| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740 |
- import { getCurrentScope as Tee, onScopeDispose as im, unref as z, getCurrentInstance as In, onMounted as _t, nextTick as Bt, ref as ee, readonly as Pee, watch as me, defineComponent as ae, openBlock as be, createElementBlock as Ue, createElementVNode as tt, warn as oxe, computed as V, watchEffect as Vt, onBeforeUnmount as Qt, inject as et, isRef as Vs, shallowRef as ve, onBeforeMount as $ee, provide as Et, mergeProps as Xn, renderSlot as ln, toRef as Lr, onUnmounted as qu, useAttrs as sxe, useSlots as D_, createCommentVNode as Ot, Fragment as Wt, normalizeClass as Ge, createBlock as Je, withCtx as ke, resolveDynamicComponent as As, withModifiers as ai, createVNode as D, toDisplayString as xi, normalizeStyle as dr, withDirectives as Sr, cloneVNode as ku, Text as KT, Comment as Aee, Teleport as R_, Transition as mo, vShow as ho, onDeactivated as lxe, reactive as zn, toRaw as es, vModelCheckbox as Bw, createTextVNode as On, toRefs as k_, vModelRadio as Eee, toHandlers as uxe, renderList as hh, withKeys as gF, h as ff, createSlots as cxe, resolveComponent as br, onUpdated as rp, isVNode as df, triggerRef as fxe, resolveDirective as dxe, render as Ih, onBeforeUpdate as Mee, TransitionGroup as X4, onActivated as hxe, createApp as pxe, pushScopeId as JT, popScopeId as e2 } from "vue";
- var kr = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t[t.BASIC_PATH = 2] = "BASIC_PATH", t[t.VIEW_CODE = 3] = "VIEW_CODE", t))(kr || {});
- const mu = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
- const a = t == null ? void 0 : t(i);
- if (n === !1 || !a)
- return e == null ? void 0 : e(i);
- };
- var mF;
- const Fr = typeof window < "u", vxe = (t) => typeof t == "string", Iee = () => {
- }, gxe = Fr && ((mF = window == null ? void 0 : window.navigator) == null ? void 0 : mF.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
- function Y4(t) {
- return typeof t == "function" ? t() : z(t);
- }
- function mxe(t) {
- return t;
- }
- function t2(t) {
- return Tee() ? (im(t), !0) : !1;
- }
- function yxe(t, e = !0) {
- In() ? _t(t) : e ? t() : Bt(t);
- }
- function yF(t, e, n = {}) {
- const {
- immediate: r = !0
- } = n, i = ee(!1);
- let a = null;
- function o() {
- a && (clearTimeout(a), a = null);
- }
- function s() {
- i.value = !1, o();
- }
- function l(...u) {
- o(), i.value = !0, a = setTimeout(() => {
- i.value = !1, a = null, t(...u);
- }, Y4(e));
- }
- return r && (i.value = !0, Fr && l()), t2(s), {
- isPending: Pee(i),
- start: l,
- stop: s
- };
- }
- function zc(t) {
- var e;
- const n = Y4(t);
- return (e = n == null ? void 0 : n.$el) != null ? e : n;
- }
- const q4 = Fr ? window : void 0;
- function Iy(...t) {
- let e, n, r, i;
- if (vxe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = q4) : [e, n, r, i] = t, !e)
- return Iee;
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
- const a = [], o = () => {
- a.forEach((c) => c()), a.length = 0;
- }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = me(() => [zc(e), Y4(i)], ([c, f]) => {
- o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
- }, { immediate: !0, flush: "post" }), u = () => {
- l(), o();
- };
- return t2(u), u;
- }
- let bF = !1;
- function bxe(t, e, n = {}) {
- const { window: r = q4, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
- if (!r)
- return;
- gxe && !bF && (bF = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", Iee)));
- let s = !0;
- const l = (d) => i.some((h) => {
- if (typeof h == "string")
- return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
- {
- const p = zc(h);
- return p && (d.target === p || d.composedPath().includes(p));
- }
- }), c = [
- Iy(r, "click", (d) => {
- const h = zc(t);
- if (!(!h || h === d.target || d.composedPath().includes(h))) {
- if (d.detail === 0 && (s = !l(d)), !s) {
- s = !0;
- return;
- }
- e(d);
- }
- }, { passive: !0, capture: a }),
- Iy(r, "pointerdown", (d) => {
- const h = zc(t);
- h && (s = !d.composedPath().includes(h) && !l(d));
- }, { passive: !0 }),
- o && Iy(r, "blur", (d) => {
- var h;
- const p = zc(t);
- ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
- })
- ].filter(Boolean);
- return () => c.forEach((d) => d());
- }
- function _xe(t, e = !1) {
- const n = ee(), r = () => n.value = !!t();
- return r(), yxe(r, e), n;
- }
- const _F = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, OF = "__vueuse_ssr_handlers__";
- _F[OF] = _F[OF] || {};
- var SF = Object.getOwnPropertySymbols, Oxe = Object.prototype.hasOwnProperty, Sxe = Object.prototype.propertyIsEnumerable, xxe = (t, e) => {
- var n = {};
- for (var r in t)
- Oxe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && SF)
- for (var r of SF(t))
- e.indexOf(r) < 0 && Sxe.call(t, r) && (n[r] = t[r]);
- return n;
- };
- function wxe(t, e, n = {}) {
- const r = n, { window: i = q4 } = r, a = xxe(r, ["window"]);
- let o;
- const s = _xe(() => i && "ResizeObserver" in i), l = () => {
- o && (o.disconnect(), o = void 0);
- }, u = me(() => zc(t), (f) => {
- l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
- }, { immediate: !0, flush: "post" }), c = () => {
- l(), u();
- };
- return t2(c), {
- isSupported: s,
- stop: c
- };
- }
- var xF;
- (function(t) {
- t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
- })(xF || (xF = {}));
- var Cxe = Object.defineProperty, wF = Object.getOwnPropertySymbols, Txe = Object.prototype.hasOwnProperty, Pxe = Object.prototype.propertyIsEnumerable, CF = (t, e, n) => e in t ? Cxe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $xe = (t, e) => {
- for (var n in e || (e = {}))
- Txe.call(e, n) && CF(t, n, e[n]);
- if (wF)
- for (var n of wF(e))
- Pxe.call(e, n) && CF(t, n, e[n]);
- return t;
- };
- const Axe = {
- easeInSine: [0.12, 0, 0.39, 0],
- easeOutSine: [0.61, 1, 0.88, 1],
- easeInOutSine: [0.37, 0, 0.63, 1],
- easeInQuad: [0.11, 0, 0.5, 0],
- easeOutQuad: [0.5, 1, 0.89, 1],
- easeInOutQuad: [0.45, 0, 0.55, 1],
- easeInCubic: [0.32, 0, 0.67, 0],
- easeOutCubic: [0.33, 1, 0.68, 1],
- easeInOutCubic: [0.65, 0, 0.35, 1],
- easeInQuart: [0.5, 0, 0.75, 0],
- easeOutQuart: [0.25, 1, 0.5, 1],
- easeInOutQuart: [0.76, 0, 0.24, 1],
- easeInQuint: [0.64, 0, 0.78, 0],
- easeOutQuint: [0.22, 1, 0.36, 1],
- easeInOutQuint: [0.83, 0, 0.17, 1],
- easeInExpo: [0.7, 0, 0.84, 0],
- easeOutExpo: [0.16, 1, 0.3, 1],
- easeInOutExpo: [0.87, 0, 0.13, 1],
- easeInCirc: [0.55, 0, 1, 0.45],
- easeOutCirc: [0, 0.55, 0.45, 1],
- easeInOutCirc: [0.85, 0, 0.15, 1],
- easeInBack: [0.36, 0, 0.66, -0.56],
- easeOutBack: [0.34, 1.56, 0.64, 1],
- easeInOutBack: [0.68, -0.6, 0.32, 1.6]
- };
- $xe({
- linear: mxe
- }, Axe);
- const Exe = () => Fr && /firefox/i.test(window.navigator.userAgent), K4 = (t) => {
- let e, n;
- return t.type === "touchend" ? (n = t.changedTouches[0].clientY, e = t.changedTouches[0].clientX) : t.type.startsWith("touch") ? (n = t.touches[0].clientY, e = t.touches[0].clientX) : (n = t.clientY, e = t.clientX), {
- clientX: e,
- clientY: n
- };
- };
- /**
- * @vue/shared v3.4.31
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
- * @license MIT
- **/
- process.env.NODE_ENV !== "production" && Object.freeze({});
- process.env.NODE_ENV !== "production" && Object.freeze([]);
- const Kc = () => {
- }, Mxe = Object.prototype.hasOwnProperty, Dh = (t, e) => Mxe.call(t, e), dg = Array.isArray, Jd = (t) => typeof t == "function", ia = (t) => typeof t == "string", Rh = (t) => t !== null && typeof t == "object", Ixe = (t) => {
- const e = /* @__PURE__ */ Object.create(null);
- return (n) => e[n] || (e[n] = t(n));
- }, Dxe = /-(\w)/g, Rxe = Ixe((t) => t.replace(Dxe, (e, n) => n ? n.toUpperCase() : ""));
- var Dee = typeof global == "object" && global && global.Object === Object && global, kxe = typeof self == "object" && self && self.Object === Object && self, Ys = Dee || kxe || Function("return this")(), ts = Ys.Symbol, Ree = Object.prototype, Lxe = Ree.hasOwnProperty, Nxe = Ree.toString, p0 = ts ? ts.toStringTag : void 0;
- function Bxe(t) {
- var e = Lxe.call(t, p0), n = t[p0];
- try {
- t[p0] = void 0;
- var r = !0;
- } catch {
- }
- var i = Nxe.call(t);
- return r && (e ? t[p0] = n : delete t[p0]), i;
- }
- var zxe = Object.prototype, Vxe = zxe.toString;
- function Fxe(t) {
- return Vxe.call(t);
- }
- var Wxe = "[object Null]", Qxe = "[object Undefined]", TF = ts ? ts.toStringTag : void 0;
- function Ef(t) {
- return t == null ? t === void 0 ? Qxe : Wxe : TF && TF in Object(t) ? Bxe(t) : Fxe(t);
- }
- function Fs(t) {
- return t != null && typeof t == "object";
- }
- var Hxe = "[object Symbol]";
- function n2(t) {
- return typeof t == "symbol" || Fs(t) && Ef(t) == Hxe;
- }
- function r2(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
- i[n] = e(t[n], n, t);
- return i;
- }
- var za = Array.isArray, Gxe = 1 / 0, PF = ts ? ts.prototype : void 0, $F = PF ? PF.toString : void 0;
- function kee(t) {
- if (typeof t == "string")
- return t;
- if (za(t))
- return r2(t, kee) + "";
- if (n2(t))
- return $F ? $F.call(t) : "";
- var e = t + "";
- return e == "0" && 1 / t == -Gxe ? "-0" : e;
- }
- var jxe = /\s/;
- function Zxe(t) {
- for (var e = t.length; e-- && jxe.test(t.charAt(e)); )
- ;
- return e;
- }
- var Uxe = /^\s+/;
- function Xxe(t) {
- return t && t.slice(0, Zxe(t) + 1).replace(Uxe, "");
- }
- function Ti(t) {
- var e = typeof t;
- return t != null && (e == "object" || e == "function");
- }
- var AF = NaN, Yxe = /^[-+]0x[0-9a-f]+$/i, qxe = /^0b[01]+$/i, Kxe = /^0o[0-7]+$/i, Jxe = parseInt;
- function WD(t) {
- if (typeof t == "number")
- return t;
- if (n2(t))
- return AF;
- if (Ti(t)) {
- var e = typeof t.valueOf == "function" ? t.valueOf() : t;
- t = Ti(e) ? e + "" : e;
- }
- if (typeof t != "string")
- return t === 0 ? t : +t;
- t = Xxe(t);
- var n = qxe.test(t);
- return n || Kxe.test(t) ? Jxe(t.slice(2), n ? 2 : 8) : Yxe.test(t) ? AF : +t;
- }
- var EF = 1 / 0, ewe = 17976931348623157e292;
- function twe(t) {
- if (!t)
- return t === 0 ? t : 0;
- if (t = WD(t), t === EF || t === -EF) {
- var e = t < 0 ? -1 : 1;
- return e * ewe;
- }
- return t === t ? t : 0;
- }
- function nwe(t) {
- var e = twe(t), n = e % 1;
- return e === e ? n ? e - n : e : 0;
- }
- function J4(t) {
- return t;
- }
- var rwe = "[object AsyncFunction]", iwe = "[object Function]", awe = "[object GeneratorFunction]", owe = "[object Proxy]";
- function eN(t) {
- if (!Ti(t))
- return !1;
- var e = Ef(t);
- return e == iwe || e == awe || e == rwe || e == owe;
- }
- var RA = Ys["__core-js_shared__"], MF = function() {
- var t = /[^.]+$/.exec(RA && RA.keys && RA.keys.IE_PROTO || "");
- return t ? "Symbol(src)_1." + t : "";
- }();
- function swe(t) {
- return !!MF && MF in t;
- }
- var lwe = Function.prototype, uwe = lwe.toString;
- function ip(t) {
- if (t != null) {
- try {
- return uwe.call(t);
- } catch {
- }
- try {
- return t + "";
- } catch {
- }
- }
- return "";
- }
- var cwe = /[\\^$.*+?()[\]{}|]/g, fwe = /^\[object .+?Constructor\]$/, dwe = Function.prototype, hwe = Object.prototype, pwe = dwe.toString, vwe = hwe.hasOwnProperty, gwe = RegExp(
- "^" + pwe.call(vwe).replace(cwe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- );
- function mwe(t) {
- if (!Ti(t) || swe(t))
- return !1;
- var e = eN(t) ? gwe : fwe;
- return e.test(ip(t));
- }
- function ywe(t, e) {
- return t == null ? void 0 : t[e];
- }
- function ap(t, e) {
- var n = ywe(t, e);
- return mwe(n) ? n : void 0;
- }
- var QD = ap(Ys, "WeakMap"), IF = Object.create, bwe = /* @__PURE__ */ function() {
- function t() {
- }
- return function(e) {
- if (!Ti(e))
- return {};
- if (IF)
- return IF(e);
- t.prototype = e;
- var n = new t();
- return t.prototype = void 0, n;
- };
- }();
- function Lee(t, e, n) {
- switch (n.length) {
- case 0:
- return t.call(e);
- case 1:
- return t.call(e, n[0]);
- case 2:
- return t.call(e, n[0], n[1]);
- case 3:
- return t.call(e, n[0], n[1], n[2]);
- }
- return t.apply(e, n);
- }
- function _we() {
- }
- function Nee(t, e) {
- var n = -1, r = t.length;
- for (e || (e = Array(r)); ++n < r; )
- e[n] = t[n];
- return e;
- }
- var Owe = 800, Swe = 16, xwe = Date.now;
- function wwe(t) {
- var e = 0, n = 0;
- return function() {
- var r = xwe(), i = Swe - (r - n);
- if (n = r, i > 0) {
- if (++e >= Owe)
- return arguments[0];
- } else
- e = 0;
- return t.apply(void 0, arguments);
- };
- }
- function Cwe(t) {
- return function() {
- return t;
- };
- }
- var zw = function() {
- try {
- var t = ap(Object, "defineProperty");
- return t({}, "", {}), t;
- } catch {
- }
- }(), Twe = zw ? function(t, e) {
- return zw(t, "toString", {
- configurable: !0,
- enumerable: !1,
- value: Cwe(e),
- writable: !0
- });
- } : J4, Bee = wwe(Twe);
- function Pwe(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
- ;
- return t;
- }
- function zee(t, e, n, r) {
- for (var i = t.length, a = n + -1; ++a < i; )
- if (e(t[a], a, t))
- return a;
- return -1;
- }
- function $we(t) {
- return t !== t;
- }
- function Awe(t, e, n) {
- for (var r = n - 1, i = t.length; ++r < i; )
- if (t[r] === e)
- return r;
- return -1;
- }
- function Ewe(t, e, n) {
- return e === e ? Awe(t, e, n) : zee(t, $we, n);
- }
- function Vee(t, e) {
- var n = t == null ? 0 : t.length;
- return !!n && Ewe(t, e, 0) > -1;
- }
- var Mwe = 9007199254740991, Iwe = /^(?:0|[1-9]\d*)$/;
- function i2(t, e) {
- var n = typeof t;
- return e = e ?? Mwe, !!e && (n == "number" || n != "symbol" && Iwe.test(t)) && t > -1 && t % 1 == 0 && t < e;
- }
- function tN(t, e, n) {
- e == "__proto__" && zw ? zw(t, e, {
- configurable: !0,
- enumerable: !0,
- value: n,
- writable: !0
- }) : t[e] = n;
- }
- function L_(t, e) {
- return t === e || t !== t && e !== e;
- }
- var Dwe = Object.prototype, Rwe = Dwe.hasOwnProperty;
- function nN(t, e, n) {
- var r = t[e];
- (!(Rwe.call(t, e) && L_(r, n)) || n === void 0 && !(e in t)) && tN(t, e, n);
- }
- function am(t, e, n, r) {
- var i = !n;
- n || (n = {});
- for (var a = -1, o = e.length; ++a < o; ) {
- var s = e[a], l = void 0;
- l === void 0 && (l = t[s]), i ? tN(n, s, l) : nN(n, s, l);
- }
- return n;
- }
- var DF = Math.max;
- function Fee(t, e, n) {
- return e = DF(e === void 0 ? t.length - 1 : e, 0), function() {
- for (var r = arguments, i = -1, a = DF(r.length - e, 0), o = Array(a); ++i < a; )
- o[i] = r[e + i];
- i = -1;
- for (var s = Array(e + 1); ++i < e; )
- s[i] = r[i];
- return s[e] = n(o), Lee(t, this, s);
- };
- }
- function rN(t, e) {
- return Bee(Fee(t, e, J4), t + "");
- }
- var kwe = 9007199254740991;
- function iN(t) {
- return typeof t == "number" && t > -1 && t % 1 == 0 && t <= kwe;
- }
- function om(t) {
- return t != null && iN(t.length) && !eN(t);
- }
- function Lwe(t, e, n) {
- if (!Ti(n))
- return !1;
- var r = typeof e;
- return (r == "number" ? om(n) && i2(e, n.length) : r == "string" && e in n) ? L_(n[e], t) : !1;
- }
- function Nwe(t) {
- return rN(function(e, n) {
- var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
- for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && Lwe(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
- var s = n[r];
- s && t(e, s, r, a);
- }
- return e;
- });
- }
- var Bwe = Object.prototype;
- function a2(t) {
- var e = t && t.constructor, n = typeof e == "function" && e.prototype || Bwe;
- return t === n;
- }
- function zwe(t, e) {
- for (var n = -1, r = Array(t); ++n < t; )
- r[n] = e(n);
- return r;
- }
- var Vwe = "[object Arguments]";
- function RF(t) {
- return Fs(t) && Ef(t) == Vwe;
- }
- var Wee = Object.prototype, Fwe = Wee.hasOwnProperty, Wwe = Wee.propertyIsEnumerable, hg = RF(/* @__PURE__ */ function() {
- return arguments;
- }()) ? RF : function(t) {
- return Fs(t) && Fwe.call(t, "callee") && !Wwe.call(t, "callee");
- };
- function Qwe() {
- return !1;
- }
- var Qee = typeof exports == "object" && exports && !exports.nodeType && exports, kF = Qee && typeof module == "object" && module && !module.nodeType && module, Hwe = kF && kF.exports === Qee, LF = Hwe ? Ys.Buffer : void 0, Gwe = LF ? LF.isBuffer : void 0, pg = Gwe || Qwe, jwe = "[object Arguments]", Zwe = "[object Array]", Uwe = "[object Boolean]", Xwe = "[object Date]", Ywe = "[object Error]", qwe = "[object Function]", Kwe = "[object Map]", Jwe = "[object Number]", eCe = "[object Object]", tCe = "[object RegExp]", nCe = "[object Set]", rCe = "[object String]", iCe = "[object WeakMap]", aCe = "[object ArrayBuffer]", oCe = "[object DataView]", sCe = "[object Float32Array]", lCe = "[object Float64Array]", uCe = "[object Int8Array]", cCe = "[object Int16Array]", fCe = "[object Int32Array]", dCe = "[object Uint8Array]", hCe = "[object Uint8ClampedArray]", pCe = "[object Uint16Array]", vCe = "[object Uint32Array]", Kn = {};
- Kn[sCe] = Kn[lCe] = Kn[uCe] = Kn[cCe] = Kn[fCe] = Kn[dCe] = Kn[hCe] = Kn[pCe] = Kn[vCe] = !0;
- Kn[jwe] = Kn[Zwe] = Kn[aCe] = Kn[Uwe] = Kn[oCe] = Kn[Xwe] = Kn[Ywe] = Kn[qwe] = Kn[Kwe] = Kn[Jwe] = Kn[eCe] = Kn[tCe] = Kn[nCe] = Kn[rCe] = Kn[iCe] = !1;
- function gCe(t) {
- return Fs(t) && iN(t.length) && !!Kn[Ef(t)];
- }
- function o2(t) {
- return function(e) {
- return t(e);
- };
- }
- var Hee = typeof exports == "object" && exports && !exports.nodeType && exports, Dy = Hee && typeof module == "object" && module && !module.nodeType && module, mCe = Dy && Dy.exports === Hee, kA = mCe && Dee.process, vg = function() {
- try {
- var t = Dy && Dy.require && Dy.require("util").types;
- return t || kA && kA.binding && kA.binding("util");
- } catch {
- }
- }(), NF = vg && vg.isTypedArray, s2 = NF ? o2(NF) : gCe, yCe = Object.prototype, bCe = yCe.hasOwnProperty;
- function Gee(t, e) {
- var n = za(t), r = !n && hg(t), i = !n && !r && pg(t), a = !n && !r && !i && s2(t), o = n || r || i || a, s = o ? zwe(t.length, String) : [], l = s.length;
- for (var u in t)
- (e || bCe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
- (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
- i2(u, l))) && s.push(u);
- return s;
- }
- function jee(t, e) {
- return function(n) {
- return t(e(n));
- };
- }
- var _Ce = jee(Object.keys, Object), OCe = Object.prototype, SCe = OCe.hasOwnProperty;
- function Zee(t) {
- if (!a2(t))
- return _Ce(t);
- var e = [];
- for (var n in Object(t))
- SCe.call(t, n) && n != "constructor" && e.push(n);
- return e;
- }
- function N_(t) {
- return om(t) ? Gee(t) : Zee(t);
- }
- function xCe(t) {
- var e = [];
- if (t != null)
- for (var n in Object(t))
- e.push(n);
- return e;
- }
- var wCe = Object.prototype, CCe = wCe.hasOwnProperty;
- function TCe(t) {
- if (!Ti(t))
- return xCe(t);
- var e = a2(t), n = [];
- for (var r in t)
- r == "constructor" && (e || !CCe.call(t, r)) || n.push(r);
- return n;
- }
- function B_(t) {
- return om(t) ? Gee(t, !0) : TCe(t);
- }
- var PCe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $Ce = /^\w*$/;
- function aN(t, e) {
- if (za(t))
- return !1;
- var n = typeof t;
- return n == "number" || n == "symbol" || n == "boolean" || t == null || n2(t) ? !0 : $Ce.test(t) || !PCe.test(t) || e != null && t in Object(e);
- }
- var bb = ap(Object, "create");
- function ACe() {
- this.__data__ = bb ? bb(null) : {}, this.size = 0;
- }
- function ECe(t) {
- var e = this.has(t) && delete this.__data__[t];
- return this.size -= e ? 1 : 0, e;
- }
- var MCe = "__lodash_hash_undefined__", ICe = Object.prototype, DCe = ICe.hasOwnProperty;
- function RCe(t) {
- var e = this.__data__;
- if (bb) {
- var n = e[t];
- return n === MCe ? void 0 : n;
- }
- return DCe.call(e, t) ? e[t] : void 0;
- }
- var kCe = Object.prototype, LCe = kCe.hasOwnProperty;
- function NCe(t) {
- var e = this.__data__;
- return bb ? e[t] !== void 0 : LCe.call(e, t);
- }
- var BCe = "__lodash_hash_undefined__";
- function zCe(t, e) {
- var n = this.__data__;
- return this.size += this.has(t) ? 0 : 1, n[t] = bb && e === void 0 ? BCe : e, this;
- }
- function kh(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- kh.prototype.clear = ACe;
- kh.prototype.delete = ECe;
- kh.prototype.get = RCe;
- kh.prototype.has = NCe;
- kh.prototype.set = zCe;
- function VCe() {
- this.__data__ = [], this.size = 0;
- }
- function l2(t, e) {
- for (var n = t.length; n--; )
- if (L_(t[n][0], e))
- return n;
- return -1;
- }
- var FCe = Array.prototype, WCe = FCe.splice;
- function QCe(t) {
- var e = this.__data__, n = l2(e, t);
- if (n < 0)
- return !1;
- var r = e.length - 1;
- return n == r ? e.pop() : WCe.call(e, n, 1), --this.size, !0;
- }
- function HCe(t) {
- var e = this.__data__, n = l2(e, t);
- return n < 0 ? void 0 : e[n][1];
- }
- function GCe(t) {
- return l2(this.__data__, t) > -1;
- }
- function jCe(t, e) {
- var n = this.__data__, r = l2(n, t);
- return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
- }
- function Ku(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- Ku.prototype.clear = VCe;
- Ku.prototype.delete = QCe;
- Ku.prototype.get = HCe;
- Ku.prototype.has = GCe;
- Ku.prototype.set = jCe;
- var _b = ap(Ys, "Map");
- function ZCe() {
- this.size = 0, this.__data__ = {
- hash: new kh(),
- map: new (_b || Ku)(),
- string: new kh()
- };
- }
- function UCe(t) {
- var e = typeof t;
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
- }
- function u2(t, e) {
- var n = t.__data__;
- return UCe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
- }
- function XCe(t) {
- var e = u2(this, t).delete(t);
- return this.size -= e ? 1 : 0, e;
- }
- function YCe(t) {
- return u2(this, t).get(t);
- }
- function qCe(t) {
- return u2(this, t).has(t);
- }
- function KCe(t, e) {
- var n = u2(this, t), r = n.size;
- return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
- }
- function Ju(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- Ju.prototype.clear = ZCe;
- Ju.prototype.delete = XCe;
- Ju.prototype.get = YCe;
- Ju.prototype.has = qCe;
- Ju.prototype.set = KCe;
- var JCe = "Expected a function";
- function oN(t, e) {
- if (typeof t != "function" || e != null && typeof e != "function")
- throw new TypeError(JCe);
- var n = function() {
- var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
- if (a.has(i))
- return a.get(i);
- var o = t.apply(this, r);
- return n.cache = a.set(i, o) || a, o;
- };
- return n.cache = new (oN.Cache || Ju)(), n;
- }
- oN.Cache = Ju;
- var eTe = 500;
- function tTe(t) {
- var e = oN(t, function(r) {
- return n.size === eTe && n.clear(), r;
- }), n = e.cache;
- return e;
- }
- var nTe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, rTe = /\\(\\)?/g, iTe = tTe(function(t) {
- var e = [];
- return t.charCodeAt(0) === 46 && e.push(""), t.replace(nTe, function(n, r, i, a) {
- e.push(i ? a.replace(rTe, "$1") : r || n);
- }), e;
- });
- function aTe(t) {
- return t == null ? "" : kee(t);
- }
- function sm(t, e) {
- return za(t) ? t : aN(t, e) ? [t] : iTe(aTe(t));
- }
- var oTe = 1 / 0;
- function lm(t) {
- if (typeof t == "string" || n2(t))
- return t;
- var e = t + "";
- return e == "0" && 1 / t == -oTe ? "-0" : e;
- }
- function c2(t, e) {
- e = sm(e, t);
- for (var n = 0, r = e.length; t != null && n < r; )
- t = t[lm(e[n++])];
- return n && n == r ? t : void 0;
- }
- function vn(t, e, n) {
- var r = t == null ? void 0 : c2(t, e);
- return r === void 0 ? n : r;
- }
- function sN(t, e) {
- for (var n = -1, r = e.length, i = t.length; ++n < r; )
- t[i + n] = e[n];
- return t;
- }
- var BF = ts ? ts.isConcatSpreadable : void 0;
- function sTe(t) {
- return za(t) || hg(t) || !!(BF && t && t[BF]);
- }
- function lTe(t, e, n, r, i) {
- var a = -1, o = t.length;
- for (n || (n = sTe), i || (i = []); ++a < o; ) {
- var s = t[a];
- n(s) ? sN(i, s) : i[i.length] = s;
- }
- return i;
- }
- function uTe(t) {
- var e = t == null ? 0 : t.length;
- return e ? lTe(t) : [];
- }
- function Uee(t) {
- return Bee(Fee(t, void 0, uTe), t + "");
- }
- var lN = jee(Object.getPrototypeOf, Object), cTe = "[object Object]", fTe = Function.prototype, dTe = Object.prototype, Xee = fTe.toString, hTe = dTe.hasOwnProperty, pTe = Xee.call(Object);
- function uN(t) {
- if (!Fs(t) || Ef(t) != cTe)
- return !1;
- var e = lN(t);
- if (e === null)
- return !0;
- var n = hTe.call(e, "constructor") && e.constructor;
- return typeof n == "function" && n instanceof n && Xee.call(n) == pTe;
- }
- function vTe(t, e, n) {
- var r = -1, i = t.length;
- e < 0 && (e = -e > i ? 0 : i + e), n = n > i ? i : n, n < 0 && (n += i), i = e > n ? 0 : n - e >>> 0, e >>>= 0;
- for (var a = Array(i); ++r < i; )
- a[r] = t[r + e];
- return a;
- }
- function gTe() {
- this.__data__ = new Ku(), this.size = 0;
- }
- function mTe(t) {
- var e = this.__data__, n = e.delete(t);
- return this.size = e.size, n;
- }
- function yTe(t) {
- return this.__data__.get(t);
- }
- function bTe(t) {
- return this.__data__.has(t);
- }
- var _Te = 200;
- function OTe(t, e) {
- var n = this.__data__;
- if (n instanceof Ku) {
- var r = n.__data__;
- if (!_b || r.length < _Te - 1)
- return r.push([t, e]), this.size = ++n.size, this;
- n = this.__data__ = new Ju(r);
- }
- return n.set(t, e), this.size = n.size, this;
- }
- function Rs(t) {
- var e = this.__data__ = new Ku(t);
- this.size = e.size;
- }
- Rs.prototype.clear = gTe;
- Rs.prototype.delete = mTe;
- Rs.prototype.get = yTe;
- Rs.prototype.has = bTe;
- Rs.prototype.set = OTe;
- function STe(t, e) {
- return t && am(e, N_(e), t);
- }
- function xTe(t, e) {
- return t && am(e, B_(e), t);
- }
- var Yee = typeof exports == "object" && exports && !exports.nodeType && exports, zF = Yee && typeof module == "object" && module && !module.nodeType && module, wTe = zF && zF.exports === Yee, VF = wTe ? Ys.Buffer : void 0, FF = VF ? VF.allocUnsafe : void 0;
- function qee(t, e) {
- if (e)
- return t.slice();
- var n = t.length, r = FF ? FF(n) : new t.constructor(n);
- return t.copy(r), r;
- }
- function CTe(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
- var o = t[n];
- e(o, n, t) && (a[i++] = o);
- }
- return a;
- }
- function Kee() {
- return [];
- }
- var TTe = Object.prototype, PTe = TTe.propertyIsEnumerable, WF = Object.getOwnPropertySymbols, cN = WF ? function(t) {
- return t == null ? [] : (t = Object(t), CTe(WF(t), function(e) {
- return PTe.call(t, e);
- }));
- } : Kee;
- function $Te(t, e) {
- return am(t, cN(t), e);
- }
- var ATe = Object.getOwnPropertySymbols, Jee = ATe ? function(t) {
- for (var e = []; t; )
- sN(e, cN(t)), t = lN(t);
- return e;
- } : Kee;
- function ETe(t, e) {
- return am(t, Jee(t), e);
- }
- function ete(t, e, n) {
- var r = e(t);
- return za(t) ? r : sN(r, n(t));
- }
- function HD(t) {
- return ete(t, N_, cN);
- }
- function tte(t) {
- return ete(t, B_, Jee);
- }
- var GD = ap(Ys, "DataView"), jD = ap(Ys, "Promise"), zv = ap(Ys, "Set"), QF = "[object Map]", MTe = "[object Object]", HF = "[object Promise]", GF = "[object Set]", jF = "[object WeakMap]", ZF = "[object DataView]", ITe = ip(GD), DTe = ip(_b), RTe = ip(jD), kTe = ip(zv), LTe = ip(QD), Wo = Ef;
- (GD && Wo(new GD(new ArrayBuffer(1))) != ZF || _b && Wo(new _b()) != QF || jD && Wo(jD.resolve()) != HF || zv && Wo(new zv()) != GF || QD && Wo(new QD()) != jF) && (Wo = function(t) {
- var e = Ef(t), n = e == MTe ? t.constructor : void 0, r = n ? ip(n) : "";
- if (r)
- switch (r) {
- case ITe:
- return ZF;
- case DTe:
- return QF;
- case RTe:
- return HF;
- case kTe:
- return GF;
- case LTe:
- return jF;
- }
- return e;
- });
- var NTe = Object.prototype, BTe = NTe.hasOwnProperty;
- function zTe(t) {
- var e = t.length, n = new t.constructor(e);
- return e && typeof t[0] == "string" && BTe.call(t, "index") && (n.index = t.index, n.input = t.input), n;
- }
- var Vw = Ys.Uint8Array;
- function fN(t) {
- var e = new t.constructor(t.byteLength);
- return new Vw(e).set(new Vw(t)), e;
- }
- function VTe(t, e) {
- var n = e ? fN(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.byteLength);
- }
- var FTe = /\w*$/;
- function WTe(t) {
- var e = new t.constructor(t.source, FTe.exec(t));
- return e.lastIndex = t.lastIndex, e;
- }
- var UF = ts ? ts.prototype : void 0, XF = UF ? UF.valueOf : void 0;
- function QTe(t) {
- return XF ? Object(XF.call(t)) : {};
- }
- function nte(t, e) {
- var n = e ? fN(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.length);
- }
- var HTe = "[object Boolean]", GTe = "[object Date]", jTe = "[object Map]", ZTe = "[object Number]", UTe = "[object RegExp]", XTe = "[object Set]", YTe = "[object String]", qTe = "[object Symbol]", KTe = "[object ArrayBuffer]", JTe = "[object DataView]", e2e = "[object Float32Array]", t2e = "[object Float64Array]", n2e = "[object Int8Array]", r2e = "[object Int16Array]", i2e = "[object Int32Array]", a2e = "[object Uint8Array]", o2e = "[object Uint8ClampedArray]", s2e = "[object Uint16Array]", l2e = "[object Uint32Array]";
- function u2e(t, e, n) {
- var r = t.constructor;
- switch (e) {
- case KTe:
- return fN(t);
- case HTe:
- case GTe:
- return new r(+t);
- case JTe:
- return VTe(t, n);
- case e2e:
- case t2e:
- case n2e:
- case r2e:
- case i2e:
- case a2e:
- case o2e:
- case s2e:
- case l2e:
- return nte(t, n);
- case jTe:
- return new r();
- case ZTe:
- case YTe:
- return new r(t);
- case UTe:
- return WTe(t);
- case XTe:
- return new r();
- case qTe:
- return QTe(t);
- }
- }
- function rte(t) {
- return typeof t.constructor == "function" && !a2(t) ? bwe(lN(t)) : {};
- }
- var c2e = "[object Map]";
- function f2e(t) {
- return Fs(t) && Wo(t) == c2e;
- }
- var YF = vg && vg.isMap, d2e = YF ? o2(YF) : f2e, h2e = "[object Set]";
- function p2e(t) {
- return Fs(t) && Wo(t) == h2e;
- }
- var qF = vg && vg.isSet, v2e = qF ? o2(qF) : p2e, g2e = 1, m2e = 2, y2e = 4, ite = "[object Arguments]", b2e = "[object Array]", _2e = "[object Boolean]", O2e = "[object Date]", S2e = "[object Error]", ate = "[object Function]", x2e = "[object GeneratorFunction]", w2e = "[object Map]", C2e = "[object Number]", ote = "[object Object]", T2e = "[object RegExp]", P2e = "[object Set]", $2e = "[object String]", A2e = "[object Symbol]", E2e = "[object WeakMap]", M2e = "[object ArrayBuffer]", I2e = "[object DataView]", D2e = "[object Float32Array]", R2e = "[object Float64Array]", k2e = "[object Int8Array]", L2e = "[object Int16Array]", N2e = "[object Int32Array]", B2e = "[object Uint8Array]", z2e = "[object Uint8ClampedArray]", V2e = "[object Uint16Array]", F2e = "[object Uint32Array]", Zn = {};
- Zn[ite] = Zn[b2e] = Zn[M2e] = Zn[I2e] = Zn[_2e] = Zn[O2e] = Zn[D2e] = Zn[R2e] = Zn[k2e] = Zn[L2e] = Zn[N2e] = Zn[w2e] = Zn[C2e] = Zn[ote] = Zn[T2e] = Zn[P2e] = Zn[$2e] = Zn[A2e] = Zn[B2e] = Zn[z2e] = Zn[V2e] = Zn[F2e] = !0;
- Zn[S2e] = Zn[ate] = Zn[E2e] = !1;
- function Ry(t, e, n, r, i, a) {
- var o, s = e & g2e, l = e & m2e, u = e & y2e;
- if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
- return o;
- if (!Ti(t))
- return t;
- var c = za(t);
- if (c) {
- if (o = zTe(t), !s)
- return Nee(t, o);
- } else {
- var f = Wo(t), d = f == ate || f == x2e;
- if (pg(t))
- return qee(t, s);
- if (f == ote || f == ite || d && !i) {
- if (o = l || d ? {} : rte(t), !s)
- return l ? ETe(t, xTe(o, t)) : $Te(t, STe(o, t));
- } else {
- if (!Zn[f])
- return i ? t : {};
- o = u2e(t, f, s);
- }
- }
- a || (a = new Rs());
- var h = a.get(t);
- if (h)
- return h;
- a.set(t, o), v2e(t) ? t.forEach(function(g) {
- o.add(Ry(g, e, n, g, t, a));
- }) : d2e(t) && t.forEach(function(g, m) {
- o.set(m, Ry(g, e, n, m, t, a));
- });
- var p = u ? l ? tte : HD : l ? B_ : N_, v = c ? void 0 : p(t);
- return Pwe(v || t, function(g, m) {
- v && (m = g, g = t[m]), nN(o, m, Ry(g, e, n, m, t, a));
- }), o;
- }
- var W2e = 1, Q2e = 4;
- function ph(t) {
- return Ry(t, W2e | Q2e);
- }
- var H2e = "__lodash_hash_undefined__";
- function G2e(t) {
- return this.__data__.set(t, H2e), this;
- }
- function j2e(t) {
- return this.__data__.has(t);
- }
- function gg(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.__data__ = new Ju(); ++e < n; )
- this.add(t[e]);
- }
- gg.prototype.add = gg.prototype.push = G2e;
- gg.prototype.has = j2e;
- function Z2e(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
- if (e(t[n], n, t))
- return !0;
- return !1;
- }
- function Fw(t, e) {
- return t.has(e);
- }
- var U2e = 1, X2e = 2;
- function ste(t, e, n, r, i, a) {
- var o = n & U2e, s = t.length, l = e.length;
- if (s != l && !(o && l > s))
- return !1;
- var u = a.get(t), c = a.get(e);
- if (u && c)
- return u == e && c == t;
- var f = -1, d = !0, h = n & X2e ? new gg() : void 0;
- for (a.set(t, e), a.set(e, t); ++f < s; ) {
- var p = t[f], v = e[f];
- if (r)
- var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
- if (g !== void 0) {
- if (g)
- continue;
- d = !1;
- break;
- }
- if (h) {
- if (!Z2e(e, function(m, y) {
- if (!Fw(h, y) && (p === m || i(p, m, n, r, a)))
- return h.push(y);
- })) {
- d = !1;
- break;
- }
- } else if (!(p === v || i(p, v, n, r, a))) {
- d = !1;
- break;
- }
- }
- return a.delete(t), a.delete(e), d;
- }
- function Y2e(t) {
- var e = -1, n = Array(t.size);
- return t.forEach(function(r, i) {
- n[++e] = [i, r];
- }), n;
- }
- function dN(t) {
- var e = -1, n = Array(t.size);
- return t.forEach(function(r) {
- n[++e] = r;
- }), n;
- }
- var q2e = 1, K2e = 2, J2e = "[object Boolean]", ePe = "[object Date]", tPe = "[object Error]", nPe = "[object Map]", rPe = "[object Number]", iPe = "[object RegExp]", aPe = "[object Set]", oPe = "[object String]", sPe = "[object Symbol]", lPe = "[object ArrayBuffer]", uPe = "[object DataView]", KF = ts ? ts.prototype : void 0, LA = KF ? KF.valueOf : void 0;
- function cPe(t, e, n, r, i, a, o) {
- switch (n) {
- case uPe:
- if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
- return !1;
- t = t.buffer, e = e.buffer;
- case lPe:
- return !(t.byteLength != e.byteLength || !a(new Vw(t), new Vw(e)));
- case J2e:
- case ePe:
- case rPe:
- return L_(+t, +e);
- case tPe:
- return t.name == e.name && t.message == e.message;
- case iPe:
- case oPe:
- return t == e + "";
- case nPe:
- var s = Y2e;
- case aPe:
- var l = r & q2e;
- if (s || (s = dN), t.size != e.size && !l)
- return !1;
- var u = o.get(t);
- if (u)
- return u == e;
- r |= K2e, o.set(t, e);
- var c = ste(s(t), s(e), r, i, a, o);
- return o.delete(t), c;
- case sPe:
- if (LA)
- return LA.call(t) == LA.call(e);
- }
- return !1;
- }
- var fPe = 1, dPe = Object.prototype, hPe = dPe.hasOwnProperty;
- function pPe(t, e, n, r, i, a) {
- var o = n & fPe, s = HD(t), l = s.length, u = HD(e), c = u.length;
- if (l != c && !o)
- return !1;
- for (var f = l; f--; ) {
- var d = s[f];
- if (!(o ? d in e : hPe.call(e, d)))
- return !1;
- }
- var h = a.get(t), p = a.get(e);
- if (h && p)
- return h == e && p == t;
- var v = !0;
- a.set(t, e), a.set(e, t);
- for (var g = o; ++f < l; ) {
- d = s[f];
- var m = t[d], y = e[d];
- if (r)
- var _ = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
- if (!(_ === void 0 ? m === y || i(m, y, n, r, a) : _)) {
- v = !1;
- break;
- }
- g || (g = d == "constructor");
- }
- if (v && !g) {
- var O = t.constructor, S = e.constructor;
- O != S && "constructor" in t && "constructor" in e && !(typeof O == "function" && O instanceof O && typeof S == "function" && S instanceof S) && (v = !1);
- }
- return a.delete(t), a.delete(e), v;
- }
- var vPe = 1, JF = "[object Arguments]", eW = "[object Array]", IO = "[object Object]", gPe = Object.prototype, tW = gPe.hasOwnProperty;
- function mPe(t, e, n, r, i, a) {
- var o = za(t), s = za(e), l = o ? eW : Wo(t), u = s ? eW : Wo(e);
- l = l == JF ? IO : l, u = u == JF ? IO : u;
- var c = l == IO, f = u == IO, d = l == u;
- if (d && pg(t)) {
- if (!pg(e))
- return !1;
- o = !0, c = !1;
- }
- if (d && !c)
- return a || (a = new Rs()), o || s2(t) ? ste(t, e, n, r, i, a) : cPe(t, e, l, n, r, i, a);
- if (!(n & vPe)) {
- var h = c && tW.call(t, "__wrapped__"), p = f && tW.call(e, "__wrapped__");
- if (h || p) {
- var v = h ? t.value() : t, g = p ? e.value() : e;
- return a || (a = new Rs()), i(v, g, n, r, a);
- }
- }
- return d ? (a || (a = new Rs()), pPe(t, e, n, r, i, a)) : !1;
- }
- function f2(t, e, n, r, i) {
- return t === e ? !0 : t == null || e == null || !Fs(t) && !Fs(e) ? t !== t && e !== e : mPe(t, e, n, r, f2, i);
- }
- var yPe = 1, bPe = 2;
- function _Pe(t, e, n, r) {
- var i = n.length, a = i;
- if (t == null)
- return !a;
- for (t = Object(t); i--; ) {
- var o = n[i];
- if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
- return !1;
- }
- for (; ++i < a; ) {
- o = n[i];
- var s = o[0], l = t[s], u = o[1];
- if (o[2]) {
- if (l === void 0 && !(s in t))
- return !1;
- } else {
- var c = new Rs(), f;
- if (!(f === void 0 ? f2(u, l, yPe | bPe, r, c) : f))
- return !1;
- }
- }
- return !0;
- }
- function lte(t) {
- return t === t && !Ti(t);
- }
- function OPe(t) {
- for (var e = N_(t), n = e.length; n--; ) {
- var r = e[n], i = t[r];
- e[n] = [r, i, lte(i)];
- }
- return e;
- }
- function ute(t, e) {
- return function(n) {
- return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
- };
- }
- function SPe(t) {
- var e = OPe(t);
- return e.length == 1 && e[0][2] ? ute(e[0][0], e[0][1]) : function(n) {
- return n === t || _Pe(n, t, e);
- };
- }
- function xPe(t, e) {
- return t != null && e in Object(t);
- }
- function wPe(t, e, n) {
- e = sm(e, t);
- for (var r = -1, i = e.length, a = !1; ++r < i; ) {
- var o = lm(e[r]);
- if (!(a = t != null && n(t, o)))
- break;
- t = t[o];
- }
- return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && iN(i) && i2(o, i) && (za(t) || hg(t)));
- }
- function cte(t, e) {
- return t != null && wPe(t, e, xPe);
- }
- var CPe = 1, TPe = 2;
- function PPe(t, e) {
- return aN(t) && lte(e) ? ute(lm(t), e) : function(n) {
- var r = vn(n, t);
- return r === void 0 && r === e ? cte(n, t) : f2(e, r, CPe | TPe);
- };
- }
- function $Pe(t) {
- return function(e) {
- return e == null ? void 0 : e[t];
- };
- }
- function APe(t) {
- return function(e) {
- return c2(e, t);
- };
- }
- function EPe(t) {
- return aN(t) ? $Pe(lm(t)) : APe(t);
- }
- function fte(t) {
- return typeof t == "function" ? t : t == null ? J4 : typeof t == "object" ? za(t) ? PPe(t[0], t[1]) : SPe(t) : EPe(t);
- }
- function MPe(t) {
- return function(e, n, r) {
- for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
- var l = o[++i];
- if (n(a[l], l, a) === !1)
- break;
- }
- return e;
- };
- }
- var IPe = MPe(), NA = function() {
- return Ys.Date.now();
- }, DPe = "Expected a function", RPe = Math.max, kPe = Math.min;
- function hN(t, e, n) {
- var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
- if (typeof t != "function")
- throw new TypeError(DPe);
- e = WD(e) || 0, Ti(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? RPe(WD(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
- function h(x) {
- var C = r, P = i;
- return r = i = void 0, u = x, o = t.apply(P, C), o;
- }
- function p(x) {
- return u = x, s = setTimeout(m, e), c ? h(x) : o;
- }
- function v(x) {
- var C = x - l, P = x - u, $ = e - C;
- return f ? kPe($, a - P) : $;
- }
- function g(x) {
- var C = x - l, P = x - u;
- return l === void 0 || C >= e || C < 0 || f && P >= a;
- }
- function m() {
- var x = NA();
- if (g(x))
- return y(x);
- s = setTimeout(m, v(x));
- }
- function y(x) {
- return s = void 0, d && r ? h(x) : (r = i = void 0, o);
- }
- function _() {
- s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
- }
- function O() {
- return s === void 0 ? o : y(NA());
- }
- function S() {
- var x = NA(), C = g(x);
- if (r = arguments, i = this, l = x, C) {
- if (s === void 0)
- return p(l);
- if (f)
- return clearTimeout(s), s = setTimeout(m, e), h(l);
- }
- return s === void 0 && (s = setTimeout(m, e)), o;
- }
- return S.cancel = _, S.flush = O, S;
- }
- function ZD(t, e, n) {
- (n !== void 0 && !L_(t[e], n) || n === void 0 && !(e in t)) && tN(t, e, n);
- }
- function dte(t) {
- return Fs(t) && om(t);
- }
- function UD(t, e) {
- if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
- return t[e];
- }
- function LPe(t) {
- return am(t, B_(t));
- }
- function NPe(t, e, n, r, i, a, o) {
- var s = UD(t, n), l = UD(e, n), u = o.get(l);
- if (u) {
- ZD(t, n, u);
- return;
- }
- var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
- if (f) {
- var d = za(l), h = !d && pg(l), p = !d && !h && s2(l);
- c = l, d || h || p ? za(s) ? c = s : dte(s) ? c = Nee(s) : h ? (f = !1, c = qee(l, !0)) : p ? (f = !1, c = nte(l, !0)) : c = [] : uN(l) || hg(l) ? (c = s, hg(s) ? c = LPe(s) : (!Ti(s) || eN(s)) && (c = rte(l))) : f = !1;
- }
- f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), ZD(t, n, c);
- }
- function pN(t, e, n, r, i) {
- t !== e && IPe(e, function(a, o) {
- if (i || (i = new Rs()), Ti(a))
- NPe(t, e, o, n, pN, r, i);
- else {
- var s = r ? r(UD(t, o), a, o + "", t, e, i) : void 0;
- s === void 0 && (s = a), ZD(t, o, s);
- }
- }, B_);
- }
- function hte(t, e, n, r, i, a) {
- return Ti(t) && Ti(e) && (a.set(e, t), pN(t, e, void 0, hte, a), a.delete(e)), t;
- }
- var BPe = Nwe(function(t, e, n, r) {
- pN(t, e, n, r);
- }), pte = rN(function(t) {
- return t.push(void 0, hte), Lee(BPe, void 0, t);
- });
- function zPe(t) {
- var e = t == null ? 0 : t.length;
- return e ? t[e - 1] : void 0;
- }
- function VPe(t) {
- return function(e, n, r) {
- var i = Object(e);
- if (!om(e)) {
- var a = fte(n);
- e = N_(e), n = function(s) {
- return a(i[s], s, i);
- };
- }
- var o = t(e, n, r);
- return o > -1 ? i[a ? e[o] : o] : void 0;
- };
- }
- var FPe = Math.max;
- function WPe(t, e, n) {
- var r = t == null ? 0 : t.length;
- if (!r)
- return -1;
- var i = n == null ? 0 : nwe(n);
- return i < 0 && (i = FPe(r + i, 0)), zee(t, fte(e), i);
- }
- var QPe = VPe(WPe);
- function Ww(t) {
- for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
- var i = t[e];
- r[i[0]] = i[1];
- }
- return r;
- }
- var HPe = Math.min;
- function GPe(t, e, n) {
- for (var r = Vee, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
- var c = t[o];
- o && e && (c = r2(c, o2(e))), l = HPe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new gg(o && c) : void 0;
- }
- c = t[0];
- var f = -1, d = s[0];
- e:
- for (; ++f < i && u.length < l; ) {
- var h = c[f], p = h;
- if (h = h !== 0 ? h : 0, !(d ? Fw(d, p) : r(u, p))) {
- for (o = a; --o; ) {
- var v = s[o];
- if (!(v ? Fw(v, p) : r(t[o], p)))
- continue e;
- }
- d && d.push(p), u.push(h);
- }
- }
- return u;
- }
- function jPe(t) {
- return dte(t) ? t : [];
- }
- var ZPe = rN(function(t) {
- var e = r2(t, jPe);
- return e.length && e[0] === t[0] ? GPe(e) : [];
- });
- function UPe(t, e) {
- return e.length < 2 ? t : c2(t, vTe(e, 0, -1));
- }
- var XPe = "[object Map]", YPe = "[object Set]", qPe = Object.prototype, KPe = qPe.hasOwnProperty;
- function vte(t) {
- if (t == null)
- return !0;
- if (om(t) && (za(t) || typeof t == "string" || typeof t.splice == "function" || pg(t) || s2(t) || hg(t)))
- return !t.length;
- var e = Wo(t);
- if (e == XPe || e == YPe)
- return !t.size;
- if (a2(t))
- return !Zee(t).length;
- for (var n in t)
- if (KPe.call(t, n))
- return !1;
- return !0;
- }
- function z_(t, e) {
- return f2(t, e);
- }
- var JPe = "[object Number]";
- function e$e(t) {
- return typeof t == "number" || Fs(t) && Ef(t) == JPe;
- }
- function Jc(t) {
- return t == null;
- }
- function gte(t) {
- return t === void 0;
- }
- function t$e(t, e) {
- return e = sm(e, t), t = UPe(t, e), t == null || delete t[lm(zPe(e))];
- }
- function n$e(t) {
- return uN(t) ? void 0 : t;
- }
- var r$e = 1, i$e = 2, a$e = 4, mte = Uee(function(t, e) {
- var n = {};
- if (t == null)
- return n;
- var r = !1;
- e = r2(e, function(a) {
- return a = sm(a, t), r || (r = a.length > 1), a;
- }), am(t, tte(t), n), r && (n = Ry(n, r$e | i$e | a$e, n$e));
- for (var i = e.length; i--; )
- t$e(n, e[i]);
- return n;
- });
- function yte(t, e, n, r) {
- if (!Ti(t))
- return t;
- e = sm(e, t);
- for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
- var l = lm(e[i]), u = n;
- if (l === "__proto__" || l === "constructor" || l === "prototype")
- return t;
- if (i != o) {
- var c = s[l];
- u = void 0, u === void 0 && (u = Ti(c) ? c : i2(e[i + 1]) ? [] : {});
- }
- nN(s, l, u), s = s[l];
- }
- return t;
- }
- function o$e(t, e, n) {
- for (var r = -1, i = e.length, a = {}; ++r < i; ) {
- var o = e[r], s = c2(t, o);
- n(s, o) && yte(a, sm(o, t), s);
- }
- return a;
- }
- function s$e(t, e) {
- return o$e(t, e, function(n, r) {
- return cte(t, r);
- });
- }
- var mg = Uee(function(t, e) {
- return t == null ? {} : s$e(t, e);
- });
- function vN(t, e, n) {
- return t == null ? t : yte(t, e, n);
- }
- var l$e = "Expected a function";
- function u$e(t, e, n) {
- var r = !0, i = !0;
- if (typeof t != "function")
- throw new TypeError(l$e);
- return Ti(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), hN(t, e, {
- leading: r,
- maxWait: e,
- trailing: i
- });
- }
- var c$e = 1 / 0, f$e = zv && 1 / dN(new zv([, -0]))[1] == c$e ? function(t) {
- return new zv(t);
- } : _we, d$e = 200;
- function h$e(t, e, n) {
- var r = -1, i = Vee, a = t.length, o = !0, s = [], l = s;
- if (a >= d$e) {
- var u = f$e(t);
- if (u)
- return dN(u);
- o = !1, i = Fw, l = new gg();
- } else
- l = s;
- e:
- for (; ++r < a; ) {
- var c = t[r], f = c;
- if (c = c !== 0 ? c : 0, o && f === f) {
- for (var d = l.length; d--; )
- if (l[d] === f)
- continue e;
- s.push(c);
- } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
- }
- return s;
- }
- function BA(t) {
- return t && t.length ? h$e(t) : [];
- }
- const Qw = (t) => t === void 0, hf = (t) => typeof t == "boolean", Ws = (t) => typeof t == "number", Ob = (t) => typeof Element > "u" ? !1 : t instanceof Element, yg = (t) => Jc(t), p$e = (t) => ia(t) ? !Number.isNaN(Number(t)) : !1;
- class bte extends Error {
- constructor(e) {
- super(e), this.name = "ElementPlusError";
- }
- }
- function v$e(t, e) {
- throw new bte(`[${t}] ${e}`);
- }
- function Fi(t, e) {
- if (process.env.NODE_ENV !== "production") {
- const n = ia(t) ? new bte(`[${t}] ${e}`) : t;
- console.warn(n);
- }
- }
- const g$e = "utils/dom/style", _te = (t = "") => t.split(" ").filter((e) => !!e.trim()), nW = (t, e) => {
- if (!t || !e)
- return !1;
- if (e.includes(" "))
- throw new Error("className should not contain space.");
- return t.classList.contains(e);
- }, Ote = (t, e) => {
- !t || !e.trim() || t.classList.add(..._te(e));
- }, Lx = (t, e) => {
- !t || !e.trim() || t.classList.remove(..._te(e));
- }, m$e = (t, e) => {
- var n;
- if (!Fr || !t || !e)
- return "";
- let r = Rxe(e);
- r === "float" && (r = "cssFloat");
- try {
- const i = t.style[r];
- if (i)
- return i;
- const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(t, "");
- return a ? a[r] : "";
- } catch {
- return t.style[r];
- }
- };
- function bg(t, e = "px") {
- if (!t)
- return "";
- if (Ws(t) || p$e(t))
- return `${t}${e}`;
- if (ia(t))
- return t;
- Fi(g$e, "binding value must be a string or number");
- }
- let DO;
- const y$e = (t) => {
- var e;
- if (!Fr)
- return 0;
- if (DO !== void 0)
- return DO;
- const n = document.createElement("div");
- n.className = `${t}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
- const r = n.offsetWidth;
- n.style.overflow = "scroll";
- const i = document.createElement("div");
- i.style.width = "100%", n.appendChild(i);
- const a = i.offsetWidth;
- return (e = n.parentNode) == null || e.removeChild(n), DO = r - a, DO;
- };
- /*! Element Plus Icons Vue v2.3.1 */
- var b$e = /* @__PURE__ */ ae({
- name: "ArrowDown",
- __name: "arrow-down",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
- })
- ]));
- }
- }), _$e = b$e, O$e = /* @__PURE__ */ ae({
- name: "CaretRight",
- __name: "caret-right",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M384 192v640l384-320.064z"
- })
- ]));
- }
- }), S$e = O$e, x$e = /* @__PURE__ */ ae({
- name: "CircleCheck",
- __name: "circle-check",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
- }),
- tt("path", {
- fill: "currentColor",
- d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
- })
- ]));
- }
- }), w$e = x$e, C$e = /* @__PURE__ */ ae({
- name: "CircleClose",
- __name: "circle-close",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
- }),
- tt("path", {
- fill: "currentColor",
- d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
- })
- ]));
- }
- }), Ste = C$e, T$e = /* @__PURE__ */ ae({
- name: "Close",
- __name: "close",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
- })
- ]));
- }
- }), xte = T$e, P$e = /* @__PURE__ */ ae({
- name: "Hide",
- __name: "hide",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
- }),
- tt("path", {
- fill: "currentColor",
- d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
- })
- ]));
- }
- }), $$e = P$e, A$e = /* @__PURE__ */ ae({
- name: "Loading",
- __name: "loading",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
- })
- ]));
- }
- }), gN = A$e, E$e = /* @__PURE__ */ ae({
- name: "View",
- __name: "view",
- setup(t) {
- return (e, n) => (be(), Ue("svg", {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 1024 1024"
- }, [
- tt("path", {
- fill: "currentColor",
- d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
- })
- ]));
- }
- }), M$e = E$e;
- const wte = "__epPropKey", mn = (t) => t, I$e = (t) => Rh(t) && !!t[wte], d2 = (t, e) => {
- if (!Rh(t) || I$e(t))
- return t;
- const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
- type: a,
- required: !!r,
- validator: n || o ? (u) => {
- let c = !1, f = [];
- if (n && (f = Array.from(n), Dh(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
- const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
- oxe(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
- }
- return c;
- } : void 0,
- [wte]: !0
- };
- return Dh(t, "default") && (l.default = i), l;
- }, hr = (t) => Ww(Object.entries(t).map(([e, n]) => [
- e,
- d2(n, e)
- ])), _g = mn([
- String,
- Object,
- Function
- ]), D$e = {
- Close: xte
- }, R$e = {
- validating: gN,
- success: w$e,
- error: Ste
- }, ec = (t, e) => {
- if (t.install = (n) => {
- for (const r of [t, ...Object.values(e ?? {})])
- n.component(r.name, r);
- }, e)
- for (const [n, r] of Object.entries(e))
- t[n] = r;
- return t;
- }, V_ = (t) => (t.install = Kc, t), k$e = (...t) => (e) => {
- t.forEach((n) => {
- Jd(n) ? n(e) : n.value = e;
- });
- }, wa = {
- tab: "Tab",
- enter: "Enter",
- space: "Space",
- left: "ArrowLeft",
- up: "ArrowUp",
- right: "ArrowRight",
- down: "ArrowDown",
- esc: "Escape",
- delete: "Delete",
- backspace: "Backspace",
- numpadEnter: "NumpadEnter",
- pageUp: "PageUp",
- pageDown: "PageDown",
- home: "Home",
- end: "End"
- }, ca = "update:modelValue", Cte = "change", L$e = ["", "default", "small", "large"];
- var Nx = /* @__PURE__ */ ((t) => (t[t.TEXT = 1] = "TEXT", t[t.CLASS = 2] = "CLASS", t[t.STYLE = 4] = "STYLE", t[t.PROPS = 8] = "PROPS", t[t.FULL_PROPS = 16] = "FULL_PROPS", t[t.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", t[t.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", t[t.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", t[t.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", t[t.NEED_PATCH = 512] = "NEED_PATCH", t[t.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", t[t.HOISTED = -1] = "HOISTED", t[t.BAIL = -2] = "BAIL", t))(Nx || {});
- const N$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), B$e = (t) => t, z$e = ["class", "style"], V$e = /^on[A-Z]/, F$e = (t = {}) => {
- const { excludeListeners: e = !1, excludeKeys: n } = t, r = V(() => ((n == null ? void 0 : n.value) || []).concat(z$e)), i = In();
- return i ? V(() => {
- var a;
- return Ww(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && V$e.test(o))));
- }) : (Fi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), V(() => ({})));
- }, Es = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
- me(() => z(o), (s) => {
- s && Fi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
- For more detail, please visit: ${i}
- `);
- }, {
- immediate: !0
- });
- }, W$e = (t, e, n, r) => {
- let i = {
- offsetX: 0,
- offsetY: 0
- };
- const a = (l) => {
- const u = l.clientX, c = l.clientY, { offsetX: f, offsetY: d } = i, h = t.value.getBoundingClientRect(), p = h.left, v = h.top, g = h.width, m = h.height, y = document.documentElement.clientWidth, _ = document.documentElement.clientHeight, O = -p + f, S = -v + d, x = y - p - g + f, C = _ - v - m + d, P = (T) => {
- let E = f + T.clientX - u, M = d + T.clientY - c;
- r != null && r.value || (E = Math.min(Math.max(E, O), x), M = Math.min(Math.max(M, S), C)), i = {
- offsetX: E,
- offsetY: M
- }, t.value && (t.value.style.transform = `translate(${bg(E)}, ${bg(M)})`);
- }, $ = () => {
- document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", $);
- };
- document.addEventListener("mousemove", P), document.addEventListener("mouseup", $);
- }, o = () => {
- e.value && t.value && e.value.addEventListener("mousedown", a);
- }, s = () => {
- e.value && t.value && e.value.removeEventListener("mousedown", a);
- };
- _t(() => {
- Vt(() => {
- n.value ? o() : s();
- });
- }), Qt(() => {
- s();
- });
- };
- var Q$e = {
- name: "en",
- el: {
- breadcrumb: {
- label: "Breadcrumb"
- },
- colorpicker: {
- confirm: "OK",
- clear: "Clear",
- defaultLabel: "color picker",
- description: "current color is {color}. press enter to select a new color."
- },
- datepicker: {
- now: "Now",
- today: "Today",
- cancel: "Cancel",
- clear: "Clear",
- confirm: "OK",
- dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
- monthTablePrompt: "Use the arrow keys and enter to select the month",
- yearTablePrompt: "Use the arrow keys and enter to select the year",
- selectedDate: "Selected date",
- selectDate: "Select date",
- selectTime: "Select time",
- startDate: "Start Date",
- startTime: "Start Time",
- endDate: "End Date",
- endTime: "End Time",
- prevYear: "Previous Year",
- nextYear: "Next Year",
- prevMonth: "Previous Month",
- nextMonth: "Next Month",
- year: "",
- month1: "January",
- month2: "February",
- month3: "March",
- month4: "April",
- month5: "May",
- month6: "June",
- month7: "July",
- month8: "August",
- month9: "September",
- month10: "October",
- month11: "November",
- month12: "December",
- week: "week",
- weeks: {
- sun: "Sun",
- mon: "Mon",
- tue: "Tue",
- wed: "Wed",
- thu: "Thu",
- fri: "Fri",
- sat: "Sat"
- },
- weeksFull: {
- sun: "Sunday",
- mon: "Monday",
- tue: "Tuesday",
- wed: "Wednesday",
- thu: "Thursday",
- fri: "Friday",
- sat: "Saturday"
- },
- months: {
- jan: "Jan",
- feb: "Feb",
- mar: "Mar",
- apr: "Apr",
- may: "May",
- jun: "Jun",
- jul: "Jul",
- aug: "Aug",
- sep: "Sep",
- oct: "Oct",
- nov: "Nov",
- dec: "Dec"
- }
- },
- inputNumber: {
- decrease: "decrease number",
- increase: "increase number"
- },
- select: {
- loading: "Loading",
- noMatch: "No matching data",
- noData: "No data",
- placeholder: "Select"
- },
- dropdown: {
- toggleDropdown: "Toggle Dropdown"
- },
- cascader: {
- noMatch: "No matching data",
- loading: "Loading",
- placeholder: "Select",
- noData: "No data"
- },
- pagination: {
- goto: "Go to",
- pagesize: "/page",
- total: "Total {total}",
- pageClassifier: "",
- page: "Page",
- prev: "Go to previous page",
- next: "Go to next page",
- currentPage: "page {pager}",
- prevPages: "Previous {pager} pages",
- nextPages: "Next {pager} pages",
- deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
- },
- dialog: {
- close: "Close this dialog"
- },
- drawer: {
- close: "Close this dialog"
- },
- messagebox: {
- title: "Message",
- confirm: "OK",
- cancel: "Cancel",
- error: "Illegal input",
- close: "Close this dialog"
- },
- upload: {
- deleteTip: "press delete to remove",
- delete: "Delete",
- preview: "Preview",
- continue: "Continue"
- },
- slider: {
- defaultLabel: "slider between {min} and {max}",
- defaultRangeStartLabel: "pick start value",
- defaultRangeEndLabel: "pick end value"
- },
- table: {
- emptyText: "No Data",
- confirmFilter: "Confirm",
- resetFilter: "Reset",
- clearFilter: "All",
- sumText: "Sum"
- },
- tour: {
- next: "Next",
- previous: "Previous",
- finish: "Finish"
- },
- tree: {
- emptyText: "No Data"
- },
- transfer: {
- noMatch: "No matching data",
- noData: "No data",
- titles: ["List 1", "List 2"],
- filterPlaceholder: "Enter keyword",
- noCheckedFormat: "{total} items",
- hasCheckedFormat: "{checked}/{total} checked"
- },
- image: {
- error: "FAILED"
- },
- pageHeader: {
- title: "Back"
- },
- popconfirm: {
- confirmButtonText: "Yes",
- cancelButtonText: "No"
- },
- carousel: {
- leftArrow: "Carousel arrow left",
- rightArrow: "Carousel arrow right",
- indicator: "Carousel switch to index {index}"
- }
- }
- };
- const H$e = (t) => (e, n) => G$e(e, n, z(t)), G$e = (t, e, n) => vn(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
- var a;
- return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
- }), j$e = (t) => {
- const e = V(() => z(t).name), n = Vs(t) ? t : ee(t);
- return {
- lang: e,
- locale: n,
- t: H$e(t)
- };
- }, Z$e = Symbol("localeContextKey"), mN = (t) => {
- const e = et(Z$e, ee());
- return j$e(V(() => e.value || Q$e));
- }, Bx = "el", U$e = "is-", nd = (t, e, n, r, i) => {
- let a = `${t}-${e}`;
- return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
- }, X$e = Symbol("namespaceContextKey"), yN = (t) => {
- const e = In() ? et(X$e, ee(Bx)) : ee(Bx);
- return V(() => z(e) || Bx);
- }, $n = (t, e) => {
- const n = yN();
- return {
- namespace: n,
- b: (v = "") => nd(n.value, t, v, "", ""),
- e: (v) => v ? nd(n.value, t, "", v, "") : "",
- m: (v) => v ? nd(n.value, t, "", "", v) : "",
- be: (v, g) => v && g ? nd(n.value, t, v, g, "") : "",
- em: (v, g) => v && g ? nd(n.value, t, "", v, g) : "",
- bm: (v, g) => v && g ? nd(n.value, t, v, "", g) : "",
- bem: (v, g, m) => v && g && m ? nd(n.value, t, v, g, m) : "",
- is: (v, ...g) => {
- const m = g.length >= 1 ? g[0] : !0;
- return v && m ? `${U$e}${v}` : "";
- },
- cssVar: (v) => {
- const g = {};
- for (const m in v)
- v[m] && (g[`--${n.value}-${m}`] = v[m]);
- return g;
- },
- cssVarName: (v) => `--${n.value}-${v}`,
- cssVarBlock: (v) => {
- const g = {};
- for (const m in v)
- v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
- return g;
- },
- cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
- };
- }, Y$e = (t, e = {}) => {
- Vs(t) || v$e("[useLockscreen]", "You need to pass a ref param to this function");
- const n = e.ns || $n("popup"), r = V(() => n.bm("parent", "hidden"));
- if (!Fr || nW(document.body, r.value))
- return;
- let i = 0, a = !1, o = "0";
- const s = () => {
- setTimeout(() => {
- Lx(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = o);
- }, 200);
- };
- me(t, (l) => {
- if (!l) {
- s();
- return;
- }
- a = !nW(document.body, r.value), a && (o = document.body.style.width), i = y$e(n.namespace.value);
- const u = document.documentElement.clientHeight < document.body.scrollHeight, c = m$e(document.body, "overflowY");
- i > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${i}px)`), Ote(document.body, r.value);
- }), im(() => s());
- }, q$e = d2({
- type: mn(Boolean),
- default: null
- }), K$e = d2({
- type: mn(Function)
- }), Tte = (t) => {
- const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
- [t]: q$e,
- [n]: K$e
- };
- return {
- useModelToggle: ({
- indicator: o,
- toggleReason: s,
- shouldHideWhenRouteChanges: l,
- shouldProceed: u,
- onShow: c,
- onHide: f
- }) => {
- const d = In(), { emit: h } = d, p = d.props, v = V(() => Jd(p[n])), g = V(() => p[t] === null), m = (C) => {
- o.value !== !0 && (o.value = !0, s && (s.value = C), Jd(c) && c(C));
- }, y = (C) => {
- o.value !== !1 && (o.value = !1, s && (s.value = C), Jd(f) && f(C));
- }, _ = (C) => {
- if (p.disabled === !0 || Jd(u) && !u())
- return;
- const P = v.value && Fr;
- P && h(e, !0), (g.value || !P) && m(C);
- }, O = (C) => {
- if (p.disabled === !0 || !Fr)
- return;
- const P = v.value && Fr;
- P && h(e, !1), (g.value || !P) && y(C);
- }, S = (C) => {
- hf(C) && (p.disabled && C ? v.value && h(e, !1) : o.value !== C && (C ? m() : y()));
- }, x = () => {
- o.value ? O() : _();
- };
- return me(() => p[t], S), l && d.appContext.config.globalProperties.$route !== void 0 && me(() => ({
- ...d.proxy.$route
- }), () => {
- l.value && o.value && O();
- }), _t(() => {
- S(p[t]);
- }), {
- hide: O,
- show: _,
- toggle: x,
- hasUpdateHandler: v
- };
- },
- useModelToggleProps: i,
- useModelToggleEmits: r
- };
- };
- Tte("modelValue");
- const Pte = (t) => {
- const e = In();
- return V(() => {
- var n, r;
- return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
- });
- };
- var Ra = "top", ns = "bottom", rs = "right", ka = "left", bN = "auto", F_ = [Ra, ns, rs, ka], Og = "start", Sb = "end", J$e = "clippingParents", $te = "viewport", v0 = "popper", eAe = "reference", rW = F_.reduce(function(t, e) {
- return t.concat([e + "-" + Og, e + "-" + Sb]);
- }, []), _N = [].concat(F_, [bN]).reduce(function(t, e) {
- return t.concat([e, e + "-" + Og, e + "-" + Sb]);
- }, []), tAe = "beforeRead", nAe = "read", rAe = "afterRead", iAe = "beforeMain", aAe = "main", oAe = "afterMain", sAe = "beforeWrite", lAe = "write", uAe = "afterWrite", cAe = [tAe, nAe, rAe, iAe, aAe, oAe, sAe, lAe, uAe];
- function zl(t) {
- return t ? (t.nodeName || "").toLowerCase() : null;
- }
- function qs(t) {
- if (t == null) return window;
- if (t.toString() !== "[object Window]") {
- var e = t.ownerDocument;
- return e && e.defaultView || window;
- }
- return t;
- }
- function Sg(t) {
- var e = qs(t).Element;
- return t instanceof e || t instanceof Element;
- }
- function Xo(t) {
- var e = qs(t).HTMLElement;
- return t instanceof e || t instanceof HTMLElement;
- }
- function ON(t) {
- if (typeof ShadowRoot > "u") return !1;
- var e = qs(t).ShadowRoot;
- return t instanceof e || t instanceof ShadowRoot;
- }
- function fAe(t) {
- var e = t.state;
- Object.keys(e.elements).forEach(function(n) {
- var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
- !Xo(a) || !zl(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
- var s = i[o];
- s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
- }));
- });
- }
- function dAe(t) {
- var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
- return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
- Object.keys(e.elements).forEach(function(r) {
- var i = e.elements[r], a = e.attributes[r] || {}, o = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = o.reduce(function(l, u) {
- return l[u] = "", l;
- }, {});
- !Xo(i) || !zl(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
- i.removeAttribute(l);
- }));
- });
- };
- }
- var Ate = { name: "applyStyles", enabled: !0, phase: "write", fn: fAe, effect: dAe, requires: ["computeStyles"] };
- function Rl(t) {
- return t.split("-")[0];
- }
- var vh = Math.max, Hw = Math.min, xg = Math.round;
- function wg(t, e) {
- e === void 0 && (e = !1);
- var n = t.getBoundingClientRect(), r = 1, i = 1;
- if (Xo(t) && e) {
- var a = t.offsetHeight, o = t.offsetWidth;
- o > 0 && (r = xg(n.width) / o || 1), a > 0 && (i = xg(n.height) / a || 1);
- }
- return { width: n.width / r, height: n.height / i, top: n.top / i, right: n.right / r, bottom: n.bottom / i, left: n.left / r, x: n.left / r, y: n.top / i };
- }
- function SN(t) {
- var e = wg(t), n = t.offsetWidth, r = t.offsetHeight;
- return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
- }
- function Ete(t, e) {
- var n = e.getRootNode && e.getRootNode();
- if (t.contains(e)) return !0;
- if (n && ON(n)) {
- var r = e;
- do {
- if (r && t.isSameNode(r)) return !0;
- r = r.parentNode || r.host;
- } while (r);
- }
- return !1;
- }
- function Lu(t) {
- return qs(t).getComputedStyle(t);
- }
- function hAe(t) {
- return ["table", "td", "th"].indexOf(zl(t)) >= 0;
- }
- function Mf(t) {
- return ((Sg(t) ? t.ownerDocument : t.document) || window.document).documentElement;
- }
- function h2(t) {
- return zl(t) === "html" ? t : t.assignedSlot || t.parentNode || (ON(t) ? t.host : null) || Mf(t);
- }
- function iW(t) {
- return !Xo(t) || Lu(t).position === "fixed" ? null : t.offsetParent;
- }
- function pAe(t) {
- var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
- if (n && Xo(t)) {
- var r = Lu(t);
- if (r.position === "fixed") return null;
- }
- var i = h2(t);
- for (ON(i) && (i = i.host); Xo(i) && ["html", "body"].indexOf(zl(i)) < 0; ) {
- var a = Lu(i);
- if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none") return i;
- i = i.parentNode;
- }
- return null;
- }
- function W_(t) {
- for (var e = qs(t), n = iW(t); n && hAe(n) && Lu(n).position === "static"; ) n = iW(n);
- return n && (zl(n) === "html" || zl(n) === "body" && Lu(n).position === "static") ? e : n || pAe(t) || e;
- }
- function xN(t) {
- return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
- }
- function ky(t, e, n) {
- return vh(t, Hw(e, n));
- }
- function vAe(t, e, n) {
- var r = ky(t, e, n);
- return r > n ? n : r;
- }
- function Mte() {
- return { top: 0, right: 0, bottom: 0, left: 0 };
- }
- function Ite(t) {
- return Object.assign({}, Mte(), t);
- }
- function Dte(t, e) {
- return e.reduce(function(n, r) {
- return n[r] = t, n;
- }, {});
- }
- var gAe = function(t, e) {
- return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, Ite(typeof t != "number" ? t : Dte(t, F_));
- };
- function mAe(t) {
- var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = Rl(n.placement), l = xN(s), u = [ka, rs].indexOf(s) >= 0, c = u ? "height" : "width";
- if (!(!a || !o)) {
- var f = gAe(i.padding, n), d = SN(a), h = l === "y" ? Ra : ka, p = l === "y" ? ns : rs, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = W_(a), y = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, _ = v / 2 - g / 2, O = f[h], S = y - d[c] - f[p], x = y / 2 - d[c] / 2 + _, C = ky(O, x, S), P = l;
- n.modifiersData[r] = (e = {}, e[P] = C, e.centerOffset = C - x, e);
- }
- }
- function yAe(t) {
- var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
- i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !Ete(e.elements.popper, i) || (e.elements.arrow = i));
- }
- var bAe = { name: "arrow", enabled: !0, phase: "main", fn: mAe, effect: yAe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
- function Cg(t) {
- return t.split("-")[1];
- }
- var _Ae = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
- function OAe(t) {
- var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
- return { x: xg(e * i) / i || 0, y: xg(n * i) / i || 0 };
- }
- function aW(t) {
- var e, n = t.popper, r = t.popperRect, i = t.placement, a = t.variation, o = t.offsets, s = t.position, l = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, f = t.isFixed, d = o.x, h = d === void 0 ? 0 : d, p = o.y, v = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v };
- h = g.x, v = g.y;
- var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), _ = ka, O = Ra, S = window;
- if (u) {
- var x = W_(n), C = "clientHeight", P = "clientWidth";
- if (x === qs(n) && (x = Mf(n), Lu(x).position !== "static" && s === "absolute" && (C = "scrollHeight", P = "scrollWidth")), x = x, i === Ra || (i === ka || i === rs) && a === Sb) {
- O = ns;
- var $ = f && x === S && S.visualViewport ? S.visualViewport.height : x[C];
- v -= $ - r.height, v *= l ? 1 : -1;
- }
- if (i === ka || (i === Ra || i === ns) && a === Sb) {
- _ = rs;
- var T = f && x === S && S.visualViewport ? S.visualViewport.width : x[P];
- h -= T - r.width, h *= l ? 1 : -1;
- }
- }
- var E = Object.assign({ position: s }, u && _Ae), M = c === !0 ? OAe({ x: h, y: v }) : { x: h, y: v };
- if (h = M.x, v = M.y, l) {
- var R;
- return Object.assign({}, E, (R = {}, R[O] = y ? "0" : "", R[_] = m ? "0" : "", R.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R));
- }
- return Object.assign({}, E, (e = {}, e[O] = y ? v + "px" : "", e[_] = m ? h + "px" : "", e.transform = "", e));
- }
- function SAe(t) {
- var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: Rl(e.placement), variation: Cg(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
- e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, aW(Object.assign({}, u, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: l })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, aW(Object.assign({}, u, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
- }
- var Rte = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: SAe, data: {} }, RO = { passive: !0 };
- function xAe(t) {
- var e = t.state, n = t.instance, r = t.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, l = qs(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
- return a && u.forEach(function(c) {
- c.addEventListener("scroll", n.update, RO);
- }), s && l.addEventListener("resize", n.update, RO), function() {
- a && u.forEach(function(c) {
- c.removeEventListener("scroll", n.update, RO);
- }), s && l.removeEventListener("resize", n.update, RO);
- };
- }
- var kte = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
- }, effect: xAe, data: {} }, wAe = { left: "right", right: "left", bottom: "top", top: "bottom" };
- function zx(t) {
- return t.replace(/left|right|bottom|top/g, function(e) {
- return wAe[e];
- });
- }
- var CAe = { start: "end", end: "start" };
- function oW(t) {
- return t.replace(/start|end/g, function(e) {
- return CAe[e];
- });
- }
- function wN(t) {
- var e = qs(t), n = e.pageXOffset, r = e.pageYOffset;
- return { scrollLeft: n, scrollTop: r };
- }
- function CN(t) {
- return wg(Mf(t)).left + wN(t).scrollLeft;
- }
- function TAe(t) {
- var e = qs(t), n = Mf(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
- return r && (i = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (o = r.offsetLeft, s = r.offsetTop)), { width: i, height: a, x: o + CN(t), y: s };
- }
- function PAe(t) {
- var e, n = Mf(t), r = wN(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = vh(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = vh(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + CN(t), l = -r.scrollTop;
- return Lu(i || n).direction === "rtl" && (s += vh(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
- }
- function TN(t) {
- var e = Lu(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
- return /auto|scroll|overlay|hidden/.test(n + i + r);
- }
- function Lte(t) {
- return ["html", "body", "#document"].indexOf(zl(t)) >= 0 ? t.ownerDocument.body : Xo(t) && TN(t) ? t : Lte(h2(t));
- }
- function Ly(t, e) {
- var n;
- e === void 0 && (e = []);
- var r = Lte(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = qs(r), o = i ? [a].concat(a.visualViewport || [], TN(r) ? r : []) : r, s = e.concat(o);
- return i ? s : s.concat(Ly(h2(o)));
- }
- function XD(t) {
- return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
- }
- function $Ae(t) {
- var e = wg(t);
- return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
- }
- function sW(t, e) {
- return e === $te ? XD(TAe(t)) : Sg(e) ? $Ae(e) : XD(PAe(Mf(t)));
- }
- function AAe(t) {
- var e = Ly(h2(t)), n = ["absolute", "fixed"].indexOf(Lu(t).position) >= 0, r = n && Xo(t) ? W_(t) : t;
- return Sg(r) ? e.filter(function(i) {
- return Sg(i) && Ete(i, r) && zl(i) !== "body";
- }) : [];
- }
- function EAe(t, e, n) {
- var r = e === "clippingParents" ? AAe(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
- var u = sW(t, l);
- return s.top = vh(u.top, s.top), s.right = Hw(u.right, s.right), s.bottom = Hw(u.bottom, s.bottom), s.left = vh(u.left, s.left), s;
- }, sW(t, a));
- return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
- }
- function Nte(t) {
- var e = t.reference, n = t.element, r = t.placement, i = r ? Rl(r) : null, a = r ? Cg(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
- switch (i) {
- case Ra:
- l = { x: o, y: e.y - n.height };
- break;
- case ns:
- l = { x: o, y: e.y + e.height };
- break;
- case rs:
- l = { x: e.x + e.width, y: s };
- break;
- case ka:
- l = { x: e.x - n.width, y: s };
- break;
- default:
- l = { x: e.x, y: e.y };
- }
- var u = i ? xN(i) : null;
- if (u != null) {
- var c = u === "y" ? "height" : "width";
- switch (a) {
- case Og:
- l[u] = l[u] - (e[c] / 2 - n[c] / 2);
- break;
- case Sb:
- l[u] = l[u] + (e[c] / 2 - n[c] / 2);
- break;
- }
- }
- return l;
- }
- function xb(t, e) {
- e === void 0 && (e = {});
- var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? J$e : a, s = n.rootBoundary, l = s === void 0 ? $te : s, u = n.elementContext, c = u === void 0 ? v0 : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = Ite(typeof p != "number" ? p : Dte(p, F_)), g = c === v0 ? eAe : v0, m = t.rects.popper, y = t.elements[d ? g : c], _ = EAe(Sg(y) ? y : y.contextElement || Mf(t.elements.popper), o, l), O = wg(t.elements.reference), S = Nte({ reference: O, element: m, strategy: "absolute", placement: i }), x = XD(Object.assign({}, m, S)), C = c === v0 ? x : O, P = { top: _.top - C.top + v.top, bottom: C.bottom - _.bottom + v.bottom, left: _.left - C.left + v.left, right: C.right - _.right + v.right }, $ = t.modifiersData.offset;
- if (c === v0 && $) {
- var T = $[i];
- Object.keys(P).forEach(function(E) {
- var M = [rs, ns].indexOf(E) >= 0 ? 1 : -1, R = [Ra, ns].indexOf(E) >= 0 ? "y" : "x";
- P[E] += T[R] * M;
- });
- }
- return P;
- }
- function MAe(t, e) {
- e === void 0 && (e = {});
- var n = e, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? _N : l, c = Cg(r), f = c ? s ? rW : rW.filter(function(p) {
- return Cg(p) === c;
- }) : F_, d = f.filter(function(p) {
- return u.indexOf(p) >= 0;
- });
- d.length === 0 && (d = f);
- var h = d.reduce(function(p, v) {
- return p[v] = xb(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[Rl(v)], p;
- }, {});
- return Object.keys(h).sort(function(p, v) {
- return h[p] - h[v];
- });
- }
- function IAe(t) {
- if (Rl(t) === bN) return [];
- var e = zx(t);
- return [oW(t), e, oW(e)];
- }
- function DAe(t) {
- var e = t.state, n = t.options, r = t.name;
- if (!e.modifiersData[r]._skip) {
- for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, l = n.fallbackPlacements, u = n.padding, c = n.boundary, f = n.rootBoundary, d = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, m = Rl(g), y = m === g, _ = l || (y || !p ? [zx(g)] : IAe(g)), O = [g].concat(_).reduce(function(fe, ue) {
- return fe.concat(Rl(ue) === bN ? MAe(e, { placement: ue, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ue);
- }, []), S = e.rects.reference, x = e.rects.popper, C = /* @__PURE__ */ new Map(), P = !0, $ = O[0], T = 0; T < O.length; T++) {
- var E = O[T], M = Rl(E), R = Cg(E) === Og, N = [Ra, ns].indexOf(M) >= 0, I = N ? "width" : "height", B = xb(e, { placement: E, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), Q = N ? R ? rs : ka : R ? ns : Ra;
- S[I] > x[I] && (Q = zx(Q));
- var W = zx(Q), H = [];
- if (a && H.push(B[M] <= 0), s && H.push(B[Q] <= 0, B[W] <= 0), H.every(function(fe) {
- return fe;
- })) {
- $ = E, P = !1;
- break;
- }
- C.set(E, H);
- }
- if (P) for (var U = p ? 3 : 1, j = function(fe) {
- var ue = O.find(function(ye) {
- var se = C.get(ye);
- if (se) return se.slice(0, fe).every(function(he) {
- return he;
- });
- });
- if (ue) return $ = ue, "break";
- }, Y = U; Y > 0; Y--) {
- var ne = j(Y);
- if (ne === "break") break;
- }
- e.placement !== $ && (e.modifiersData[r]._skip = !0, e.placement = $, e.reset = !0);
- }
- }
- var RAe = { name: "flip", enabled: !0, phase: "main", fn: DAe, requiresIfExists: ["offset"], data: { _skip: !1 } };
- function lW(t, e, n) {
- return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
- }
- function uW(t) {
- return [Ra, rs, ns, ka].some(function(e) {
- return t[e] >= 0;
- });
- }
- function kAe(t) {
- var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = xb(e, { elementContext: "reference" }), s = xb(e, { altBoundary: !0 }), l = lW(o, r), u = lW(s, i, a), c = uW(l), f = uW(u);
- e.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: f }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": f });
- }
- var LAe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: kAe };
- function NAe(t, e, n) {
- var r = Rl(t), i = [ka, Ra].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
- return o = o || 0, s = (s || 0) * i, [ka, rs].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
- }
- function BAe(t) {
- var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = _N.reduce(function(c, f) {
- return c[f] = NAe(f, e.rects, a), c;
- }, {}), s = o[e.placement], l = s.x, u = s.y;
- e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
- }
- var zAe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: BAe };
- function VAe(t) {
- var e = t.state, n = t.name;
- e.modifiersData[n] = Nte({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
- }
- var Bte = { name: "popperOffsets", enabled: !0, phase: "read", fn: VAe, data: {} };
- function FAe(t) {
- return t === "x" ? "y" : "x";
- }
- function WAe(t) {
- var e = t.state, n = t.options, r = t.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, f = n.padding, d = n.tether, h = d === void 0 ? !0 : d, p = n.tetherOffset, v = p === void 0 ? 0 : p, g = xb(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = Rl(e.placement), y = Cg(e.placement), _ = !y, O = xN(m), S = FAe(O), x = e.modifiersData.popperOffsets, C = e.rects.reference, P = e.rects.popper, $ = typeof v == "function" ? v(Object.assign({}, e.rects, { placement: e.placement })) : v, T = typeof $ == "number" ? { mainAxis: $, altAxis: $ } : Object.assign({ mainAxis: 0, altAxis: 0 }, $), E = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, M = { x: 0, y: 0 };
- if (x) {
- if (a) {
- var R, N = O === "y" ? Ra : ka, I = O === "y" ? ns : rs, B = O === "y" ? "height" : "width", Q = x[O], W = Q + g[N], H = Q - g[I], U = h ? -P[B] / 2 : 0, j = y === Og ? C[B] : P[B], Y = y === Og ? -P[B] : -C[B], ne = e.elements.arrow, fe = h && ne ? SN(ne) : { width: 0, height: 0 }, ue = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Mte(), ye = ue[N], se = ue[I], he = ky(0, C[B], fe[B]), re = _ ? C[B] / 2 - U - he - ye - T.mainAxis : j - he - ye - T.mainAxis, q = _ ? -C[B] / 2 + U + he + se + T.mainAxis : Y + he + se + T.mainAxis, K = e.elements.arrow && W_(e.elements.arrow), de = K ? O === "y" ? K.clientTop || 0 : K.clientLeft || 0 : 0, xe = (R = E == null ? void 0 : E[O]) != null ? R : 0, we = Q + re - xe - de, He = Q + q - xe, je = ky(h ? Hw(W, we) : W, Q, h ? vh(H, He) : H);
- x[O] = je, M[O] = je - Q;
- }
- if (s) {
- var Be, Le = O === "x" ? Ra : ka, Pe = O === "x" ? ns : rs, Fe = x[S], Ye = S === "y" ? "height" : "width", xt = Fe + g[Le], It = Fe - g[Pe], an = [Ra, ka].indexOf(m) !== -1, Ae = (Be = E == null ? void 0 : E[S]) != null ? Be : 0, gt = an ? xt : Fe - C[Ye] - P[Ye] - Ae + T.altAxis, Xt = an ? Fe + C[Ye] + P[Ye] - Ae - T.altAxis : It, Bn = h && an ? vAe(gt, Fe, Xt) : ky(h ? gt : xt, Fe, h ? Xt : It);
- x[S] = Bn, M[S] = Bn - Fe;
- }
- e.modifiersData[r] = M;
- }
- }
- var QAe = { name: "preventOverflow", enabled: !0, phase: "main", fn: WAe, requiresIfExists: ["offset"] };
- function HAe(t) {
- return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
- }
- function GAe(t) {
- return t === qs(t) || !Xo(t) ? wN(t) : HAe(t);
- }
- function jAe(t) {
- var e = t.getBoundingClientRect(), n = xg(e.width) / t.offsetWidth || 1, r = xg(e.height) / t.offsetHeight || 1;
- return n !== 1 || r !== 1;
- }
- function ZAe(t, e, n) {
- n === void 0 && (n = !1);
- var r = Xo(e), i = Xo(e) && jAe(e), a = Mf(e), o = wg(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
- return (r || !r && !n) && ((zl(e) !== "body" || TN(a)) && (s = GAe(e)), Xo(e) ? (l = wg(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = CN(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
- }
- function UAe(t) {
- var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
- t.forEach(function(a) {
- e.set(a.name, a);
- });
- function i(a) {
- n.add(a.name);
- var o = [].concat(a.requires || [], a.requiresIfExists || []);
- o.forEach(function(s) {
- if (!n.has(s)) {
- var l = e.get(s);
- l && i(l);
- }
- }), r.push(a);
- }
- return t.forEach(function(a) {
- n.has(a.name) || i(a);
- }), r;
- }
- function XAe(t) {
- var e = UAe(t);
- return cAe.reduce(function(n, r) {
- return n.concat(e.filter(function(i) {
- return i.phase === r;
- }));
- }, []);
- }
- function YAe(t) {
- var e;
- return function() {
- return e || (e = new Promise(function(n) {
- Promise.resolve().then(function() {
- e = void 0, n(t());
- });
- })), e;
- };
- }
- function qAe(t) {
- var e = t.reduce(function(n, r) {
- var i = n[r.name];
- return n[r.name] = i ? Object.assign({}, i, r, { options: Object.assign({}, i.options, r.options), data: Object.assign({}, i.data, r.data) }) : r, n;
- }, {});
- return Object.keys(e).map(function(n) {
- return e[n];
- });
- }
- var cW = { placement: "bottom", modifiers: [], strategy: "absolute" };
- function fW() {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
- return !e.some(function(r) {
- return !(r && typeof r.getBoundingClientRect == "function");
- });
- }
- function PN(t) {
- t === void 0 && (t = {});
- var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? cW : i;
- return function(o, s, l) {
- l === void 0 && (l = a);
- var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, cW, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
- var g = typeof v == "function" ? v(u.options) : v;
- p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Sg(o) ? Ly(o) : o.contextElement ? Ly(o.contextElement) : [], popper: Ly(s) };
- var m = XAe(qAe([].concat(r, u.options.modifiers)));
- return u.orderedModifiers = m.filter(function(y) {
- return y.enabled;
- }), h(), d.update();
- }, forceUpdate: function() {
- if (!f) {
- var v = u.elements, g = v.reference, m = v.popper;
- if (fW(g, m)) {
- u.rects = { reference: ZAe(g, W_(m), u.options.strategy === "fixed"), popper: SN(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(P) {
- return u.modifiersData[P.name] = Object.assign({}, P.data);
- });
- for (var y = 0; y < u.orderedModifiers.length; y++) {
- if (u.reset === !0) {
- u.reset = !1, y = -1;
- continue;
- }
- var _ = u.orderedModifiers[y], O = _.fn, S = _.options, x = S === void 0 ? {} : S, C = _.name;
- typeof O == "function" && (u = O({ state: u, options: x, name: C, instance: d }) || u);
- }
- }
- }
- }, update: YAe(function() {
- return new Promise(function(v) {
- d.forceUpdate(), v(u);
- });
- }), destroy: function() {
- p(), f = !0;
- } };
- if (!fW(o, s)) return d;
- d.setOptions(l).then(function(v) {
- !f && l.onFirstUpdate && l.onFirstUpdate(v);
- });
- function h() {
- u.orderedModifiers.forEach(function(v) {
- var g = v.name, m = v.options, y = m === void 0 ? {} : m, _ = v.effect;
- if (typeof _ == "function") {
- var O = _({ state: u, name: g, instance: d, options: y }), S = function() {
- };
- c.push(O || S);
- }
- });
- }
- function p() {
- c.forEach(function(v) {
- return v();
- }), c = [];
- }
- return d;
- };
- }
- PN();
- var KAe = [kte, Bte, Rte, Ate];
- PN({ defaultModifiers: KAe });
- var JAe = [kte, Bte, Rte, Ate, zAe, RAe, QAe, bAe, LAe], eEe = PN({ defaultModifiers: JAe });
- const tEe = (t, e, n = {}) => {
- const r = {
- name: "updateState",
- enabled: !0,
- phase: "write",
- fn: ({ state: l }) => {
- const u = nEe(l);
- Object.assign(o.value, u);
- },
- requires: ["computeStyles"]
- }, i = V(() => {
- const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = z(n);
- return {
- onFirstUpdate: l,
- placement: u || "bottom",
- strategy: c || "absolute",
- modifiers: [
- ...f || [],
- r,
- { name: "applyStyles", enabled: !1 }
- ]
- };
- }), a = ve(), o = ee({
- styles: {
- popper: {
- position: z(i).strategy,
- left: "0",
- top: "0"
- },
- arrow: {
- position: "absolute"
- }
- },
- attributes: {}
- }), s = () => {
- a.value && (a.value.destroy(), a.value = void 0);
- };
- return me(i, (l) => {
- const u = z(a);
- u && u.setOptions(l);
- }, {
- deep: !0
- }), me([t, e], ([l, u]) => {
- s(), !(!l || !u) && (a.value = eEe(l, u, z(i)));
- }), Qt(() => {
- s();
- }), {
- state: V(() => {
- var l;
- return { ...((l = z(a)) == null ? void 0 : l.state) || {} };
- }),
- styles: V(() => z(o).styles),
- attributes: V(() => z(o).attributes),
- update: () => {
- var l;
- return (l = z(a)) == null ? void 0 : l.update();
- },
- forceUpdate: () => {
- var l;
- return (l = z(a)) == null ? void 0 : l.forceUpdate();
- },
- instanceRef: V(() => z(a))
- };
- };
- function nEe(t) {
- const e = Object.keys(t.elements), n = Ww(e.map((i) => [i, t.styles[i] || {}])), r = Ww(e.map((i) => [i, t.attributes[i]]));
- return {
- styles: n,
- attributes: r
- };
- }
- const zte = (t) => {
- if (!t)
- return { onClick: Kc, onMousedown: Kc, onMouseup: Kc };
- let e = !1, n = !1;
- return { onClick: (o) => {
- e && n && t(o), e = n = !1;
- }, onMousedown: (o) => {
- e = o.target === o.currentTarget;
- }, onMouseup: (o) => {
- n = o.target === o.currentTarget;
- } };
- };
- function dW() {
- let t;
- const e = (r, i) => {
- n(), t = window.setTimeout(r, i);
- }, n = () => window.clearTimeout(t);
- return t2(() => n()), {
- registerTimeout: e,
- cancelTimeout: n
- };
- }
- const YD = {
- prefix: Math.floor(Math.random() * 1e4),
- current: 0
- }, rEe = Symbol("elIdInjection"), Vte = () => In() ? et(rEe, YD) : YD, wb = (t) => {
- const e = Vte();
- !Fr && e === YD && Fi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
- usage: app.provide(ID_INJECTION_KEY, {
- prefix: number,
- current: number,
- })`);
- const n = yN();
- return V(() => z(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
- };
- let mv = [];
- const hW = (t) => {
- const e = t;
- e.key === wa.esc && mv.forEach((n) => n(e));
- }, iEe = (t) => {
- _t(() => {
- mv.length === 0 && document.addEventListener("keydown", hW), Fr && mv.push(t);
- }), Qt(() => {
- mv = mv.filter((e) => e !== t), mv.length === 0 && Fr && document.removeEventListener("keydown", hW);
- });
- };
- let pW;
- const Fte = () => {
- const t = yN(), e = Vte(), n = V(() => `${t.value}-popper-container-${e.prefix}`), r = V(() => `#${n.value}`);
- return {
- id: n,
- selector: r
- };
- }, aEe = (t) => {
- const e = document.createElement("div");
- return e.id = t, document.body.appendChild(e), e;
- }, oEe = () => {
- const { id: t, selector: e } = Fte();
- return $ee(() => {
- Fr && (process.env.NODE_ENV === "test" || !pW && !document.body.querySelector(e.value)) && (pW = aEe(t.value));
- }), {
- id: t,
- selector: e
- };
- }, sEe = hr({
- showAfter: {
- type: Number,
- default: 0
- },
- hideAfter: {
- type: Number,
- default: 200
- },
- autoClose: {
- type: Number,
- default: 0
- }
- }), lEe = ({
- showAfter: t,
- hideAfter: e,
- autoClose: n,
- open: r,
- close: i
- }) => {
- const { registerTimeout: a } = dW(), {
- registerTimeout: o,
- cancelTimeout: s
- } = dW();
- return {
- onOpen: (c) => {
- a(() => {
- r(c);
- const f = z(n);
- Ws(f) && f > 0 && o(() => {
- i(c);
- }, f);
- }, z(t));
- },
- onClose: (c) => {
- s(), a(() => {
- i(c);
- }, z(e));
- }
- };
- }, Wte = Symbol("elForwardRef"), uEe = (t) => {
- Et(Wte, {
- setForwardRef: (n) => {
- t.value = n;
- }
- });
- }, cEe = (t) => ({
- mounted(e) {
- t(e);
- },
- updated(e) {
- t(e);
- },
- unmounted() {
- t(null);
- }
- }), vW = {
- current: 0
- }, gW = ee(0), fEe = 2e3, mW = Symbol("elZIndexContextKey"), dEe = Symbol("zIndexContextKey"), Qte = (t) => {
- const e = In() ? et(mW, vW) : vW, n = In() ? et(dEe, void 0) : void 0, r = V(() => {
- const o = z(n);
- return Ws(o) ? o : fEe;
- }), i = V(() => r.value + gW.value), a = () => (e.current++, gW.value = e.current, i.value);
- return !Fr && !et(mW) && Fi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
- initialZIndex: r,
- currentZIndex: i,
- nextZIndex: a
- };
- };
- function hEe(t) {
- const e = ee();
- function n() {
- if (t.value == null)
- return;
- const { selectionStart: i, selectionEnd: a, value: o } = t.value;
- if (i == null || a == null)
- return;
- const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
- e.value = {
- selectionStart: i,
- selectionEnd: a,
- value: o,
- beforeTxt: s,
- afterTxt: l
- };
- }
- function r() {
- if (t.value == null || e.value == null)
- return;
- const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
- if (a == null || o == null || s == null)
- return;
- let l = i.length;
- if (i.endsWith(o))
- l = i.length - o.length;
- else if (i.startsWith(a))
- l = a.length;
- else {
- const u = a[s - 1], c = i.indexOf(u, s - 1);
- c !== -1 && (l = c + 1);
- }
- t.value.setSelectionRange(l, l);
- }
- return [n, r];
- }
- const op = d2({
- type: String,
- values: L$e,
- required: !1
- }), pEe = Symbol("size"), vEe = () => {
- const t = et(pEe, {});
- return V(() => z(t.size) || "");
- };
- function Hte(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
- const i = In(), { emit: a } = i, o = ve(), s = ee(!1), l = (f) => {
- s.value || (s.value = !0, a("focus", f), e == null || e());
- }, u = (f) => {
- var d;
- Jd(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
- }, c = () => {
- var f;
- (f = t.value) == null || f.focus();
- };
- return me(o, (f) => {
- f && f.setAttribute("tabindex", "-1");
- }), Iy(o, "click", c), {
- wrapperRef: o,
- isFocused: s,
- handleFocus: l,
- handleBlur: u
- };
- }
- const gEe = hr({
- ariaLabel: String,
- ariaOrientation: {
- type: String,
- values: ["horizontal", "vertical", "undefined"]
- },
- ariaControls: String
- }), sp = (t) => mg(gEe, t), mEe = Symbol(), yW = ee();
- function Gte(t, e = void 0) {
- const n = In() ? et(mEe, yW) : yW;
- return t ? V(() => {
- var r, i;
- return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
- }) : n;
- }
- var Nn = (t, e) => {
- const n = t.__vccOpts || t;
- for (const [r, i] of e)
- n[r] = i;
- return n;
- };
- const yEe = hr({
- size: {
- type: mn([Number, String])
- },
- color: {
- type: String
- }
- }), bEe = ae({
- name: "ElIcon",
- inheritAttrs: !1
- }), _Ee = /* @__PURE__ */ ae({
- ...bEe,
- props: yEe,
- setup(t) {
- const e = t, n = $n("icon"), r = V(() => {
- const { size: i, color: a } = e;
- return !i && !a ? {} : {
- fontSize: Qw(i) ? void 0 : bg(i),
- "--color": a
- };
- });
- return (i, a) => (be(), Ue("i", Xn({
- class: z(n).b(),
- style: z(r)
- }, i.$attrs), [
- ln(i.$slots, "default")
- ], 16));
- }
- });
- var OEe = /* @__PURE__ */ Nn(_Ee, [["__file", "icon.vue"]]);
- const $s = ec(OEe), $N = Symbol("formContextKey"), Cb = Symbol("formItemContextKey"), Tg = (t, e = {}) => {
- const n = ee(void 0), r = e.prop ? n : Pte("size"), i = e.global ? n : vEe(), a = e.form ? { size: void 0 } : et($N, void 0), o = e.formItem ? { size: void 0 } : et(Cb, void 0);
- return V(() => r.value || z(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
- }, um = (t) => {
- const e = Pte("disabled"), n = et($N, void 0);
- return V(() => e.value || z(t) || (n == null ? void 0 : n.disabled) || !1);
- }, lp = () => {
- const t = et($N, void 0), e = et(Cb, void 0);
- return {
- form: t,
- formItem: e
- };
- }, Q_ = (t, {
- formItemContext: e,
- disableIdGeneration: n,
- disableIdManagement: r
- }) => {
- n || (n = ee(!1)), r || (r = ee(!1));
- const i = ee();
- let a;
- const o = V(() => {
- var s;
- return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
- });
- return _t(() => {
- a = me([Lr(t, "id"), n], ([s, l]) => {
- const u = s ?? (l ? void 0 : wb().value);
- u !== i.value && (e != null && e.removeInputId && (i.value && e.removeInputId(i.value), !(r != null && r.value) && !l && u && e.addInputId(u)), i.value = u);
- }, { immediate: !0 });
- }), qu(() => {
- a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
- }), {
- isLabeledByFormItem: o,
- inputId: i
- };
- };
- function eh() {
- return eh = Object.assign ? Object.assign.bind() : function(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var r in n)
- Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
- }
- return t;
- }, eh.apply(this, arguments);
- }
- function SEe(t, e) {
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, Tb(t, e);
- }
- function qD(t) {
- return qD = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
- return n.__proto__ || Object.getPrototypeOf(n);
- }, qD(t);
- }
- function Tb(t, e) {
- return Tb = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
- return r.__proto__ = i, r;
- }, Tb(t, e);
- }
- function xEe() {
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
- if (typeof Proxy == "function") return !0;
- try {
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
- })), !0;
- } catch {
- return !1;
- }
- }
- function Vx(t, e, n) {
- return xEe() ? Vx = Reflect.construct.bind() : Vx = function(i, a, o) {
- var s = [null];
- s.push.apply(s, a);
- var l = Function.bind.apply(i, s), u = new l();
- return o && Tb(u, o.prototype), u;
- }, Vx.apply(null, arguments);
- }
- function wEe(t) {
- return Function.toString.call(t).indexOf("[native code]") !== -1;
- }
- function KD(t) {
- var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
- return KD = function(r) {
- if (r === null || !wEe(r)) return r;
- if (typeof r != "function")
- throw new TypeError("Super expression must either be null or a function");
- if (typeof e < "u") {
- if (e.has(r)) return e.get(r);
- e.set(r, i);
- }
- function i() {
- return Vx(r, arguments, qD(this).constructor);
- }
- return i.prototype = Object.create(r.prototype, {
- constructor: {
- value: i,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), Tb(i, r);
- }, KD(t);
- }
- var CEe = /%[sdj%]/g, jte = function() {
- };
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (jte = function(e, n) {
- typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
- return typeof r == "string";
- }) && console.warn(e, n);
- });
- function JD(t) {
- if (!t || !t.length) return null;
- var e = {};
- return t.forEach(function(n) {
- var r = n.field;
- e[r] = e[r] || [], e[r].push(n);
- }), e;
- }
- function io(t) {
- for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
- n[r - 1] = arguments[r];
- var i = 0, a = n.length;
- if (typeof t == "function")
- return t.apply(null, n);
- if (typeof t == "string") {
- var o = t.replace(CEe, function(s) {
- if (s === "%%")
- return "%";
- if (i >= a)
- return s;
- switch (s) {
- case "%s":
- return String(n[i++]);
- case "%d":
- return Number(n[i++]);
- case "%j":
- try {
- return JSON.stringify(n[i++]);
- } catch {
- return "[Circular]";
- }
- break;
- default:
- return s;
- }
- });
- return o;
- }
- return t;
- }
- function TEe(t) {
- return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
- }
- function Jr(t, e) {
- return !!(t == null || e === "array" && Array.isArray(t) && !t.length || TEe(e) && typeof t == "string" && !t);
- }
- function PEe(t, e, n) {
- var r = [], i = 0, a = t.length;
- function o(s) {
- r.push.apply(r, s || []), i++, i === a && n(r);
- }
- t.forEach(function(s) {
- e(s, o);
- });
- }
- function bW(t, e, n) {
- var r = 0, i = t.length;
- function a(o) {
- if (o && o.length) {
- n(o);
- return;
- }
- var s = r;
- r = r + 1, s < i ? e(t[s], a) : n([]);
- }
- a([]);
- }
- function $Ee(t) {
- var e = [];
- return Object.keys(t).forEach(function(n) {
- e.push.apply(e, t[n] || []);
- }), e;
- }
- var _W = /* @__PURE__ */ function(t) {
- SEe(e, t);
- function e(n, r) {
- var i;
- return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
- }
- return e;
- }(/* @__PURE__ */ KD(Error));
- function AEe(t, e, n, r, i) {
- if (e.first) {
- var a = new Promise(function(d, h) {
- var p = function(m) {
- return r(m), m.length ? h(new _W(m, JD(m))) : d(i);
- }, v = $Ee(t);
- bW(v, n, p);
- });
- return a.catch(function(d) {
- return d;
- }), a;
- }
- var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], s = Object.keys(t), l = s.length, u = 0, c = [], f = new Promise(function(d, h) {
- var p = function(g) {
- if (c.push.apply(c, g), u++, u === l)
- return r(c), c.length ? h(new _W(c, JD(c))) : d(i);
- };
- s.length || (r(c), d(i)), s.forEach(function(v) {
- var g = t[v];
- o.indexOf(v) !== -1 ? bW(g, n, p) : PEe(g, n, p);
- });
- });
- return f.catch(function(d) {
- return d;
- }), f;
- }
- function EEe(t) {
- return !!(t && t.message !== void 0);
- }
- function MEe(t, e) {
- for (var n = t, r = 0; r < e.length; r++) {
- if (n == null)
- return n;
- n = n[e[r]];
- }
- return n;
- }
- function OW(t, e) {
- return function(n) {
- var r;
- return t.fullFields ? r = MEe(e, t.fullFields) : r = e[n.field || t.fullField], EEe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
- message: typeof n == "function" ? n() : n,
- fieldValue: r,
- field: n.field || t.fullField
- };
- };
- }
- function SW(t, e) {
- if (e) {
- for (var n in e)
- if (e.hasOwnProperty(n)) {
- var r = e[n];
- typeof r == "object" && typeof t[n] == "object" ? t[n] = eh({}, t[n], r) : t[n] = r;
- }
- }
- return t;
- }
- var Zte = function(e, n, r, i, a, o) {
- e.required && (!r.hasOwnProperty(e.field) || Jr(n, o || e.type)) && i.push(io(a.messages.required, e.fullField));
- }, IEe = function(e, n, r, i, a) {
- (/^\s+$/.test(n) || n === "") && i.push(io(a.messages.whitespace, e.fullField));
- }, kO, DEe = function() {
- if (kO)
- return kO;
- var t = "[a-fA-F\\d:]", e = function(O) {
- return O && O.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
- }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", i = (`
- (?:
- (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
- (?:` + r + ":){6}(?:" + n + "|:" + r + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
- (?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
- (?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
- (?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
- (?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
- (?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
- (?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
- )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(O) {
- return O && O.exact ? a : new RegExp("(?:" + e(O) + n + e(O) + ")|(?:" + e(O) + i + e(O) + ")", "g");
- };
- l.v4 = function(_) {
- return _ && _.exact ? o : new RegExp("" + e(_) + n + e(_), "g");
- }, l.v6 = function(_) {
- return _ && _.exact ? s : new RegExp("" + e(_) + i + e(_), "g");
- };
- var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, d = l.v6().source, h = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', y = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + f + "|" + d + "|" + h + p + v + ")" + g + m;
- return kO = new RegExp("(?:^" + y + "$)", "i"), kO;
- }, xW = {
- // http://emailregex.com/
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
- // url: new RegExp(
- // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
- // 'i',
- // ),
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
- }, uy = {
- integer: function(e) {
- return uy.number(e) && parseInt(e, 10) === e;
- },
- float: function(e) {
- return uy.number(e) && !uy.integer(e);
- },
- array: function(e) {
- return Array.isArray(e);
- },
- regexp: function(e) {
- if (e instanceof RegExp)
- return !0;
- try {
- return !!new RegExp(e);
- } catch {
- return !1;
- }
- },
- date: function(e) {
- return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
- },
- number: function(e) {
- return isNaN(e) ? !1 : typeof e == "number";
- },
- object: function(e) {
- return typeof e == "object" && !uy.array(e);
- },
- method: function(e) {
- return typeof e == "function";
- },
- email: function(e) {
- return typeof e == "string" && e.length <= 320 && !!e.match(xW.email);
- },
- url: function(e) {
- return typeof e == "string" && e.length <= 2048 && !!e.match(DEe());
- },
- hex: function(e) {
- return typeof e == "string" && !!e.match(xW.hex);
- }
- }, REe = function(e, n, r, i, a) {
- if (e.required && n === void 0) {
- Zte(e, n, r, i, a);
- return;
- }
- var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
- o.indexOf(s) > -1 ? uy[s](n) || i.push(io(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(io(a.messages.types[s], e.fullField, e.type));
- }, kEe = function(e, n, r, i, a) {
- var o = typeof e.len == "number", s = typeof e.min == "number", l = typeof e.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, f = null, d = typeof n == "number", h = typeof n == "string", p = Array.isArray(n);
- if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
- return !1;
- p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(io(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(io(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(io(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(io(a.messages[f].range, e.fullField, e.min, e.max));
- }, zp = "enum", LEe = function(e, n, r, i, a) {
- e[zp] = Array.isArray(e[zp]) ? e[zp] : [], e[zp].indexOf(n) === -1 && i.push(io(a.messages[zp], e.fullField, e[zp].join(", ")));
- }, NEe = function(e, n, r, i, a) {
- if (e.pattern) {
- if (e.pattern instanceof RegExp)
- e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(io(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
- else if (typeof e.pattern == "string") {
- var o = new RegExp(e.pattern);
- o.test(n) || i.push(io(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
- }
- }
- }, dn = {
- required: Zte,
- whitespace: IEe,
- type: REe,
- range: kEe,
- enum: LEe,
- pattern: NEe
- }, BEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n, "string") && !e.required)
- return r();
- dn.required(e, n, i, o, a, "string"), Jr(n, "string") || (dn.type(e, n, i, o, a), dn.range(e, n, i, o, a), dn.pattern(e, n, i, o, a), e.whitespace === !0 && dn.whitespace(e, n, i, o, a));
- }
- r(o);
- }, zEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && dn.type(e, n, i, o, a);
- }
- r(o);
- }, VEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (n === "" && (n = void 0), Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && (dn.type(e, n, i, o, a), dn.range(e, n, i, o, a));
- }
- r(o);
- }, FEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && dn.type(e, n, i, o, a);
- }
- r(o);
- }, WEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), Jr(n) || dn.type(e, n, i, o, a);
- }
- r(o);
- }, QEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && (dn.type(e, n, i, o, a), dn.range(e, n, i, o, a));
- }
- r(o);
- }, HEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && (dn.type(e, n, i, o, a), dn.range(e, n, i, o, a));
- }
- r(o);
- }, GEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (n == null && !e.required)
- return r();
- dn.required(e, n, i, o, a, "array"), n != null && (dn.type(e, n, i, o, a), dn.range(e, n, i, o, a));
- }
- r(o);
- }, jEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && dn.type(e, n, i, o, a);
- }
- r(o);
- }, ZEe = "enum", UEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a), n !== void 0 && dn[ZEe](e, n, i, o, a);
- }
- r(o);
- }, XEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n, "string") && !e.required)
- return r();
- dn.required(e, n, i, o, a), Jr(n, "string") || dn.pattern(e, n, i, o, a);
- }
- r(o);
- }, YEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n, "date") && !e.required)
- return r();
- if (dn.required(e, n, i, o, a), !Jr(n, "date")) {
- var l;
- n instanceof Date ? l = n : l = new Date(n), dn.type(e, l, i, o, a), l && dn.range(e, l.getTime(), i, o, a);
- }
- }
- r(o);
- }, qEe = function(e, n, r, i, a) {
- var o = [], s = Array.isArray(n) ? "array" : typeof n;
- dn.required(e, n, i, o, a, s), r(o);
- }, zA = function(e, n, r, i, a) {
- var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
- if (l) {
- if (Jr(n, o) && !e.required)
- return r();
- dn.required(e, n, i, s, a, o), Jr(n, o) || dn.type(e, n, i, s, a);
- }
- r(s);
- }, KEe = function(e, n, r, i, a) {
- var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
- if (s) {
- if (Jr(n) && !e.required)
- return r();
- dn.required(e, n, i, o, a);
- }
- r(o);
- }, Ny = {
- string: BEe,
- method: zEe,
- number: VEe,
- boolean: FEe,
- regexp: WEe,
- integer: QEe,
- float: HEe,
- array: GEe,
- object: jEe,
- enum: UEe,
- pattern: XEe,
- date: YEe,
- url: zA,
- hex: zA,
- email: zA,
- required: qEe,
- any: KEe
- };
- function eR() {
- return {
- default: "Validation error on field %s",
- required: "%s is required",
- enum: "%s must be one of %s",
- whitespace: "%s cannot be empty",
- date: {
- format: "%s date %s is invalid for format %s",
- parse: "%s date could not be parsed, %s is invalid ",
- invalid: "%s date %s is invalid"
- },
- types: {
- string: "%s is not a %s",
- method: "%s is not a %s (function)",
- array: "%s is not an %s",
- object: "%s is not an %s",
- number: "%s is not a %s",
- date: "%s is not a %s",
- boolean: "%s is not a %s",
- integer: "%s is not an %s",
- float: "%s is not a %s",
- regexp: "%s is not a valid %s",
- email: "%s is not a valid %s",
- url: "%s is not a valid %s",
- hex: "%s is not a valid %s"
- },
- string: {
- len: "%s must be exactly %s characters",
- min: "%s must be at least %s characters",
- max: "%s cannot be longer than %s characters",
- range: "%s must be between %s and %s characters"
- },
- number: {
- len: "%s must equal %s",
- min: "%s cannot be less than %s",
- max: "%s cannot be greater than %s",
- range: "%s must be between %s and %s"
- },
- array: {
- len: "%s must be exactly %s in length",
- min: "%s cannot be less than %s in length",
- max: "%s cannot be greater than %s in length",
- range: "%s must be between %s and %s in length"
- },
- pattern: {
- mismatch: "%s value %s does not match pattern %s"
- },
- clone: function() {
- var e = JSON.parse(JSON.stringify(this));
- return e.clone = this.clone, e;
- }
- };
- }
- var tR = eR(), H_ = /* @__PURE__ */ function() {
- function t(n) {
- this.rules = null, this._messages = tR, this.define(n);
- }
- var e = t.prototype;
- return e.define = function(r) {
- var i = this;
- if (!r)
- throw new Error("Cannot configure a schema with no rules");
- if (typeof r != "object" || Array.isArray(r))
- throw new Error("Rules must be an object");
- this.rules = {}, Object.keys(r).forEach(function(a) {
- var o = r[a];
- i.rules[a] = Array.isArray(o) ? o : [o];
- });
- }, e.messages = function(r) {
- return r && (this._messages = SW(eR(), r)), this._messages;
- }, e.validate = function(r, i, a) {
- var o = this;
- i === void 0 && (i = {}), a === void 0 && (a = function() {
- });
- var s = r, l = i, u = a;
- if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
- return u && u(null, s), Promise.resolve(s);
- function c(v) {
- var g = [], m = {};
- function y(O) {
- if (Array.isArray(O)) {
- var S;
- g = (S = g).concat.apply(S, O);
- } else
- g.push(O);
- }
- for (var _ = 0; _ < v.length; _++)
- y(v[_]);
- g.length ? (m = JD(g), u(g, m)) : u(null, s);
- }
- if (l.messages) {
- var f = this.messages();
- f === tR && (f = eR()), SW(f, l.messages), l.messages = f;
- } else
- l.messages = this.messages();
- var d = {}, h = l.keys || Object.keys(this.rules);
- h.forEach(function(v) {
- var g = o.rules[v], m = s[v];
- g.forEach(function(y) {
- var _ = y;
- typeof _.transform == "function" && (s === r && (s = eh({}, s)), m = s[v] = _.transform(m)), typeof _ == "function" ? _ = {
- validator: _
- } : _ = eh({}, _), _.validator = o.getValidationMethod(_), _.validator && (_.field = v, _.fullField = _.fullField || v, _.type = o.getType(_), d[v] = d[v] || [], d[v].push({
- rule: _,
- value: m,
- source: s,
- field: v
- }));
- });
- });
- var p = {};
- return AEe(d, l, function(v, g) {
- var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
- y = y && (m.required || !m.required && v.value), m.field = v.field;
- function _(x, C) {
- return eh({}, C, {
- fullField: m.fullField + "." + x,
- fullFields: m.fullFields ? [].concat(m.fullFields, [x]) : [x]
- });
- }
- function O(x) {
- x === void 0 && (x = []);
- var C = Array.isArray(x) ? x : [x];
- !l.suppressWarning && C.length && t.warning("async-validator:", C), C.length && m.message !== void 0 && (C = [].concat(m.message));
- var P = C.map(OW(m, s));
- if (l.first && P.length)
- return p[m.field] = 1, g(P);
- if (!y)
- g(P);
- else {
- if (m.required && !v.value)
- return m.message !== void 0 ? P = [].concat(m.message).map(OW(m, s)) : l.error && (P = [l.error(m, io(l.messages.required, m.field))]), g(P);
- var $ = {};
- m.defaultField && Object.keys(v.value).map(function(M) {
- $[M] = m.defaultField;
- }), $ = eh({}, $, v.rule.fields);
- var T = {};
- Object.keys($).forEach(function(M) {
- var R = $[M], N = Array.isArray(R) ? R : [R];
- T[M] = N.map(_.bind(null, M));
- });
- var E = new t(T);
- E.messages(l.messages), v.rule.options && (v.rule.options.messages = l.messages, v.rule.options.error = l.error), E.validate(v.value, v.rule.options || l, function(M) {
- var R = [];
- P && P.length && R.push.apply(R, P), M && M.length && R.push.apply(R, M), g(R.length ? R : null);
- });
- }
- }
- var S;
- if (m.asyncValidator)
- S = m.asyncValidator(m, v.value, O, v.source, l);
- else if (m.validator) {
- try {
- S = m.validator(m, v.value, O, v.source, l);
- } catch (x) {
- console.error == null || console.error(x), l.suppressValidatorError || setTimeout(function() {
- throw x;
- }, 0), O(x.message);
- }
- S === !0 ? O() : S === !1 ? O(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : S instanceof Array ? O(S) : S instanceof Error && O(S.message);
- }
- S && S.then && S.then(function() {
- return O();
- }, function(x) {
- return O(x);
- });
- }, function(v) {
- c(v);
- }, s);
- }, e.getType = function(r) {
- if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Ny.hasOwnProperty(r.type))
- throw new Error(io("Unknown rule type %s", r.type));
- return r.type || "string";
- }, e.getValidationMethod = function(r) {
- if (typeof r.validator == "function")
- return r.validator;
- var i = Object.keys(r), a = i.indexOf("message");
- return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? Ny.required : Ny[this.getType(r)] || void 0;
- }, t;
- }();
- H_.register = function(e, n) {
- if (typeof n != "function")
- throw new Error("Cannot register a validator by type, validator is not a function");
- Ny[e] = n;
- };
- H_.warning = jte;
- H_.messages = tR;
- H_.validators = Ny;
- let Os;
- const JEe = `
- height:0 !important;
- visibility:hidden !important;
- ${Exe() ? "" : "overflow:hidden !important;"}
- position:absolute !important;
- z-index:-1000 !important;
- top:0 !important;
- right:0 !important;
- `, eMe = [
- "letter-spacing",
- "line-height",
- "padding-top",
- "padding-bottom",
- "font-family",
- "font-weight",
- "font-size",
- "text-rendering",
- "text-transform",
- "width",
- "text-indent",
- "padding-left",
- "padding-right",
- "border-width",
- "box-sizing"
- ];
- function tMe(t) {
- const e = window.getComputedStyle(t), n = e.getPropertyValue("box-sizing"), r = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), i = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width"));
- return { contextStyle: eMe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
- }
- function wW(t, e = 1, n) {
- var r;
- Os || (Os = document.createElement("textarea"), document.body.appendChild(Os));
- const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = tMe(t);
- Os.setAttribute("style", `${s};${JEe}`), Os.value = t.value || t.placeholder || "";
- let l = Os.scrollHeight;
- const u = {};
- o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Os.value = "";
- const c = Os.scrollHeight - i;
- if (Ws(e)) {
- let f = c * e;
- o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
- }
- if (Ws(n)) {
- let f = c * n;
- o === "border-box" && (f = f + i + a), l = Math.min(f, l);
- }
- return u.height = `${l}px`, (r = Os.parentNode) == null || r.removeChild(Os), Os = void 0, u;
- }
- const nMe = hr({
- id: {
- type: String,
- default: void 0
- },
- size: op,
- disabled: Boolean,
- modelValue: {
- type: mn([
- String,
- Number,
- Object
- ]),
- default: ""
- },
- maxlength: {
- type: [String, Number]
- },
- minlength: {
- type: [String, Number]
- },
- type: {
- type: String,
- default: "text"
- },
- resize: {
- type: String,
- values: ["none", "both", "horizontal", "vertical"]
- },
- autosize: {
- type: mn([Boolean, Object]),
- default: !1
- },
- autocomplete: {
- type: String,
- default: "off"
- },
- formatter: {
- type: Function
- },
- parser: {
- type: Function
- },
- placeholder: {
- type: String
- },
- form: {
- type: String
- },
- readonly: {
- type: Boolean,
- default: !1
- },
- clearable: {
- type: Boolean,
- default: !1
- },
- showPassword: {
- type: Boolean,
- default: !1
- },
- showWordLimit: {
- type: Boolean,
- default: !1
- },
- suffixIcon: {
- type: _g
- },
- prefixIcon: {
- type: _g
- },
- containerRole: {
- type: String,
- default: void 0
- },
- label: {
- type: String,
- default: void 0
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- validateEvent: {
- type: Boolean,
- default: !0
- },
- inputStyle: {
- type: mn([Object, Array, String]),
- default: () => B$e({})
- },
- autofocus: {
- type: Boolean,
- default: !1
- },
- ...sp(["ariaLabel"])
- }), rMe = {
- [ca]: (t) => ia(t),
- input: (t) => ia(t),
- change: (t) => ia(t),
- focus: (t) => t instanceof FocusEvent,
- blur: (t) => t instanceof FocusEvent,
- clear: () => !0,
- mouseleave: (t) => t instanceof MouseEvent,
- mouseenter: (t) => t instanceof MouseEvent,
- keydown: (t) => t instanceof Event,
- compositionstart: (t) => t instanceof CompositionEvent,
- compositionupdate: (t) => t instanceof CompositionEvent,
- compositionend: (t) => t instanceof CompositionEvent
- }, iMe = ["role"], aMe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], oMe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], sMe = ae({
- name: "ElInput",
- inheritAttrs: !1
- }), lMe = /* @__PURE__ */ ae({
- ...sMe,
- props: nMe,
- emits: rMe,
- setup(t, { expose: e, emit: n }) {
- const r = t, i = sxe(), a = D_(), o = V(() => {
- const Ae = {};
- return r.containerRole === "combobox" && (Ae["aria-haspopup"] = i["aria-haspopup"], Ae["aria-owns"] = i["aria-owns"], Ae["aria-expanded"] = i["aria-expanded"]), Ae;
- }), s = V(() => [
- r.type === "textarea" ? g.b() : v.b(),
- v.m(h.value),
- v.is("disabled", p.value),
- v.is("exceed", fe.value),
- {
- [v.b("group")]: a.prepend || a.append,
- [v.m("prefix")]: a.prefix || r.prefixIcon,
- [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
- [v.bm("suffix", "password-clear")]: U.value && j.value,
- [v.b("hidden")]: r.type === "hidden"
- },
- i.class
- ]), l = V(() => [
- v.e("wrapper"),
- v.is("focus", T.value)
- ]), u = F$e({
- excludeKeys: V(() => Object.keys(o.value))
- }), { form: c, formItem: f } = lp(), { inputId: d } = Q_(r, {
- formItemContext: f
- }), h = Tg(), p = um(), v = $n("input"), g = $n("textarea"), m = ve(), y = ve(), _ = ee(!1), O = ee(!1), S = ee(!1), x = ee(), C = ve(r.inputStyle), P = V(() => m.value || y.value), { wrapperRef: $, isFocused: T, handleFocus: E, handleBlur: M } = Hte(P, {
- afterBlur() {
- var Ae;
- r.validateEvent && ((Ae = f == null ? void 0 : f.validate) == null || Ae.call(f, "blur").catch((gt) => Fi(gt)));
- }
- }), R = V(() => {
- var Ae;
- return (Ae = c == null ? void 0 : c.statusIcon) != null ? Ae : !1;
- }), N = V(() => (f == null ? void 0 : f.validateState) || ""), I = V(() => N.value && R$e[N.value]), B = V(() => S.value ? M$e : $$e), Q = V(() => [
- i.style
- ]), W = V(() => [
- r.inputStyle,
- C.value,
- { resize: r.resize }
- ]), H = V(() => Jc(r.modelValue) ? "" : String(r.modelValue)), U = V(() => r.clearable && !p.value && !r.readonly && !!H.value && (T.value || _.value)), j = V(() => r.showPassword && !p.value && !r.readonly && !!H.value && (!!H.value || T.value)), Y = V(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ne = V(() => H.value.length), fe = V(() => !!Y.value && ne.value > Number(r.maxlength)), ue = V(() => !!a.suffix || !!r.suffixIcon || U.value || r.showPassword || Y.value || !!N.value && R.value), [ye, se] = hEe(m);
- wxe(y, (Ae) => {
- if (q(), !Y.value || r.resize !== "both")
- return;
- const gt = Ae[0], { width: Xt } = gt.contentRect;
- x.value = {
- right: `calc(100% - ${Xt + 15 + 6}px)`
- };
- });
- const he = () => {
- const { type: Ae, autosize: gt } = r;
- if (!(!Fr || Ae !== "textarea" || !y.value))
- if (gt) {
- const Xt = Rh(gt) ? gt.minRows : void 0, Bn = Rh(gt) ? gt.maxRows : void 0, Dn = wW(y.value, Xt, Bn);
- C.value = {
- overflowY: "hidden",
- ...Dn
- }, Bt(() => {
- y.value.offsetHeight, C.value = Dn;
- });
- } else
- C.value = {
- minHeight: wW(y.value).minHeight
- };
- }, q = ((Ae) => {
- let gt = !1;
- return () => {
- var Xt;
- if (gt || !r.autosize)
- return;
- ((Xt = y.value) == null ? void 0 : Xt.offsetParent) === null || (Ae(), gt = !0);
- };
- })(he), K = () => {
- const Ae = P.value, gt = r.formatter ? r.formatter(H.value) : H.value;
- !Ae || Ae.value === gt || (Ae.value = gt);
- }, de = async (Ae) => {
- ye();
- let { value: gt } = Ae.target;
- if (r.formatter && (gt = r.parser ? r.parser(gt) : gt), !O.value) {
- if (gt === H.value) {
- K();
- return;
- }
- n(ca, gt), n("input", gt), await Bt(), K(), se();
- }
- }, xe = (Ae) => {
- n("change", Ae.target.value);
- }, we = (Ae) => {
- n("compositionstart", Ae), O.value = !0;
- }, He = (Ae) => {
- var gt;
- n("compositionupdate", Ae);
- const Xt = (gt = Ae.target) == null ? void 0 : gt.value, Bn = Xt[Xt.length - 1] || "";
- O.value = !N$e(Bn);
- }, je = (Ae) => {
- n("compositionend", Ae), O.value && (O.value = !1, de(Ae));
- }, Be = () => {
- S.value = !S.value, Le();
- }, Le = async () => {
- var Ae;
- await Bt(), (Ae = P.value) == null || Ae.focus();
- }, Pe = () => {
- var Ae;
- return (Ae = P.value) == null ? void 0 : Ae.blur();
- }, Fe = (Ae) => {
- _.value = !1, n("mouseleave", Ae);
- }, Ye = (Ae) => {
- _.value = !0, n("mouseenter", Ae);
- }, xt = (Ae) => {
- n("keydown", Ae);
- }, It = () => {
- var Ae;
- (Ae = P.value) == null || Ae.select();
- }, an = () => {
- n(ca, ""), n("change", ""), n("clear"), n("input", "");
- };
- return me(() => r.modelValue, () => {
- var Ae;
- Bt(() => he()), r.validateEvent && ((Ae = f == null ? void 0 : f.validate) == null || Ae.call(f, "change").catch((gt) => Fi(gt)));
- }), me(H, () => K()), me(() => r.type, async () => {
- await Bt(), K(), he();
- }), _t(() => {
- !r.formatter && r.parser && Fi("ElInput", "If you set the parser, you also need to set the formatter."), K(), Bt(he);
- }), Es({
- from: "label",
- replacement: "aria-label",
- version: "2.8.0",
- scope: "el-input",
- ref: "https://element-plus.org/en-US/component/input.html"
- }, V(() => !!r.label)), e({
- input: m,
- textarea: y,
- ref: P,
- textareaStyle: W,
- autosize: Lr(r, "autosize"),
- focus: Le,
- blur: Pe,
- select: It,
- clear: an,
- resizeTextarea: he
- }), (Ae, gt) => (be(), Ue("div", Xn(z(o), {
- class: [
- z(s),
- {
- [z(v).bm("group", "append")]: Ae.$slots.append,
- [z(v).bm("group", "prepend")]: Ae.$slots.prepend
- }
- ],
- style: z(Q),
- role: Ae.containerRole,
- onMouseenter: Ye,
- onMouseleave: Fe
- }), [
- Ot(" input "),
- Ae.type !== "textarea" ? (be(), Ue(Wt, { key: 0 }, [
- Ot(" prepend slot "),
- Ae.$slots.prepend ? (be(), Ue("div", {
- key: 0,
- class: Ge(z(v).be("group", "prepend"))
- }, [
- ln(Ae.$slots, "prepend")
- ], 2)) : Ot("v-if", !0),
- tt("div", {
- ref_key: "wrapperRef",
- ref: $,
- class: Ge(z(l))
- }, [
- Ot(" prefix slot "),
- Ae.$slots.prefix || Ae.prefixIcon ? (be(), Ue("span", {
- key: 0,
- class: Ge(z(v).e("prefix"))
- }, [
- tt("span", {
- class: Ge(z(v).e("prefix-inner"))
- }, [
- ln(Ae.$slots, "prefix"),
- Ae.prefixIcon ? (be(), Je(z($s), {
- key: 0,
- class: Ge(z(v).e("icon"))
- }, {
- default: ke(() => [
- (be(), Je(As(Ae.prefixIcon)))
- ]),
- _: 1
- }, 8, ["class"])) : Ot("v-if", !0)
- ], 2)
- ], 2)) : Ot("v-if", !0),
- tt("input", Xn({
- id: z(d),
- ref_key: "input",
- ref: m,
- class: z(v).e("inner")
- }, z(u), {
- minlength: Ae.minlength,
- maxlength: Ae.maxlength,
- type: Ae.showPassword ? S.value ? "text" : "password" : Ae.type,
- disabled: z(p),
- readonly: Ae.readonly,
- autocomplete: Ae.autocomplete,
- tabindex: Ae.tabindex,
- "aria-label": Ae.label || Ae.ariaLabel,
- placeholder: Ae.placeholder,
- style: Ae.inputStyle,
- form: Ae.form,
- autofocus: Ae.autofocus,
- onCompositionstart: we,
- onCompositionupdate: He,
- onCompositionend: je,
- onInput: de,
- onFocus: gt[0] || (gt[0] = (...Xt) => z(E) && z(E)(...Xt)),
- onBlur: gt[1] || (gt[1] = (...Xt) => z(M) && z(M)(...Xt)),
- onChange: xe,
- onKeydown: xt
- }), null, 16, aMe),
- Ot(" suffix slot "),
- z(ue) ? (be(), Ue("span", {
- key: 1,
- class: Ge(z(v).e("suffix"))
- }, [
- tt("span", {
- class: Ge(z(v).e("suffix-inner"))
- }, [
- !z(U) || !z(j) || !z(Y) ? (be(), Ue(Wt, { key: 0 }, [
- ln(Ae.$slots, "suffix"),
- Ae.suffixIcon ? (be(), Je(z($s), {
- key: 0,
- class: Ge(z(v).e("icon"))
- }, {
- default: ke(() => [
- (be(), Je(As(Ae.suffixIcon)))
- ]),
- _: 1
- }, 8, ["class"])) : Ot("v-if", !0)
- ], 64)) : Ot("v-if", !0),
- z(U) ? (be(), Je(z($s), {
- key: 1,
- class: Ge([z(v).e("icon"), z(v).e("clear")]),
- onMousedown: ai(z(Kc), ["prevent"]),
- onClick: an
- }, {
- default: ke(() => [
- D(z(Ste))
- ]),
- _: 1
- }, 8, ["class", "onMousedown"])) : Ot("v-if", !0),
- z(j) ? (be(), Je(z($s), {
- key: 2,
- class: Ge([z(v).e("icon"), z(v).e("password")]),
- onClick: Be
- }, {
- default: ke(() => [
- (be(), Je(As(z(B))))
- ]),
- _: 1
- }, 8, ["class"])) : Ot("v-if", !0),
- z(Y) ? (be(), Ue("span", {
- key: 3,
- class: Ge(z(v).e("count"))
- }, [
- tt("span", {
- class: Ge(z(v).e("count-inner"))
- }, xi(z(ne)) + " / " + xi(Ae.maxlength), 3)
- ], 2)) : Ot("v-if", !0),
- z(N) && z(I) && z(R) ? (be(), Je(z($s), {
- key: 4,
- class: Ge([
- z(v).e("icon"),
- z(v).e("validateIcon"),
- z(v).is("loading", z(N) === "validating")
- ])
- }, {
- default: ke(() => [
- (be(), Je(As(z(I))))
- ]),
- _: 1
- }, 8, ["class"])) : Ot("v-if", !0)
- ], 2)
- ], 2)) : Ot("v-if", !0)
- ], 2),
- Ot(" append slot "),
- Ae.$slots.append ? (be(), Ue("div", {
- key: 1,
- class: Ge(z(v).be("group", "append"))
- }, [
- ln(Ae.$slots, "append")
- ], 2)) : Ot("v-if", !0)
- ], 64)) : (be(), Ue(Wt, { key: 1 }, [
- Ot(" textarea "),
- tt("textarea", Xn({
- id: z(d),
- ref_key: "textarea",
- ref: y,
- class: [z(g).e("inner"), z(v).is("focus", z(T))]
- }, z(u), {
- minlength: Ae.minlength,
- maxlength: Ae.maxlength,
- tabindex: Ae.tabindex,
- disabled: z(p),
- readonly: Ae.readonly,
- autocomplete: Ae.autocomplete,
- style: z(W),
- "aria-label": Ae.label || Ae.ariaLabel,
- placeholder: Ae.placeholder,
- form: Ae.form,
- autofocus: Ae.autofocus,
- onCompositionstart: we,
- onCompositionupdate: He,
- onCompositionend: je,
- onInput: de,
- onFocus: gt[2] || (gt[2] = (...Xt) => z(E) && z(E)(...Xt)),
- onBlur: gt[3] || (gt[3] = (...Xt) => z(M) && z(M)(...Xt)),
- onChange: xe,
- onKeydown: xt
- }), null, 16, oMe),
- z(Y) ? (be(), Ue("span", {
- key: 0,
- style: dr(x.value),
- class: Ge(z(v).e("count"))
- }, xi(z(ne)) + " / " + xi(Ae.maxlength), 7)) : Ot("v-if", !0)
- ], 64))
- ], 16, iMe));
- }
- });
- var uMe = /* @__PURE__ */ Nn(lMe, [["__file", "input.vue"]]);
- const p2 = ec(uMe), AN = Symbol("popper"), Ute = Symbol("popperContent"), cMe = [
- "dialog",
- "grid",
- "group",
- "listbox",
- "menu",
- "navigation",
- "tooltip",
- "tree"
- ], Xte = hr({
- role: {
- type: String,
- values: cMe,
- default: "tooltip"
- }
- }), fMe = ae({
- name: "ElPopper",
- inheritAttrs: !1
- }), dMe = /* @__PURE__ */ ae({
- ...fMe,
- props: Xte,
- setup(t, { expose: e }) {
- const n = t, r = ee(), i = ee(), a = ee(), o = ee(), s = V(() => n.role), l = {
- triggerRef: r,
- popperInstanceRef: i,
- contentRef: a,
- referenceRef: o,
- role: s
- };
- return e(l), Et(AN, l), (u, c) => ln(u.$slots, "default");
- }
- });
- var hMe = /* @__PURE__ */ Nn(dMe, [["__file", "popper.vue"]]);
- const Yte = hr({
- arrowOffset: {
- type: Number,
- default: 5
- }
- }), pMe = ae({
- name: "ElPopperArrow",
- inheritAttrs: !1
- }), vMe = /* @__PURE__ */ ae({
- ...pMe,
- props: Yte,
- setup(t, { expose: e }) {
- const n = t, r = $n("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = et(Ute, void 0);
- return me(() => n.arrowOffset, (s) => {
- i.value = s;
- }), Qt(() => {
- a.value = void 0;
- }), e({
- arrowRef: a
- }), (s, l) => (be(), Ue("span", {
- ref_key: "arrowRef",
- ref: a,
- class: Ge(z(r).e("arrow")),
- style: dr(z(o)),
- "data-popper-arrow": ""
- }, null, 6));
- }
- });
- var gMe = /* @__PURE__ */ Nn(vMe, [["__file", "arrow.vue"]]);
- const VA = "ElOnlyChild", mMe = ae({
- name: VA,
- setup(t, {
- slots: e,
- attrs: n
- }) {
- var r;
- const i = et(Wte), a = cEe((r = i == null ? void 0 : i.setForwardRef) != null ? r : Kc);
- return () => {
- var o;
- const s = (o = e.default) == null ? void 0 : o.call(e, n);
- if (!s)
- return null;
- if (s.length > 1)
- return Fi(VA, "requires exact only one valid child."), null;
- const l = qte(s);
- return l ? Sr(ku(l, n), [[a]]) : (Fi(VA, "no valid child node found"), null);
- };
- }
- });
- function qte(t) {
- if (!t)
- return null;
- const e = t;
- for (const n of e) {
- if (Rh(n))
- switch (n.type) {
- case Aee:
- continue;
- case KT:
- case "svg":
- return CW(n);
- case Wt:
- return qte(n.children);
- default:
- return n;
- }
- return CW(n);
- }
- return null;
- }
- function CW(t) {
- const e = $n("only-child");
- return D("span", {
- class: e.e("content")
- }, [t]);
- }
- const Kte = hr({
- virtualRef: {
- type: mn(Object)
- },
- virtualTriggering: Boolean,
- onMouseenter: {
- type: mn(Function)
- },
- onMouseleave: {
- type: mn(Function)
- },
- onClick: {
- type: mn(Function)
- },
- onKeydown: {
- type: mn(Function)
- },
- onFocus: {
- type: mn(Function)
- },
- onBlur: {
- type: mn(Function)
- },
- onContextmenu: {
- type: mn(Function)
- },
- id: String,
- open: Boolean
- }), yMe = ae({
- name: "ElPopperTrigger",
- inheritAttrs: !1
- }), bMe = /* @__PURE__ */ ae({
- ...yMe,
- props: Kte,
- setup(t, { expose: e }) {
- const n = t, { role: r, triggerRef: i } = et(AN, void 0);
- uEe(i);
- const a = V(() => s.value ? n.id : void 0), o = V(() => {
- if (r && r.value === "tooltip")
- return n.open && n.id ? n.id : void 0;
- }), s = V(() => {
- if (r && r.value !== "tooltip")
- return r.value;
- }), l = V(() => s.value ? `${n.open}` : void 0);
- let u;
- return _t(() => {
- me(() => n.virtualRef, (c) => {
- c && (i.value = zc(c));
- }, {
- immediate: !0
- }), me(i, (c, f) => {
- u == null || u(), u = void 0, Ob(c) && ([
- "onMouseenter",
- "onMouseleave",
- "onClick",
- "onKeydown",
- "onFocus",
- "onBlur",
- "onContextmenu"
- ].forEach((d) => {
- var h;
- const p = n[d];
- p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
- }), u = me([a, o, s, l], (d) => {
- [
- "aria-controls",
- "aria-describedby",
- "aria-haspopup",
- "aria-expanded"
- ].forEach((h, p) => {
- Jc(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
- });
- }, { immediate: !0 })), Ob(f) && [
- "aria-controls",
- "aria-describedby",
- "aria-haspopup",
- "aria-expanded"
- ].forEach((d) => f.removeAttribute(d));
- }, {
- immediate: !0
- });
- }), Qt(() => {
- u == null || u(), u = void 0;
- }), e({
- triggerRef: i
- }), (c, f) => c.virtualTriggering ? Ot("v-if", !0) : (be(), Je(z(mMe), Xn({ key: 0 }, c.$attrs, {
- "aria-controls": z(a),
- "aria-describedby": z(o),
- "aria-expanded": z(l),
- "aria-haspopup": z(s)
- }), {
- default: ke(() => [
- ln(c.$slots, "default")
- ]),
- _: 3
- }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
- }
- });
- var _Me = /* @__PURE__ */ Nn(bMe, [["__file", "trigger.vue"]]);
- const FA = "focus-trap.focus-after-trapped", WA = "focus-trap.focus-after-released", OMe = "focus-trap.focusout-prevented", TW = {
- cancelable: !0,
- bubbles: !1
- }, SMe = {
- cancelable: !0,
- bubbles: !1
- }, PW = "focusAfterTrapped", $W = "focusAfterReleased", Jte = Symbol("elFocusTrap"), EN = ee(), v2 = ee(0), MN = ee(0);
- let LO = 0;
- const ene = (t) => {
- const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
- acceptNode: (r) => {
- const i = r.tagName === "INPUT" && r.type === "hidden";
- return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
- }
- });
- for (; n.nextNode(); )
- e.push(n.currentNode);
- return e;
- }, AW = (t, e) => {
- for (const n of t)
- if (!xMe(n, e))
- return n;
- }, xMe = (t, e) => {
- if (process.env.NODE_ENV === "test")
- return !1;
- if (getComputedStyle(t).visibility === "hidden")
- return !0;
- for (; t; ) {
- if (e && t === e)
- return !1;
- if (getComputedStyle(t).display === "none")
- return !0;
- t = t.parentElement;
- }
- return !1;
- }, wMe = (t) => {
- const e = ene(t), n = AW(e, t), r = AW(e.reverse(), t);
- return [n, r];
- }, CMe = (t) => t instanceof HTMLInputElement && "select" in t, Pc = (t, e) => {
- if (t && t.focus) {
- const n = document.activeElement;
- t.focus({ preventScroll: !0 }), MN.value = window.performance.now(), t !== n && CMe(t) && e && t.select();
- }
- };
- function EW(t, e) {
- const n = [...t], r = t.indexOf(e);
- return r !== -1 && n.splice(r, 1), n;
- }
- const TMe = () => {
- let t = [];
- return {
- push: (r) => {
- const i = t[0];
- i && r !== i && i.pause(), t = EW(t, r), t.unshift(r);
- },
- remove: (r) => {
- var i, a;
- t = EW(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
- }
- };
- }, PMe = (t, e = !1) => {
- const n = document.activeElement;
- for (const r of t)
- if (Pc(r, e), document.activeElement !== n)
- return;
- }, MW = TMe(), $Me = () => v2.value > MN.value, NO = () => {
- EN.value = "pointer", v2.value = window.performance.now();
- }, IW = () => {
- EN.value = "keyboard", v2.value = window.performance.now();
- }, AMe = () => (_t(() => {
- LO === 0 && (document.addEventListener("mousedown", NO), document.addEventListener("touchstart", NO), document.addEventListener("keydown", IW)), LO++;
- }), Qt(() => {
- LO--, LO <= 0 && (document.removeEventListener("mousedown", NO), document.removeEventListener("touchstart", NO), document.removeEventListener("keydown", IW));
- }), {
- focusReason: EN,
- lastUserFocusTimestamp: v2,
- lastAutomatedFocusTimestamp: MN
- }), BO = (t) => new CustomEvent(OMe, {
- ...SMe,
- detail: t
- }), EMe = ae({
- name: "ElFocusTrap",
- inheritAttrs: !1,
- props: {
- loop: Boolean,
- trapped: Boolean,
- focusTrapEl: Object,
- focusStartEl: {
- type: [Object, String],
- default: "first"
- }
- },
- emits: [
- PW,
- $W,
- "focusin",
- "focusout",
- "focusout-prevented",
- "release-requested"
- ],
- setup(t, { emit: e }) {
- const n = ee();
- let r, i;
- const { focusReason: a } = AMe();
- iEe((p) => {
- t.trapped && !o.paused && e("release-requested", p);
- });
- const o = {
- paused: !1,
- pause() {
- this.paused = !0;
- },
- resume() {
- this.paused = !1;
- }
- }, s = (p) => {
- if (!t.loop && !t.trapped || o.paused)
- return;
- const { key: v, altKey: g, ctrlKey: m, metaKey: y, currentTarget: _, shiftKey: O } = p, { loop: S } = t, x = v === wa.tab && !g && !m && !y, C = document.activeElement;
- if (x && C) {
- const P = _, [$, T] = wMe(P);
- if ($ && T) {
- if (!O && C === T) {
- const M = BO({
- focusReason: a.value
- });
- e("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), S && Pc($, !0));
- } else if (O && [$, P].includes(C)) {
- const M = BO({
- focusReason: a.value
- });
- e("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), S && Pc(T, !0));
- }
- } else if (C === P) {
- const M = BO({
- focusReason: a.value
- });
- e("focusout-prevented", M), M.defaultPrevented || p.preventDefault();
- }
- }
- };
- Et(Jte, {
- focusTrapRef: n,
- onKeydown: s
- }), me(() => t.focusTrapEl, (p) => {
- p && (n.value = p);
- }, { immediate: !0 }), me([n], ([p], [v]) => {
- p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", f)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", f));
- });
- const l = (p) => {
- e(PW, p);
- }, u = (p) => e($W, p), c = (p) => {
- const v = z(n);
- if (!v)
- return;
- const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
- t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : Pc(i, !0));
- }, f = (p) => {
- const v = z(n);
- if (!(o.paused || !v))
- if (t.trapped) {
- const g = p.relatedTarget;
- !Jc(g) && !v.contains(g) && setTimeout(() => {
- if (!o.paused && t.trapped) {
- const m = BO({
- focusReason: a.value
- });
- e("focusout-prevented", m), m.defaultPrevented || Pc(i, !0);
- }
- }, 0);
- } else {
- const g = p.target;
- g && v.contains(g) || e("focusout", p);
- }
- };
- async function d() {
- await Bt();
- const p = z(n);
- if (p) {
- MW.push(o);
- const v = p.contains(document.activeElement) ? r : document.activeElement;
- if (r = v, !p.contains(v)) {
- const m = new Event(FA, TW);
- p.addEventListener(FA, l), p.dispatchEvent(m), m.defaultPrevented || Bt(() => {
- let y = t.focusStartEl;
- ia(y) || (Pc(y), document.activeElement !== y && (y = "first")), y === "first" && PMe(ene(p), !0), (document.activeElement === v || y === "container") && Pc(p);
- });
- }
- }
- }
- function h() {
- const p = z(n);
- if (p) {
- p.removeEventListener(FA, l);
- const v = new CustomEvent(WA, {
- ...TW,
- detail: {
- focusReason: a.value
- }
- });
- p.addEventListener(WA, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !$Me() || p.contains(document.activeElement)) && Pc(r ?? document.body), p.removeEventListener(WA, u), MW.remove(o);
- }
- }
- return _t(() => {
- t.trapped && d(), me(() => t.trapped, (p) => {
- p ? d() : h();
- });
- }), Qt(() => {
- t.trapped && h();
- }), {
- onKeydown: s
- };
- }
- });
- function MMe(t, e, n, r, i, a) {
- return ln(t.$slots, "default", { handleKeydown: t.onKeydown });
- }
- var tne = /* @__PURE__ */ Nn(EMe, [["render", MMe], ["__file", "focus-trap.vue"]]);
- const IMe = ["fixed", "absolute"], DMe = hr({
- boundariesPadding: {
- type: Number,
- default: 0
- },
- fallbackPlacements: {
- type: mn(Array),
- default: void 0
- },
- gpuAcceleration: {
- type: Boolean,
- default: !0
- },
- offset: {
- type: Number,
- default: 12
- },
- placement: {
- type: String,
- values: _N,
- default: "bottom"
- },
- popperOptions: {
- type: mn(Object),
- default: () => ({})
- },
- strategy: {
- type: String,
- values: IMe,
- default: "absolute"
- }
- }), nne = hr({
- ...DMe,
- id: String,
- style: {
- type: mn([String, Array, Object])
- },
- className: {
- type: mn([String, Array, Object])
- },
- effect: {
- type: String,
- default: "dark"
- },
- visible: Boolean,
- enterable: {
- type: Boolean,
- default: !0
- },
- pure: Boolean,
- focusOnShow: {
- type: Boolean,
- default: !1
- },
- trapping: {
- type: Boolean,
- default: !1
- },
- popperClass: {
- type: mn([String, Array, Object])
- },
- popperStyle: {
- type: mn([String, Array, Object])
- },
- referenceEl: {
- type: mn(Object)
- },
- triggerTargetEl: {
- type: mn(Object)
- },
- stopPopperMouseEvent: {
- type: Boolean,
- default: !0
- },
- virtualTriggering: Boolean,
- zIndex: Number,
- ...sp(["ariaLabel"])
- }), RMe = {
- mouseenter: (t) => t instanceof MouseEvent,
- mouseleave: (t) => t instanceof MouseEvent,
- focus: () => !0,
- blur: () => !0,
- close: () => !0
- }, kMe = (t, e = []) => {
- const { placement: n, strategy: r, popperOptions: i } = t, a = {
- placement: n,
- strategy: r,
- ...i,
- modifiers: [...NMe(t), ...e]
- };
- return BMe(a, i == null ? void 0 : i.modifiers), a;
- }, LMe = (t) => {
- if (Fr)
- return zc(t);
- };
- function NMe(t) {
- const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
- return [
- {
- name: "offset",
- options: {
- offset: [0, e ?? 12]
- }
- },
- {
- name: "preventOverflow",
- options: {
- padding: {
- top: 2,
- bottom: 2,
- left: 5,
- right: 5
- }
- }
- },
- {
- name: "flip",
- options: {
- padding: 5,
- fallbackPlacements: r
- }
- },
- {
- name: "computeStyles",
- options: {
- gpuAcceleration: n
- }
- }
- ];
- }
- function BMe(t, e) {
- e && (t.modifiers = [...t.modifiers, ...e ?? []]);
- }
- const zMe = 0, VMe = (t) => {
- const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = et(AN, void 0), a = ee(), o = ee(), s = V(() => ({
- name: "eventListeners",
- enabled: !!t.visible
- })), l = V(() => {
- var m;
- const y = z(a), _ = (m = z(o)) != null ? m : zMe;
- return {
- name: "arrow",
- enabled: !gte(y),
- options: {
- element: y,
- padding: _
- }
- };
- }), u = V(() => ({
- onFirstUpdate: () => {
- p();
- },
- ...kMe(t, [
- z(l),
- z(s)
- ])
- })), c = V(() => LMe(t.referenceEl) || z(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = tEe(c, n, u);
- return me(g, (m) => e.value = m), _t(() => {
- me(() => {
- var m;
- return (m = z(c)) == null ? void 0 : m.getBoundingClientRect();
- }, () => {
- p();
- });
- }), {
- attributes: f,
- arrowRef: a,
- contentRef: n,
- instanceRef: g,
- state: d,
- styles: h,
- role: i,
- forceUpdate: v,
- update: p
- };
- }, FMe = (t, {
- attributes: e,
- styles: n,
- role: r
- }) => {
- const { nextZIndex: i } = Qte(), a = $n("popper"), o = V(() => z(e).popper), s = ee(Ws(t.zIndex) ? t.zIndex : i()), l = V(() => [
- a.b(),
- a.is("pure", t.pure),
- a.is(t.effect),
- t.popperClass
- ]), u = V(() => [
- { zIndex: z(s) },
- z(n).popper,
- t.popperStyle || {}
- ]), c = V(() => r.value === "dialog" ? "false" : void 0), f = V(() => z(n).arrow || {});
- return {
- ariaModal: c,
- arrowStyle: f,
- contentAttrs: o,
- contentClass: l,
- contentStyle: u,
- contentZIndex: s,
- updateZIndex: () => {
- s.value = Ws(t.zIndex) ? t.zIndex : i();
- }
- };
- }, WMe = (t, e) => {
- const n = ee(!1), r = ee();
- return {
- focusStartRef: r,
- trapped: n,
- onFocusAfterReleased: (u) => {
- var c;
- ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
- },
- onFocusAfterTrapped: () => {
- e("focus");
- },
- onFocusInTrap: (u) => {
- t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
- },
- onFocusoutPrevented: (u) => {
- t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
- },
- onReleaseRequested: () => {
- n.value = !1, e("close");
- }
- };
- }, QMe = ae({
- name: "ElPopperContent"
- }), HMe = /* @__PURE__ */ ae({
- ...QMe,
- props: nne,
- emits: RMe,
- setup(t, { expose: e, emit: n }) {
- const r = t, {
- focusStartRef: i,
- trapped: a,
- onFocusAfterReleased: o,
- onFocusAfterTrapped: s,
- onFocusInTrap: l,
- onFocusoutPrevented: u,
- onReleaseRequested: c
- } = WMe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = VMe(r), {
- ariaModal: y,
- arrowStyle: _,
- contentAttrs: O,
- contentClass: S,
- contentStyle: x,
- updateZIndex: C
- } = FMe(r, {
- styles: p,
- attributes: f,
- role: g
- }), P = et(Cb, void 0), $ = ee();
- Et(Ute, {
- arrowStyle: _,
- arrowRef: d,
- arrowOffset: $
- }), P && Et(Cb, {
- ...P,
- addInputId: Kc,
- removeInputId: Kc
- });
- let T;
- const E = (R = !0) => {
- m(), R && C();
- }, M = () => {
- E(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
- };
- return _t(() => {
- me(() => r.triggerTargetEl, (R, N) => {
- T == null || T(), T = void 0;
- const I = z(R || h.value), B = z(N || h.value);
- Ob(I) && (T = me([g, () => r.ariaLabel, y, () => r.id], (Q) => {
- ["role", "aria-label", "aria-modal", "id"].forEach((W, H) => {
- Jc(Q[H]) ? I.removeAttribute(W) : I.setAttribute(W, Q[H]);
- });
- }, { immediate: !0 })), B !== I && Ob(B) && ["role", "aria-label", "aria-modal", "id"].forEach((Q) => {
- B.removeAttribute(Q);
- });
- }, { immediate: !0 }), me(() => r.visible, M, { immediate: !0 });
- }), Qt(() => {
- T == null || T(), T = void 0;
- }), e({
- popperContentRef: h,
- popperInstanceRef: v,
- updatePopper: E,
- contentStyle: x
- }), (R, N) => (be(), Ue("div", Xn({
- ref_key: "contentRef",
- ref: h
- }, z(O), {
- style: z(x),
- class: z(S),
- tabindex: "-1",
- onMouseenter: N[0] || (N[0] = (I) => R.$emit("mouseenter", I)),
- onMouseleave: N[1] || (N[1] = (I) => R.$emit("mouseleave", I))
- }), [
- D(z(tne), {
- trapped: z(a),
- "trap-on-focus-in": !0,
- "focus-trap-el": z(h),
- "focus-start-el": z(i),
- onFocusAfterTrapped: z(s),
- onFocusAfterReleased: z(o),
- onFocusin: z(l),
- onFocusoutPrevented: z(u),
- onReleaseRequested: z(c)
- }, {
- default: ke(() => [
- ln(R.$slots, "default")
- ]),
- _: 3
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
- ], 16));
- }
- });
- var GMe = /* @__PURE__ */ Nn(HMe, [["__file", "content.vue"]]);
- const jMe = ec(hMe), IN = Symbol("elTooltip"), DN = hr({
- ...sEe,
- ...nne,
- appendTo: {
- type: mn([String, Object])
- },
- content: {
- type: String,
- default: ""
- },
- rawContent: {
- type: Boolean,
- default: !1
- },
- persistent: Boolean,
- visible: {
- type: mn(Boolean),
- default: null
- },
- transition: String,
- teleported: {
- type: Boolean,
- default: !0
- },
- disabled: Boolean,
- ...sp(["ariaLabel"])
- }), rne = hr({
- ...Kte,
- disabled: Boolean,
- trigger: {
- type: mn([String, Array]),
- default: "hover"
- },
- triggerKeys: {
- type: mn(Array),
- default: () => [wa.enter, wa.space]
- }
- }), {
- useModelToggleProps: ZMe,
- useModelToggleEmits: UMe,
- useModelToggle: XMe
- } = Tte("visible"), YMe = hr({
- ...Xte,
- ...ZMe,
- ...DN,
- ...rne,
- ...Yte,
- showArrow: {
- type: Boolean,
- default: !0
- }
- }), qMe = [
- ...UMe,
- "before-show",
- "before-hide",
- "show",
- "hide",
- "open",
- "close"
- ], KMe = (t, e) => dg(t) ? t.includes(e) : t === e, Vp = (t, e, n) => (r) => {
- KMe(z(t), e) && n(r);
- }, JMe = ae({
- name: "ElTooltipTrigger"
- }), eIe = /* @__PURE__ */ ae({
- ...JMe,
- props: rne,
- setup(t, { expose: e }) {
- const n = t, r = $n("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = et(IN, void 0), c = ee(null), f = () => {
- if (z(i) || n.disabled)
- return !0;
- }, d = Lr(n, "trigger"), h = mu(f, Vp(d, "hover", s)), p = mu(f, Vp(d, "hover", l)), v = mu(f, Vp(d, "click", (O) => {
- O.button === 0 && u(O);
- })), g = mu(f, Vp(d, "focus", s)), m = mu(f, Vp(d, "focus", l)), y = mu(f, Vp(d, "contextmenu", (O) => {
- O.preventDefault(), u(O);
- })), _ = mu(f, (O) => {
- const { code: S } = O;
- n.triggerKeys.includes(S) && (O.preventDefault(), u(O));
- });
- return e({
- triggerRef: c
- }), (O, S) => (be(), Je(z(_Me), {
- id: z(a),
- "virtual-ref": O.virtualRef,
- open: z(o),
- "virtual-triggering": O.virtualTriggering,
- class: Ge(z(r).e("trigger")),
- onBlur: z(m),
- onClick: z(v),
- onContextmenu: z(y),
- onFocus: z(g),
- onMouseenter: z(h),
- onMouseleave: z(p),
- onKeydown: z(_)
- }, {
- default: ke(() => [
- ln(O.$slots, "default")
- ]),
- _: 3
- }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
- }
- });
- var tIe = /* @__PURE__ */ Nn(eIe, [["__file", "trigger.vue"]]);
- const nIe = ae({
- name: "ElTooltipContent",
- inheritAttrs: !1
- }), rIe = /* @__PURE__ */ ae({
- ...nIe,
- props: DN,
- setup(t, { expose: e }) {
- const n = t, { selector: r } = Fte(), i = $n("tooltip"), a = ee(null), o = ee(!1), {
- controlled: s,
- id: l,
- open: u,
- trigger: c,
- onClose: f,
- onOpen: d,
- onShow: h,
- onHide: p,
- onBeforeShow: v,
- onBeforeHide: g
- } = et(IN, void 0), m = V(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = V(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
- Qt(() => {
- o.value = !0;
- });
- const _ = V(() => z(y) ? !0 : z(u)), O = V(() => n.disabled ? !1 : z(u)), S = V(() => n.appendTo || r.value), x = V(() => {
- var Q;
- return (Q = n.style) != null ? Q : {};
- }), C = V(() => !z(u)), P = () => {
- p();
- }, $ = () => {
- if (z(s))
- return !0;
- }, T = mu($, () => {
- n.enterable && z(c) === "hover" && d();
- }), E = mu($, () => {
- z(c) === "hover" && f();
- }), M = () => {
- var Q, W;
- (W = (Q = a.value) == null ? void 0 : Q.updatePopper) == null || W.call(Q), v == null || v();
- }, R = () => {
- g == null || g();
- }, N = () => {
- h(), B = bxe(V(() => {
- var Q;
- return (Q = a.value) == null ? void 0 : Q.popperContentRef;
- }), () => {
- if (z(s))
- return;
- z(c) !== "hover" && f();
- });
- }, I = () => {
- n.virtualTriggering || f();
- };
- let B;
- return me(() => z(u), (Q) => {
- Q || B == null || B();
- }, {
- flush: "post"
- }), me(() => n.content, () => {
- var Q, W;
- (W = (Q = a.value) == null ? void 0 : Q.updatePopper) == null || W.call(Q);
- }), e({
- contentRef: a
- }), (Q, W) => (be(), Je(R_, {
- disabled: !Q.teleported,
- to: z(S)
- }, [
- D(mo, {
- name: z(m),
- onAfterLeave: P,
- onBeforeEnter: M,
- onAfterEnter: N,
- onBeforeLeave: R
- }, {
- default: ke(() => [
- z(_) ? Sr((be(), Je(z(GMe), Xn({
- key: 0,
- id: z(l),
- ref_key: "contentRef",
- ref: a
- }, Q.$attrs, {
- "aria-label": Q.ariaLabel,
- "aria-hidden": z(C),
- "boundaries-padding": Q.boundariesPadding,
- "fallback-placements": Q.fallbackPlacements,
- "gpu-acceleration": Q.gpuAcceleration,
- offset: Q.offset,
- placement: Q.placement,
- "popper-options": Q.popperOptions,
- strategy: Q.strategy,
- effect: Q.effect,
- enterable: Q.enterable,
- pure: Q.pure,
- "popper-class": Q.popperClass,
- "popper-style": [Q.popperStyle, z(x)],
- "reference-el": Q.referenceEl,
- "trigger-target-el": Q.triggerTargetEl,
- visible: z(O),
- "z-index": Q.zIndex,
- onMouseenter: z(T),
- onMouseleave: z(E),
- onBlur: I,
- onClose: z(f)
- }), {
- default: ke(() => [
- o.value ? Ot("v-if", !0) : ln(Q.$slots, "default", { key: 0 })
- ]),
- _: 3
- }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
- [ho, z(O)]
- ]) : Ot("v-if", !0)
- ]),
- _: 3
- }, 8, ["name"])
- ], 8, ["disabled", "to"]));
- }
- });
- var iIe = /* @__PURE__ */ Nn(rIe, [["__file", "content.vue"]]);
- const aIe = ["innerHTML"], oIe = { key: 1 }, sIe = ae({
- name: "ElTooltip"
- }), lIe = /* @__PURE__ */ ae({
- ...sIe,
- props: YMe,
- emits: qMe,
- setup(t, { expose: e, emit: n }) {
- const r = t;
- oEe();
- const i = wb(), a = ee(), o = ee(), s = () => {
- var m;
- const y = z(a);
- y && ((m = y.popperInstanceRef) == null || m.update());
- }, l = ee(!1), u = ee(), { show: c, hide: f, hasUpdateHandler: d } = XMe({
- indicator: l,
- toggleReason: u
- }), { onOpen: h, onClose: p } = lEe({
- showAfter: Lr(r, "showAfter"),
- hideAfter: Lr(r, "hideAfter"),
- autoClose: Lr(r, "autoClose"),
- open: c,
- close: f
- }), v = V(() => hf(r.visible) && !d.value);
- Et(IN, {
- controlled: v,
- id: i,
- open: Pee(l),
- trigger: Lr(r, "trigger"),
- onOpen: (m) => {
- h(m);
- },
- onClose: (m) => {
- p(m);
- },
- onToggle: (m) => {
- z(l) ? p(m) : h(m);
- },
- onShow: () => {
- n("show", u.value);
- },
- onHide: () => {
- n("hide", u.value);
- },
- onBeforeShow: () => {
- n("before-show", u.value);
- },
- onBeforeHide: () => {
- n("before-hide", u.value);
- },
- updatePopper: s
- }), me(() => r.disabled, (m) => {
- m && l.value && (l.value = !1);
- });
- const g = (m) => {
- var y, _;
- const O = (_ = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : _.popperContentRef, S = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
- return O && O.contains(S);
- };
- return lxe(() => l.value && f()), e({
- popperRef: a,
- contentRef: o,
- isFocusInsideContent: g,
- updatePopper: s,
- onOpen: h,
- onClose: p,
- hide: f
- }), (m, y) => (be(), Je(z(jMe), {
- ref_key: "popperRef",
- ref: a,
- role: m.role
- }, {
- default: ke(() => [
- D(tIe, {
- disabled: m.disabled,
- trigger: m.trigger,
- "trigger-keys": m.triggerKeys,
- "virtual-ref": m.virtualRef,
- "virtual-triggering": m.virtualTriggering
- }, {
- default: ke(() => [
- m.$slots.default ? ln(m.$slots, "default", { key: 0 }) : Ot("v-if", !0)
- ]),
- _: 3
- }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
- D(iIe, {
- ref_key: "contentRef",
- ref: o,
- "aria-label": m.ariaLabel,
- "boundaries-padding": m.boundariesPadding,
- content: m.content,
- disabled: m.disabled,
- effect: m.effect,
- enterable: m.enterable,
- "fallback-placements": m.fallbackPlacements,
- "hide-after": m.hideAfter,
- "gpu-acceleration": m.gpuAcceleration,
- offset: m.offset,
- persistent: m.persistent,
- "popper-class": m.popperClass,
- "popper-style": m.popperStyle,
- placement: m.placement,
- "popper-options": m.popperOptions,
- pure: m.pure,
- "raw-content": m.rawContent,
- "reference-el": m.referenceEl,
- "trigger-target-el": m.triggerTargetEl,
- "show-after": m.showAfter,
- strategy: m.strategy,
- teleported: m.teleported,
- transition: m.transition,
- "virtual-triggering": m.virtualTriggering,
- "z-index": m.zIndex,
- "append-to": m.appendTo
- }, {
- default: ke(() => [
- ln(m.$slots, "content", {}, () => [
- m.rawContent ? (be(), Ue("span", {
- key: 0,
- innerHTML: m.content
- }, null, 8, aIe)) : (be(), Ue("span", oIe, xi(m.content), 1))
- ]),
- m.showArrow ? (be(), Je(z(gMe), {
- key: 0,
- "arrow-offset": m.arrowOffset
- }, null, 8, ["arrow-offset"])) : Ot("v-if", !0)
- ]),
- _: 3
- }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
- ]),
- _: 3
- }, 8, ["role"]));
- }
- });
- var uIe = /* @__PURE__ */ Nn(lIe, [["__file", "tooltip.vue"]]);
- const cIe = ec(uIe), ine = Symbol("buttonGroupContextKey"), fIe = (t, e) => {
- Es({
- from: "type.text",
- replacement: "link",
- version: "3.0.0",
- scope: "props",
- ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
- }, V(() => t.type === "text"));
- const n = et(ine, void 0), r = Gte("button"), { form: i } = lp(), a = Tg(V(() => n == null ? void 0 : n.size)), o = um(), s = ee(), l = D_(), u = V(() => t.type || (n == null ? void 0 : n.type) || ""), c = V(() => {
- var p, v, g;
- return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
- }), f = V(() => t.tag === "button" ? {
- ariaDisabled: o.value || t.loading,
- disabled: o.value || t.loading,
- autofocus: t.autofocus,
- type: t.nativeType
- } : {}), d = V(() => {
- var p;
- const v = (p = l.default) == null ? void 0 : p.call(l);
- if (c.value && (v == null ? void 0 : v.length) === 1) {
- const g = v[0];
- if ((g == null ? void 0 : g.type) === KT) {
- const m = g.children;
- return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
- }
- }
- return !1;
- });
- return {
- _disabled: o,
- _size: a,
- _type: u,
- _ref: s,
- _props: f,
- shouldAddSpace: d,
- handleClick: (p) => {
- t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
- }
- };
- }, dIe = [
- "default",
- "primary",
- "success",
- "warning",
- "info",
- "danger",
- "text",
- ""
- ], hIe = ["button", "submit", "reset"], nR = hr({
- size: op,
- disabled: Boolean,
- type: {
- type: String,
- values: dIe,
- default: ""
- },
- icon: {
- type: _g
- },
- nativeType: {
- type: String,
- values: hIe,
- default: "button"
- },
- loading: Boolean,
- loadingIcon: {
- type: _g,
- default: () => gN
- },
- plain: Boolean,
- text: Boolean,
- link: Boolean,
- bg: Boolean,
- autofocus: Boolean,
- round: Boolean,
- circle: Boolean,
- color: String,
- dark: Boolean,
- autoInsertSpace: {
- type: Boolean,
- default: void 0
- },
- tag: {
- type: mn([String, Object]),
- default: "button"
- }
- }), pIe = {
- click: (t) => t instanceof MouseEvent
- };
- function Ci(t, e) {
- vIe(t) && (t = "100%");
- var n = gIe(t);
- return t = e === 360 ? t : Math.min(e, Math.max(0, parseFloat(t))), n && (t = parseInt(String(t * e), 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : (e === 360 ? t = (t < 0 ? t % e + e : t % e) / parseFloat(String(e)) : t = t % e / parseFloat(String(e)), t);
- }
- function zO(t) {
- return Math.min(1, Math.max(0, t));
- }
- function vIe(t) {
- return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
- }
- function gIe(t) {
- return typeof t == "string" && t.indexOf("%") !== -1;
- }
- function ane(t) {
- return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
- }
- function VO(t) {
- return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
- }
- function th(t) {
- return t.length === 1 ? "0" + t : String(t);
- }
- function mIe(t, e, n) {
- return {
- r: Ci(t, 255) * 255,
- g: Ci(e, 255) * 255,
- b: Ci(n, 255) * 255
- };
- }
- function DW(t, e, n) {
- t = Ci(t, 255), e = Ci(e, 255), n = Ci(n, 255);
- var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
- if (r === i)
- o = 0, a = 0;
- else {
- var l = r - i;
- switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
- case t:
- a = (e - n) / l + (e < n ? 6 : 0);
- break;
- case e:
- a = (n - t) / l + 2;
- break;
- case n:
- a = (t - e) / l + 4;
- break;
- }
- a /= 6;
- }
- return { h: a, s: o, l: s };
- }
- function QA(t, e, n) {
- return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * (6 * n) : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
- }
- function yIe(t, e, n) {
- var r, i, a;
- if (t = Ci(t, 360), e = Ci(e, 100), n = Ci(n, 100), e === 0)
- i = n, a = n, r = n;
- else {
- var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
- r = QA(s, o, t + 1 / 3), i = QA(s, o, t), a = QA(s, o, t - 1 / 3);
- }
- return { r: r * 255, g: i * 255, b: a * 255 };
- }
- function rR(t, e, n) {
- t = Ci(t, 255), e = Ci(e, 255), n = Ci(n, 255);
- var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = r, s = r - i, l = r === 0 ? 0 : s / r;
- if (r === i)
- a = 0;
- else {
- switch (r) {
- case t:
- a = (e - n) / s + (e < n ? 6 : 0);
- break;
- case e:
- a = (n - t) / s + 2;
- break;
- case n:
- a = (t - e) / s + 4;
- break;
- }
- a /= 6;
- }
- return { h: a, s: l, v: o };
- }
- function bIe(t, e, n) {
- t = Ci(t, 360) * 6, e = Ci(e, 100), n = Ci(n, 100);
- var r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
- return { r: u * 255, g: c * 255, b: f * 255 };
- }
- function iR(t, e, n, r) {
- var i = [
- th(Math.round(t).toString(16)),
- th(Math.round(e).toString(16)),
- th(Math.round(n).toString(16))
- ];
- return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
- }
- function _Ie(t, e, n, r, i) {
- var a = [
- th(Math.round(t).toString(16)),
- th(Math.round(e).toString(16)),
- th(Math.round(n).toString(16)),
- th(OIe(r))
- ];
- return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
- }
- function OIe(t) {
- return Math.round(parseFloat(t) * 255).toString(16);
- }
- function RW(t) {
- return Ka(t) / 255;
- }
- function Ka(t) {
- return parseInt(t, 16);
- }
- function SIe(t) {
- return {
- r: t >> 16,
- g: (t & 65280) >> 8,
- b: t & 255
- };
- }
- var aR = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- goldenrod: "#daa520",
- gold: "#ffd700",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavenderblush: "#fff0f5",
- lavender: "#e6e6fa",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- rebeccapurple: "#663399",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- };
- function yv(t) {
- var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
- return typeof t == "string" && (t = CIe(t)), typeof t == "object" && (du(t.r) && du(t.g) && du(t.b) ? (e = mIe(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : du(t.h) && du(t.s) && du(t.v) ? (r = VO(t.s), i = VO(t.v), e = bIe(t.h, r, i), o = !0, s = "hsv") : du(t.h) && du(t.s) && du(t.l) && (r = VO(t.s), a = VO(t.l), e = yIe(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = ane(n), {
- ok: o,
- format: t.format || s,
- r: Math.min(255, Math.max(e.r, 0)),
- g: Math.min(255, Math.max(e.g, 0)),
- b: Math.min(255, Math.max(e.b, 0)),
- a: n
- };
- }
- var xIe = "[-\\+]?\\d+%?", wIe = "[-\\+]?\\d*\\.\\d+%?", Vc = "(?:".concat(wIe, ")|(?:").concat(xIe, ")"), HA = "[\\s|\\(]+(".concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")\\s*\\)?"), GA = "[\\s|\\(]+(".concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")\\s*\\)?"), xs = {
- CSS_UNIT: new RegExp(Vc),
- rgb: new RegExp("rgb" + HA),
- rgba: new RegExp("rgba" + GA),
- hsl: new RegExp("hsl" + HA),
- hsla: new RegExp("hsla" + GA),
- hsv: new RegExp("hsv" + HA),
- hsva: new RegExp("hsva" + GA),
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
- };
- function CIe(t) {
- if (t = t.trim().toLowerCase(), t.length === 0)
- return !1;
- var e = !1;
- if (aR[t])
- t = aR[t], e = !0;
- else if (t === "transparent")
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
- var n = xs.rgb.exec(t);
- return n ? { r: n[1], g: n[2], b: n[3] } : (n = xs.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xs.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = xs.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xs.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = xs.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xs.hex8.exec(t), n ? {
- r: Ka(n[1]),
- g: Ka(n[2]),
- b: Ka(n[3]),
- a: RW(n[4]),
- format: e ? "name" : "hex8"
- } : (n = xs.hex6.exec(t), n ? {
- r: Ka(n[1]),
- g: Ka(n[2]),
- b: Ka(n[3]),
- format: e ? "name" : "hex"
- } : (n = xs.hex4.exec(t), n ? {
- r: Ka(n[1] + n[1]),
- g: Ka(n[2] + n[2]),
- b: Ka(n[3] + n[3]),
- a: RW(n[4] + n[4]),
- format: e ? "name" : "hex8"
- } : (n = xs.hex3.exec(t), n ? {
- r: Ka(n[1] + n[1]),
- g: Ka(n[2] + n[2]),
- b: Ka(n[3] + n[3]),
- format: e ? "name" : "hex"
- } : !1)))))))));
- }
- function du(t) {
- return !!xs.CSS_UNIT.exec(String(t));
- }
- var Hn = (
- /** @class */
- function() {
- function t(e, n) {
- e === void 0 && (e = ""), n === void 0 && (n = {});
- var r;
- if (e instanceof t)
- return e;
- typeof e == "number" && (e = SIe(e)), this.originalInput = e;
- var i = yv(e);
- this.originalInput = e, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
- }
- return t.prototype.isDark = function() {
- return this.getBrightness() < 128;
- }, t.prototype.isLight = function() {
- return !this.isDark();
- }, t.prototype.getBrightness = function() {
- var e = this.toRgb();
- return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
- }, t.prototype.getLuminance = function() {
- var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
- return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * i;
- }, t.prototype.getAlpha = function() {
- return this.a;
- }, t.prototype.setAlpha = function(e) {
- return this.a = ane(e), this.roundA = Math.round(100 * this.a) / 100, this;
- }, t.prototype.isMonochrome = function() {
- var e = this.toHsl().s;
- return e === 0;
- }, t.prototype.toHsv = function() {
- var e = rR(this.r, this.g, this.b);
- return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
- }, t.prototype.toHsvString = function() {
- var e = rR(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
- return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
- }, t.prototype.toHsl = function() {
- var e = DW(this.r, this.g, this.b);
- return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
- }, t.prototype.toHslString = function() {
- var e = DW(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
- return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
- }, t.prototype.toHex = function(e) {
- return e === void 0 && (e = !1), iR(this.r, this.g, this.b, e);
- }, t.prototype.toHexString = function(e) {
- return e === void 0 && (e = !1), "#" + this.toHex(e);
- }, t.prototype.toHex8 = function(e) {
- return e === void 0 && (e = !1), _Ie(this.r, this.g, this.b, this.a, e);
- }, t.prototype.toHex8String = function(e) {
- return e === void 0 && (e = !1), "#" + this.toHex8(e);
- }, t.prototype.toHexShortString = function(e) {
- return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
- }, t.prototype.toRgb = function() {
- return {
- r: Math.round(this.r),
- g: Math.round(this.g),
- b: Math.round(this.b),
- a: this.a
- };
- }, t.prototype.toRgbString = function() {
- var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
- return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
- }, t.prototype.toPercentageRgb = function() {
- var e = function(n) {
- return "".concat(Math.round(Ci(n, 255) * 100), "%");
- };
- return {
- r: e(this.r),
- g: e(this.g),
- b: e(this.b),
- a: this.a
- };
- }, t.prototype.toPercentageRgbString = function() {
- var e = function(n) {
- return Math.round(Ci(n, 255) * 100);
- };
- return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
- }, t.prototype.toName = function() {
- if (this.a === 0)
- return "transparent";
- if (this.a < 1)
- return !1;
- for (var e = "#" + iR(this.r, this.g, this.b, !1), n = 0, r = Object.entries(aR); n < r.length; n++) {
- var i = r[n], a = i[0], o = i[1];
- if (e === o)
- return a;
- }
- return !1;
- }, t.prototype.toString = function(e) {
- var n = !!e;
- e = e ?? this.format;
- var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
- return a ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (r = this.toRgbString()), e === "prgb" && (r = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (r = this.toHexString()), e === "hex3" && (r = this.toHexString(!0)), e === "hex4" && (r = this.toHex8String(!0)), e === "hex8" && (r = this.toHex8String()), e === "name" && (r = this.toName()), e === "hsl" && (r = this.toHslString()), e === "hsv" && (r = this.toHsvString()), r || this.toHexString());
- }, t.prototype.toNumber = function() {
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
- }, t.prototype.clone = function() {
- return new t(this.toString());
- }, t.prototype.lighten = function(e) {
- e === void 0 && (e = 10);
- var n = this.toHsl();
- return n.l += e / 100, n.l = zO(n.l), new t(n);
- }, t.prototype.brighten = function(e) {
- e === void 0 && (e = 10);
- var n = this.toRgb();
- return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(e / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(e / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(e / 100)))), new t(n);
- }, t.prototype.darken = function(e) {
- e === void 0 && (e = 10);
- var n = this.toHsl();
- return n.l -= e / 100, n.l = zO(n.l), new t(n);
- }, t.prototype.tint = function(e) {
- return e === void 0 && (e = 10), this.mix("white", e);
- }, t.prototype.shade = function(e) {
- return e === void 0 && (e = 10), this.mix("black", e);
- }, t.prototype.desaturate = function(e) {
- e === void 0 && (e = 10);
- var n = this.toHsl();
- return n.s -= e / 100, n.s = zO(n.s), new t(n);
- }, t.prototype.saturate = function(e) {
- e === void 0 && (e = 10);
- var n = this.toHsl();
- return n.s += e / 100, n.s = zO(n.s), new t(n);
- }, t.prototype.greyscale = function() {
- return this.desaturate(100);
- }, t.prototype.spin = function(e) {
- var n = this.toHsl(), r = (n.h + e) % 360;
- return n.h = r < 0 ? 360 + r : r, new t(n);
- }, t.prototype.mix = function(e, n) {
- n === void 0 && (n = 50);
- var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
- r: (i.r - r.r) * a + r.r,
- g: (i.g - r.g) * a + r.g,
- b: (i.b - r.b) * a + r.b,
- a: (i.a - r.a) * a + r.a
- };
- return new t(o);
- }, t.prototype.analogous = function(e, n) {
- e === void 0 && (e = 6), n === void 0 && (n = 30);
- var r = this.toHsl(), i = 360 / n, a = [this];
- for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
- r.h = (r.h + i) % 360, a.push(new t(r));
- return a;
- }, t.prototype.complement = function() {
- var e = this.toHsl();
- return e.h = (e.h + 180) % 360, new t(e);
- }, t.prototype.monochromatic = function(e) {
- e === void 0 && (e = 6);
- for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
- o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
- return o;
- }, t.prototype.splitcomplement = function() {
- var e = this.toHsl(), n = e.h;
- return [
- this,
- new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
- new t({ h: (n + 216) % 360, s: e.s, l: e.l })
- ];
- }, t.prototype.onBackground = function(e) {
- var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
- return new t({
- r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
- g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
- b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
- a: i
- });
- }, t.prototype.triad = function() {
- return this.polyad(3);
- }, t.prototype.tetrad = function() {
- return this.polyad(4);
- }, t.prototype.polyad = function(e) {
- for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
- i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
- return i;
- }, t.prototype.equals = function(e) {
- return this.toRgbString() === new t(e).toRgbString();
- }, t;
- }()
- );
- function mc(t, e = 20) {
- return t.mix("#141414", e).toString();
- }
- function TIe(t) {
- const e = um(), n = $n("button");
- return V(() => {
- let r = {}, i = t.color;
- if (i) {
- const a = i.match(/var\((.*?)\)/);
- a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
- const o = new Hn(i), s = t.dark ? o.tint(20).toString() : mc(o, 20);
- if (t.plain)
- r = n.cssVarBlock({
- "bg-color": t.dark ? mc(o, 90) : o.tint(90).toString(),
- "text-color": i,
- "border-color": t.dark ? mc(o, 50) : o.tint(50).toString(),
- "hover-text-color": `var(${n.cssVarName("color-white")})`,
- "hover-bg-color": i,
- "hover-border-color": i,
- "active-bg-color": s,
- "active-text-color": `var(${n.cssVarName("color-white")})`,
- "active-border-color": s
- }), e.value && (r[n.cssVarBlockName("disabled-bg-color")] = t.dark ? mc(o, 90) : o.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = t.dark ? mc(o, 50) : o.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = t.dark ? mc(o, 80) : o.tint(80).toString());
- else {
- const l = t.dark ? mc(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
- if (r = n.cssVarBlock({
- "bg-color": i,
- "text-color": u,
- "border-color": i,
- "hover-bg-color": l,
- "hover-text-color": u,
- "hover-border-color": l,
- "active-bg-color": s,
- "active-border-color": s
- }), e.value) {
- const c = t.dark ? mc(o, 50) : o.tint(50).toString();
- r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c;
- }
- }
- }
- return r;
- });
- }
- const PIe = ae({
- name: "ElButton"
- }), $Ie = /* @__PURE__ */ ae({
- ...PIe,
- props: nR,
- emits: pIe,
- setup(t, { expose: e, emit: n }) {
- const r = t, i = TIe(r), a = $n("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = fIe(r, n), h = V(() => [
- a.b(),
- a.m(l.value),
- a.m(s.value),
- a.is("disabled", u.value),
- a.is("loading", r.loading),
- a.is("plain", r.plain),
- a.is("round", r.round),
- a.is("circle", r.circle),
- a.is("text", r.text),
- a.is("link", r.link),
- a.is("has-bg", r.bg)
- ]);
- return e({
- ref: o,
- size: s,
- type: l,
- disabled: u,
- shouldAddSpace: f
- }), (p, v) => (be(), Je(As(p.tag), Xn({
- ref_key: "_ref",
- ref: o
- }, z(c), {
- class: z(h),
- style: z(i),
- onClick: z(d)
- }), {
- default: ke(() => [
- p.loading ? (be(), Ue(Wt, { key: 0 }, [
- p.$slots.loading ? ln(p.$slots, "loading", { key: 0 }) : (be(), Je(z($s), {
- key: 1,
- class: Ge(z(a).is("loading"))
- }, {
- default: ke(() => [
- (be(), Je(As(p.loadingIcon)))
- ]),
- _: 1
- }, 8, ["class"]))
- ], 64)) : p.icon || p.$slots.icon ? (be(), Je(z($s), { key: 1 }, {
- default: ke(() => [
- p.icon ? (be(), Je(As(p.icon), { key: 0 })) : ln(p.$slots, "icon", { key: 1 })
- ]),
- _: 3
- })) : Ot("v-if", !0),
- p.$slots.default ? (be(), Ue("span", {
- key: 2,
- class: Ge({ [z(a).em("text", "expand")]: z(f) })
- }, [
- ln(p.$slots, "default")
- ], 2)) : Ot("v-if", !0)
- ]),
- _: 3
- }, 16, ["class", "style", "onClick"]));
- }
- });
- var AIe = /* @__PURE__ */ Nn($Ie, [["__file", "button.vue"]]);
- const EIe = {
- size: nR.size,
- type: nR.type
- }, MIe = ae({
- name: "ElButtonGroup"
- }), IIe = /* @__PURE__ */ ae({
- ...MIe,
- props: EIe,
- setup(t) {
- const e = t;
- Et(ine, zn({
- size: Lr(e, "size"),
- type: Lr(e, "type")
- }));
- const n = $n("button");
- return (r, i) => (be(), Ue("div", {
- class: Ge(`${z(n).b("group")}`)
- }, [
- ln(r.$slots, "default")
- ], 2));
- }
- });
- var one = /* @__PURE__ */ Nn(IIe, [["__file", "button-group.vue"]]);
- const oR = ec(AIe, {
- ButtonGroup: one
- });
- V_(one);
- var Su = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
- function g2(t) {
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
- }
- const $c = /* @__PURE__ */ new Map();
- let kW;
- Fr && (document.addEventListener("mousedown", (t) => kW = t), document.addEventListener("mouseup", (t) => {
- for (const e of $c.values())
- for (const { documentHandler: n } of e)
- n(t, kW);
- }));
- function LW(t, e) {
- let n = [];
- return Array.isArray(e.arg) ? n = e.arg : Ob(e.arg) && n.push(e.arg), function(r, i) {
- const a = e.instance.popperRef, o = r.target, s = i == null ? void 0 : i.target, l = !e || !e.instance, u = !o || !s, c = t.contains(o) || t.contains(s), f = t === o, d = n.length && n.some((p) => p == null ? void 0 : p.contains(o)) || n.length && n.includes(s), h = a && (a.contains(o) || a.contains(s));
- l || u || c || f || d || h || e.value(r, i);
- };
- }
- const DIe = {
- beforeMount(t, e) {
- $c.has(t) || $c.set(t, []), $c.get(t).push({
- documentHandler: LW(t, e),
- bindingFn: e.value
- });
- },
- updated(t, e) {
- $c.has(t) || $c.set(t, []);
- const n = $c.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
- documentHandler: LW(t, e),
- bindingFn: e.value
- };
- r >= 0 ? n.splice(r, 1, i) : n.push(i);
- },
- unmounted(t) {
- $c.delete(t);
- }
- }, sne = {
- modelValue: {
- type: [Number, String, Boolean],
- default: void 0
- },
- label: {
- type: [String, Boolean, Number, Object],
- default: void 0
- },
- value: {
- type: [String, Boolean, Number, Object],
- default: void 0
- },
- indeterminate: Boolean,
- disabled: Boolean,
- checked: Boolean,
- name: {
- type: String,
- default: void 0
- },
- trueValue: {
- type: [String, Number],
- default: void 0
- },
- falseValue: {
- type: [String, Number],
- default: void 0
- },
- trueLabel: {
- type: [String, Number],
- default: void 0
- },
- falseLabel: {
- type: [String, Number],
- default: void 0
- },
- id: {
- type: String,
- default: void 0
- },
- controls: {
- type: String,
- default: void 0
- },
- border: Boolean,
- size: op,
- tabindex: [String, Number],
- validateEvent: {
- type: Boolean,
- default: !0
- },
- ...sp(["ariaControls"])
- }, lne = {
- [ca]: (t) => ia(t) || Ws(t) || hf(t),
- change: (t) => ia(t) || Ws(t) || hf(t)
- }, cm = Symbol("checkboxGroupContextKey"), RIe = ({
- model: t,
- isChecked: e
- }) => {
- const n = et(cm, void 0), r = V(() => {
- var a, o;
- const s = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value;
- return !Qw(s) && t.value.length >= s && !e.value || !Qw(l) && t.value.length <= l && e.value;
- });
- return {
- isDisabled: um(V(() => (n == null ? void 0 : n.disabled.value) || r.value)),
- isLimitDisabled: r
- };
- }, kIe = (t, {
- model: e,
- isLimitExceeded: n,
- hasOwnLabel: r,
- isDisabled: i,
- isLabeledByFormItem: a
- }) => {
- const o = et(cm, void 0), { formItem: s } = lp(), { emit: l } = In();
- function u(p) {
- var v, g, m, y;
- return [!0, t.trueValue, t.trueLabel].includes(p) ? (g = (v = t.trueValue) != null ? v : t.trueLabel) != null ? g : !0 : (y = (m = t.falseValue) != null ? m : t.falseLabel) != null ? y : !1;
- }
- function c(p, v) {
- l("change", u(p), v);
- }
- function f(p) {
- if (n.value)
- return;
- const v = p.target;
- l("change", u(v.checked), p);
- }
- async function d(p) {
- n.value || !r.value && !i.value && a.value && (p.composedPath().some((m) => m.tagName === "LABEL") || (e.value = u([!1, t.falseValue, t.falseLabel].includes(e.value)), await Bt(), c(e.value, p)));
- }
- const h = V(() => (o == null ? void 0 : o.validateEvent) || t.validateEvent);
- return me(() => t.modelValue, () => {
- h.value && (s == null || s.validate("change").catch((p) => Fi(p)));
- }), {
- handleChange: f,
- onClickRoot: d
- };
- }, LIe = (t) => {
- const e = ee(!1), { emit: n } = In(), r = et(cm, void 0), i = V(() => Qw(r) === !1), a = ee(!1), o = V({
- get() {
- var s, l;
- return i.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = t.modelValue) != null ? l : e.value;
- },
- set(s) {
- var l, u;
- i.value && dg(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > o.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(ca, s), e.value = s);
- }
- });
- return {
- model: o,
- isGroup: i,
- isLimitExceeded: a
- };
- }, NIe = (t, e, { model: n }) => {
- const r = et(cm, void 0), i = ee(!1), a = V(() => yg(t.value) ? t.label : t.value), o = V(() => {
- const c = n.value;
- return hf(c) ? c : dg(c) ? Rh(a.value) ? c.map(es).some((f) => z_(f, a.value)) : c.map(es).includes(a.value) : c != null ? c === t.trueValue || c === t.trueLabel : !!c;
- }), s = Tg(V(() => {
- var c;
- return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
- }), {
- prop: !0
- }), l = Tg(V(() => {
- var c;
- return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
- })), u = V(() => !!e.default || !yg(a.value));
- return {
- checkboxButtonSize: s,
- isChecked: o,
- isFocused: i,
- checkboxSize: l,
- hasOwnLabel: u,
- actualValue: a
- };
- }, une = (t, e) => {
- const { formItem: n } = lp(), { model: r, isGroup: i, isLimitExceeded: a } = LIe(t), {
- isFocused: o,
- isChecked: s,
- checkboxButtonSize: l,
- checkboxSize: u,
- hasOwnLabel: c,
- actualValue: f
- } = NIe(t, e, { model: r }), { isDisabled: d } = RIe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Q_(t, {
- formItemContext: n,
- disableIdGeneration: c,
- disableIdManagement: i
- }), { handleChange: v, onClickRoot: g } = kIe(t, {
- model: r,
- isLimitExceeded: a,
- hasOwnLabel: c,
- isDisabled: d,
- isLabeledByFormItem: p
- });
- return (() => {
- function y() {
- var _, O;
- dg(r.value) && !r.value.includes(f.value) ? r.value.push(f.value) : r.value = (O = (_ = t.trueValue) != null ? _ : t.trueLabel) != null ? O : !0;
- }
- t.checked && y();
- })(), Es({
- from: "controls",
- replacement: "aria-controls",
- version: "2.8.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, V(() => !!t.controls)), Es({
- from: "label act as value",
- replacement: "value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, V(() => i.value && yg(t.value))), Es({
- from: "true-label",
- replacement: "true-value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, V(() => !!t.trueLabel)), Es({
- from: "false-label",
- replacement: "false-value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, V(() => !!t.falseLabel)), {
- inputId: h,
- isLabeledByFormItem: p,
- isChecked: s,
- isDisabled: d,
- isFocused: o,
- checkboxButtonSize: l,
- checkboxSize: u,
- hasOwnLabel: c,
- model: r,
- actualValue: f,
- handleChange: v,
- onClickRoot: g
- };
- }, BIe = ["id", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value"], zIe = ["id", "indeterminate", "disabled", "value", "name", "tabindex"], VIe = ae({
- name: "ElCheckbox"
- }), FIe = /* @__PURE__ */ ae({
- ...VIe,
- props: sne,
- emits: lne,
- setup(t) {
- const e = t, n = D_(), {
- inputId: r,
- isLabeledByFormItem: i,
- isChecked: a,
- isDisabled: o,
- isFocused: s,
- checkboxSize: l,
- hasOwnLabel: u,
- model: c,
- actualValue: f,
- handleChange: d,
- onClickRoot: h
- } = une(e, n), p = $n("checkbox"), v = V(() => [
- p.b(),
- p.m(l.value),
- p.is("disabled", o.value),
- p.is("bordered", e.border),
- p.is("checked", a.value)
- ]), g = V(() => [
- p.e("input"),
- p.is("disabled", o.value),
- p.is("checked", a.value),
- p.is("indeterminate", e.indeterminate),
- p.is("focus", s.value)
- ]);
- return (m, y) => (be(), Je(As(!z(u) && z(i) ? "span" : "label"), {
- class: Ge(z(v)),
- "aria-controls": m.indeterminate ? m.controls || m.ariaControls : null,
- onClick: z(h)
- }, {
- default: ke(() => {
- var _, O;
- return [
- tt("span", {
- class: Ge(z(g))
- }, [
- m.trueValue || m.falseValue || m.trueLabel || m.falseLabel ? Sr((be(), Ue("input", {
- key: 0,
- id: z(r),
- "onUpdate:modelValue": y[0] || (y[0] = (S) => Vs(c) ? c.value = S : null),
- class: Ge(z(p).e("original")),
- type: "checkbox",
- indeterminate: m.indeterminate,
- name: m.name,
- tabindex: m.tabindex,
- disabled: z(o),
- "true-value": (_ = m.trueValue) != null ? _ : m.trueLabel,
- "false-value": (O = m.falseValue) != null ? O : m.falseLabel,
- onChange: y[1] || (y[1] = (...S) => z(d) && z(d)(...S)),
- onFocus: y[2] || (y[2] = (S) => s.value = !0),
- onBlur: y[3] || (y[3] = (S) => s.value = !1),
- onClick: y[4] || (y[4] = ai(() => {
- }, ["stop"]))
- }, null, 42, BIe)), [
- [Bw, z(c)]
- ]) : Sr((be(), Ue("input", {
- key: 1,
- id: z(r),
- "onUpdate:modelValue": y[5] || (y[5] = (S) => Vs(c) ? c.value = S : null),
- class: Ge(z(p).e("original")),
- type: "checkbox",
- indeterminate: m.indeterminate,
- disabled: z(o),
- value: z(f),
- name: m.name,
- tabindex: m.tabindex,
- onChange: y[6] || (y[6] = (...S) => z(d) && z(d)(...S)),
- onFocus: y[7] || (y[7] = (S) => s.value = !0),
- onBlur: y[8] || (y[8] = (S) => s.value = !1),
- onClick: y[9] || (y[9] = ai(() => {
- }, ["stop"]))
- }, null, 42, zIe)), [
- [Bw, z(c)]
- ]),
- tt("span", {
- class: Ge(z(p).e("inner"))
- }, null, 2)
- ], 2),
- z(u) ? (be(), Ue("span", {
- key: 0,
- class: Ge(z(p).e("label"))
- }, [
- ln(m.$slots, "default"),
- m.$slots.default ? Ot("v-if", !0) : (be(), Ue(Wt, { key: 0 }, [
- On(xi(m.label), 1)
- ], 64))
- ], 2)) : Ot("v-if", !0)
- ];
- }),
- _: 3
- }, 8, ["class", "aria-controls", "onClick"]));
- }
- });
- var WIe = /* @__PURE__ */ Nn(FIe, [["__file", "checkbox.vue"]]);
- const QIe = ["name", "tabindex", "disabled", "true-value", "false-value"], HIe = ["name", "tabindex", "disabled", "value"], GIe = ae({
- name: "ElCheckboxButton"
- }), jIe = /* @__PURE__ */ ae({
- ...GIe,
- props: sne,
- emits: lne,
- setup(t) {
- const e = t, n = D_(), {
- isFocused: r,
- isChecked: i,
- isDisabled: a,
- checkboxButtonSize: o,
- model: s,
- actualValue: l,
- handleChange: u
- } = une(e, n), c = et(cm, void 0), f = $n("checkbox"), d = V(() => {
- var p, v, g, m;
- const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : "";
- return {
- backgroundColor: y,
- borderColor: y,
- color: (m = (g = c == null ? void 0 : c.textColor) == null ? void 0 : g.value) != null ? m : "",
- boxShadow: y ? `-1px 0 0 0 ${y}` : void 0
- };
- }), h = V(() => [
- f.b("button"),
- f.bm("button", o.value),
- f.is("disabled", a.value),
- f.is("checked", i.value),
- f.is("focus", r.value)
- ]);
- return (p, v) => {
- var g, m;
- return be(), Ue("label", {
- class: Ge(z(h))
- }, [
- p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? Sr((be(), Ue("input", {
- key: 0,
- "onUpdate:modelValue": v[0] || (v[0] = (y) => Vs(s) ? s.value = y : null),
- class: Ge(z(f).be("button", "original")),
- type: "checkbox",
- name: p.name,
- tabindex: p.tabindex,
- disabled: z(a),
- "true-value": (g = p.trueValue) != null ? g : p.trueLabel,
- "false-value": (m = p.falseValue) != null ? m : p.falseLabel,
- onChange: v[1] || (v[1] = (...y) => z(u) && z(u)(...y)),
- onFocus: v[2] || (v[2] = (y) => r.value = !0),
- onBlur: v[3] || (v[3] = (y) => r.value = !1),
- onClick: v[4] || (v[4] = ai(() => {
- }, ["stop"]))
- }, null, 42, QIe)), [
- [Bw, z(s)]
- ]) : Sr((be(), Ue("input", {
- key: 1,
- "onUpdate:modelValue": v[5] || (v[5] = (y) => Vs(s) ? s.value = y : null),
- class: Ge(z(f).be("button", "original")),
- type: "checkbox",
- name: p.name,
- tabindex: p.tabindex,
- disabled: z(a),
- value: z(l),
- onChange: v[6] || (v[6] = (...y) => z(u) && z(u)(...y)),
- onFocus: v[7] || (v[7] = (y) => r.value = !0),
- onBlur: v[8] || (v[8] = (y) => r.value = !1),
- onClick: v[9] || (v[9] = ai(() => {
- }, ["stop"]))
- }, null, 42, HIe)), [
- [Bw, z(s)]
- ]),
- p.$slots.default || p.label ? (be(), Ue("span", {
- key: 2,
- class: Ge(z(f).be("button", "inner")),
- style: dr(z(i) ? z(d) : void 0)
- }, [
- ln(p.$slots, "default", {}, () => [
- On(xi(p.label), 1)
- ])
- ], 6)) : Ot("v-if", !0)
- ], 2);
- };
- }
- });
- var cne = /* @__PURE__ */ Nn(jIe, [["__file", "checkbox-button.vue"]]);
- const ZIe = hr({
- modelValue: {
- type: mn(Array),
- default: () => []
- },
- disabled: Boolean,
- min: Number,
- max: Number,
- size: op,
- label: String,
- fill: String,
- textColor: String,
- tag: {
- type: String,
- default: "div"
- },
- validateEvent: {
- type: Boolean,
- default: !0
- },
- ...sp(["ariaLabel"])
- }), UIe = {
- [ca]: (t) => dg(t),
- change: (t) => dg(t)
- }, XIe = ae({
- name: "ElCheckboxGroup"
- }), YIe = /* @__PURE__ */ ae({
- ...XIe,
- props: ZIe,
- emits: UIe,
- setup(t, { emit: e }) {
- const n = t, r = $n("checkbox"), { formItem: i } = lp(), { inputId: a, isLabeledByFormItem: o } = Q_(n, {
- formItemContext: i
- }), s = async (u) => {
- e(ca, u), await Bt(), e("change", u);
- }, l = V({
- get() {
- return n.modelValue;
- },
- set(u) {
- s(u);
- }
- });
- return Et(cm, {
- ...mg(k_(n), [
- "size",
- "min",
- "max",
- "disabled",
- "validateEvent",
- "fill",
- "textColor"
- ]),
- modelValue: l,
- changeEvent: s
- }), Es({
- from: "label",
- replacement: "aria-label",
- version: "2.8.0",
- scope: "el-checkbox-group",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, V(() => !!n.label)), me(() => n.modelValue, () => {
- n.validateEvent && (i == null || i.validate("change").catch((u) => Fi(u)));
- }), (u, c) => {
- var f;
- return be(), Je(As(u.tag), {
- id: z(a),
- class: Ge(z(r).b("group")),
- role: "group",
- "aria-label": z(o) ? void 0 : u.label || u.ariaLabel || "checkbox-group",
- "aria-labelledby": z(o) ? (f = z(i)) == null ? void 0 : f.labelId : void 0
- }, {
- default: ke(() => [
- ln(u.$slots, "default")
- ]),
- _: 3
- }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
- };
- }
- });
- var fne = /* @__PURE__ */ Nn(YIe, [["__file", "checkbox-group.vue"]]);
- const qIe = ec(WIe, {
- CheckboxButton: cne,
- CheckboxGroup: fne
- });
- V_(cne);
- V_(fne);
- const dne = hr({
- modelValue: {
- type: [String, Number, Boolean],
- default: void 0
- },
- size: op,
- disabled: Boolean,
- label: {
- type: [String, Number, Boolean],
- default: void 0
- },
- value: {
- type: [String, Number, Boolean],
- default: void 0
- },
- name: {
- type: String,
- default: void 0
- }
- }), KIe = hr({
- ...dne,
- border: Boolean
- }), hne = {
- [ca]: (t) => ia(t) || Ws(t) || hf(t),
- [Cte]: (t) => ia(t) || Ws(t) || hf(t)
- }, pne = Symbol("radioGroupKey"), vne = (t, e) => {
- const n = ee(), r = et(pne, void 0), i = V(() => !!r), a = V(() => yg(t.value) ? t.label : t.value), o = V({
- get() {
- return i.value ? r.modelValue : t.modelValue;
- },
- set(f) {
- i.value ? r.changeEvent(f) : e && e(ca, f), n.value.checked = t.modelValue === a.value;
- }
- }), s = Tg(V(() => r == null ? void 0 : r.size)), l = um(V(() => r == null ? void 0 : r.disabled)), u = ee(!1), c = V(() => l.value || i.value && o.value !== a.value ? -1 : 0);
- return Es({
- from: "label act as value",
- replacement: "value",
- version: "3.0.0",
- scope: "el-radio",
- ref: "https://element-plus.org/en-US/component/radio.html"
- }, V(() => i.value && yg(t.value))), {
- radioRef: n,
- isGroup: i,
- radioGroup: r,
- focus: u,
- size: s,
- disabled: l,
- tabIndex: c,
- modelValue: o,
- actualValue: a
- };
- }, JIe = ["value", "name", "disabled"], eDe = ae({
- name: "ElRadio"
- }), tDe = /* @__PURE__ */ ae({
- ...eDe,
- props: KIe,
- emits: hne,
- setup(t, { emit: e }) {
- const n = t, r = $n("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = vne(n, e);
- function f() {
- Bt(() => e("change", u.value));
- }
- return (d, h) => {
- var p;
- return be(), Ue("label", {
- class: Ge([
- z(r).b(),
- z(r).is("disabled", z(l)),
- z(r).is("focus", z(o)),
- z(r).is("bordered", d.border),
- z(r).is("checked", z(u) === z(c)),
- z(r).m(z(s))
- ])
- }, [
- tt("span", {
- class: Ge([
- z(r).e("input"),
- z(r).is("disabled", z(l)),
- z(r).is("checked", z(u) === z(c))
- ])
- }, [
- Sr(tt("input", {
- ref_key: "radioRef",
- ref: i,
- "onUpdate:modelValue": h[0] || (h[0] = (v) => Vs(u) ? u.value = v : null),
- class: Ge(z(r).e("original")),
- value: z(c),
- name: d.name || ((p = z(a)) == null ? void 0 : p.name),
- disabled: z(l),
- type: "radio",
- onFocus: h[1] || (h[1] = (v) => o.value = !0),
- onBlur: h[2] || (h[2] = (v) => o.value = !1),
- onChange: f,
- onClick: h[3] || (h[3] = ai(() => {
- }, ["stop"]))
- }, null, 42, JIe), [
- [Eee, z(u)]
- ]),
- tt("span", {
- class: Ge(z(r).e("inner"))
- }, null, 2)
- ], 2),
- tt("span", {
- class: Ge(z(r).e("label")),
- onKeydown: h[4] || (h[4] = ai(() => {
- }, ["stop"]))
- }, [
- ln(d.$slots, "default", {}, () => [
- On(xi(d.label), 1)
- ])
- ], 34)
- ], 2);
- };
- }
- });
- var nDe = /* @__PURE__ */ Nn(tDe, [["__file", "radio.vue"]]);
- const rDe = hr({
- ...dne
- }), iDe = ["value", "name", "disabled"], aDe = ae({
- name: "ElRadioButton"
- }), oDe = /* @__PURE__ */ ae({
- ...aDe,
- props: rDe,
- setup(t) {
- const e = t, n = $n("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = vne(e), c = V(() => ({
- backgroundColor: (l == null ? void 0 : l.fill) || "",
- borderColor: (l == null ? void 0 : l.fill) || "",
- boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
- color: (l == null ? void 0 : l.textColor) || ""
- }));
- return (f, d) => {
- var h;
- return be(), Ue("label", {
- class: Ge([
- z(n).b("button"),
- z(n).is("active", z(s) === z(u)),
- z(n).is("disabled", z(o)),
- z(n).is("focus", z(i)),
- z(n).bm("button", z(a))
- ])
- }, [
- Sr(tt("input", {
- ref_key: "radioRef",
- ref: r,
- "onUpdate:modelValue": d[0] || (d[0] = (p) => Vs(s) ? s.value = p : null),
- class: Ge(z(n).be("button", "original-radio")),
- value: z(u),
- type: "radio",
- name: f.name || ((h = z(l)) == null ? void 0 : h.name),
- disabled: z(o),
- onFocus: d[1] || (d[1] = (p) => i.value = !0),
- onBlur: d[2] || (d[2] = (p) => i.value = !1),
- onClick: d[3] || (d[3] = ai(() => {
- }, ["stop"]))
- }, null, 42, iDe), [
- [Eee, z(s)]
- ]),
- tt("span", {
- class: Ge(z(n).be("button", "inner")),
- style: dr(z(s) === z(u) ? z(c) : {}),
- onKeydown: d[4] || (d[4] = ai(() => {
- }, ["stop"]))
- }, [
- ln(f.$slots, "default", {}, () => [
- On(xi(f.label), 1)
- ])
- ], 38)
- ], 2);
- };
- }
- });
- var gne = /* @__PURE__ */ Nn(oDe, [["__file", "radio-button.vue"]]);
- const sDe = hr({
- id: {
- type: String,
- default: void 0
- },
- size: op,
- disabled: Boolean,
- modelValue: {
- type: [String, Number, Boolean],
- default: void 0
- },
- fill: {
- type: String,
- default: ""
- },
- label: {
- type: String,
- default: void 0
- },
- textColor: {
- type: String,
- default: ""
- },
- name: {
- type: String,
- default: void 0
- },
- validateEvent: {
- type: Boolean,
- default: !0
- },
- ...sp(["ariaLabel"])
- }), lDe = hne, uDe = ["id", "aria-label", "aria-labelledby"], cDe = ae({
- name: "ElRadioGroup"
- }), fDe = /* @__PURE__ */ ae({
- ...cDe,
- props: sDe,
- emits: lDe,
- setup(t, { emit: e }) {
- const n = t, r = $n("radio"), i = wb(), a = ee(), { formItem: o } = lp(), { inputId: s, isLabeledByFormItem: l } = Q_(n, {
- formItemContext: o
- }), u = (f) => {
- e(ca, f), Bt(() => e("change", f));
- };
- _t(() => {
- const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
- !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
- });
- const c = V(() => n.name || i.value);
- return Et(pne, zn({
- ...k_(n),
- changeEvent: u,
- name: c
- })), me(() => n.modelValue, () => {
- n.validateEvent && (o == null || o.validate("change").catch((f) => Fi(f)));
- }), Es({
- from: "label",
- replacement: "aria-label",
- version: "2.8.0",
- scope: "el-radio-group",
- ref: "https://element-plus.org/en-US/component/radio.html"
- }, V(() => !!n.label)), (f, d) => (be(), Ue("div", {
- id: z(s),
- ref_key: "radioGroupRef",
- ref: a,
- class: Ge(z(r).b("group")),
- role: "radiogroup",
- "aria-label": z(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
- "aria-labelledby": z(l) ? z(o).labelId : void 0
- }, [
- ln(f.$slots, "default")
- ], 10, uDe));
- }
- });
- var mne = /* @__PURE__ */ Nn(fDe, [["__file", "radio-group.vue"]]);
- ec(nDe, {
- RadioButton: gne,
- RadioGroup: mne
- });
- const yne = V_(mne), By = V_(gne), dDe = ae({
- name: "ElCollapseTransition"
- }), hDe = /* @__PURE__ */ ae({
- ...dDe,
- setup(t) {
- const e = $n("collapse-transition"), n = (i) => {
- i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow, i.style.paddingTop = i.dataset.oldPaddingTop, i.style.paddingBottom = i.dataset.oldPaddingBottom;
- }, r = {
- beforeEnter(i) {
- i.dataset || (i.dataset = {}), i.dataset.oldPaddingTop = i.style.paddingTop, i.dataset.oldPaddingBottom = i.style.paddingBottom, i.style.height && (i.dataset.elExistsHeight = i.style.height), i.style.maxHeight = 0, i.style.paddingTop = 0, i.style.paddingBottom = 0;
- },
- enter(i) {
- requestAnimationFrame(() => {
- i.dataset.oldOverflow = i.style.overflow, i.dataset.elExistsHeight ? i.style.maxHeight = i.dataset.elExistsHeight : i.scrollHeight !== 0 ? i.style.maxHeight = `${i.scrollHeight}px` : i.style.maxHeight = 0, i.style.paddingTop = i.dataset.oldPaddingTop, i.style.paddingBottom = i.dataset.oldPaddingBottom, i.style.overflow = "hidden";
- });
- },
- afterEnter(i) {
- i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
- },
- enterCancelled(i) {
- n(i);
- },
- beforeLeave(i) {
- i.dataset || (i.dataset = {}), i.dataset.oldPaddingTop = i.style.paddingTop, i.dataset.oldPaddingBottom = i.style.paddingBottom, i.dataset.oldOverflow = i.style.overflow, i.style.maxHeight = `${i.scrollHeight}px`, i.style.overflow = "hidden";
- },
- leave(i) {
- i.scrollHeight !== 0 && (i.style.maxHeight = 0, i.style.paddingTop = 0, i.style.paddingBottom = 0);
- },
- afterLeave(i) {
- n(i);
- },
- leaveCancelled(i) {
- n(i);
- }
- };
- return (i, a) => (be(), Je(mo, Xn({
- name: z(e).b()
- }, uxe(r)), {
- default: ke(() => [
- ln(i.$slots, "default")
- ]),
- _: 3
- }, 16, ["name"]));
- }
- });
- var Fx = /* @__PURE__ */ Nn(hDe, [["__file", "collapse-transition.vue"]]);
- Fx.install = (t) => {
- t.component(Fx.name, Fx);
- };
- const pDe = Fx, vDe = hr({
- color: {
- type: mn(Object),
- required: !0
- },
- vertical: {
- type: Boolean,
- default: !1
- }
- });
- let jA = !1;
- function Pb(t, e) {
- if (!Fr)
- return;
- const n = function(a) {
- var o;
- (o = e.drag) == null || o.call(e, a);
- }, r = function(a) {
- var o;
- document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, jA = !1, (o = e.end) == null || o.call(e, a);
- }, i = function(a) {
- var o;
- jA || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), jA = !0, (o = e.start) == null || o.call(e, a));
- };
- t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
- }
- const gDe = (t) => {
- const e = In(), n = ve(), r = ve();
- function i(o) {
- o.target !== n.value && a(o);
- }
- function a(o) {
- if (!r.value || !n.value)
- return;
- const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = K4(o);
- if (t.vertical) {
- let f = c - l.top;
- f = Math.max(n.value.offsetHeight / 2, f), f = Math.min(f, l.height - n.value.offsetHeight / 2), t.color.set("alpha", Math.round((f - n.value.offsetHeight / 2) / (l.height - n.value.offsetHeight) * 100));
- } else {
- let f = u - l.left;
- f = Math.max(n.value.offsetWidth / 2, f), f = Math.min(f, l.width - n.value.offsetWidth / 2), t.color.set("alpha", Math.round((f - n.value.offsetWidth / 2) / (l.width - n.value.offsetWidth) * 100));
- }
- }
- return {
- thumb: n,
- bar: r,
- handleDrag: a,
- handleClick: i
- };
- }, mDe = (t, {
- bar: e,
- thumb: n,
- handleDrag: r
- }) => {
- const i = In(), a = $n("color-alpha-slider"), o = ee(0), s = ee(0), l = ee();
- function u() {
- if (!n.value || t.vertical)
- return 0;
- const y = i.vnode.el, _ = t.color.get("alpha");
- return y ? Math.round(_ * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
- }
- function c() {
- if (!n.value)
- return 0;
- const y = i.vnode.el;
- if (!t.vertical)
- return 0;
- const _ = t.color.get("alpha");
- return y ? Math.round(_ * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
- }
- function f() {
- if (t.color && t.color.value) {
- const { r: y, g: _, b: O } = t.color.toRgb();
- return `linear-gradient(to right, rgba(${y}, ${_}, ${O}, 0) 0%, rgba(${y}, ${_}, ${O}, 1) 100%)`;
- }
- return "";
- }
- function d() {
- o.value = u(), s.value = c(), l.value = f();
- }
- _t(() => {
- if (!e.value || !n.value)
- return;
- const y = {
- drag: (_) => {
- r(_);
- },
- end: (_) => {
- r(_);
- }
- };
- Pb(e.value, y), Pb(n.value, y), d();
- }), me(() => t.color.get("alpha"), () => d()), me(() => t.color.value, () => d());
- const h = V(() => [a.b(), a.is("vertical", t.vertical)]), p = V(() => a.e("bar")), v = V(() => a.e("thumb")), g = V(() => ({ background: l.value })), m = V(() => ({
- left: bg(o.value),
- top: bg(s.value)
- }));
- return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
- }, yDe = "ElColorAlphaSlider", bDe = ae({
- name: yDe
- }), _De = /* @__PURE__ */ ae({
- ...bDe,
- props: vDe,
- setup(t, { expose: e }) {
- const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = gDe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = mDe(n, {
- bar: r,
- thumb: i,
- handleDrag: a
- });
- return e({
- update: d,
- bar: r,
- thumb: i
- }), (h, p) => (be(), Ue("div", {
- class: Ge(z(s))
- }, [
- tt("div", {
- ref_key: "bar",
- ref: r,
- class: Ge(z(l)),
- style: dr(z(u)),
- onClick: p[0] || (p[0] = (...v) => z(o) && z(o)(...v))
- }, null, 6),
- tt("div", {
- ref_key: "thumb",
- ref: i,
- class: Ge(z(c)),
- style: dr(z(f))
- }, null, 6)
- ], 2));
- }
- });
- var ODe = /* @__PURE__ */ Nn(_De, [["__file", "alpha-slider.vue"]]);
- const SDe = ae({
- name: "ElColorHueSlider",
- props: {
- color: {
- type: Object,
- required: !0
- },
- vertical: Boolean
- },
- setup(t) {
- const e = $n("color-hue-slider"), n = In(), r = ee(), i = ee(), a = ee(0), o = ee(0), s = V(() => t.color.get("hue"));
- me(() => s.value, () => {
- d();
- });
- function l(h) {
- h.target !== r.value && u(h);
- }
- function u(h) {
- if (!i.value || !r.value)
- return;
- const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = K4(h);
- let y;
- if (t.vertical) {
- let _ = m - v.top;
- _ = Math.min(_, v.height - r.value.offsetHeight / 2), _ = Math.max(r.value.offsetHeight / 2, _), y = Math.round((_ - r.value.offsetHeight / 2) / (v.height - r.value.offsetHeight) * 360);
- } else {
- let _ = g - v.left;
- _ = Math.min(_, v.width - r.value.offsetWidth / 2), _ = Math.max(r.value.offsetWidth / 2, _), y = Math.round((_ - r.value.offsetWidth / 2) / (v.width - r.value.offsetWidth) * 360);
- }
- t.color.set("hue", y);
- }
- function c() {
- if (!r.value)
- return 0;
- const h = n.vnode.el;
- if (t.vertical)
- return 0;
- const p = t.color.get("hue");
- return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
- }
- function f() {
- if (!r.value)
- return 0;
- const h = n.vnode.el;
- if (!t.vertical)
- return 0;
- const p = t.color.get("hue");
- return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
- }
- function d() {
- a.value = c(), o.value = f();
- }
- return _t(() => {
- if (!i.value || !r.value)
- return;
- const h = {
- drag: (p) => {
- u(p);
- },
- end: (p) => {
- u(p);
- }
- };
- Pb(i.value, h), Pb(r.value, h), d();
- }), {
- bar: i,
- thumb: r,
- thumbLeft: a,
- thumbTop: o,
- hueValue: s,
- handleClick: l,
- update: d,
- ns: e
- };
- }
- });
- function xDe(t, e, n, r, i, a) {
- return be(), Ue("div", {
- class: Ge([t.ns.b(), t.ns.is("vertical", t.vertical)])
- }, [
- tt("div", {
- ref: "bar",
- class: Ge(t.ns.e("bar")),
- onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
- }, null, 2),
- tt("div", {
- ref: "thumb",
- class: Ge(t.ns.e("thumb")),
- style: dr({
- left: t.thumbLeft + "px",
- top: t.thumbTop + "px"
- })
- }, null, 6)
- ], 2);
- }
- var wDe = /* @__PURE__ */ Nn(SDe, [["render", xDe], ["__file", "hue-slider.vue"]]);
- const CDe = hr({
- modelValue: String,
- id: String,
- showAlpha: Boolean,
- colorFormat: String,
- disabled: Boolean,
- size: op,
- popperClass: {
- type: String,
- default: ""
- },
- label: {
- type: String,
- default: void 0
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- teleported: DN.teleported,
- predefine: {
- type: mn(Array)
- },
- validateEvent: {
- type: Boolean,
- default: !0
- },
- ...sp(["ariaLabel"])
- }), TDe = {
- [ca]: (t) => ia(t) || Jc(t),
- [Cte]: (t) => ia(t) || Jc(t),
- activeChange: (t) => ia(t) || Jc(t),
- focus: (t) => t instanceof FocusEvent,
- blur: (t) => t instanceof FocusEvent
- }, bne = Symbol("colorPickerContextKey"), NW = function(t, e, n) {
- return [
- t,
- e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
- t / 2
- ];
- }, PDe = function(t) {
- return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
- }, $De = function(t) {
- return typeof t == "string" && t.includes("%");
- }, Vv = function(t, e) {
- PDe(t) && (t = "100%");
- const n = $De(t);
- return t = Math.min(e, Math.max(0, Number.parseFloat(`${t}`))), n && (t = Number.parseInt(`${t * e}`, 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : t % e / Number.parseFloat(e);
- }, BW = {
- 10: "A",
- 11: "B",
- 12: "C",
- 13: "D",
- 14: "E",
- 15: "F"
- }, Wx = (t) => {
- t = Math.min(Math.round(t), 255);
- const e = Math.floor(t / 16), n = t % 16;
- return `${BW[e] || e}${BW[n] || n}`;
- }, zW = function({ r: t, g: e, b: n }) {
- return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${Wx(t)}${Wx(e)}${Wx(n)}`;
- }, ZA = {
- A: 10,
- B: 11,
- C: 12,
- D: 13,
- E: 14,
- F: 15
- }, rd = function(t) {
- return t.length === 2 ? (ZA[t[0].toUpperCase()] || +t[0]) * 16 + (ZA[t[1].toUpperCase()] || +t[1]) : ZA[t[1].toUpperCase()] || +t[1];
- }, ADe = function(t, e, n) {
- e = e / 100, n = n / 100;
- let r = e;
- const i = Math.max(n, 0.01);
- n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
- const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
- return {
- h: t,
- s: o * 100,
- v: a * 100
- };
- }, VW = (t, e, n) => {
- t = Vv(t, 255), e = Vv(e, 255), n = Vv(n, 255);
- const r = Math.max(t, e, n), i = Math.min(t, e, n);
- let a;
- const o = r, s = r - i, l = r === 0 ? 0 : s / r;
- if (r === i)
- a = 0;
- else {
- switch (r) {
- case t: {
- a = (e - n) / s + (e < n ? 6 : 0);
- break;
- }
- case e: {
- a = (n - t) / s + 2;
- break;
- }
- case n: {
- a = (t - e) / s + 4;
- break;
- }
- }
- a /= 6;
- }
- return { h: a * 360, s: l * 100, v: o * 100 };
- }, g0 = function(t, e, n) {
- t = Vv(t, 360) * 6, e = Vv(e, 100), n = Vv(n, 100);
- const r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
- return {
- r: Math.round(u * 255),
- g: Math.round(c * 255),
- b: Math.round(f * 255)
- };
- };
- class zy {
- constructor(e = {}) {
- this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
- for (const n in e)
- Dh(e, n) && (this[n] = e[n]);
- e.value ? this.fromString(e.value) : this.doOnChange();
- }
- set(e, n) {
- if (arguments.length === 1 && typeof e == "object") {
- for (const r in e)
- Dh(e, r) && this.set(r, e[r]);
- return;
- }
- this[`_${e}`] = n, this.doOnChange();
- }
- get(e) {
- return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
- }
- toRgb() {
- return g0(this._hue, this._saturation, this._value);
- }
- fromString(e) {
- if (!e) {
- this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
- return;
- }
- const n = (r, i, a) => {
- this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, i)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
- };
- if (e.includes("hsl")) {
- const r = e.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
- if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
- const { h: i, s: a, v: o } = ADe(r[0], r[1], r[2]);
- n(i, a, o);
- }
- } else if (e.includes("hsv")) {
- const r = e.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
- r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]);
- } else if (e.includes("rgb")) {
- const r = e.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
- if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
- const { h: i, s: a, v: o } = VW(r[0], r[1], r[2]);
- n(i, a, o);
- }
- } else if (e.includes("#")) {
- const r = e.replace("#", "").trim();
- if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
- return;
- let i, a, o;
- r.length === 3 ? (i = rd(r[0] + r[0]), a = rd(r[1] + r[1]), o = rd(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (i = rd(r.slice(0, 2)), a = rd(r.slice(2, 4)), o = rd(r.slice(4, 6))), r.length === 8 ? this._alpha = rd(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
- const { h: s, s: l, v: u } = VW(i, a, o);
- n(s, l, u);
- }
- }
- compare(e) {
- return Math.abs(e._hue - this._hue) < 2 && Math.abs(e._saturation - this._saturation) < 1 && Math.abs(e._value - this._value) < 1 && Math.abs(e._alpha - this._alpha) < 1;
- }
- doOnChange() {
- const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
- if (this.enableAlpha)
- switch (a) {
- case "hsl": {
- const o = NW(e, n / 100, r / 100);
- this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
- break;
- }
- case "hsv": {
- this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
- break;
- }
- case "hex": {
- this.value = `${zW(g0(e, n, r))}${Wx(i * 255 / 100)}`;
- break;
- }
- default: {
- const { r: o, g: s, b: l } = g0(e, n, r);
- this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
- }
- }
- else
- switch (a) {
- case "hsl": {
- const o = NW(e, n / 100, r / 100);
- this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
- break;
- }
- case "hsv": {
- this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
- break;
- }
- case "rgb": {
- const { r: o, g: s, b: l } = g0(e, n, r);
- this.value = `rgb(${o}, ${s}, ${l})`;
- break;
- }
- default:
- this.value = zW(g0(e, n, r));
- }
- }
- }
- const EDe = ae({
- props: {
- colors: {
- type: Array,
- required: !0
- },
- color: {
- type: Object,
- required: !0
- },
- enableAlpha: {
- type: Boolean,
- required: !0
- }
- },
- setup(t) {
- const e = $n("color-predefine"), { currentColor: n } = et(bne), r = ee(a(t.colors, t.color));
- me(() => n.value, (o) => {
- const s = new zy();
- s.fromString(o), r.value.forEach((l) => {
- l.selected = s.compare(l);
- });
- }), Vt(() => {
- r.value = a(t.colors, t.color);
- });
- function i(o) {
- t.color.fromString(t.colors[o]);
- }
- function a(o, s) {
- return o.map((l) => {
- const u = new zy();
- return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
- });
- }
- return {
- rgbaColors: r,
- handleSelect: i,
- ns: e
- };
- }
- }), MDe = ["onClick"];
- function IDe(t, e, n, r, i, a) {
- return be(), Ue("div", {
- class: Ge(t.ns.b())
- }, [
- tt("div", {
- class: Ge(t.ns.e("colors"))
- }, [
- (be(!0), Ue(Wt, null, hh(t.rgbaColors, (o, s) => (be(), Ue("div", {
- key: t.colors[s],
- class: Ge([
- t.ns.e("color-selector"),
- t.ns.is("alpha", o._alpha < 100),
- { selected: o.selected }
- ]),
- onClick: (l) => t.handleSelect(s)
- }, [
- tt("div", {
- style: dr({ backgroundColor: o.value })
- }, null, 4)
- ], 10, MDe))), 128))
- ], 2)
- ], 2);
- }
- var DDe = /* @__PURE__ */ Nn(EDe, [["render", IDe], ["__file", "predefine.vue"]]);
- const RDe = ae({
- name: "ElSlPanel",
- props: {
- color: {
- type: Object,
- required: !0
- }
- },
- setup(t) {
- const e = $n("color-svpanel"), n = In(), r = ee(0), i = ee(0), a = ee("hsl(0, 100%, 50%)"), o = V(() => {
- const u = t.color.get("hue"), c = t.color.get("value");
- return { hue: u, value: c };
- });
- function s() {
- const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
- i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
- }
- function l(u) {
- const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = K4(u);
- let p = d - f.left, v = h - f.top;
- p = Math.max(0, p), p = Math.min(p, f.width), v = Math.max(0, v), v = Math.min(v, f.height), i.value = p, r.value = v, t.color.set({
- saturation: p / f.width * 100,
- value: 100 - v / f.height * 100
- });
- }
- return me(() => o.value, () => {
- s();
- }), _t(() => {
- Pb(n.vnode.el, {
- drag: (u) => {
- l(u);
- },
- end: (u) => {
- l(u);
- }
- }), s();
- }), {
- cursorTop: r,
- cursorLeft: i,
- background: a,
- colorValue: o,
- handleDrag: l,
- update: s,
- ns: e
- };
- }
- }), kDe = /* @__PURE__ */ tt("div", null, null, -1), LDe = [
- kDe
- ];
- function NDe(t, e, n, r, i, a) {
- return be(), Ue("div", {
- class: Ge(t.ns.b()),
- style: dr({
- backgroundColor: t.background
- })
- }, [
- tt("div", {
- class: Ge(t.ns.e("white"))
- }, null, 2),
- tt("div", {
- class: Ge(t.ns.e("black"))
- }, null, 2),
- tt("div", {
- class: Ge(t.ns.e("cursor")),
- style: dr({
- top: t.cursorTop + "px",
- left: t.cursorLeft + "px"
- })
- }, LDe, 6)
- ], 6);
- }
- var BDe = /* @__PURE__ */ Nn(RDe, [["render", NDe], ["__file", "sv-panel.vue"]]);
- const zDe = ["onKeydown"], VDe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], FDe = ae({
- name: "ElColorPicker"
- }), WDe = /* @__PURE__ */ ae({
- ...FDe,
- props: CDe,
- emits: TDe,
- setup(t, { expose: e, emit: n }) {
- const r = t, { t: i } = mN(), a = $n("color"), { formItem: o } = lp(), s = Tg(), l = um(), { inputId: u, isLabeledByFormItem: c } = Q_(r, {
- formItemContext: o
- }), f = ee(), d = ee(), h = ee(), p = ee(), v = ee(), g = ee(), {
- isFocused: m,
- handleFocus: y,
- handleBlur: _
- } = Hte(v, {
- beforeBlur(q) {
- var K;
- return (K = p.value) == null ? void 0 : K.isFocusInsideContent(q);
- },
- afterBlur() {
- B(!1), U();
- }
- }), O = (q) => {
- if (l.value)
- return re();
- y(q);
- };
- let S = !0;
- const x = zn(new zy({
- enableAlpha: r.showAlpha,
- format: r.colorFormat || "",
- value: r.modelValue
- })), C = ee(!1), P = ee(!1), $ = ee(""), T = V(() => !r.modelValue && !P.value ? "transparent" : I(x, r.showAlpha)), E = V(() => !r.modelValue && !P.value ? "" : x.value), M = V(() => c.value ? void 0 : r.label || r.ariaLabel || i("el.colorpicker.defaultLabel"));
- Es({
- from: "label",
- replacement: "aria-label",
- version: "2.8.0",
- scope: "el-color-picker",
- ref: "https://element-plus.org/en-US/component/color-picker.html"
- }, V(() => !!r.label));
- const R = V(() => c.value ? o == null ? void 0 : o.labelId : void 0), N = V(() => [
- a.b("picker"),
- a.is("disabled", l.value),
- a.bm("picker", s.value),
- a.is("focused", m.value)
- ]);
- function I(q, K) {
- if (!(q instanceof zy))
- throw new TypeError("color should be instance of _color Class");
- const { r: de, g: xe, b: we } = q.toRgb();
- return K ? `rgba(${de}, ${xe}, ${we}, ${q.get("alpha") / 100})` : `rgb(${de}, ${xe}, ${we})`;
- }
- function B(q) {
- C.value = q;
- }
- const Q = hN(B, 100, { leading: !0 });
- function W() {
- l.value || B(!0);
- }
- function H() {
- Q(!1), U();
- }
- function U() {
- Bt(() => {
- r.modelValue ? x.fromString(r.modelValue) : (x.value = "", Bt(() => {
- P.value = !1;
- }));
- });
- }
- function j() {
- l.value || Q(!C.value);
- }
- function Y() {
- x.fromString($.value);
- }
- function ne() {
- const q = x.value;
- n(ca, q), n("change", q), r.validateEvent && (o == null || o.validate("change").catch((K) => Fi(K))), Q(!1), Bt(() => {
- const K = new zy({
- enableAlpha: r.showAlpha,
- format: r.colorFormat || "",
- value: r.modelValue
- });
- x.compare(K) || U();
- });
- }
- function fe() {
- Q(!1), n(ca, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((q) => Fi(q))), U();
- }
- function ue(q) {
- if (C.value && (H(), m.value)) {
- const K = new FocusEvent("focus", q);
- _(K);
- }
- }
- function ye(q) {
- q.preventDefault(), q.stopPropagation(), B(!1), U();
- }
- function se(q) {
- switch (q.code) {
- case wa.enter:
- case wa.space:
- q.preventDefault(), q.stopPropagation(), W(), g.value.focus();
- break;
- case wa.esc:
- ye(q);
- break;
- }
- }
- function he() {
- v.value.focus();
- }
- function re() {
- v.value.blur();
- }
- return _t(() => {
- r.modelValue && ($.value = E.value);
- }), me(() => r.modelValue, (q) => {
- q ? q && q !== x.value && (S = !1, x.fromString(q)) : P.value = !1;
- }), me(() => E.value, (q) => {
- $.value = q, S && n("activeChange", q), S = !0;
- }), me(() => x.value, () => {
- !r.modelValue && !P.value && (P.value = !0);
- }), me(() => C.value, () => {
- Bt(() => {
- var q, K, de;
- (q = f.value) == null || q.update(), (K = d.value) == null || K.update(), (de = h.value) == null || de.update();
- });
- }), Et(bne, {
- currentColor: E
- }), e({
- color: x,
- show: W,
- hide: H,
- focus: he,
- blur: re
- }), (q, K) => (be(), Je(z(cIe), {
- ref_key: "popper",
- ref: p,
- visible: C.value,
- "show-arrow": !1,
- "fallback-placements": ["bottom", "top", "right", "left"],
- offset: 0,
- "gpu-acceleration": !1,
- "popper-class": [z(a).be("picker", "panel"), z(a).b("dropdown"), q.popperClass],
- "stop-popper-mouse-event": !1,
- effect: "light",
- trigger: "click",
- teleported: q.teleported,
- transition: `${z(a).namespace.value}-zoom-in-top`,
- persistent: "",
- onHide: K[2] || (K[2] = (de) => B(!1))
- }, {
- content: ke(() => [
- Sr((be(), Ue("div", {
- onKeydown: gF(ye, ["esc"])
- }, [
- tt("div", {
- class: Ge(z(a).be("dropdown", "main-wrapper"))
- }, [
- D(wDe, {
- ref_key: "hue",
- ref: f,
- class: "hue-slider",
- color: z(x),
- vertical: ""
- }, null, 8, ["color"]),
- D(BDe, {
- ref_key: "sv",
- ref: d,
- color: z(x)
- }, null, 8, ["color"])
- ], 2),
- q.showAlpha ? (be(), Je(ODe, {
- key: 0,
- ref_key: "alpha",
- ref: h,
- color: z(x)
- }, null, 8, ["color"])) : Ot("v-if", !0),
- q.predefine ? (be(), Je(DDe, {
- key: 1,
- ref: "predefine",
- "enable-alpha": q.showAlpha,
- color: z(x),
- colors: q.predefine
- }, null, 8, ["enable-alpha", "color", "colors"])) : Ot("v-if", !0),
- tt("div", {
- class: Ge(z(a).be("dropdown", "btns"))
- }, [
- tt("span", {
- class: Ge(z(a).be("dropdown", "value"))
- }, [
- D(z(p2), {
- ref_key: "inputRef",
- ref: g,
- modelValue: $.value,
- "onUpdate:modelValue": K[0] || (K[0] = (de) => $.value = de),
- "validate-event": !1,
- size: "small",
- onKeyup: gF(Y, ["enter"]),
- onBlur: Y
- }, null, 8, ["modelValue", "onKeyup"])
- ], 2),
- D(z(oR), {
- class: Ge(z(a).be("dropdown", "link-btn")),
- text: "",
- size: "small",
- onClick: fe
- }, {
- default: ke(() => [
- On(xi(z(i)("el.colorpicker.clear")), 1)
- ]),
- _: 1
- }, 8, ["class"]),
- D(z(oR), {
- plain: "",
- size: "small",
- class: Ge(z(a).be("dropdown", "btn")),
- onClick: ne
- }, {
- default: ke(() => [
- On(xi(z(i)("el.colorpicker.confirm")), 1)
- ]),
- _: 1
- }, 8, ["class"])
- ], 2)
- ], 40, zDe)), [
- [z(DIe), ue]
- ])
- ]),
- default: ke(() => [
- tt("div", Xn({
- id: z(u),
- ref_key: "triggerRef",
- ref: v
- }, q.$attrs, {
- class: z(N),
- role: "button",
- "aria-label": z(M),
- "aria-labelledby": z(R),
- "aria-description": z(i)("el.colorpicker.description", { color: q.modelValue || "" }),
- "aria-disabled": z(l),
- tabindex: z(l) ? -1 : q.tabindex,
- onKeydown: se,
- onFocus: O,
- onBlur: K[1] || (K[1] = (...de) => z(_) && z(_)(...de))
- }), [
- z(l) ? (be(), Ue("div", {
- key: 0,
- class: Ge(z(a).be("picker", "mask"))
- }, null, 2)) : Ot("v-if", !0),
- tt("div", {
- class: Ge(z(a).be("picker", "trigger")),
- onClick: j
- }, [
- tt("span", {
- class: Ge([z(a).be("picker", "color"), z(a).is("alpha", q.showAlpha)])
- }, [
- tt("span", {
- class: Ge(z(a).be("picker", "color-inner")),
- style: dr({
- backgroundColor: z(T)
- })
- }, [
- Sr(D(z($s), {
- class: Ge([z(a).be("picker", "icon"), z(a).is("icon-arrow-down")])
- }, {
- default: ke(() => [
- D(z(_$e))
- ]),
- _: 1
- }, 8, ["class"]), [
- [ho, q.modelValue || P.value]
- ]),
- Sr(D(z($s), {
- class: Ge([z(a).be("picker", "empty"), z(a).is("icon-close")])
- }, {
- default: ke(() => [
- D(z(xte))
- ]),
- _: 1
- }, 8, ["class"]), [
- [ho, !q.modelValue && !P.value]
- ])
- ], 6)
- ], 2)
- ], 2)
- ], 16, VDe)
- ]),
- _: 1
- }, 8, ["visible", "popper-class", "teleported", "transition"]));
- }
- });
- var QDe = /* @__PURE__ */ Nn(WDe, [["__file", "color-picker.vue"]]);
- const Fv = ec(QDe), HDe = hr({
- mask: {
- type: Boolean,
- default: !0
- },
- customMaskEvent: {
- type: Boolean,
- default: !1
- },
- overlayClass: {
- type: mn([
- String,
- Array,
- Object
- ])
- },
- zIndex: {
- type: mn([String, Number])
- }
- }), GDe = {
- click: (t) => t instanceof MouseEvent
- }, jDe = "overlay";
- var ZDe = ae({
- name: "ElOverlay",
- props: HDe,
- emits: GDe,
- setup(t, { slots: e, emit: n }) {
- const r = $n(jDe), i = (l) => {
- n("click", l);
- }, { onClick: a, onMousedown: o, onMouseup: s } = zte(t.customMaskEvent ? void 0 : i);
- return () => t.mask ? D("div", {
- class: [r.b(), t.overlayClass],
- style: {
- zIndex: t.zIndex
- },
- onClick: a,
- onMousedown: o,
- onMouseup: s
- }, [ln(e, "default")], Nx.STYLE | Nx.CLASS | Nx.PROPS, ["onClick", "onMouseup", "onMousedown"]) : ff("div", {
- class: t.overlayClass,
- style: {
- zIndex: t.zIndex,
- position: "fixed",
- top: "0px",
- right: "0px",
- bottom: "0px",
- left: "0px"
- }
- }, [ln(e, "default")]);
- }
- });
- const UDe = ZDe, _ne = Symbol("dialogInjectionKey"), One = hr({
- center: Boolean,
- alignCenter: Boolean,
- closeIcon: {
- type: _g
- },
- draggable: Boolean,
- overflow: Boolean,
- fullscreen: Boolean,
- showClose: {
- type: Boolean,
- default: !0
- },
- title: {
- type: String,
- default: ""
- },
- ariaLevel: {
- type: String,
- default: "2"
- }
- }), XDe = {
- close: () => !0
- }, YDe = ["aria-level"], qDe = ["aria-label"], KDe = ["id"], JDe = ae({ name: "ElDialogContent" }), eRe = /* @__PURE__ */ ae({
- ...JDe,
- props: One,
- emits: XDe,
- setup(t) {
- const e = t, { t: n } = mN(), { Close: r } = D$e, { dialogRef: i, headerRef: a, bodyId: o, ns: s, style: l } = et(_ne), { focusTrapRef: u } = et(Jte), c = V(() => [
- s.b(),
- s.is("fullscreen", e.fullscreen),
- s.is("draggable", e.draggable),
- s.is("align-center", e.alignCenter),
- { [s.m("center")]: e.center }
- ]), f = k$e(u, i), d = V(() => e.draggable), h = V(() => e.overflow);
- return W$e(i, a, d, h), (p, v) => (be(), Ue("div", {
- ref: z(f),
- class: Ge(z(c)),
- style: dr(z(l)),
- tabindex: "-1"
- }, [
- tt("header", {
- ref_key: "headerRef",
- ref: a,
- class: Ge([z(s).e("header"), { "show-close": p.showClose }])
- }, [
- ln(p.$slots, "header", {}, () => [
- tt("span", {
- role: "heading",
- "aria-level": p.ariaLevel,
- class: Ge(z(s).e("title"))
- }, xi(p.title), 11, YDe)
- ]),
- p.showClose ? (be(), Ue("button", {
- key: 0,
- "aria-label": z(n)("el.dialog.close"),
- class: Ge(z(s).e("headerbtn")),
- type: "button",
- onClick: v[0] || (v[0] = (g) => p.$emit("close"))
- }, [
- D(z($s), {
- class: Ge(z(s).e("close"))
- }, {
- default: ke(() => [
- (be(), Je(As(p.closeIcon || z(r))))
- ]),
- _: 1
- }, 8, ["class"])
- ], 10, qDe)) : Ot("v-if", !0)
- ], 2),
- tt("div", {
- id: z(o),
- class: Ge(z(s).e("body"))
- }, [
- ln(p.$slots, "default")
- ], 10, KDe),
- p.$slots.footer ? (be(), Ue("footer", {
- key: 0,
- class: Ge(z(s).e("footer"))
- }, [
- ln(p.$slots, "footer")
- ], 2)) : Ot("v-if", !0)
- ], 6));
- }
- });
- var tRe = /* @__PURE__ */ Nn(eRe, [["__file", "dialog-content.vue"]]);
- const nRe = hr({
- ...One,
- appendToBody: Boolean,
- appendTo: {
- type: mn(String),
- default: "body"
- },
- beforeClose: {
- type: mn(Function)
- },
- destroyOnClose: Boolean,
- closeOnClickModal: {
- type: Boolean,
- default: !0
- },
- closeOnPressEscape: {
- type: Boolean,
- default: !0
- },
- lockScroll: {
- type: Boolean,
- default: !0
- },
- modal: {
- type: Boolean,
- default: !0
- },
- openDelay: {
- type: Number,
- default: 0
- },
- closeDelay: {
- type: Number,
- default: 0
- },
- top: {
- type: String
- },
- modelValue: Boolean,
- modalClass: String,
- width: {
- type: [String, Number]
- },
- zIndex: {
- type: Number
- },
- trapFocus: {
- type: Boolean,
- default: !1
- },
- headerAriaLevel: {
- type: String,
- default: "2"
- }
- }), rRe = {
- open: () => !0,
- opened: () => !0,
- close: () => !0,
- closed: () => !0,
- [ca]: (t) => hf(t),
- openAutoFocus: () => !0,
- closeAutoFocus: () => !0
- }, iRe = (t, e) => {
- var n;
- const i = In().emit, { nextZIndex: a } = Qte();
- let o = "";
- const s = wb(), l = wb(), u = ee(!1), c = ee(!1), f = ee(!1), d = ee((n = t.zIndex) != null ? n : a());
- let h, p;
- const v = Gte("namespace", Bx), g = V(() => {
- const I = {}, B = `--${v.value}-dialog`;
- return t.fullscreen || (t.top && (I[`${B}-margin-top`] = t.top), t.width && (I[`${B}-width`] = bg(t.width))), I;
- }), m = V(() => t.alignCenter ? { display: "flex" } : {});
- function y() {
- i("opened");
- }
- function _() {
- i("closed"), i(ca, !1), t.destroyOnClose && (f.value = !1);
- }
- function O() {
- i("close");
- }
- function S() {
- p == null || p(), h == null || h(), t.openDelay && t.openDelay > 0 ? { stop: h } = yF(() => $(), t.openDelay) : $();
- }
- function x() {
- h == null || h(), p == null || p(), t.closeDelay && t.closeDelay > 0 ? { stop: p } = yF(() => T(), t.closeDelay) : T();
- }
- function C() {
- function I(B) {
- B || (c.value = !0, u.value = !1);
- }
- t.beforeClose ? t.beforeClose(I) : x();
- }
- function P() {
- t.closeOnClickModal && C();
- }
- function $() {
- Fr && (u.value = !0);
- }
- function T() {
- u.value = !1;
- }
- function E() {
- i("openAutoFocus");
- }
- function M() {
- i("closeAutoFocus");
- }
- function R(I) {
- var B;
- ((B = I.detail) == null ? void 0 : B.focusReason) === "pointer" && I.preventDefault();
- }
- t.lockScroll && Y$e(u);
- function N() {
- t.closeOnPressEscape && C();
- }
- return me(() => t.modelValue, (I) => {
- I ? (c.value = !1, S(), f.value = !0, d.value = gte(t.zIndex) ? a() : d.value++, Bt(() => {
- i("open"), e.value && (e.value.scrollTop = 0);
- })) : u.value && x();
- }), me(() => t.fullscreen, (I) => {
- e.value && (I ? (o = e.value.style.transform, e.value.style.transform = "") : e.value.style.transform = o);
- }), _t(() => {
- t.modelValue && (u.value = !0, f.value = !0, S());
- }), {
- afterEnter: y,
- afterLeave: _,
- beforeLeave: O,
- handleClose: C,
- onModalClick: P,
- close: x,
- doClose: T,
- onOpenAutoFocus: E,
- onCloseAutoFocus: M,
- onCloseRequested: N,
- onFocusoutPrevented: R,
- titleId: s,
- bodyId: l,
- closed: c,
- style: g,
- overlayDialogStyle: m,
- rendered: f,
- visible: u,
- zIndex: d
- };
- }, aRe = ["aria-label", "aria-labelledby", "aria-describedby"], oRe = ae({
- name: "ElDialog",
- inheritAttrs: !1
- }), sRe = /* @__PURE__ */ ae({
- ...oRe,
- props: nRe,
- emits: rRe,
- setup(t, { expose: e }) {
- const n = t, r = D_();
- Es({
- scope: "el-dialog",
- from: "the title slot",
- replacement: "the header slot",
- version: "3.0.0",
- ref: "https://element-plus.org/en-US/component/dialog.html#slots"
- }, V(() => !!r.title));
- const i = $n("dialog"), a = ee(), o = ee(), s = ee(), {
- visible: l,
- titleId: u,
- bodyId: c,
- style: f,
- overlayDialogStyle: d,
- rendered: h,
- zIndex: p,
- afterEnter: v,
- afterLeave: g,
- beforeLeave: m,
- handleClose: y,
- onModalClick: _,
- onOpenAutoFocus: O,
- onCloseAutoFocus: S,
- onCloseRequested: x,
- onFocusoutPrevented: C
- } = iRe(n, a);
- Et(_ne, {
- dialogRef: a,
- headerRef: o,
- bodyId: c,
- ns: i,
- rendered: h,
- style: f
- });
- const P = zte(_), $ = V(() => n.draggable && !n.fullscreen);
- return e({
- visible: l,
- dialogContentRef: s
- }), (T, E) => (be(), Je(R_, {
- to: T.appendTo,
- disabled: T.appendTo !== "body" ? !1 : !T.appendToBody
- }, [
- D(mo, {
- name: "dialog-fade",
- onAfterEnter: z(v),
- onAfterLeave: z(g),
- onBeforeLeave: z(m),
- persisted: ""
- }, {
- default: ke(() => [
- Sr(D(z(UDe), {
- "custom-mask-event": "",
- mask: T.modal,
- "overlay-class": T.modalClass,
- "z-index": z(p)
- }, {
- default: ke(() => [
- tt("div", {
- role: "dialog",
- "aria-modal": "true",
- "aria-label": T.title || void 0,
- "aria-labelledby": T.title ? void 0 : z(u),
- "aria-describedby": z(c),
- class: Ge(`${z(i).namespace.value}-overlay-dialog`),
- style: dr(z(d)),
- onClick: E[0] || (E[0] = (...M) => z(P).onClick && z(P).onClick(...M)),
- onMousedown: E[1] || (E[1] = (...M) => z(P).onMousedown && z(P).onMousedown(...M)),
- onMouseup: E[2] || (E[2] = (...M) => z(P).onMouseup && z(P).onMouseup(...M))
- }, [
- D(z(tne), {
- loop: "",
- trapped: z(l),
- "focus-start-el": "container",
- onFocusAfterTrapped: z(O),
- onFocusAfterReleased: z(S),
- onFocusoutPrevented: z(C),
- onReleaseRequested: z(x)
- }, {
- default: ke(() => [
- z(h) ? (be(), Je(tRe, Xn({
- key: 0,
- ref_key: "dialogContentRef",
- ref: s
- }, T.$attrs, {
- center: T.center,
- "align-center": T.alignCenter,
- "close-icon": T.closeIcon,
- draggable: z($),
- overflow: T.overflow,
- fullscreen: T.fullscreen,
- "show-close": T.showClose,
- title: T.title,
- "aria-level": T.headerAriaLevel,
- onClose: z(y)
- }), cxe({
- header: ke(() => [
- T.$slots.title ? ln(T.$slots, "title", { key: 1 }) : ln(T.$slots, "header", {
- key: 0,
- close: z(y),
- titleId: z(u),
- titleClass: z(i).e("title")
- })
- ]),
- default: ke(() => [
- ln(T.$slots, "default")
- ]),
- _: 2
- }, [
- T.$slots.footer ? {
- name: "footer",
- fn: ke(() => [
- ln(T.$slots, "footer")
- ])
- } : void 0
- ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : Ot("v-if", !0)
- ]),
- _: 3
- }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
- ], 46, aRe)
- ]),
- _: 3
- }, 8, ["mask", "overlay-class", "z-index"]), [
- [ho, z(l)]
- ])
- ]),
- _: 3
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
- ], 8, ["to", "disabled"]));
- }
- });
- var lRe = /* @__PURE__ */ Nn(sRe, [["__file", "dialog.vue"]]);
- const uRe = ec(lRe), cRe = Symbol("ElSelect"), Wv = "$treeNodeId", FW = function(t, e) {
- !e || e[Wv] || Object.defineProperty(e, Wv, {
- value: t.id,
- enumerable: !1,
- configurable: !1,
- writable: !1
- });
- }, RN = function(t, e) {
- return t ? e[t] : e[Wv];
- }, sR = (t, e, n) => {
- const r = t.value.currentNode;
- n();
- const i = t.value.currentNode;
- r !== i && e("current-change", i ? i.data : null, i);
- }, lR = (t) => {
- let e = !0, n = !0, r = !0;
- for (let i = 0, a = t.length; i < a; i++) {
- const o = t[i];
- (o.checked !== !0 || o.indeterminate) && (e = !1, o.disabled || (r = !1)), (o.checked !== !1 || o.indeterminate) && (n = !1);
- }
- return { all: e, none: n, allWithoutDisable: r, half: !e && !n };
- }, cy = function(t) {
- if (t.childNodes.length === 0 || t.loading)
- return;
- const { all: e, none: n, half: r } = lR(t.childNodes);
- e ? (t.checked = !0, t.indeterminate = !1) : r ? (t.checked = !1, t.indeterminate = !0) : n && (t.checked = !1, t.indeterminate = !1);
- const i = t.parent;
- !i || i.level === 0 || t.store.checkStrictly || cy(i);
- }, FO = function(t, e) {
- const n = t.store.props, r = t.data || {}, i = n[e];
- if (typeof i == "function")
- return i(r, t);
- if (typeof i == "string")
- return r[i];
- if (typeof i > "u") {
- const a = r[e];
- return a === void 0 ? "" : a;
- }
- };
- let fRe = 0;
- class gh {
- constructor(e) {
- this.id = fRe++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
- for (const n in e)
- Dh(e, n) && (this[n] = e[n]);
- this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
- }
- initialize() {
- const e = this.store;
- if (!e)
- throw new Error("[Node]store is required!");
- e.registerNode(this);
- const n = e.props;
- if (n && typeof n.isLeaf < "u") {
- const a = FO(this, "isLeaf");
- typeof a == "boolean" && (this.isLeafByUser = a);
- }
- if (e.lazy !== !0 && this.data ? (this.setData(this.data), e.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && e.lazy && e.defaultExpandAll && this.expand(), Array.isArray(this.data) || FW(this, this.data), !this.data)
- return;
- const r = e.defaultExpandedKeys, i = e.key;
- i && r && r.includes(this.key) && this.expand(null, e.autoExpandParent), i && e.currentNodeKey !== void 0 && this.key === e.currentNodeKey && (e.currentNode = this, e.currentNode.isCurrent = !0), e.lazy && e._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
- }
- setData(e) {
- Array.isArray(e) || FW(this, e), this.data = e, this.childNodes = [];
- let n;
- this.level === 0 && Array.isArray(this.data) ? n = this.data : n = FO(this, "children") || [];
- for (let r = 0, i = n.length; r < i; r++)
- this.insertChild({ data: n[r] });
- }
- get label() {
- return FO(this, "label");
- }
- get key() {
- const e = this.store.key;
- return this.data ? this.data[e] : null;
- }
- get disabled() {
- return FO(this, "disabled");
- }
- get nextSibling() {
- const e = this.parent;
- if (e) {
- const n = e.childNodes.indexOf(this);
- if (n > -1)
- return e.childNodes[n + 1];
- }
- return null;
- }
- get previousSibling() {
- const e = this.parent;
- if (e) {
- const n = e.childNodes.indexOf(this);
- if (n > -1)
- return n > 0 ? e.childNodes[n - 1] : null;
- }
- return null;
- }
- contains(e, n = !0) {
- return (this.childNodes || []).some((r) => r === e || n && r.contains(e));
- }
- remove() {
- const e = this.parent;
- e && e.removeChild(this);
- }
- insertChild(e, n, r) {
- if (!e)
- throw new Error("InsertChild error: child is required.");
- if (!(e instanceof gh)) {
- if (!r) {
- const i = this.getChildren(!0);
- i.includes(e.data) || (typeof n > "u" || n < 0 ? i.push(e.data) : i.splice(n, 0, e.data));
- }
- Object.assign(e, {
- parent: this,
- store: this.store
- }), e = zn(new gh(e)), e instanceof gh && e.initialize();
- }
- e.level = this.level + 1, typeof n > "u" || n < 0 ? this.childNodes.push(e) : this.childNodes.splice(n, 0, e), this.updateLeafState();
- }
- insertBefore(e, n) {
- let r;
- n && (r = this.childNodes.indexOf(n)), this.insertChild(e, r);
- }
- insertAfter(e, n) {
- let r;
- n && (r = this.childNodes.indexOf(n), r !== -1 && (r += 1)), this.insertChild(e, r);
- }
- removeChild(e) {
- const n = this.getChildren() || [], r = n.indexOf(e.data);
- r > -1 && n.splice(r, 1);
- const i = this.childNodes.indexOf(e);
- i > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(i, 1)), this.updateLeafState();
- }
- removeChildByData(e) {
- let n = null;
- for (let r = 0; r < this.childNodes.length; r++)
- if (this.childNodes[r].data === e) {
- n = this.childNodes[r];
- break;
- }
- n && this.removeChild(n);
- }
- expand(e, n) {
- const r = () => {
- if (n) {
- let i = this.parent;
- for (; i.level > 0; )
- i.expanded = !0, i = i.parent;
- }
- this.expanded = !0, e && e(), this.childNodes.forEach((i) => {
- i.canFocus = !0;
- });
- };
- this.shouldLoadData() ? this.loadData((i) => {
- Array.isArray(i) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || cy(this), r());
- }) : r();
- }
- doCreateChildren(e, n = {}) {
- e.forEach((r) => {
- this.insertChild(Object.assign({ data: r }, n), void 0, !0);
- });
- }
- collapse() {
- this.expanded = !1, this.childNodes.forEach((e) => {
- e.canFocus = !1;
- });
- }
- shouldLoadData() {
- return this.store.lazy === !0 && this.store.load && !this.loaded;
- }
- updateLeafState() {
- if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
- this.isLeaf = this.isLeafByUser;
- return;
- }
- const e = this.childNodes;
- if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
- this.isLeaf = !e || e.length === 0;
- return;
- }
- this.isLeaf = !1;
- }
- setChecked(e, n, r, i) {
- if (this.indeterminate = e === "half", this.checked = e === !0, this.store.checkStrictly)
- return;
- if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
- const { all: o, allWithoutDisable: s } = lR(this.childNodes);
- !this.isLeaf && !o && s && (this.checked = !1, e = !1);
- const l = () => {
- if (n) {
- const u = this.childNodes;
- for (let d = 0, h = u.length; d < h; d++) {
- const p = u[d];
- i = i || e !== !1;
- const v = p.disabled ? p.checked : i;
- p.setChecked(v, n, !0, i);
- }
- const { half: c, all: f } = lR(u);
- f || (this.checked = f, this.indeterminate = c);
- }
- };
- if (this.shouldLoadData()) {
- this.loadData(() => {
- l(), cy(this);
- }, {
- checked: e !== !1
- });
- return;
- } else
- l();
- }
- const a = this.parent;
- !a || a.level === 0 || r || cy(a);
- }
- getChildren(e = !1) {
- if (this.level === 0)
- return this.data;
- const n = this.data;
- if (!n)
- return null;
- const r = this.store.props;
- let i = "children";
- return r && (i = r.children || "children"), n[i] === void 0 && (n[i] = null), e && !n[i] && (n[i] = []), n[i];
- }
- updateChildren() {
- const e = this.getChildren() || [], n = this.childNodes.map((a) => a.data), r = {}, i = [];
- e.forEach((a, o) => {
- const s = a[Wv];
- !!s && n.findIndex((u) => u[Wv] === s) >= 0 ? r[s] = { index: o, data: a } : i.push({ index: o, data: a });
- }), this.store.lazy || n.forEach((a) => {
- r[a[Wv]] || this.removeChildByData(a);
- }), i.forEach(({ index: a, data: o }) => {
- this.insertChild({ data: o }, a);
- }), this.updateLeafState();
- }
- loadData(e, n = {}) {
- if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) {
- this.loading = !0;
- const r = (a) => {
- this.childNodes = [], this.doCreateChildren(a, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, a);
- }, i = () => {
- this.loading = !1;
- };
- this.store.load(this, r, i);
- } else
- e && e.call(this);
- }
- eachNode(e) {
- const n = [this];
- for (; n.length; ) {
- const r = n.shift();
- n.unshift(...r.childNodes), e(r);
- }
- }
- reInitChecked() {
- this.store.checkStrictly || cy(this);
- }
- }
- class dRe {
- constructor(e) {
- this.currentNode = null, this.currentNodeKey = null;
- for (const n in e)
- Dh(e, n) && (this[n] = e[n]);
- this.nodesMap = {};
- }
- initialize() {
- if (this.root = new gh({
- data: this.data,
- store: this
- }), this.root.initialize(), this.lazy && this.load) {
- const e = this.load;
- e(this.root, (n) => {
- this.root.doCreateChildren(n), this._initDefaultCheckedNodes();
- });
- } else
- this._initDefaultCheckedNodes();
- }
- filter(e) {
- const n = this.filterNodeMethod, r = this.lazy, i = function(a) {
- const o = a.root ? a.root.childNodes : a.childNodes;
- if (o.forEach((s) => {
- s.visible = n.call(s, e, s.data, s), i(s);
- }), !a.visible && o.length) {
- let s = !0;
- s = !o.some((l) => l.visible), a.root ? a.root.visible = s === !1 : a.visible = s === !1;
- }
- e && a.visible && !a.isLeaf && (!r || a.loaded) && a.expand();
- };
- i(this);
- }
- setData(e) {
- e !== this.root.data ? (this.root.setData(e), this._initDefaultCheckedNodes()) : this.root.updateChildren();
- }
- getNode(e) {
- if (e instanceof gh)
- return e;
- const n = Rh(e) ? RN(this.key, e) : e;
- return this.nodesMap[n] || null;
- }
- insertBefore(e, n) {
- const r = this.getNode(n);
- r.parent.insertBefore({ data: e }, r);
- }
- insertAfter(e, n) {
- const r = this.getNode(n);
- r.parent.insertAfter({ data: e }, r);
- }
- remove(e) {
- const n = this.getNode(e);
- n && n.parent && (n === this.currentNode && (this.currentNode = null), n.parent.removeChild(n));
- }
- append(e, n) {
- const r = yg(n) ? this.root : this.getNode(n);
- r && r.insertChild({ data: e });
- }
- _initDefaultCheckedNodes() {
- const e = this.defaultCheckedKeys || [], n = this.nodesMap;
- e.forEach((r) => {
- const i = n[r];
- i && i.setChecked(!0, !this.checkStrictly);
- });
- }
- _initDefaultCheckedNode(e) {
- (this.defaultCheckedKeys || []).includes(e.key) && e.setChecked(!0, !this.checkStrictly);
- }
- setDefaultCheckedKey(e) {
- e !== this.defaultCheckedKeys && (this.defaultCheckedKeys = e, this._initDefaultCheckedNodes());
- }
- registerNode(e) {
- const n = this.key;
- !e || !e.data || (n ? e.key !== void 0 && (this.nodesMap[e.key] = e) : this.nodesMap[e.id] = e);
- }
- deregisterNode(e) {
- !this.key || !e || !e.data || (e.childNodes.forEach((r) => {
- this.deregisterNode(r);
- }), delete this.nodesMap[e.key]);
- }
- getCheckedNodes(e = !1, n = !1) {
- const r = [], i = function(a) {
- (a.root ? a.root.childNodes : a.childNodes).forEach((s) => {
- (s.checked || n && s.indeterminate) && (!e || e && s.isLeaf) && r.push(s.data), i(s);
- });
- };
- return i(this), r;
- }
- getCheckedKeys(e = !1) {
- return this.getCheckedNodes(e).map((n) => (n || {})[this.key]);
- }
- getHalfCheckedNodes() {
- const e = [], n = function(r) {
- (r.root ? r.root.childNodes : r.childNodes).forEach((a) => {
- a.indeterminate && e.push(a.data), n(a);
- });
- };
- return n(this), e;
- }
- getHalfCheckedKeys() {
- return this.getHalfCheckedNodes().map((e) => (e || {})[this.key]);
- }
- _getAllNodes() {
- const e = [], n = this.nodesMap;
- for (const r in n)
- Dh(n, r) && e.push(n[r]);
- return e;
- }
- updateChildren(e, n) {
- const r = this.nodesMap[e];
- if (!r)
- return;
- const i = r.childNodes;
- for (let a = i.length - 1; a >= 0; a--) {
- const o = i[a];
- this.remove(o.data);
- }
- for (let a = 0, o = n.length; a < o; a++) {
- const s = n[a];
- this.append(s, r.data);
- }
- }
- _setCheckedKeys(e, n = !1, r) {
- const i = this._getAllNodes().sort((l, u) => l.level - u.level), a = /* @__PURE__ */ Object.create(null), o = Object.keys(r);
- i.forEach((l) => l.setChecked(!1, !1));
- const s = (l) => {
- l.childNodes.forEach((u) => {
- var c;
- a[u.data[e]] = !0, (c = u.childNodes) != null && c.length && s(u);
- });
- };
- for (let l = 0, u = i.length; l < u; l++) {
- const c = i[l], f = c.data[e].toString();
- if (!o.includes(f)) {
- c.checked && !a[f] && c.setChecked(!1, !1);
- continue;
- }
- if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) {
- c.setChecked(!0, !1);
- continue;
- }
- if (c.setChecked(!0, !0), n) {
- c.setChecked(!1, !1);
- const h = function(p) {
- p.childNodes.forEach((g) => {
- g.isLeaf || g.setChecked(!1, !1), h(g);
- });
- };
- h(c);
- }
- }
- }
- setCheckedNodes(e, n = !1) {
- const r = this.key, i = {};
- e.forEach((a) => {
- i[(a || {})[r]] = !0;
- }), this._setCheckedKeys(r, n, i);
- }
- setCheckedKeys(e, n = !1) {
- this.defaultCheckedKeys = e;
- const r = this.key, i = {};
- e.forEach((a) => {
- i[a] = !0;
- }), this._setCheckedKeys(r, n, i);
- }
- setDefaultExpandedKeys(e) {
- e = e || [], this.defaultExpandedKeys = e, e.forEach((n) => {
- const r = this.getNode(n);
- r && r.expand(null, this.autoExpandParent);
- });
- }
- setChecked(e, n, r) {
- const i = this.getNode(e);
- i && i.setChecked(!!n, r);
- }
- getCurrentNode() {
- return this.currentNode;
- }
- setCurrentNode(e) {
- const n = this.currentNode;
- n && (n.isCurrent = !1), this.currentNode = e, this.currentNode.isCurrent = !0;
- }
- setUserCurrentNode(e, n = !0) {
- const r = e[this.key], i = this.nodesMap[r];
- this.setCurrentNode(i), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0);
- }
- setCurrentNodeKey(e, n = !0) {
- if (e == null) {
- this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
- return;
- }
- const r = this.getNode(e);
- r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0));
- }
- }
- const hRe = ae({
- name: "ElTreeNodeContent",
- props: {
- node: {
- type: Object,
- required: !0
- },
- renderContent: Function
- },
- setup(t) {
- const e = $n("tree"), n = et("NodeInstance"), r = et("RootTree");
- return () => {
- const i = t.node, { data: a, store: o } = i;
- return t.renderContent ? t.renderContent(ff, { _self: n, node: i, data: a, store: o }) : ln(r.ctx.slots, "default", { node: i, data: a }, () => [
- ff("span", { class: e.be("node", "label") }, [i.label])
- ]);
- };
- }
- });
- var pRe = /* @__PURE__ */ Nn(hRe, [["__file", "tree-node-content.vue"]]);
- function Sne(t) {
- const e = et("TreeNodeMap", null), n = {
- treeNodeExpand: (r) => {
- t.node !== r && t.node.collapse();
- },
- children: []
- };
- return e && e.children.push(n), Et("TreeNodeMap", n), {
- broadcastExpanded: (r) => {
- if (t.accordion)
- for (const i of n.children)
- i.treeNodeExpand(r);
- }
- };
- }
- const xne = Symbol("dragEvents");
- function vRe({ props: t, ctx: e, el$: n, dropIndicator$: r, store: i }) {
- const a = $n("tree"), o = ee({
- showDropIndicator: !1,
- draggingNode: null,
- dropNode: null,
- allowDrop: !0,
- dropType: null
- });
- return Et(xne, {
- treeNodeDragStart: ({ event: c, treeNode: f }) => {
- if (typeof t.allowDrag == "function" && !t.allowDrag(f.node))
- return c.preventDefault(), !1;
- c.dataTransfer.effectAllowed = "move";
- try {
- c.dataTransfer.setData("text/plain", "");
- } catch {
- }
- o.value.draggingNode = f, e.emit("node-drag-start", f.node, c);
- },
- treeNodeDragOver: ({ event: c, treeNode: f }) => {
- const d = f, h = o.value.dropNode;
- h && h.node.id !== d.node.id && Lx(h.$el, a.is("drop-inner"));
- const p = o.value.draggingNode;
- if (!p || !d)
- return;
- let v = !0, g = !0, m = !0, y = !0;
- typeof t.allowDrop == "function" && (v = t.allowDrop(p.node, d.node, "prev"), y = g = t.allowDrop(p.node, d.node, "inner"), m = t.allowDrop(p.node, d.node, "next")), c.dataTransfer.dropEffect = g || v || m ? "move" : "none", (v || g || m) && (h == null ? void 0 : h.node.id) !== d.node.id && (h && e.emit("node-drag-leave", p.node, h.node, c), e.emit("node-drag-enter", p.node, d.node, c)), v || g || m ? o.value.dropNode = d : o.value.dropNode = null, d.node.nextSibling === p.node && (m = !1), d.node.previousSibling === p.node && (v = !1), d.node.contains(p.node, !1) && (g = !1), (p.node === d.node || p.node.contains(d.node)) && (v = !1, g = !1, m = !1);
- const _ = d.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), O = n.value.getBoundingClientRect();
- let S;
- const x = v ? g ? 0.25 : m ? 0.45 : 1 : -1, C = m ? g ? 0.75 : v ? 0.55 : 0 : 1;
- let P = -9999;
- const $ = c.clientY - _.top;
- $ < _.height * x ? S = "before" : $ > _.height * C ? S = "after" : g ? S = "inner" : S = "none";
- const T = d.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), E = r.value;
- S === "before" ? P = T.top - O.top : S === "after" && (P = T.bottom - O.top), E.style.top = `${P}px`, E.style.left = `${T.right - O.left}px`, S === "inner" ? Ote(d.$el, a.is("drop-inner")) : Lx(d.$el, a.is("drop-inner")), o.value.showDropIndicator = S === "before" || S === "after", o.value.allowDrop = o.value.showDropIndicator || y, o.value.dropType = S, e.emit("node-drag-over", p.node, d.node, c);
- },
- treeNodeDragEnd: (c) => {
- const { draggingNode: f, dropType: d, dropNode: h } = o.value;
- if (c.preventDefault(), c.dataTransfer.dropEffect = "move", f && h) {
- const p = { data: f.node.data };
- d !== "none" && f.node.remove(), d === "before" ? h.node.parent.insertBefore(p, h.node) : d === "after" ? h.node.parent.insertAfter(p, h.node) : d === "inner" && h.node.insertChild(p), d !== "none" && (i.value.registerNode(p), i.value.key && f.node.eachNode((v) => {
- var g;
- (g = i.value.nodesMap[v.data[i.value.key]]) == null || g.setChecked(v.checked, !i.value.checkStrictly);
- })), Lx(h.$el, a.is("drop-inner")), e.emit("node-drag-end", f.node, h.node, d, c), d !== "none" && e.emit("node-drop", f.node, h.node, d, c);
- }
- f && !h && e.emit("node-drag-end", f.node, null, d, c), o.value.showDropIndicator = !1, o.value.draggingNode = null, o.value.dropNode = null, o.value.allowDrop = !0;
- }
- }), {
- dragState: o
- };
- }
- const gRe = ae({
- name: "ElTreeNode",
- components: {
- ElCollapseTransition: pDe,
- ElCheckbox: qIe,
- NodeContent: pRe,
- ElIcon: $s,
- Loading: gN
- },
- props: {
- node: {
- type: gh,
- default: () => ({})
- },
- props: {
- type: Object,
- default: () => ({})
- },
- accordion: Boolean,
- renderContent: Function,
- renderAfterExpand: Boolean,
- showCheckbox: {
- type: Boolean,
- default: !1
- }
- },
- emits: ["node-expand"],
- setup(t, e) {
- const n = $n("tree"), { broadcastExpanded: r } = Sne(t), i = et("RootTree"), a = ee(!1), o = ee(!1), s = ee(null), l = ee(null), u = ee(null), c = et(xne), f = In();
- Et("NodeInstance", f), i || Fi("Tree", "Can not find node's tree."), t.node.expanded && (a.value = !0, o.value = !0);
- const d = i.props.props.children || "children";
- me(() => {
- const $ = t.node.data[d];
- return $ && [...$];
- }, () => {
- t.node.updateChildren();
- }), me(() => t.node.indeterminate, ($) => {
- v(t.node.checked, $);
- }), me(() => t.node.checked, ($) => {
- v($, t.node.indeterminate);
- }), me(() => t.node.childNodes.length, () => t.node.reInitChecked()), me(() => t.node.expanded, ($) => {
- Bt(() => a.value = $), $ && (o.value = !0);
- });
- const h = ($) => RN(i.props.nodeKey, $.data), p = ($) => {
- const T = t.props.class;
- if (!T)
- return {};
- let E;
- if (Jd(T)) {
- const { data: M } = $;
- E = T(M, $);
- } else
- E = T;
- return ia(E) ? { [E]: !0 } : E;
- }, v = ($, T) => {
- (s.value !== $ || l.value !== T) && i.ctx.emit("check-change", t.node.data, $, T), s.value = $, l.value = T;
- }, g = ($) => {
- sR(i.store, i.ctx.emit, () => i.store.value.setCurrentNode(t.node)), i.currentNode.value = t.node, i.props.expandOnClickNode && y(), i.props.checkOnClickNode && !t.node.disabled && _(null, {
- target: { checked: !t.node.checked }
- }), i.ctx.emit("node-click", t.node.data, t.node, f, $);
- }, m = ($) => {
- i.instance.vnode.props.onNodeContextmenu && ($.stopPropagation(), $.preventDefault()), i.ctx.emit("node-contextmenu", $, t.node.data, t.node, f);
- }, y = () => {
- t.node.isLeaf || (a.value ? (i.ctx.emit("node-collapse", t.node.data, t.node, f), t.node.collapse()) : (t.node.expand(), e.emit("node-expand", t.node.data, t.node, f)));
- }, _ = ($, T) => {
- t.node.setChecked(T.target.checked, !i.props.checkStrictly), Bt(() => {
- const E = i.store.value;
- i.ctx.emit("check", t.node.data, {
- checkedNodes: E.getCheckedNodes(),
- checkedKeys: E.getCheckedKeys(),
- halfCheckedNodes: E.getHalfCheckedNodes(),
- halfCheckedKeys: E.getHalfCheckedKeys()
- });
- });
- };
- return {
- ns: n,
- node$: u,
- tree: i,
- expanded: a,
- childNodeRendered: o,
- oldChecked: s,
- oldIndeterminate: l,
- getNodeKey: h,
- getNodeClass: p,
- handleSelectChange: v,
- handleClick: g,
- handleContextMenu: m,
- handleExpandIconClick: y,
- handleCheckChange: _,
- handleChildNodeExpand: ($, T, E) => {
- r(T), i.ctx.emit("node-expand", $, T, E);
- },
- handleDragStart: ($) => {
- i.props.draggable && c.treeNodeDragStart({ event: $, treeNode: t });
- },
- handleDragOver: ($) => {
- $.preventDefault(), i.props.draggable && c.treeNodeDragOver({
- event: $,
- treeNode: { $el: u.value, node: t.node }
- });
- },
- handleDrop: ($) => {
- $.preventDefault();
- },
- handleDragEnd: ($) => {
- i.props.draggable && c.treeNodeDragEnd($);
- },
- CaretRight: S$e
- };
- }
- }), mRe = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"], yRe = ["aria-expanded"];
- function bRe(t, e, n, r, i, a) {
- const o = br("el-icon"), s = br("el-checkbox"), l = br("loading"), u = br("node-content"), c = br("el-tree-node"), f = br("el-collapse-transition");
- return Sr((be(), Ue("div", {
- ref: "node$",
- class: Ge([
- t.ns.b("node"),
- t.ns.is("expanded", t.expanded),
- t.ns.is("current", t.node.isCurrent),
- t.ns.is("hidden", !t.node.visible),
- t.ns.is("focusable", !t.node.disabled),
- t.ns.is("checked", !t.node.disabled && t.node.checked),
- t.getNodeClass(t.node)
- ]),
- role: "treeitem",
- tabindex: "-1",
- "aria-expanded": t.expanded,
- "aria-disabled": t.node.disabled,
- "aria-checked": t.node.checked,
- draggable: t.tree.props.draggable,
- "data-key": t.getNodeKey(t.node),
- onClick: e[1] || (e[1] = ai((...d) => t.handleClick && t.handleClick(...d), ["stop"])),
- onContextmenu: e[2] || (e[2] = (...d) => t.handleContextMenu && t.handleContextMenu(...d)),
- onDragstart: e[3] || (e[3] = ai((...d) => t.handleDragStart && t.handleDragStart(...d), ["stop"])),
- onDragover: e[4] || (e[4] = ai((...d) => t.handleDragOver && t.handleDragOver(...d), ["stop"])),
- onDragend: e[5] || (e[5] = ai((...d) => t.handleDragEnd && t.handleDragEnd(...d), ["stop"])),
- onDrop: e[6] || (e[6] = ai((...d) => t.handleDrop && t.handleDrop(...d), ["stop"]))
- }, [
- tt("div", {
- class: Ge(t.ns.be("node", "content")),
- style: dr({ paddingLeft: (t.node.level - 1) * t.tree.props.indent + "px" })
- }, [
- t.tree.props.icon || t.CaretRight ? (be(), Je(o, {
- key: 0,
- class: Ge([
- t.ns.be("node", "expand-icon"),
- t.ns.is("leaf", t.node.isLeaf),
- {
- expanded: !t.node.isLeaf && t.expanded
- }
- ]),
- onClick: ai(t.handleExpandIconClick, ["stop"])
- }, {
- default: ke(() => [
- (be(), Je(As(t.tree.props.icon || t.CaretRight)))
- ]),
- _: 1
- }, 8, ["class", "onClick"])) : Ot("v-if", !0),
- t.showCheckbox ? (be(), Je(s, {
- key: 1,
- "model-value": t.node.checked,
- indeterminate: t.node.indeterminate,
- disabled: !!t.node.disabled,
- onClick: e[0] || (e[0] = ai(() => {
- }, ["stop"])),
- onChange: t.handleCheckChange
- }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : Ot("v-if", !0),
- t.node.loading ? (be(), Je(o, {
- key: 2,
- class: Ge([t.ns.be("node", "loading-icon"), t.ns.is("loading")])
- }, {
- default: ke(() => [
- D(l)
- ]),
- _: 1
- }, 8, ["class"])) : Ot("v-if", !0),
- D(u, {
- node: t.node,
- "render-content": t.renderContent
- }, null, 8, ["node", "render-content"])
- ], 6),
- D(f, null, {
- default: ke(() => [
- !t.renderAfterExpand || t.childNodeRendered ? Sr((be(), Ue("div", {
- key: 0,
- class: Ge(t.ns.be("node", "children")),
- role: "group",
- "aria-expanded": t.expanded
- }, [
- (be(!0), Ue(Wt, null, hh(t.node.childNodes, (d) => (be(), Je(c, {
- key: t.getNodeKey(d),
- "render-content": t.renderContent,
- "render-after-expand": t.renderAfterExpand,
- "show-checkbox": t.showCheckbox,
- node: d,
- accordion: t.accordion,
- props: t.props,
- onNodeExpand: t.handleChildNodeExpand
- }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128))
- ], 10, yRe)), [
- [ho, t.expanded]
- ]) : Ot("v-if", !0)
- ]),
- _: 1
- })
- ], 42, mRe)), [
- [ho, t.node.visible]
- ]);
- }
- var _Re = /* @__PURE__ */ Nn(gRe, [["render", bRe], ["__file", "tree-node.vue"]]);
- function ORe({ el$: t }, e) {
- const n = $n("tree"), r = ve([]), i = ve([]);
- _t(() => {
- o();
- }), rp(() => {
- r.value = Array.from(t.value.querySelectorAll("[role=treeitem]")), i.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
- }), me(i, (s) => {
- s.forEach((l) => {
- l.setAttribute("tabindex", "-1");
- });
- }), Iy(t, "keydown", (s) => {
- const l = s.target;
- if (!l.className.includes(n.b("node")))
- return;
- const u = s.code;
- r.value = Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));
- const c = r.value.indexOf(l);
- let f;
- if ([wa.up, wa.down].includes(u)) {
- if (s.preventDefault(), u === wa.up) {
- f = c === -1 ? 0 : c !== 0 ? c - 1 : r.value.length - 1;
- const h = f;
- for (; !e.value.getNode(r.value[f].dataset.key).canFocus; ) {
- if (f--, f === h) {
- f = -1;
- break;
- }
- f < 0 && (f = r.value.length - 1);
- }
- } else {
- f = c === -1 ? 0 : c < r.value.length - 1 ? c + 1 : 0;
- const h = f;
- for (; !e.value.getNode(r.value[f].dataset.key).canFocus; ) {
- if (f++, f === h) {
- f = -1;
- break;
- }
- f >= r.value.length && (f = 0);
- }
- }
- f !== -1 && r.value[f].focus();
- }
- [wa.left, wa.right].includes(u) && (s.preventDefault(), l.click());
- const d = l.querySelector('[type="checkbox"]');
- [wa.enter, wa.space].includes(u) && d && (s.preventDefault(), d.click());
- });
- const o = () => {
- var s;
- r.value = Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), i.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
- const l = t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);
- if (l.length) {
- l[0].setAttribute("tabindex", "0");
- return;
- }
- (s = r.value[0]) == null || s.setAttribute("tabindex", "0");
- };
- }
- const SRe = ae({
- name: "ElTree",
- components: { ElTreeNode: _Re },
- props: {
- data: {
- type: Array,
- default: () => []
- },
- emptyText: {
- type: String
- },
- renderAfterExpand: {
- type: Boolean,
- default: !0
- },
- nodeKey: String,
- checkStrictly: Boolean,
- defaultExpandAll: Boolean,
- expandOnClickNode: {
- type: Boolean,
- default: !0
- },
- checkOnClickNode: Boolean,
- checkDescendants: {
- type: Boolean,
- default: !1
- },
- autoExpandParent: {
- type: Boolean,
- default: !0
- },
- defaultCheckedKeys: Array,
- defaultExpandedKeys: Array,
- currentNodeKey: [String, Number],
- renderContent: Function,
- showCheckbox: {
- type: Boolean,
- default: !1
- },
- draggable: {
- type: Boolean,
- default: !1
- },
- allowDrag: Function,
- allowDrop: Function,
- props: {
- type: Object,
- default: () => ({
- children: "children",
- label: "label",
- disabled: "disabled"
- })
- },
- lazy: {
- type: Boolean,
- default: !1
- },
- highlightCurrent: Boolean,
- load: Function,
- filterNodeMethod: Function,
- accordion: Boolean,
- indent: {
- type: Number,
- default: 18
- },
- icon: {
- type: _g
- }
- },
- emits: [
- "check-change",
- "current-change",
- "node-click",
- "node-contextmenu",
- "node-collapse",
- "node-expand",
- "check",
- "node-drag-start",
- "node-drag-end",
- "node-drop",
- "node-drag-leave",
- "node-drag-enter",
- "node-drag-over"
- ],
- setup(t, e) {
- const { t: n } = mN(), r = $n("tree"), i = et(cRe, null), a = ee(new dRe({
- key: t.nodeKey,
- data: t.data,
- lazy: t.lazy,
- props: t.props,
- load: t.load,
- currentNodeKey: t.currentNodeKey,
- checkStrictly: t.checkStrictly,
- checkDescendants: t.checkDescendants,
- defaultCheckedKeys: t.defaultCheckedKeys,
- defaultExpandedKeys: t.defaultExpandedKeys,
- autoExpandParent: t.autoExpandParent,
- defaultExpandAll: t.defaultExpandAll,
- filterNodeMethod: t.filterNodeMethod
- }));
- a.value.initialize();
- const o = ee(a.value.root), s = ee(null), l = ee(null), u = ee(null), { broadcastExpanded: c } = Sne(t), { dragState: f } = vRe({
- props: t,
- ctx: e,
- el$: l,
- dropIndicator$: u,
- store: a
- });
- ORe({ el$: l }, a);
- const d = V(() => {
- const { childNodes: W } = o.value, H = i ? i.hasFilteredOptions !== 0 : !1;
- return (!W || W.length === 0 || W.every(({ visible: U }) => !U)) && !H;
- });
- me(() => t.currentNodeKey, (W) => {
- a.value.setCurrentNodeKey(W);
- }), me(() => t.defaultCheckedKeys, (W) => {
- a.value.setDefaultCheckedKey(W);
- }), me(() => t.defaultExpandedKeys, (W) => {
- a.value.setDefaultExpandedKeys(W);
- }), me(() => t.data, (W) => {
- a.value.setData(W);
- }, { deep: !0 }), me(() => t.checkStrictly, (W) => {
- a.value.checkStrictly = W;
- });
- const h = (W) => {
- if (!t.filterNodeMethod)
- throw new Error("[Tree] filterNodeMethod is required when filter");
- a.value.filter(W);
- }, p = (W) => RN(t.nodeKey, W.data), v = (W) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in getNodePath");
- const H = a.value.getNode(W);
- if (!H)
- return [];
- const U = [H.data];
- let j = H.parent;
- for (; j && j !== o.value; )
- U.push(j.data), j = j.parent;
- return U.reverse();
- }, g = (W, H) => a.value.getCheckedNodes(W, H), m = (W) => a.value.getCheckedKeys(W), y = () => {
- const W = a.value.getCurrentNode();
- return W ? W.data : null;
- }, _ = () => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in getCurrentKey");
- const W = y();
- return W ? W[t.nodeKey] : null;
- }, O = (W, H) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in setCheckedNodes");
- a.value.setCheckedNodes(W, H);
- }, S = (W, H) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in setCheckedKeys");
- a.value.setCheckedKeys(W, H);
- }, x = (W, H, U) => {
- a.value.setChecked(W, H, U);
- }, C = () => a.value.getHalfCheckedNodes(), P = () => a.value.getHalfCheckedKeys(), $ = (W, H = !0) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in setCurrentNode");
- sR(a, e.emit, () => a.value.setUserCurrentNode(W, H));
- }, T = (W, H = !0) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in setCurrentKey");
- sR(a, e.emit, () => a.value.setCurrentNodeKey(W, H));
- }, E = (W) => a.value.getNode(W), M = (W) => {
- a.value.remove(W);
- }, R = (W, H) => {
- a.value.append(W, H);
- }, N = (W, H) => {
- a.value.insertBefore(W, H);
- }, I = (W, H) => {
- a.value.insertAfter(W, H);
- }, B = (W, H, U) => {
- c(H), e.emit("node-expand", W, H, U);
- }, Q = (W, H) => {
- if (!t.nodeKey)
- throw new Error("[Tree] nodeKey is required in updateKeyChild");
- a.value.updateChildren(W, H);
- };
- return Et("RootTree", {
- ctx: e,
- props: t,
- store: a,
- root: o,
- currentNode: s,
- instance: In()
- }), Et(Cb, void 0), {
- ns: r,
- store: a,
- root: o,
- currentNode: s,
- dragState: f,
- el$: l,
- dropIndicator$: u,
- isEmpty: d,
- filter: h,
- getNodeKey: p,
- getNodePath: v,
- getCheckedNodes: g,
- getCheckedKeys: m,
- getCurrentNode: y,
- getCurrentKey: _,
- setCheckedNodes: O,
- setCheckedKeys: S,
- setChecked: x,
- getHalfCheckedNodes: C,
- getHalfCheckedKeys: P,
- setCurrentNode: $,
- setCurrentKey: T,
- t: n,
- getNode: E,
- remove: M,
- append: R,
- insertBefore: N,
- insertAfter: I,
- handleNodeExpand: B,
- updateKeyChildren: Q
- };
- }
- });
- function xRe(t, e, n, r, i, a) {
- const o = br("el-tree-node");
- return be(), Ue("div", {
- ref: "el$",
- class: Ge([
- t.ns.b(),
- t.ns.is("dragging", !!t.dragState.draggingNode),
- t.ns.is("drop-not-allow", !t.dragState.allowDrop),
- t.ns.is("drop-inner", t.dragState.dropType === "inner"),
- { [t.ns.m("highlight-current")]: t.highlightCurrent }
- ]),
- role: "tree"
- }, [
- (be(!0), Ue(Wt, null, hh(t.root.childNodes, (s) => (be(), Je(o, {
- key: t.getNodeKey(s),
- node: s,
- props: t.props,
- accordion: t.accordion,
- "render-after-expand": t.renderAfterExpand,
- "show-checkbox": t.showCheckbox,
- "render-content": t.renderContent,
- onNodeExpand: t.handleNodeExpand
- }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)),
- t.isEmpty ? (be(), Ue("div", {
- key: 0,
- class: Ge(t.ns.e("empty-block"))
- }, [
- ln(t.$slots, "empty", {}, () => {
- var s;
- return [
- tt("span", {
- class: Ge(t.ns.e("empty-text"))
- }, xi((s = t.emptyText) != null ? s : t.t("el.tree.emptyText")), 3)
- ];
- })
- ], 2)) : Ot("v-if", !0),
- Sr(tt("div", {
- ref: "dropIndicator$",
- class: Ge(t.ns.e("drop-indicator"))
- }, null, 2), [
- [ho, t.dragState.showDropIndicator]
- ])
- ], 2);
- }
- var Qx = /* @__PURE__ */ Nn(SRe, [["render", xRe], ["__file", "tree.vue"]]);
- Qx.install = (t) => {
- t.component(Qx.name, Qx);
- };
- const wRe = Qx, WW = wRe;
- function $b(t) {
- "@babel/helpers - typeof";
- return $b = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
- return typeof e;
- } : function(e) {
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
- }, $b(t);
- }
- function CRe(t, e) {
- if ($b(t) != "object" || !t) return t;
- var n = t[Symbol.toPrimitive];
- if (n !== void 0) {
- var r = n.call(t, e || "default");
- if ($b(r) != "object") return r;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (e === "string" ? String : Number)(t);
- }
- function TRe(t) {
- var e = CRe(t, "string");
- return $b(e) == "symbol" ? e : e + "";
- }
- function PRe(t, e, n) {
- return (e = TRe(e)) in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t;
- }
- function QW(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var r = Object.getOwnPropertySymbols(t);
- e && (r = r.filter(function(i) {
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
- })), n.push.apply(n, r);
- }
- return n;
- }
- function te(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? arguments[e] : {};
- e % 2 ? QW(Object(n), !0).forEach(function(r) {
- PRe(t, r, n[r]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : QW(Object(n)).forEach(function(r) {
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
- });
- }
- return t;
- }
- function k() {
- return k = Object.assign ? Object.assign.bind() : function(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
- }
- return t;
- }, k.apply(null, arguments);
- }
- const $Re = (t) => typeof t == "function", ARe = Array.isArray, ERe = (t) => typeof t == "string", MRe = (t) => t !== null && typeof t == "object", IRe = /^on[^a-z]/, DRe = (t) => IRe.test(t), wne = (t) => {
- const e = /* @__PURE__ */ Object.create(null);
- return (n) => e[n] || (e[n] = t(n));
- }, RRe = /-(\w)/g, kN = wne((t) => t.replace(RRe, (e, n) => n ? n.toUpperCase() : "")), kRe = /\B([A-Z])/g, LRe = wne((t) => t.replace(kRe, "-$1").toLowerCase()), NRe = Object.prototype.hasOwnProperty, HW = (t, e) => NRe.call(t, e);
- function BRe(t, e, n, r) {
- const i = t[n];
- if (i != null) {
- const a = HW(i, "default");
- if (a && r === void 0) {
- const o = i.default;
- r = i.type !== Function && $Re(o) ? o() : o;
- }
- i.type === Boolean && (!HW(e, n) && !a ? r = !1 : r === "" && (r = !0));
- }
- return r;
- }
- function zRe(t) {
- return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
- }
- function m0(t) {
- return typeof t == "number" ? `${t}px` : t;
- }
- function $v(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
- return typeof t == "function" ? t(e) : t ?? n;
- }
- function VRe(t) {
- let e;
- const n = new Promise((i) => {
- e = t(() => {
- i(!0);
- });
- }), r = () => {
- e == null || e();
- };
- return r.then = (i, a) => n.then(i, a), r.promise = n, r;
- }
- function Re() {
- const t = [];
- for (let e = 0; e < arguments.length; e++) {
- const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
- if (n) {
- if (ERe(n))
- t.push(n);
- else if (ARe(n))
- for (let r = 0; r < n.length; r++) {
- const i = Re(n[r]);
- i && t.push(i);
- }
- else if (MRe(n))
- for (const r in n)
- n[r] && t.push(r);
- }
- }
- return t.join(" ");
- }
- var Cne = function() {
- if (typeof Map < "u")
- return Map;
- function t(e, n) {
- var r = -1;
- return e.some(function(i, a) {
- return i[0] === n ? (r = a, !0) : !1;
- }), r;
- }
- return (
- /** @class */
- function() {
- function e() {
- this.__entries__ = [];
- }
- return Object.defineProperty(e.prototype, "size", {
- /**
- * @returns {boolean}
- */
- get: function() {
- return this.__entries__.length;
- },
- enumerable: !0,
- configurable: !0
- }), e.prototype.get = function(n) {
- var r = t(this.__entries__, n), i = this.__entries__[r];
- return i && i[1];
- }, e.prototype.set = function(n, r) {
- var i = t(this.__entries__, n);
- ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
- }, e.prototype.delete = function(n) {
- var r = this.__entries__, i = t(r, n);
- ~i && r.splice(i, 1);
- }, e.prototype.has = function(n) {
- return !!~t(this.__entries__, n);
- }, e.prototype.clear = function() {
- this.__entries__.splice(0);
- }, e.prototype.forEach = function(n, r) {
- r === void 0 && (r = null);
- for (var i = 0, a = this.__entries__; i < a.length; i++) {
- var o = a[i];
- n.call(r, o[1], o[0]);
- }
- }, e;
- }()
- );
- }(), uR = typeof window < "u" && typeof document < "u" && window.document === document, Gw = function() {
- return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
- }(), FRe = function() {
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Gw) : function(t) {
- return setTimeout(function() {
- return t(Date.now());
- }, 1e3 / 60);
- };
- }(), WRe = 2;
- function QRe(t, e) {
- var n = !1, r = !1, i = 0;
- function a() {
- n && (n = !1, t()), r && s();
- }
- function o() {
- FRe(a);
- }
- function s() {
- var l = Date.now();
- if (n) {
- if (l - i < WRe)
- return;
- r = !0;
- } else
- n = !0, r = !1, setTimeout(o, e);
- i = l;
- }
- return s;
- }
- var HRe = 20, GRe = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], jRe = typeof MutationObserver < "u", ZRe = (
- /** @class */
- function() {
- function t() {
- this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = QRe(this.refresh.bind(this), HRe);
- }
- return t.prototype.addObserver = function(e) {
- ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
- }, t.prototype.removeObserver = function(e) {
- var n = this.observers_, r = n.indexOf(e);
- ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
- }, t.prototype.refresh = function() {
- var e = this.updateObservers_();
- e && this.refresh();
- }, t.prototype.updateObservers_ = function() {
- var e = this.observers_.filter(function(n) {
- return n.gatherActive(), n.hasActive();
- });
- return e.forEach(function(n) {
- return n.broadcastActive();
- }), e.length > 0;
- }, t.prototype.connect_ = function() {
- !uR || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), jRe ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
- attributes: !0,
- childList: !0,
- characterData: !0,
- subtree: !0
- })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
- }, t.prototype.disconnect_ = function() {
- !uR || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
- }, t.prototype.onTransitionEnd_ = function(e) {
- var n = e.propertyName, r = n === void 0 ? "" : n, i = GRe.some(function(a) {
- return !!~r.indexOf(a);
- });
- i && this.refresh();
- }, t.getInstance = function() {
- return this.instance_ || (this.instance_ = new t()), this.instance_;
- }, t.instance_ = null, t;
- }()
- ), Tne = function(t, e) {
- for (var n = 0, r = Object.keys(e); n < r.length; n++) {
- var i = r[n];
- Object.defineProperty(t, i, {
- value: e[i],
- enumerable: !1,
- writable: !1,
- configurable: !0
- });
- }
- return t;
- }, Pg = function(t) {
- var e = t && t.ownerDocument && t.ownerDocument.defaultView;
- return e || Gw;
- }, Pne = m2(0, 0, 0, 0);
- function jw(t) {
- return parseFloat(t) || 0;
- }
- function GW(t) {
- for (var e = [], n = 1; n < arguments.length; n++)
- e[n - 1] = arguments[n];
- return e.reduce(function(r, i) {
- var a = t["border-" + i + "-width"];
- return r + jw(a);
- }, 0);
- }
- function URe(t) {
- for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
- var a = i[r], o = t["padding-" + a];
- n[a] = jw(o);
- }
- return n;
- }
- function XRe(t) {
- var e = t.getBBox();
- return m2(0, 0, e.width, e.height);
- }
- function YRe(t) {
- var e = t.clientWidth, n = t.clientHeight;
- if (!e && !n)
- return Pne;
- var r = Pg(t).getComputedStyle(t), i = URe(r), a = i.left + i.right, o = i.top + i.bottom, s = jw(r.width), l = jw(r.height);
- if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= GW(r, "left", "right") + a), Math.round(l + o) !== n && (l -= GW(r, "top", "bottom") + o)), !KRe(t)) {
- var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
- Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
- }
- return m2(i.left, i.top, s, l);
- }
- var qRe = /* @__PURE__ */ function() {
- return typeof SVGGraphicsElement < "u" ? function(t) {
- return t instanceof Pg(t).SVGGraphicsElement;
- } : function(t) {
- return t instanceof Pg(t).SVGElement && typeof t.getBBox == "function";
- };
- }();
- function KRe(t) {
- return t === Pg(t).document.documentElement;
- }
- function JRe(t) {
- return uR ? qRe(t) ? XRe(t) : YRe(t) : Pne;
- }
- function eke(t) {
- var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
- return Tne(o, {
- x: e,
- y: n,
- width: r,
- height: i,
- top: n,
- right: e + r,
- bottom: i + n,
- left: e
- }), o;
- }
- function m2(t, e, n, r) {
- return { x: t, y: e, width: n, height: r };
- }
- var tke = (
- /** @class */
- function() {
- function t(e) {
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = m2(0, 0, 0, 0), this.target = e;
- }
- return t.prototype.isActive = function() {
- var e = JRe(this.target);
- return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
- }, t.prototype.broadcastRect = function() {
- var e = this.contentRect_;
- return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
- }, t;
- }()
- ), nke = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e, n) {
- var r = eke(n);
- Tne(this, { target: e, contentRect: r });
- }
- return t;
- }()
- ), rke = (
- /** @class */
- function() {
- function t(e, n, r) {
- if (this.activeObservations_ = [], this.observations_ = new Cne(), typeof e != "function")
- throw new TypeError("The callback provided as parameter 1 is not a function.");
- this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
- }
- return t.prototype.observe = function(e) {
- if (!arguments.length)
- throw new TypeError("1 argument required, but only 0 present.");
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
- if (!(e instanceof Pg(e).Element))
- throw new TypeError('parameter 1 is not of type "Element".');
- var n = this.observations_;
- n.has(e) || (n.set(e, new tke(e)), this.controller_.addObserver(this), this.controller_.refresh());
- }
- }, t.prototype.unobserve = function(e) {
- if (!arguments.length)
- throw new TypeError("1 argument required, but only 0 present.");
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
- if (!(e instanceof Pg(e).Element))
- throw new TypeError('parameter 1 is not of type "Element".');
- var n = this.observations_;
- n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
- }
- }, t.prototype.disconnect = function() {
- this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
- }, t.prototype.gatherActive = function() {
- var e = this;
- this.clearActive(), this.observations_.forEach(function(n) {
- n.isActive() && e.activeObservations_.push(n);
- });
- }, t.prototype.broadcastActive = function() {
- if (this.hasActive()) {
- var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
- return new nke(r.target, r.broadcastRect());
- });
- this.callback_.call(e, n, e), this.clearActive();
- }
- }, t.prototype.clearActive = function() {
- this.activeObservations_.splice(0);
- }, t.prototype.hasActive = function() {
- return this.activeObservations_.length > 0;
- }, t;
- }()
- ), $ne = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Cne(), Ane = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- if (!(this instanceof t))
- throw new TypeError("Cannot call a class as a function.");
- if (!arguments.length)
- throw new TypeError("1 argument required, but only 0 present.");
- var n = ZRe.getInstance(), r = new rke(e, n, this);
- $ne.set(this, r);
- }
- return t;
- }()
- );
- [
- "observe",
- "unobserve",
- "disconnect"
- ].forEach(function(t) {
- Ane.prototype[t] = function() {
- var e;
- return (e = $ne.get(this))[t].apply(e, arguments);
- };
- });
- var Ene = function() {
- return typeof Gw.ResizeObserver < "u" ? Gw.ResizeObserver : Ane;
- }();
- const cR = (t) => t != null && t !== "", li = (t, e) => {
- const n = k({}, t);
- return Object.keys(e).forEach((r) => {
- const i = n[r];
- if (i)
- i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
- type: i,
- default: e[r]
- };
- else
- throw new Error(`not have ${r} prop`);
- }), n;
- }, ike = (t) => {
- const e = Object.keys(t), n = {}, r = {}, i = {};
- for (let a = 0, o = e.length; a < o; a++) {
- const s = e[a];
- DRe(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
- }
- return {
- onEvents: r,
- events: n,
- extraAttrs: i
- };
- }, ake = function() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
- return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
- if (a) {
- const o = a.split(i);
- if (o.length > 1) {
- const s = e ? kN(o[0].trim()) : o[0].trim();
- n[s] = o[1].trim();
- }
- }
- }), n);
- }, Zw = (t, e) => t[e] !== void 0, Mne = Symbol("skipFlatten"), qr = function() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
- const n = Array.isArray(t) ? t : [t], r = [];
- return n.forEach((i) => {
- Array.isArray(i) ? r.push(...qr(i, e)) : i && i.type === Wt ? i.key === Mne ? r.push(i) : r.push(...qr(i.children, e)) : i && df(i) ? e && !LN(i) ? r.push(i) : e || r.push(i) : cR(i) && r.push(i);
- }), r;
- }, Ine = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
- if (df(t))
- return t.type === Wt ? e === "default" ? qr(t.children) : [] : t.children && t.children[e] ? qr(t.children[e](n)) : [];
- {
- const r = t.$slots[e] && t.$slots[e](n);
- return qr(r);
- }
- }, xu = (t) => {
- var e;
- let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
- for (; n && !n.tagName; )
- n = n.nextSibling;
- return n;
- }, oke = (t) => {
- const e = {};
- if (t.$ && t.$.vnode) {
- const n = t.$.vnode.props || {};
- Object.keys(t.$props).forEach((r) => {
- const i = t.$props[r], a = LRe(r);
- (i !== void 0 || a in n) && (e[r] = i);
- });
- } else if (df(t) && typeof t.type == "object") {
- const n = t.props || {}, r = {};
- Object.keys(n).forEach((a) => {
- r[kN(a)] = n[a];
- });
- const i = t.type.props || {};
- Object.keys(i).forEach((a) => {
- const o = BRe(i, r, a, r[a]);
- (o !== void 0 || a in r) && (e[a] = o);
- });
- }
- return e;
- }, ske = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
- if (t.$) {
- const a = t[e];
- if (a !== void 0)
- return typeof a == "function" && r ? a(n) : a;
- i = t.$slots[e], i = r && i ? i(n) : i;
- } else if (df(t)) {
- const a = t.props && t.props[e];
- if (a !== void 0 && t.props !== null)
- return typeof a == "function" && r ? a(n) : a;
- t.type === Wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
- }
- return Array.isArray(i) && (i = qr(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
- };
- function jW() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
- return t.$ ? n = k(k({}, n), t.$attrs) : n = k(k({}, n), t.props), ike(n)[e ? "onEvents" : "events"];
- }
- function lke(t, e) {
- let r = ((df(t) ? t.props : t.$attrs) || {}).style || {};
- return typeof r == "string" && (r = ake(r, e)), r;
- }
- function uke(t) {
- return t.length === 1 && t[0].type === Wt;
- }
- function LN(t) {
- return t && (t.type === Aee || t.type === Wt && t.children.length === 0 || t.type === KT && t.children.trim() === "");
- }
- function Zl() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- const e = [];
- return t.forEach((n) => {
- Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === Wt ? e.push(...Zl(n.children)) : e.push(n);
- }), e.filter((n) => !LN(n));
- }
- function po(t) {
- return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
- }
- function y2(t, e) {
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
- var r, i;
- return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
- }
- const $g = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ResizeObserver",
- props: {
- disabled: Boolean,
- onResize: Function
- },
- emits: ["resize"],
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = zn({
- width: 0,
- height: 0,
- offsetHeight: 0,
- offsetWidth: 0
- });
- let i = null, a = null;
- const o = () => {
- a && (a.disconnect(), a = null);
- }, s = (c) => {
- const {
- onResize: f
- } = t, d = c[0].target, {
- width: h,
- height: p
- } = d.getBoundingClientRect(), {
- offsetWidth: v,
- offsetHeight: g
- } = d, m = Math.floor(h), y = Math.floor(p);
- if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
- const _ = {
- width: m,
- height: y,
- offsetWidth: v,
- offsetHeight: g
- };
- k(r, _), f && Promise.resolve().then(() => {
- f(k(k({}, _), {
- offsetWidth: v,
- offsetHeight: g
- }), d);
- });
- }
- }, l = In(), u = () => {
- const {
- disabled: c
- } = t;
- if (c) {
- o();
- return;
- }
- const f = xu(l);
- f !== i && (o(), i = f), !a && f && (a = new Ene(s), a.observe(f));
- };
- return _t(() => {
- u();
- }), rp(() => {
- u();
- }), qu(() => {
- o();
- }), me(() => t.disabled, () => {
- u();
- }, {
- flush: "post"
- }), () => {
- var c;
- return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
- };
- }
- });
- let Dne = (t) => setTimeout(t, 16), Rne = (t) => clearTimeout(t);
- typeof window < "u" && "requestAnimationFrame" in window && (Dne = (t) => window.requestAnimationFrame(t), Rne = (t) => window.cancelAnimationFrame(t));
- let ZW = 0;
- const NN = /* @__PURE__ */ new Map();
- function kne(t) {
- NN.delete(t);
- }
- function en(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
- ZW += 1;
- const n = ZW;
- function r(i) {
- if (i === 0)
- kne(n), t();
- else {
- const a = Dne(() => {
- r(i - 1);
- });
- NN.set(n, a);
- }
- }
- return r(e), n;
- }
- en.cancel = (t) => {
- const e = NN.get(t);
- return kne(e), Rne(e);
- };
- const pf = function() {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
- e[n] = arguments[n];
- return e;
- }, fm = (t) => {
- const e = t;
- return e.install = function(n) {
- n.component(e.displayName || e.name, t);
- }, t;
- };
- function Uw() {
- return {
- type: [Function, Array]
- };
- }
- function sn(t) {
- return {
- type: Object,
- default: t
- };
- }
- function Tt(t) {
- return {
- type: Boolean,
- default: t
- };
- }
- function Ct(t) {
- return {
- type: Function,
- default: t
- };
- }
- function Fo(t, e) {
- return {
- validator: () => !0,
- default: t
- };
- }
- function Lh(t) {
- return {
- type: Array,
- default: t
- };
- }
- function rr(t) {
- return {
- type: String,
- default: t
- };
- }
- function or(t, e) {
- return t ? {
- type: t,
- default: e
- } : Fo(e);
- }
- let mi = !1;
- try {
- const t = Object.defineProperty({}, "passive", {
- get() {
- mi = !0;
- }
- });
- window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
- } catch {
- }
- function yi(t, e, n, r) {
- if (t && t.addEventListener) {
- let i = r;
- i === void 0 && mi && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
- passive: !1
- }), t.addEventListener(e, n, i);
- }
- return {
- remove: () => {
- t && t.removeEventListener && t.removeEventListener(e, n);
- }
- };
- }
- const BN = "anticon", Lne = Symbol("GlobalFormContextKey"), cke = (t) => {
- Et(Lne, t);
- }, fke = () => et(Lne, {
- validateMessages: V(() => {
- })
- }), dke = () => ({
- iconPrefixCls: String,
- getTargetContainer: {
- type: Function
- },
- getPopupContainer: {
- type: Function
- },
- prefixCls: String,
- getPrefixCls: {
- type: Function
- },
- renderEmpty: {
- type: Function
- },
- transformCellText: {
- type: Function
- },
- csp: sn(),
- input: sn(),
- autoInsertSpaceInButton: {
- type: Boolean,
- default: void 0
- },
- locale: sn(),
- pageHeader: sn(),
- componentSize: {
- type: String
- },
- componentDisabled: {
- type: Boolean,
- default: void 0
- },
- direction: {
- type: String,
- default: "ltr"
- },
- space: sn(),
- virtual: {
- type: Boolean,
- default: void 0
- },
- dropdownMatchSelectWidth: {
- type: [Number, Boolean],
- default: !0
- },
- form: sn(),
- pagination: sn(),
- theme: sn(),
- select: sn(),
- wave: sn()
- }), zN = Symbol("configProvider"), Nne = {
- getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
- iconPrefixCls: V(() => BN),
- getPopupContainer: V(() => () => document.body),
- direction: V(() => "ltr")
- }, b2 = () => et(zN, Nne), hke = (t) => Et(zN, t), Bne = Symbol("DisabledContextKey"), Vl = () => et(Bne, ee(void 0)), zne = (t) => {
- const e = Vl();
- return Et(Bne, V(() => {
- var n;
- return (n = t.value) !== null && n !== void 0 ? n : e.value;
- })), t;
- }, pke = {
- // Options.jsx
- items_per_page: "/ page",
- jump_to: "Go to",
- jump_to_confirm: "confirm",
- page: "",
- // Pagination.jsx
- prev_page: "Previous Page",
- next_page: "Next Page",
- prev_5: "Previous 5 Pages",
- next_5: "Next 5 Pages",
- prev_3: "Previous 3 Pages",
- next_3: "Next 3 Pages"
- }, vke = {
- locale: "en_US",
- today: "Today",
- now: "Now",
- backToToday: "Back to today",
- ok: "Ok",
- clear: "Clear",
- month: "Month",
- year: "Year",
- timeSelect: "select time",
- dateSelect: "select date",
- weekSelect: "Choose a week",
- monthSelect: "Choose a month",
- yearSelect: "Choose a year",
- decadeSelect: "Choose a decade",
- yearFormat: "YYYY",
- dateFormat: "M/D/YYYY",
- dayFormat: "D",
- dateTimeFormat: "M/D/YYYY HH:mm:ss",
- monthBeforeYear: !0,
- previousMonth: "Previous month (PageUp)",
- nextMonth: "Next month (PageDown)",
- previousYear: "Last year (Control + left)",
- nextYear: "Next year (Control + right)",
- previousDecade: "Last decade",
- nextDecade: "Next decade",
- previousCentury: "Last century",
- nextCentury: "Next century"
- }, Vne = {
- placeholder: "Select time",
- rangePlaceholder: ["Start time", "End time"]
- }, UW = {
- lang: k({
- placeholder: "Select date",
- yearPlaceholder: "Select year",
- quarterPlaceholder: "Select quarter",
- monthPlaceholder: "Select month",
- weekPlaceholder: "Select week",
- rangePlaceholder: ["Start date", "End date"],
- rangeYearPlaceholder: ["Start year", "End year"],
- rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
- rangeMonthPlaceholder: ["Start month", "End month"],
- rangeWeekPlaceholder: ["Start week", "End week"]
- }, vke),
- timePickerLocale: k({}, Vne)
- }, Za = "${label} is not a valid ${type}", Nu = {
- locale: "en",
- Pagination: pke,
- DatePicker: UW,
- TimePicker: Vne,
- Calendar: UW,
- global: {
- placeholder: "Please select"
- },
- Table: {
- filterTitle: "Filter menu",
- filterConfirm: "OK",
- filterReset: "Reset",
- filterEmptyText: "No filters",
- filterCheckall: "Select all items",
- filterSearchPlaceholder: "Search in filters",
- emptyText: "No data",
- selectAll: "Select current page",
- selectInvert: "Invert current page",
- selectNone: "Clear all data",
- selectionAll: "Select all data",
- sortTitle: "Sort",
- expand: "Expand row",
- collapse: "Collapse row",
- triggerDesc: "Click to sort descending",
- triggerAsc: "Click to sort ascending",
- cancelSort: "Click to cancel sorting"
- },
- Tour: {
- Next: "Next",
- Previous: "Previous",
- Finish: "Finish"
- },
- Modal: {
- okText: "OK",
- cancelText: "Cancel",
- justOkText: "OK"
- },
- Popconfirm: {
- okText: "OK",
- cancelText: "Cancel"
- },
- Transfer: {
- titles: ["", ""],
- searchPlaceholder: "Search here",
- itemUnit: "item",
- itemsUnit: "items",
- remove: "Remove",
- selectCurrent: "Select current page",
- removeCurrent: "Remove current page",
- selectAll: "Select all data",
- removeAll: "Remove all data",
- selectInvert: "Invert current page"
- },
- Upload: {
- uploading: "Uploading...",
- removeFile: "Remove file",
- uploadError: "Upload error",
- previewFile: "Preview file",
- downloadFile: "Download file"
- },
- Empty: {
- description: "No data"
- },
- Icon: {
- icon: "icon"
- },
- Text: {
- edit: "Edit",
- copy: "Copy",
- copied: "Copied",
- expand: "Expand"
- },
- PageHeader: {
- back: "Back"
- },
- Form: {
- optional: "(optional)",
- defaultValidateMessages: {
- default: "Field validation error for ${label}",
- required: "Please enter ${label}",
- enum: "${label} must be one of [${enum}]",
- whitespace: "${label} cannot be a blank character",
- date: {
- format: "${label} date format is invalid",
- parse: "${label} cannot be converted to a date",
- invalid: "${label} is an invalid date"
- },
- types: {
- string: Za,
- method: Za,
- array: Za,
- object: Za,
- number: Za,
- date: Za,
- boolean: Za,
- integer: Za,
- float: Za,
- regexp: Za,
- email: Za,
- url: Za,
- hex: Za
- },
- string: {
- len: "${label} must be ${len} characters",
- min: "${label} must be at least ${min} characters",
- max: "${label} must be up to ${max} characters",
- range: "${label} must be between ${min}-${max} characters"
- },
- number: {
- len: "${label} must be equal to ${len}",
- min: "${label} must be minimum ${min}",
- max: "${label} must be maximum ${max}",
- range: "${label} must be between ${min}-${max}"
- },
- array: {
- len: "Must be ${len} ${label}",
- min: "At least ${min} ${label}",
- max: "At most ${max} ${label}",
- range: "The amount of ${label} must be between ${min}-${max}"
- },
- pattern: {
- mismatch: "${label} does not match the pattern ${pattern}"
- }
- }
- },
- Image: {
- preview: "Preview"
- },
- QRCode: {
- expired: "QR code expired",
- refresh: "Refresh",
- scanned: "Scanned"
- }
- }, Fne = ae({
- compatConfig: {
- MODE: 3
- },
- name: "LocaleReceiver",
- props: {
- componentName: String,
- defaultLocale: {
- type: [Object, Function]
- },
- children: {
- type: Function
- }
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = et("localeData", {}), i = V(() => {
- const {
- componentName: o = "global",
- defaultLocale: s
- } = t, l = s || Nu[o || "global"], {
- antLocale: u
- } = r, c = o && u ? u[o] : {};
- return k(k({}, typeof l == "function" ? l() : l), c || {});
- }), a = V(() => {
- const {
- antLocale: o
- } = r, s = o && o.locale;
- return o && o.exist && !s ? Nu.locale : s;
- });
- return () => {
- const o = t.children || n.default, {
- antLocale: s
- } = r;
- return o == null ? void 0 : o(i.value, a.value, s);
- };
- }
- });
- function _2(t, e, n) {
- const r = et("localeData", {});
- return [V(() => {
- const {
- antLocale: a
- } = r, o = z(e) || Nu[t || "global"], s = t && a ? a[t] : {};
- return k(k(k({}, typeof o == "function" ? o() : o), s || {}), z(n) || {});
- })];
- }
- function VN(t) {
- for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
- n = t.charCodeAt(r) & 255 | (t.charCodeAt(++r) & 255) << 8 | (t.charCodeAt(++r) & 255) << 16 | (t.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
- n >>> 24, e = /* Math.imul(k, m): */
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
- (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
- switch (i) {
- case 3:
- e ^= (t.charCodeAt(r + 2) & 255) << 16;
- case 2:
- e ^= (t.charCodeAt(r + 1) & 255) << 8;
- case 1:
- e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
- (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
- }
- return e ^= e >>> 13, e = /* Math.imul(h, m): */
- (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
- }
- const XW = "%";
- class gke {
- constructor(e) {
- this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
- }
- get(e) {
- return this.cache.get(Array.isArray(e) ? e.join(XW) : e) || null;
- }
- update(e, n) {
- const r = Array.isArray(e) ? e.join(XW) : e, i = this.cache.get(r), a = n(i);
- a === null ? this.cache.delete(r) : this.cache.set(r, a);
- }
- }
- const Wne = "data-token-hash", mh = "data-css-hash", mke = "data-cache-path", Av = "__cssinjs_instance__";
- function Ab() {
- const t = Math.random().toString(12).slice(2);
- if (typeof document < "u" && document.head && document.body) {
- const e = document.body.querySelectorAll(`style[${mh}]`) || [], {
- firstChild: n
- } = document.head;
- Array.from(e).forEach((i) => {
- i[Av] = i[Av] || t, i[Av] === t && document.head.insertBefore(i, n);
- });
- const r = {};
- Array.from(document.querySelectorAll(`style[${mh}]`)).forEach((i) => {
- var a;
- const o = i.getAttribute(mh);
- r[o] ? i[Av] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
- });
- }
- return new gke(t);
- }
- const Qne = Symbol("StyleContextKey"), yke = () => {
- var t, e, n;
- const r = In();
- let i;
- if (r && r.appContext) {
- const a = (n = (e = (t = r.appContext) === null || t === void 0 ? void 0 : t.config) === null || e === void 0 ? void 0 : e.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
- a ? i = a : (i = Ab(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
- } else
- i = Ab();
- return i;
- }, Hne = {
- cache: Ab(),
- defaultCache: !0,
- hashPriority: "low"
- }, O2 = () => {
- const t = yke();
- return et(Qne, ve(k(k({}, Hne), {
- cache: t
- })));
- }, bke = (t) => {
- const e = O2(), n = ve(k(k({}, Hne), {
- cache: Ab()
- }));
- return me([() => z(t), e], () => {
- const r = k({}, e.value), i = z(t);
- Object.keys(i).forEach((o) => {
- const s = i[o];
- i[o] !== void 0 && (r[o] = s);
- });
- const {
- cache: a
- } = i;
- r.cache = r.cache || Ab(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
- }, {
- immediate: !0
- }), Et(Qne, n), n;
- }, _ke = () => ({
- autoClear: Tt(),
- /** @private Test only. Not work in production. */
- mock: rr(),
- /**
- * Only set when you need ssr to extract style on you own.
- * If not provided, it will auto create <style /> on the end of Provider in server side.
- */
- cache: sn(),
- /** Tell children that this context is default generated context */
- defaultCache: Tt(),
- /** Use `:where` selector to reduce hashId css selector priority */
- hashPriority: rr(),
- /** Tell cssinjs where to inject style in */
- container: or(),
- /** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
- ssrInline: Tt(),
- /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
- transformers: Lh(),
- /**
- * Linters to lint css before inject in document.
- * Styles will be linted after transforming.
- * Please note that `linters` do not support dynamic update.
- */
- linters: Lh()
- });
- fm(ae({
- name: "AStyleProvider",
- inheritAttrs: !1,
- props: _ke(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- return bke(t), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- }));
- function Oke() {
- return !1;
- }
- let fR = !1;
- function Ske() {
- return fR;
- }
- const xke = process.env.NODE_ENV === "production" ? Oke : Ske;
- if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
- const t = window;
- if (typeof t.webpackHotUpdate == "function") {
- const e = t.webpackHotUpdate;
- t.webpackHotUpdate = function() {
- return fR = !0, setTimeout(() => {
- fR = !1;
- }, 0), e(...arguments);
- };
- }
- }
- function Gne(t, e, n, r) {
- const i = O2(), a = ve(""), o = ve();
- Vt(() => {
- a.value = [t, ...e.value].join("%");
- });
- const s = xke(), l = (u) => {
- i.value.cache.update(u, (c) => {
- const [f = 0, d] = c || [];
- return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
- });
- };
- return me(a, (u, c) => {
- c && l(c), i.value.cache.update(u, (f) => {
- const [d = 0, h] = f || [];
- let p = h;
- process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
- const v = p || n();
- return [d + 1, v];
- }), o.value = i.value.cache.get(a.value)[1];
- }, {
- immediate: !0
- }), Qt(() => {
- l(a.value);
- }), o;
- }
- function is() {
- return !!(typeof window < "u" && window.document && window.document.createElement);
- }
- function kc(t, e) {
- return t && t.contains ? t.contains(e) : !1;
- }
- const YW = "data-vc-order", wke = "vc-util-key", dR = /* @__PURE__ */ new Map();
- function jne() {
- let {
- mark: t
- } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
- return t ? t.startsWith("data-") ? t : `data-${t}` : wke;
- }
- function S2(t) {
- return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
- }
- function Cke(t) {
- return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
- }
- function Zne(t) {
- return Array.from((dR.get(t) || t).children).filter((e) => e.tagName === "STYLE");
- }
- function Une(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- if (!is())
- return null;
- const {
- csp: n,
- prepend: r
- } = e, i = document.createElement("style");
- i.setAttribute(YW, Cke(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
- const a = S2(e), {
- firstChild: o
- } = a;
- if (r) {
- if (r === "queue") {
- const s = Zne(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(YW)));
- if (s.length)
- return a.insertBefore(i, s[s.length - 1].nextSibling), i;
- }
- a.insertBefore(i, o);
- } else
- a.appendChild(i);
- return i;
- }
- function Xne(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- const n = S2(e);
- return Zne(n).find((r) => r.getAttribute(jne(e)) === t);
- }
- function Xw(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- const n = Xne(t, e);
- n && S2(e).removeChild(n);
- }
- function Tke(t, e) {
- const n = dR.get(t);
- if (!n || !kc(document, n)) {
- const r = Une("", e), {
- parentNode: i
- } = r;
- dR.set(t, i), t.removeChild(r);
- }
- }
- function Eb(t, e) {
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
- var r, i, a;
- const o = S2(n);
- Tke(o, n);
- const s = Xne(e, n);
- if (s)
- return !((r = n.csp) === null || r === void 0) && r.nonce && s.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (s.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), s.innerHTML !== t && (s.innerHTML = t), s;
- const l = Une(t, n);
- return l.setAttribute(jne(n), e), l;
- }
- function Pke(t, e) {
- if (t.length !== e.length)
- return !1;
- for (let n = 0; n < t.length; n++)
- if (t[n] !== e[n])
- return !1;
- return !0;
- }
- class Ag {
- constructor() {
- this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
- }
- size() {
- return this.keys.length;
- }
- internalGet(e) {
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
- map: this.cache
- };
- return e.forEach((i) => {
- var a;
- r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
- }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
- }
- get(e) {
- var n;
- return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
- }
- has(e) {
- return !!this.internalGet(e);
- }
- set(e, n) {
- if (!this.has(e)) {
- if (this.size() + 1 > Ag.MAX_CACHE_SIZE + Ag.MAX_CACHE_OFFSET) {
- const [i] = this.keys.reduce((a, o) => {
- const [, s] = a;
- return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
- }, [this.keys[0], this.cacheCallTimes]);
- this.delete(i);
- }
- this.keys.push(e);
- }
- let r = this.cache;
- e.forEach((i, a) => {
- if (a === e.length - 1)
- r.set(i, {
- value: [n, this.cacheCallTimes++]
- });
- else {
- const o = r.get(i);
- o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
- map: /* @__PURE__ */ new Map()
- }), r = r.get(i).map;
- }
- });
- }
- deleteByPath(e, n) {
- var r;
- const i = e.get(n[0]);
- if (n.length === 1)
- return i.map ? e.set(n[0], {
- map: i.map
- }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
- const a = this.deleteByPath(i.map, n.slice(1));
- return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
- }
- delete(e) {
- if (this.has(e))
- return this.keys = this.keys.filter((n) => !Pke(n, e)), this.deleteByPath(this.cache, e);
- }
- }
- Ag.MAX_CACHE_SIZE = 20;
- Ag.MAX_CACHE_OFFSET = 5;
- let hR = {};
- function Nh(t, e) {
- process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
- }
- function $ke(t, e) {
- process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
- }
- function Ake() {
- hR = {};
- }
- function Yne(t, e, n) {
- !e && !hR[n] && (t(!1, n), hR[n] = !0);
- }
- function Lo(t, e) {
- Yne(Nh, t, e);
- }
- function qW(t, e) {
- Yne($ke, t, e);
- }
- function Eke() {
- }
- let aa = Eke;
- process.env.NODE_ENV !== "production" && (aa = (t, e, n) => {
- Lo(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && Ake();
- });
- let KW = 0;
- class qne {
- constructor(e) {
- this.derivatives = Array.isArray(e) ? e : [e], this.id = KW, e.length === 0 && aa(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), KW += 1;
- }
- getDerivativeToken(e) {
- return this.derivatives.reduce((n, r) => r(e, n), void 0);
- }
- }
- const UA = new Ag();
- function Kne(t) {
- const e = Array.isArray(t) ? t : [t];
- return UA.has(e) || UA.set(e, new qne(e)), UA.get(e);
- }
- const JW = /* @__PURE__ */ new WeakMap();
- function Yw(t) {
- let e = JW.get(t) || "";
- return e || (Object.keys(t).forEach((n) => {
- const r = t[n];
- e += n, r instanceof qne ? e += r.id : r && typeof r == "object" ? e += Yw(r) : e += r;
- }), JW.set(t, e)), e;
- }
- function Mke(t, e) {
- return VN(`${e}_${Yw(t)}`);
- }
- const Vy = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), Jne = "_bAmBoO_";
- function Ike(t, e, n) {
- var r, i;
- if (is()) {
- Eb(t, Vy);
- const a = document.createElement("div");
- a.style.position = "fixed", a.style.left = "0", a.style.top = "0", e == null || e(a), document.body.appendChild(a), process.env.NODE_ENV !== "production" && (a.innerHTML = "Test", a.style.zIndex = "9999999");
- const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(Jne);
- return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), Xw(Vy), o;
- }
- return !1;
- }
- let XA;
- function Dke() {
- return XA === void 0 && (XA = Ike(`@layer ${Vy} { .${Vy} { content: "${Jne}"!important; } }`, (t) => {
- t.className = Vy;
- })), XA;
- }
- const e7 = {}, Rke = process.env.NODE_ENV === "production", kke = process.env.NODE_ENV === "prerender", Lke = !Rke && !kke ? "css-dev-only-do-not-override" : "css", Wd = /* @__PURE__ */ new Map();
- function Nke(t) {
- Wd.set(t, (Wd.get(t) || 0) + 1);
- }
- function Bke(t, e) {
- typeof document < "u" && document.querySelectorAll(`style[${Wne}="${t}"]`).forEach((r) => {
- var i;
- r[Av] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
- });
- }
- const zke = 0;
- function Vke(t, e) {
- Wd.set(t, (Wd.get(t) || 0) - 1);
- const n = Array.from(Wd.keys()), r = n.filter((i) => (Wd.get(i) || 0) <= 0);
- n.length - r.length > zke && r.forEach((i) => {
- Bke(i, e), Wd.delete(i);
- });
- }
- const Fke = (t, e, n, r) => {
- const i = n.getDerivativeToken(t);
- let a = k(k({}, i), e);
- return r && (a = r(a)), a;
- };
- function Wke(t, e) {
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ee({});
- const r = O2(), i = V(() => k({}, ...e.value)), a = V(() => Yw(i.value)), o = V(() => Yw(n.value.override || e7));
- return Gne("token", V(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
- const {
- salt: l = "",
- override: u = e7,
- formatToken: c,
- getComputedToken: f
- } = n.value, d = f ? f(i.value, u, t.value) : Fke(i.value, u, t.value, c), h = Mke(d, l);
- d._tokenKey = h, Nke(h);
- const p = `${Lke}-${VN(h)}`;
- return d._hashId = p, [d, p];
- }, (l) => {
- var u;
- Vke(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
- });
- }
- var Qke = {
- animationIterationCount: 1,
- aspectRatio: 1,
- borderImageOutset: 1,
- borderImageSlice: 1,
- borderImageWidth: 1,
- boxFlex: 1,
- boxFlexGroup: 1,
- boxOrdinalGroup: 1,
- columnCount: 1,
- columns: 1,
- flex: 1,
- flexGrow: 1,
- flexPositive: 1,
- flexShrink: 1,
- flexNegative: 1,
- flexOrder: 1,
- gridRow: 1,
- gridRowEnd: 1,
- gridRowSpan: 1,
- gridRowStart: 1,
- gridColumn: 1,
- gridColumnEnd: 1,
- gridColumnSpan: 1,
- gridColumnStart: 1,
- msGridRow: 1,
- msGridRowSpan: 1,
- msGridColumn: 1,
- msGridColumnSpan: 1,
- fontWeight: 1,
- lineHeight: 1,
- opacity: 1,
- order: 1,
- orphans: 1,
- tabSize: 1,
- widows: 1,
- zIndex: 1,
- zoom: 1,
- WebkitLineClamp: 1,
- // SVG-related properties
- fillOpacity: 1,
- floodOpacity: 1,
- stopOpacity: 1,
- strokeDasharray: 1,
- strokeDashoffset: 1,
- strokeMiterlimit: 1,
- strokeOpacity: 1,
- strokeWidth: 1
- }, ere = "comm", tre = "rule", nre = "decl", Hke = "@import", Gke = "@keyframes", jke = "@layer", rre = Math.abs, FN = String.fromCharCode;
- function ire(t) {
- return t.trim();
- }
- function Hx(t, e, n) {
- return t.replace(e, n);
- }
- function Zke(t, e, n) {
- return t.indexOf(e, n);
- }
- function Mb(t, e) {
- return t.charCodeAt(e) | 0;
- }
- function Ib(t, e, n) {
- return t.slice(e, n);
- }
- function _u(t) {
- return t.length;
- }
- function Uke(t) {
- return t.length;
- }
- function WO(t, e) {
- return e.push(t), t;
- }
- var x2 = 1, Eg = 1, are = 0, as = 0, Nr = 0, dm = "";
- function WN(t, e, n, r, i, a, o, s) {
- return { value: t, root: e, parent: n, type: r, props: i, children: a, line: x2, column: Eg, length: o, return: "", siblings: s };
- }
- function Xke() {
- return Nr;
- }
- function Yke() {
- return Nr = as > 0 ? Mb(dm, --as) : 0, Eg--, Nr === 10 && (Eg = 1, x2--), Nr;
- }
- function ks() {
- return Nr = as < are ? Mb(dm, as++) : 0, Eg++, Nr === 10 && (Eg = 1, x2++), Nr;
- }
- function yh() {
- return Mb(dm, as);
- }
- function Gx() {
- return as;
- }
- function w2(t, e) {
- return Ib(dm, t, e);
- }
- function pR(t) {
- switch (t) {
- case 0:
- case 9:
- case 10:
- case 13:
- case 32:
- return 5;
- case 33:
- case 43:
- case 44:
- case 47:
- case 62:
- case 64:
- case 126:
- case 59:
- case 123:
- case 125:
- return 4;
- case 58:
- return 3;
- case 34:
- case 39:
- case 40:
- case 91:
- return 2;
- case 41:
- case 93:
- return 1;
- }
- return 0;
- }
- function qke(t) {
- return x2 = Eg = 1, are = _u(dm = t), as = 0, [];
- }
- function Kke(t) {
- return dm = "", t;
- }
- function YA(t) {
- return ire(w2(as - 1, vR(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
- }
- function Jke(t) {
- for (; (Nr = yh()) && Nr < 33; )
- ks();
- return pR(t) > 2 || pR(Nr) > 3 ? "" : " ";
- }
- function eLe(t, e) {
- for (; --e && ks() && !(Nr < 48 || Nr > 102 || Nr > 57 && Nr < 65 || Nr > 70 && Nr < 97); )
- ;
- return w2(t, Gx() + (e < 6 && yh() == 32 && ks() == 32));
- }
- function vR(t) {
- for (; ks(); )
- switch (Nr) {
- case t:
- return as;
- case 34:
- case 39:
- t !== 34 && t !== 39 && vR(Nr);
- break;
- case 40:
- t === 41 && vR(t);
- break;
- case 92:
- ks();
- break;
- }
- return as;
- }
- function tLe(t, e) {
- for (; ks() && t + Nr !== 57; )
- if (t + Nr === 84 && yh() === 47)
- break;
- return "/*" + w2(e, as - 1) + "*" + FN(t === 47 ? t : ks());
- }
- function nLe(t) {
- for (; !pR(yh()); )
- ks();
- return w2(t, as);
- }
- function rLe(t) {
- return Kke(jx("", null, null, null, [""], t = qke(t), 0, [0], t));
- }
- function jx(t, e, n, r, i, a, o, s, l) {
- for (var u = 0, c = 0, f = o, d = 0, h = 0, p = 0, v = 1, g = 1, m = 1, y = 0, _ = "", O = i, S = a, x = r, C = _; g; )
- switch (p = y, y = ks()) {
- case 40:
- if (p != 108 && Mb(C, f - 1) == 58) {
- Zke(C += Hx(YA(y), "&", "&\f"), "&\f", rre(u ? s[u - 1] : 0)) != -1 && (m = -1);
- break;
- }
- case 34:
- case 39:
- case 91:
- C += YA(y);
- break;
- case 9:
- case 10:
- case 13:
- case 32:
- C += Jke(p);
- break;
- case 92:
- C += eLe(Gx() - 1, 7);
- continue;
- case 47:
- switch (yh()) {
- case 42:
- case 47:
- WO(iLe(tLe(ks(), Gx()), e, n, l), l);
- break;
- default:
- C += "/";
- }
- break;
- case 123 * v:
- s[u++] = _u(C) * m;
- case 125 * v:
- case 59:
- case 0:
- switch (y) {
- case 0:
- case 125:
- g = 0;
- case 59 + c:
- m == -1 && (C = Hx(C, /\f/g, "")), h > 0 && _u(C) - f && WO(h > 32 ? n7(C + ";", r, n, f - 1, l) : n7(Hx(C, " ", "") + ";", r, n, f - 2, l), l);
- break;
- case 59:
- C += ";";
- default:
- if (WO(x = t7(C, e, n, u, c, i, s, _, O = [], S = [], f, a), a), y === 123)
- if (c === 0)
- jx(C, e, x, x, O, a, f, s, S);
- else
- switch (d === 99 && Mb(C, 3) === 110 ? 100 : d) {
- case 100:
- case 108:
- case 109:
- case 115:
- jx(t, x, x, r && WO(t7(t, x, x, 0, 0, i, s, _, i, O = [], f, S), S), i, S, f, s, r ? O : S);
- break;
- default:
- jx(C, x, x, x, [""], S, 0, s, S);
- }
- }
- u = c = h = 0, v = m = 1, _ = C = "", f = o;
- break;
- case 58:
- f = 1 + _u(C), h = p;
- default:
- if (v < 1) {
- if (y == 123)
- --v;
- else if (y == 125 && v++ == 0 && Yke() == 125)
- continue;
- }
- switch (C += FN(y), y * v) {
- case 38:
- m = c > 0 ? 1 : (C += "\f", -1);
- break;
- case 44:
- s[u++] = (_u(C) - 1) * m, m = 1;
- break;
- case 64:
- yh() === 45 && (C += YA(ks())), d = yh(), c = f = _u(_ = C += nLe(Gx())), y++;
- break;
- case 45:
- p === 45 && _u(C) == 2 && (v = 0);
- }
- }
- return a;
- }
- function t7(t, e, n, r, i, a, o, s, l, u, c, f) {
- for (var d = i - 1, h = i === 0 ? a : [""], p = Uke(h), v = 0, g = 0, m = 0; v < r; ++v)
- for (var y = 0, _ = Ib(t, d + 1, d = rre(g = o[v])), O = t; y < p; ++y)
- (O = ire(g > 0 ? h[y] + " " + _ : Hx(_, /&\f/g, h[y]))) && (l[m++] = O);
- return WN(t, e, n, i === 0 ? tre : s, l, u, c, f);
- }
- function iLe(t, e, n, r) {
- return WN(t, e, n, ere, FN(Xke()), Ib(t, 2, -2), 0, r);
- }
- function n7(t, e, n, r, i) {
- return WN(t, e, n, nre, Ib(t, 0, r), Ib(t, r + 1, -1), r, i);
- }
- function gR(t, e) {
- for (var n = "", r = 0; r < t.length; r++)
- n += e(t[r], r, t, e) || "";
- return n;
- }
- function aLe(t, e, n, r) {
- switch (t.type) {
- case jke:
- if (t.children.length) break;
- case Hke:
- case nre:
- return t.return = t.return || t.value;
- case ere:
- return "";
- case Gke:
- return t.return = t.value + "{" + gR(t.children, r) + "}";
- case tre:
- if (!_u(t.value = t.props.join(","))) return "";
- }
- return _u(n = gR(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
- }
- function ore(t, e) {
- const {
- path: n,
- parentSelectors: r
- } = e;
- Lo(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
- }
- const oLe = (t, e, n) => {
- if (t === "content") {
- const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
- (typeof e != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(e) === -1 && !r.test(e) && (e.charAt(0) !== e.charAt(e.length - 1) || e.charAt(0) !== '"' && e.charAt(0) !== "'")) && ore(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
- }
- }, sLe = (t, e, n) => {
- t === "animation" && n.hashId && e !== "none" && ore(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
- }, r7 = "data-ant-cssinjs-cache-path", lLe = "_FILE_STYLE__";
- let bh, sre = !0;
- function uLe() {
- var t;
- if (!bh && (bh = {}, is())) {
- const e = document.createElement("div");
- e.className = r7, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
- let n = getComputedStyle(e).content || "";
- n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
- const [a, o] = i.split(":");
- bh[a] = o;
- });
- const r = document.querySelector(`style[${r7}]`);
- r && (sre = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
- }
- }
- function cLe(t) {
- return uLe(), !!bh[t];
- }
- function fLe(t) {
- const e = bh[t];
- let n = null;
- if (e && is())
- if (sre)
- n = lLe;
- else {
- const r = document.querySelector(`style[${mh}="${bh[t]}"]`);
- r ? n = r.innerHTML : delete bh[t];
- }
- return [n, e];
- }
- const i7 = is(), lre = "_skip_check_", ure = "_multi_value_";
- function a7(t) {
- return gR(rLe(t), aLe).replace(/\{%%%\:[^;];}/g, ";");
- }
- function dLe(t) {
- return typeof t == "object" && t && (lre in t || ure in t);
- }
- function hLe(t, e, n) {
- if (!e)
- return t;
- const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
- return t.split(",").map((o) => {
- var s;
- const l = o.trim().split(/\s+/);
- let u = l[0] || "";
- const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
- return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
- }).join(",");
- }
- const mR = /* @__PURE__ */ new Set();
- process.env.NODE_ENV;
- const yR = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
- root: n,
- injectHash: r,
- parentSelectors: i
- } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
- root: !0,
- parentSelectors: []
- };
- const {
- hashId: a,
- layer: o,
- path: s,
- hashPriority: l,
- transformers: u = [],
- linters: c = []
- } = e;
- let f = "", d = {};
- function h(g) {
- const m = g.getName(a);
- if (!d[m]) {
- const [y] = yR(g.style, e, {
- root: !1,
- parentSelectors: i
- });
- d[m] = `@keyframes ${g.getName(a)}${y}`;
- }
- }
- function p(g) {
- let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
- return g.forEach((y) => {
- Array.isArray(y) ? p(y, m) : y && m.push(y);
- }), m;
- }
- if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
- const m = typeof g == "string" && !n ? {} : g;
- if (typeof m == "string")
- f += `${m}
- `;
- else if (m._keyframe)
- h(m);
- else {
- const y = u.reduce((_, O) => {
- var S;
- return ((S = O == null ? void 0 : O.visit) === null || S === void 0 ? void 0 : S.call(O, _)) || _;
- }, m);
- Object.keys(y).forEach((_) => {
- var O;
- const S = y[_];
- if (typeof S == "object" && S && (_ !== "animationName" || !S._keyframe) && !dLe(S)) {
- let x = !1, C = _.trim(), P = !1;
- (n || r) && a ? C.startsWith("@") ? x = !0 : C = hLe(_, a, l) : n && !a && (C === "&" || C === "") && (C = "", P = !0);
- const [$, T] = yR(S, e, {
- root: P,
- injectHash: x,
- parentSelectors: [...i, C]
- });
- d = k(k({}, d), T), f += `${C}${$}`;
- } else {
- let x = function(P, $) {
- process.env.NODE_ENV !== "production" && (typeof S != "object" || !(S != null && S[lre])) && [oLe, sLe, ...c].forEach((M) => M(P, $, {
- path: s,
- hashId: a,
- parentSelectors: i
- }));
- const T = P.replace(/[A-Z]/g, (M) => `-${M.toLowerCase()}`);
- let E = $;
- !Qke[P] && typeof E == "number" && E !== 0 && (E = `${E}px`), P === "animationName" && ($ != null && $._keyframe) && (h($), E = $.getName(a)), f += `${T}:${E};`;
- };
- const C = (O = S == null ? void 0 : S.value) !== null && O !== void 0 ? O : S;
- typeof S == "object" && (S != null && S[ure]) && Array.isArray(C) ? C.forEach((P) => {
- x(_, P);
- }) : x(_, C);
- }
- });
- }
- }), !n)
- f = `{${f}}`;
- else if (o && Dke()) {
- const g = o.split(",");
- f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
- }
- return [f, d];
- };
- function pLe(t, e) {
- return VN(`${t.join("%")}${e}`);
- }
- function bR(t, e) {
- const n = O2(), r = V(() => t.value.token._tokenKey), i = V(() => [r.value, ...t.value.path]);
- let a = i7;
- return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), Gne(
- "style",
- i,
- // Create cache if needed
- () => {
- const {
- path: o,
- hashId: s,
- layer: l,
- nonce: u,
- clientOnly: c,
- order: f = 0
- } = t.value, d = i.value.join("|");
- if (cLe(d)) {
- const [C, P] = fLe(d);
- if (C)
- return [C, r.value, P, {}, c, f];
- }
- const h = e(), {
- hashPriority: p,
- container: v,
- transformers: g,
- linters: m,
- cache: y
- } = n.value, [_, O] = yR(h, {
- hashId: s,
- hashPriority: p,
- layer: l,
- path: o.join("-"),
- transformers: g,
- linters: m
- }), S = a7(_), x = pLe(i.value, S);
- if (a) {
- const C = {
- mark: mh,
- prepend: "queue",
- attachTo: v,
- priority: f
- }, P = typeof u == "function" ? u() : u;
- P && (C.csp = {
- nonce: P
- });
- const $ = Eb(S, x, C);
- $[Av] = y.instanceId, $.setAttribute(Wne, r.value), process.env.NODE_ENV !== "production" && $.setAttribute(mke, i.value.join("|")), Object.keys(O).forEach((T) => {
- mR.has(T) || (mR.add(T), Eb(a7(O[T]), `_effect-${T}`, {
- mark: mh,
- prepend: "queue",
- attachTo: v
- }));
- });
- }
- return [S, r.value, x, O, c, f];
- },
- // Remove cache if no need
- (o, s) => {
- let [, , l] = o;
- (s || n.value.autoClear) && i7 && Xw(l, {
- mark: mh
- });
- }
- ), (o) => o;
- }
- class qt {
- constructor(e, n) {
- this._keyframe = !0, this.name = e, this.style = n;
- }
- getName() {
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
- return e ? `${e}-${this.name}` : this.name;
- }
- }
- const vLe = "4.2.3", qw = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
- var QO = 2, o7 = 0.16, gLe = 0.05, mLe = 0.05, yLe = 0.15, cre = 5, fre = 4, bLe = [{
- index: 7,
- opacity: 0.15
- }, {
- index: 6,
- opacity: 0.25
- }, {
- index: 5,
- opacity: 0.3
- }, {
- index: 5,
- opacity: 0.45
- }, {
- index: 5,
- opacity: 0.65
- }, {
- index: 5,
- opacity: 0.85
- }, {
- index: 4,
- opacity: 0.9
- }, {
- index: 3,
- opacity: 0.95
- }, {
- index: 2,
- opacity: 0.97
- }, {
- index: 1,
- opacity: 0.98
- }];
- function s7(t) {
- var e = t.r, n = t.g, r = t.b, i = rR(e, n, r);
- return {
- h: i.h * 360,
- s: i.s,
- v: i.v
- };
- }
- function HO(t) {
- var e = t.r, n = t.g, r = t.b;
- return "#".concat(iR(e, n, r, !1));
- }
- function _Le(t, e, n) {
- var r = n / 100, i = {
- r: (e.r - t.r) * r + t.r,
- g: (e.g - t.g) * r + t.g,
- b: (e.b - t.b) * r + t.b
- };
- return i;
- }
- function l7(t, e, n) {
- var r;
- return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - QO * e : Math.round(t.h) + QO * e : r = n ? Math.round(t.h) + QO * e : Math.round(t.h) - QO * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
- }
- function u7(t, e, n) {
- if (t.h === 0 && t.s === 0)
- return t.s;
- var r;
- return n ? r = t.s - o7 * e : e === fre ? r = t.s + o7 : r = t.s + gLe * e, r > 1 && (r = 1), n && e === cre && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
- }
- function c7(t, e, n) {
- var r;
- return n ? r = t.v + mLe * e : r = t.v - yLe * e, r > 1 && (r = 1), Number(r.toFixed(2));
- }
- function Bh(t) {
- for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = yv(t), i = cre; i > 0; i -= 1) {
- var a = s7(r), o = HO(yv({
- h: l7(a, i, !0),
- s: u7(a, i, !0),
- v: c7(a, i, !0)
- }));
- n.push(o);
- }
- n.push(HO(r));
- for (var s = 1; s <= fre; s += 1) {
- var l = s7(r), u = HO(yv({
- h: l7(l, s),
- s: u7(l, s),
- v: c7(l, s)
- }));
- n.push(u);
- }
- return e.theme === "dark" ? bLe.map(function(c) {
- var f = c.index, d = c.opacity, h = HO(_Le(yv(e.backgroundColor || "#141414"), yv(n[f]), d * 100));
- return h;
- }) : n;
- }
- var qA = {
- red: "#F5222D",
- volcano: "#FA541C",
- orange: "#FA8C16",
- gold: "#FAAD14",
- yellow: "#FADB14",
- lime: "#A0D911",
- green: "#52C41A",
- cyan: "#13C2C2",
- blue: "#1890FF",
- geekblue: "#2F54EB",
- purple: "#722ED1",
- magenta: "#EB2F96",
- grey: "#666666"
- }, Zx = {}, KA = {};
- Object.keys(qA).forEach(function(t) {
- Zx[t] = Bh(qA[t]), Zx[t].primary = Zx[t][5], KA[t] = Bh(qA[t], {
- theme: "dark",
- backgroundColor: "#141414"
- }), KA[t].primary = KA[t][5];
- });
- var OLe = Zx.blue;
- const SLe = (t) => {
- const {
- controlHeight: e
- } = t;
- return {
- controlHeightSM: e * 0.75,
- controlHeightXS: e * 0.5,
- controlHeightLG: e * 1.25
- };
- };
- function xLe(t) {
- const {
- sizeUnit: e,
- sizeStep: n
- } = t;
- return {
- sizeXXL: e * (n + 8),
- sizeXL: e * (n + 4),
- sizeLG: e * (n + 2),
- sizeMD: e * (n + 1),
- sizeMS: e * n,
- size: e * n,
- sizeSM: e * (n - 1),
- sizeXS: e * (n - 2),
- sizeXXS: e * (n - 3)
- // 4
- };
- }
- const dre = {
- blue: "#1677ff",
- purple: "#722ED1",
- cyan: "#13C2C2",
- green: "#52C41A",
- magenta: "#EB2F96",
- pink: "#eb2f96",
- red: "#F5222D",
- orange: "#FA8C16",
- yellow: "#FADB14",
- volcano: "#FA541C",
- geekblue: "#2F54EB",
- gold: "#FAAD14",
- lime: "#A0D911"
- }, C2 = k(k({}, dre), {
- // Color
- colorPrimary: "#1677ff",
- colorSuccess: "#52c41a",
- colorWarning: "#faad14",
- colorError: "#ff4d4f",
- colorInfo: "#1677ff",
- colorTextBase: "",
- colorBgBase: "",
- // Font
- fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
- 'Noto Color Emoji'`,
- fontSize: 14,
- // Line
- lineWidth: 1,
- lineType: "solid",
- // Motion
- motionUnit: 0.1,
- motionBase: 0,
- motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
- motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
- motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
- motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
- motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
- motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
- motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
- motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
- // Radius
- borderRadius: 6,
- // Size
- sizeUnit: 4,
- sizeStep: 4,
- sizePopupArrow: 16,
- // Control Base
- controlHeight: 32,
- // zIndex
- zIndexBase: 0,
- zIndexPopupBase: 1e3,
- // Image
- opacityImage: 1,
- // Wireframe
- wireframe: !1
- });
- function wLe(t, e) {
- let {
- generateColorPalettes: n,
- generateNeutralColorPalettes: r
- } = e;
- const {
- colorSuccess: i,
- colorWarning: a,
- colorError: o,
- colorInfo: s,
- colorPrimary: l,
- colorBgBase: u,
- colorTextBase: c
- } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
- return k(k({}, g), {
- colorPrimaryBg: f[1],
- colorPrimaryBgHover: f[2],
- colorPrimaryBorder: f[3],
- colorPrimaryBorderHover: f[4],
- colorPrimaryHover: f[5],
- colorPrimary: f[6],
- colorPrimaryActive: f[7],
- colorPrimaryTextHover: f[8],
- colorPrimaryText: f[9],
- colorPrimaryTextActive: f[10],
- colorSuccessBg: d[1],
- colorSuccessBgHover: d[2],
- colorSuccessBorder: d[3],
- colorSuccessBorderHover: d[4],
- colorSuccessHover: d[4],
- colorSuccess: d[6],
- colorSuccessActive: d[7],
- colorSuccessTextHover: d[8],
- colorSuccessText: d[9],
- colorSuccessTextActive: d[10],
- colorErrorBg: p[1],
- colorErrorBgHover: p[2],
- colorErrorBorder: p[3],
- colorErrorBorderHover: p[4],
- colorErrorHover: p[5],
- colorError: p[6],
- colorErrorActive: p[7],
- colorErrorTextHover: p[8],
- colorErrorText: p[9],
- colorErrorTextActive: p[10],
- colorWarningBg: h[1],
- colorWarningBgHover: h[2],
- colorWarningBorder: h[3],
- colorWarningBorderHover: h[4],
- colorWarningHover: h[4],
- colorWarning: h[6],
- colorWarningActive: h[7],
- colorWarningTextHover: h[8],
- colorWarningText: h[9],
- colorWarningTextActive: h[10],
- colorInfoBg: v[1],
- colorInfoBgHover: v[2],
- colorInfoBorder: v[3],
- colorInfoBorderHover: v[4],
- colorInfoHover: v[4],
- colorInfo: v[6],
- colorInfoActive: v[7],
- colorInfoTextHover: v[8],
- colorInfoText: v[9],
- colorInfoTextActive: v[10],
- colorBgMask: new Hn("#000").setAlpha(0.45).toRgbString(),
- colorWhite: "#fff"
- });
- }
- const CLe = (t) => {
- let e = t, n = t, r = t, i = t;
- return t < 6 && t >= 5 ? e = t + 1 : t < 16 && t >= 6 ? e = t + 2 : t >= 16 && (e = 16), t < 7 && t >= 5 ? n = 4 : t < 8 && t >= 7 ? n = 5 : t < 14 && t >= 8 ? n = 6 : t < 16 && t >= 14 ? n = 7 : t >= 16 && (n = 8), t < 6 && t >= 2 ? r = 1 : t >= 6 && (r = 2), t > 4 && t < 8 ? i = 4 : t >= 8 && (i = 6), {
- borderRadius: t > 16 ? 16 : t,
- borderRadiusXS: r,
- borderRadiusSM: n,
- borderRadiusLG: e,
- borderRadiusOuter: i
- };
- };
- function TLe(t) {
- const {
- motionUnit: e,
- motionBase: n,
- borderRadius: r,
- lineWidth: i
- } = t;
- return k({
- // motion
- motionDurationFast: `${(n + e).toFixed(1)}s`,
- motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
- motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
- // line
- lineWidthBold: i + 1
- }, CLe(r));
- }
- const hu = (t, e) => new Hn(t).setAlpha(e).toRgbString(), y0 = (t, e) => new Hn(t).darken(e).toHexString(), PLe = (t) => {
- const e = Bh(t);
- return {
- 1: e[0],
- 2: e[1],
- 3: e[2],
- 4: e[3],
- 5: e[4],
- 6: e[5],
- 7: e[6],
- 8: e[4],
- 9: e[5],
- 10: e[6]
- // 8: colors[7],
- // 9: colors[8],
- // 10: colors[9],
- };
- }, $Le = (t, e) => {
- const n = t || "#fff", r = e || "#000";
- return {
- colorBgBase: n,
- colorTextBase: r,
- colorText: hu(r, 0.88),
- colorTextSecondary: hu(r, 0.65),
- colorTextTertiary: hu(r, 0.45),
- colorTextQuaternary: hu(r, 0.25),
- colorFill: hu(r, 0.15),
- colorFillSecondary: hu(r, 0.06),
- colorFillTertiary: hu(r, 0.04),
- colorFillQuaternary: hu(r, 0.02),
- colorBgLayout: y0(n, 4),
- colorBgContainer: y0(n, 0),
- colorBgElevated: y0(n, 0),
- colorBgSpotlight: hu(r, 0.85),
- colorBorder: y0(n, 15),
- colorBorderSecondary: y0(n, 6)
- };
- };
- function ALe(t) {
- const e = new Array(10).fill(null).map((n, r) => {
- const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
- return Math.floor(o / 2) * 2;
- });
- return e[1] = t, e.map((n) => {
- const r = n + 8;
- return {
- size: n,
- lineHeight: r / n
- };
- });
- }
- const ELe = (t) => {
- const e = ALe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
- return {
- fontSizeSM: n[0],
- fontSize: n[1],
- fontSizeLG: n[2],
- fontSizeXL: n[3],
- fontSizeHeading1: n[6],
- fontSizeHeading2: n[5],
- fontSizeHeading3: n[4],
- fontSizeHeading4: n[3],
- fontSizeHeading5: n[2],
- lineHeight: r[1],
- lineHeightLG: r[2],
- lineHeightSM: r[0],
- lineHeightHeading1: r[6],
- lineHeightHeading2: r[5],
- lineHeightHeading3: r[4],
- lineHeightHeading4: r[3],
- lineHeightHeading5: r[2]
- };
- };
- function MLe(t) {
- const e = Object.keys(dre).map((n) => {
- const r = Bh(t[n]);
- return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
- }).reduce((n, r) => (n = k(k({}, n), r), n), {});
- return k(k(k(k(k(k(k({}, t), e), wLe(t, {
- generateColorPalettes: PLe,
- generateNeutralColorPalettes: $Le
- })), ELe(t.fontSize)), xLe(t)), SLe(t)), TLe(t));
- }
- function JA(t) {
- return t >= 0 && t <= 255;
- }
- function GO(t, e) {
- const {
- r: n,
- g: r,
- b: i,
- a
- } = new Hn(t).toRgb();
- if (a < 1)
- return t;
- const {
- r: o,
- g: s,
- b: l
- } = new Hn(e).toRgb();
- for (let u = 0.01; u <= 1; u += 0.01) {
- const c = Math.round((n - o * (1 - u)) / u), f = Math.round((r - s * (1 - u)) / u), d = Math.round((i - l * (1 - u)) / u);
- if (JA(c) && JA(f) && JA(d))
- return new Hn({
- r: c,
- g: f,
- b: d,
- a: Math.round(u * 100) / 100
- }).toRgbString();
- }
- return new Hn({
- r: n,
- g: r,
- b: i,
- a: 1
- }).toRgbString();
- }
- var ILe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function DLe(t) {
- const {
- override: e
- } = t, n = ILe(t, ["override"]), r = k({}, e);
- Object.keys(C2).forEach((h) => {
- delete r[h];
- });
- const i = k(k({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
- return k(k(k({}, i), {
- colorLink: i.colorInfoText,
- colorLinkHover: i.colorInfoHover,
- colorLinkActive: i.colorInfoActive,
- // ============== Background ============== //
- colorFillContent: i.colorFillSecondary,
- colorFillContentHover: i.colorFill,
- colorFillAlter: i.colorFillQuaternary,
- colorBgContainerDisabled: i.colorFillTertiary,
- // ============== Split ============== //
- colorBorderBg: i.colorBgContainer,
- colorSplit: GO(i.colorBorderSecondary, i.colorBgContainer),
- // ============== Text ============== //
- colorTextPlaceholder: i.colorTextQuaternary,
- colorTextDisabled: i.colorTextQuaternary,
- colorTextHeading: i.colorText,
- colorTextLabel: i.colorTextSecondary,
- colorTextDescription: i.colorTextTertiary,
- colorTextLightSolid: i.colorWhite,
- colorHighlight: i.colorError,
- colorBgTextHover: i.colorFillSecondary,
- colorBgTextActive: i.colorFill,
- colorIcon: i.colorTextTertiary,
- colorIconHover: i.colorText,
- colorErrorOutline: GO(i.colorErrorBg, i.colorBgContainer),
- colorWarningOutline: GO(i.colorWarningBg, i.colorBgContainer),
- // Font
- fontSizeIcon: i.fontSizeSM,
- // Control
- lineWidth: i.lineWidth,
- controlOutlineWidth: i.lineWidth * 2,
- // Checkbox size and expand icon size
- controlInteractiveSize: i.controlHeight / 2,
- controlItemBgHover: i.colorFillTertiary,
- controlItemBgActive: i.colorPrimaryBg,
- controlItemBgActiveHover: i.colorPrimaryBgHover,
- controlItemBgActiveDisabled: i.colorFill,
- controlTmpOutline: i.colorFillQuaternary,
- controlOutline: GO(i.colorPrimaryBg, i.colorBgContainer),
- lineType: i.lineType,
- borderRadius: i.borderRadius,
- borderRadiusXS: i.borderRadiusXS,
- borderRadiusSM: i.borderRadiusSM,
- borderRadiusLG: i.borderRadiusLG,
- fontWeightStrong: 600,
- opacityLoading: 0.65,
- linkDecoration: "none",
- linkHoverDecoration: "none",
- linkFocusDecoration: "none",
- controlPaddingHorizontal: 12,
- controlPaddingHorizontalSM: 8,
- paddingXXS: i.sizeXXS,
- paddingXS: i.sizeXS,
- paddingSM: i.sizeSM,
- padding: i.size,
- paddingMD: i.sizeMD,
- paddingLG: i.sizeLG,
- paddingXL: i.sizeXL,
- paddingContentHorizontalLG: i.sizeLG,
- paddingContentVerticalLG: i.sizeMS,
- paddingContentHorizontal: i.sizeMS,
- paddingContentVertical: i.sizeSM,
- paddingContentHorizontalSM: i.size,
- paddingContentVerticalSM: i.sizeXS,
- marginXXS: i.sizeXXS,
- marginXS: i.sizeXS,
- marginSM: i.sizeSM,
- margin: i.size,
- marginMD: i.sizeMD,
- marginLG: i.sizeLG,
- marginXL: i.sizeXL,
- marginXXL: i.sizeXXL,
- boxShadow: `
- 0 1px 2px 0 rgba(0, 0, 0, 0.03),
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
- 0 2px 4px 0 rgba(0, 0, 0, 0.02)
- `,
- boxShadowSecondary: `
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
- `,
- boxShadowTertiary: `
- 0 1px 2px 0 rgba(0, 0, 0, 0.03),
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
- 0 2px 4px 0 rgba(0, 0, 0, 0.02)
- `,
- screenXS: a,
- screenXSMin: a,
- screenXSMax: o - 1,
- screenSM: o,
- screenSMMin: o,
- screenSMMax: s - 1,
- screenMD: s,
- screenMDMin: s,
- screenMDMax: l - 1,
- screenLG: l,
- screenLGMin: l,
- screenLGMax: u - 1,
- screenXL: u,
- screenXLMin: u,
- screenXLMax: c - 1,
- screenXXL: c,
- screenXXLMin: c,
- screenXXLMax: f - 1,
- screenXXXL: f,
- screenXXXLMin: f,
- // FIXME: component box-shadow, should be removed
- boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
- boxShadowCard: `
- 0 1px 2px -2px ${new Hn("rgba(0, 0, 0, 0.16)").toRgbString()},
- 0 3px 6px 0 ${new Hn("rgba(0, 0, 0, 0.12)").toRgbString()},
- 0 5px 12px 4px ${new Hn("rgba(0, 0, 0, 0.09)").toRgbString()}
- `,
- boxShadowDrawerRight: `
- -6px 0 16px 0 rgba(0, 0, 0, 0.08),
- -3px 0 6px -4px rgba(0, 0, 0, 0.12),
- -9px 0 28px 8px rgba(0, 0, 0, 0.05)
- `,
- boxShadowDrawerLeft: `
- 6px 0 16px 0 rgba(0, 0, 0, 0.08),
- 3px 0 6px -4px rgba(0, 0, 0, 0.12),
- 9px 0 28px 8px rgba(0, 0, 0, 0.05)
- `,
- boxShadowDrawerUp: `
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
- `,
- boxShadowDrawerDown: `
- 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
- 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
- 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
- `,
- boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
- boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
- boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
- boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
- }), r);
- }
- const RLe = (t, e, n, r, i) => {
- const a = t / 2, o = 0, s = a, l = n * 1 / Math.sqrt(2), u = a - n * (1 - 1 / Math.sqrt(2)), c = a - e * (1 / Math.sqrt(2)), f = n * (Math.sqrt(2) - 1) + e * (1 / Math.sqrt(2)), d = 2 * a - c, h = f, p = 2 * a - l, v = u, g = 2 * a - o, m = s, y = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2), _ = n * (Math.sqrt(2) - 1);
- return {
- pointerEvents: "none",
- width: t,
- height: t,
- overflow: "hidden",
- "&::after": {
- content: '""',
- position: "absolute",
- width: y,
- height: y,
- bottom: 0,
- insetInline: 0,
- margin: "auto",
- borderRadius: {
- _skip_check_: !0,
- value: `0 0 ${e}px 0`
- },
- transform: "translateY(50%) rotate(-135deg)",
- boxShadow: i,
- zIndex: 0,
- background: "transparent"
- },
- "&::before": {
- position: "absolute",
- bottom: 0,
- insetInlineStart: 0,
- width: t,
- height: t / 2,
- background: r,
- clipPath: {
- _multi_value_: !0,
- value: [`polygon(${_}px 100%, 50% ${_}px, ${2 * a - _}px 100%, ${_}px 100%)`, `path('M ${o} ${s} A ${n} ${n} 0 0 0 ${l} ${u} L ${c} ${f} A ${e} ${e} 0 0 1 ${d} ${h} L ${p} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`]
- },
- content: '""'
- }
- };
- };
- function kLe(t, e) {
- return qw.reduce((n, r) => {
- const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
- return k(k({}, n), e(r, {
- lightColor: i,
- lightBorderColor: a,
- darkColor: o,
- textColor: s
- }));
- }, {});
- }
- const Mg = {
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis"
- }, Gn = (t) => ({
- boxSizing: "border-box",
- margin: 0,
- padding: 0,
- color: t.colorText,
- fontSize: t.fontSize,
- // font-variant: @font-variant-base;
- lineHeight: t.lineHeight,
- listStyle: "none",
- // font-feature-settings: @font-feature-settings-base;
- fontFamily: t.fontFamily
- }), hm = () => ({
- display: "inline-flex",
- alignItems: "center",
- color: "inherit",
- fontStyle: "normal",
- lineHeight: 0,
- textAlign: "center",
- textTransform: "none",
- // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
- verticalAlign: "-0.125em",
- textRendering: "optimizeLegibility",
- "-webkit-font-smoothing": "antialiased",
- "-moz-osx-font-smoothing": "grayscale",
- "> *": {
- lineHeight: 1
- },
- svg: {
- display: "inline-block"
- }
- }), Kw = () => ({
- // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
- "&::before": {
- display: "table",
- content: '""'
- },
- "&::after": {
- // https://github.com/ant-design/ant-design/issues/21864
- display: "table",
- clear: "both",
- content: '""'
- }
- }), LLe = (t) => ({
- a: {
- color: t.colorLink,
- textDecoration: t.linkDecoration,
- backgroundColor: "transparent",
- outline: "none",
- cursor: "pointer",
- transition: `color ${t.motionDurationSlow}`,
- "-webkit-text-decoration-skip": "objects",
- "&:hover": {
- color: t.colorLinkHover
- },
- "&:active": {
- color: t.colorLinkActive
- },
- "&:active,\n &:hover": {
- textDecoration: t.linkHoverDecoration,
- outline: 0
- },
- // https://github.com/ant-design/ant-design/issues/22503
- "&:focus": {
- textDecoration: t.linkFocusDecoration,
- outline: 0
- },
- "&[disabled]": {
- color: t.colorTextDisabled,
- cursor: "not-allowed"
- }
- }
- }), NLe = (t, e) => {
- const {
- fontFamily: n,
- fontSize: r
- } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
- return {
- [i]: {
- fontFamily: n,
- fontSize: r,
- boxSizing: "border-box",
- "&::before, &::after": {
- boxSizing: "border-box"
- },
- [i]: {
- boxSizing: "border-box",
- "&::before, &::after": {
- boxSizing: "border-box"
- }
- }
- }
- };
- }, G_ = (t) => ({
- outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
- outlineOffset: 1,
- transition: "outline-offset 0s, outline 0s"
- }), T2 = (t) => ({
- "&:focus-visible": k({}, G_(t))
- });
- function pr(t, e, n) {
- return (r) => {
- const i = V(() => r == null ? void 0 : r.value), [a, o, s] = pm(), {
- getPrefixCls: l,
- iconPrefixCls: u
- } = b2(), c = V(() => l()), f = V(() => ({
- theme: a.value,
- token: o.value,
- hashId: s.value,
- path: ["Shared", c.value]
- }));
- bR(f, () => [{
- // Link
- "&": LLe(o.value)
- }]);
- const d = V(() => ({
- theme: a.value,
- token: o.value,
- hashId: s.value,
- path: [t, i.value, u.value]
- }));
- return [bR(d, () => {
- const {
- token: h,
- flush: p
- } = zLe(o.value), v = typeof n == "function" ? n(h) : n, g = k(k({}, v), o.value[t]), m = `.${i.value}`, y = bn(h, {
- componentCls: m,
- prefixCls: i.value,
- iconCls: `.${u.value}`,
- antCls: `.${c.value}`
- }, g), _ = e(y, {
- hashId: s.value,
- prefixCls: i.value,
- rootPrefixCls: c.value,
- iconPrefixCls: u.value,
- overrideComponentToken: o.value[t]
- });
- return p(t, g), [NLe(o.value, i.value), _];
- }), s];
- };
- }
- const hre = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
- let _R = !0;
- function bn() {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
- e[n] = arguments[n];
- if (!hre)
- return k({}, ...e);
- _R = !1;
- const r = {};
- return e.forEach((i) => {
- Object.keys(i).forEach((o) => {
- Object.defineProperty(r, o, {
- configurable: !0,
- enumerable: !0,
- get: () => i[o]
- });
- });
- }), _R = !0, r;
- }
- function BLe() {
- }
- function zLe(t) {
- let e, n = t, r = BLe;
- return hre && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
- get(i, a) {
- return _R && e.add(a), i[a];
- }
- }), r = (i, a) => {
- Array.from(e);
- }), {
- token: n,
- keys: e,
- flush: r
- };
- }
- const VLe = Kne(MLe), pre = {
- token: C2,
- hashed: !0
- }, vre = Symbol("DesignTokenContext"), OR = ve(), FLe = (t) => {
- Et(vre, t), me(t, () => {
- OR.value = z(t), fxe(OR);
- }, {
- immediate: !0,
- deep: !0
- });
- }, WLe = ae({
- props: {
- value: sn()
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- return FLe(V(() => t.value)), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- });
- function pm() {
- const t = et(vre, V(() => OR.value || pre)), e = V(() => `${vLe}-${t.value.hashed || ""}`), n = V(() => t.value.theme || VLe), r = Wke(n, V(() => [C2, t.value.token]), V(() => ({
- salt: e.value,
- override: k({
- override: t.value.token
- }, t.value.components),
- formatToken: DLe
- })));
- return [n, V(() => r.value[0]), V(() => t.value.hashed ? r.value[1] : "")];
- }
- const gre = ae({
- compatConfig: {
- MODE: 3
- },
- setup() {
- const [, t] = pm(), e = V(() => new Hn(t.value.colorBgBase).toHsl().l < 0.5 ? {
- opacity: 0.65
- } : {});
- return () => D("svg", {
- style: e.value,
- width: "184",
- height: "152",
- viewBox: "0 0 184 152",
- xmlns: "http://www.w3.org/2000/svg"
- }, [D("g", {
- fill: "none",
- "fill-rule": "evenodd"
- }, [D("g", {
- transform: "translate(24 31.67)"
- }, [D("ellipse", {
- "fill-opacity": ".8",
- fill: "#F5F5F7",
- cx: "67.797",
- cy: "106.89",
- rx: "67.797",
- ry: "12.668"
- }, null), D("path", {
- d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
- fill: "#AEB8C2"
- }, null), D("path", {
- d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
- fill: "url(#linearGradient-1)",
- transform: "translate(13.56)"
- }, null), D("path", {
- d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
- fill: "#F5F5F7"
- }, null), D("path", {
- d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
- fill: "#DCE0E6"
- }, null)]), D("path", {
- d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
- fill: "#DCE0E6"
- }, null), D("g", {
- transform: "translate(149.65 15.383)",
- fill: "#FFF"
- }, [D("ellipse", {
- cx: "20.654",
- cy: "3.167",
- rx: "2.849",
- ry: "2.815"
- }, null), D("path", {
- d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
- }, null)])])]);
- }
- });
- gre.PRESENTED_IMAGE_DEFAULT = !0;
- const mre = ae({
- compatConfig: {
- MODE: 3
- },
- setup() {
- const [, t] = pm(), e = V(() => {
- const {
- colorFill: n,
- colorFillTertiary: r,
- colorFillQuaternary: i,
- colorBgContainer: a
- } = t.value;
- return {
- borderColor: new Hn(n).onBackground(a).toHexString(),
- shadowColor: new Hn(r).onBackground(a).toHexString(),
- contentColor: new Hn(i).onBackground(a).toHexString()
- };
- });
- return () => D("svg", {
- width: "64",
- height: "41",
- viewBox: "0 0 64 41",
- xmlns: "http://www.w3.org/2000/svg"
- }, [D("g", {
- transform: "translate(0 1)",
- fill: "none",
- "fill-rule": "evenodd"
- }, [D("ellipse", {
- fill: e.value.shadowColor,
- cx: "32",
- cy: "33",
- rx: "32",
- ry: "7"
- }, null), D("g", {
- "fill-rule": "nonzero",
- stroke: e.value.borderColor
- }, [D("path", {
- d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
- }, null), D("path", {
- d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
- fill: e.value.contentColor
- }, null)])])]);
- }
- });
- mre.PRESENTED_IMAGE_SIMPLE = !0;
- const QLe = (t) => {
- const {
- componentCls: e,
- margin: n,
- marginXS: r,
- marginXL: i,
- fontSize: a,
- lineHeight: o
- } = t;
- return {
- [e]: {
- marginInline: r,
- fontSize: a,
- lineHeight: o,
- textAlign: "center",
- // 原来 &-image 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
- [`${e}-image`]: {
- height: t.emptyImgHeight,
- marginBottom: r,
- opacity: t.opacityImage,
- img: {
- height: "100%"
- },
- svg: {
- height: "100%",
- margin: "auto"
- }
- },
- // 原来 &-footer 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
- [`${e}-footer`]: {
- marginTop: n
- },
- "&-normal": {
- marginBlock: i,
- color: t.colorTextDisabled,
- [`${e}-image`]: {
- height: t.emptyImgHeightMD
- }
- },
- "&-small": {
- marginBlock: r,
- color: t.colorTextDisabled,
- [`${e}-image`]: {
- height: t.emptyImgHeightSM
- }
- }
- }
- };
- }, HLe = pr("Empty", (t) => {
- const {
- componentCls: e,
- controlHeightLG: n
- } = t, r = bn(t, {
- emptyImgCls: `${e}-img`,
- emptyImgHeight: n * 2.5,
- emptyImgHeightMD: n,
- emptyImgHeightSM: n * 0.875
- });
- return [QLe(r)];
- });
- var GLe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const yre = D(gre, null, null), bre = D(mre, null, null), jLe = () => ({
- prefixCls: String,
- imageStyle: sn(),
- image: Fo(),
- description: Fo()
- }), QN = ae({
- name: "AEmpty",
- compatConfig: {
- MODE: 3
- },
- inheritAttrs: !1,
- props: jLe(),
- setup(t, e) {
- let {
- slots: n = {},
- attrs: r
- } = e;
- const {
- direction: i,
- prefixCls: a
- } = hn("empty", t), [o, s] = HLe(a);
- return () => {
- var l, u;
- const c = a.value, f = k(k({}, t), r), {
- image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || yre,
- description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
- imageStyle: p,
- class: v = ""
- } = f, g = GLe(f, ["image", "description", "imageStyle", "class"]);
- return o(D(Fne, {
- componentName: "Empty",
- children: (m) => {
- const y = typeof h < "u" ? h : m.description, _ = typeof y == "string" ? y : "empty";
- let O = null;
- return typeof d == "string" ? O = D("img", {
- alt: _,
- src: d
- }, null) : O = d, D("div", te({
- class: Re(c, v, s.value, {
- [`${c}-normal`]: d === bre,
- [`${c}-rtl`]: i.value === "rtl"
- })
- }, g), [D("div", {
- class: `${c}-image`,
- style: p
- }, [O]), y && D("p", {
- class: `${c}-description`
- }, [y]), n.default && D("div", {
- class: `${c}-footer`
- }, [Zl(n.default())])]);
- }
- }, null));
- };
- }
- });
- QN.PRESENTED_IMAGE_DEFAULT = yre;
- QN.PRESENTED_IMAGE_SIMPLE = bre;
- const b0 = fm(QN), HN = (t) => {
- const {
- prefixCls: e
- } = hn("empty", t);
- return ((r) => {
- switch (r) {
- case "Table":
- case "List":
- return D(b0, {
- image: b0.PRESENTED_IMAGE_SIMPLE
- }, null);
- case "Select":
- case "TreeSelect":
- case "Cascader":
- case "Transfer":
- case "Mentions":
- return D(b0, {
- image: b0.PRESENTED_IMAGE_SIMPLE,
- class: `${e.value}-small`
- }, null);
- default:
- return D(b0, null, null);
- }
- })(t.componentName);
- };
- function ZLe(t) {
- return D(HN, {
- componentName: t
- }, null);
- }
- const _re = Symbol("SizeContextKey"), Ore = () => et(_re, ee(void 0)), Sre = (t) => {
- const e = Ore();
- return Et(_re, V(() => t.value || e.value)), t;
- }, hn = (t, e) => {
- const n = Ore(), r = Vl(), i = et(zN, k(k({}, Nne), {
- renderEmpty: (C) => ff(HN, {
- componentName: C
- })
- })), a = V(() => i.getPrefixCls(t, e.prefixCls)), o = V(() => {
- var C, P;
- return (C = e.direction) !== null && C !== void 0 ? C : (P = i.direction) === null || P === void 0 ? void 0 : P.value;
- }), s = V(() => {
- var C;
- return (C = e.iconPrefixCls) !== null && C !== void 0 ? C : i.iconPrefixCls.value;
- }), l = V(() => i.getPrefixCls()), u = V(() => {
- var C;
- return (C = i.autoInsertSpaceInButton) === null || C === void 0 ? void 0 : C.value;
- }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = V(() => {
- var C, P;
- return (C = e.getTargetContainer) !== null && C !== void 0 ? C : (P = i.getTargetContainer) === null || P === void 0 ? void 0 : P.value;
- }), v = V(() => {
- var C, P, $;
- return (P = (C = e.getContainer) !== null && C !== void 0 ? C : e.getPopupContainer) !== null && P !== void 0 ? P : ($ = i.getPopupContainer) === null || $ === void 0 ? void 0 : $.value;
- }), g = V(() => {
- var C, P;
- return (C = e.dropdownMatchSelectWidth) !== null && C !== void 0 ? C : (P = i.dropdownMatchSelectWidth) === null || P === void 0 ? void 0 : P.value;
- }), m = V(() => {
- var C;
- return (e.virtual === void 0 ? ((C = i.virtual) === null || C === void 0 ? void 0 : C.value) !== !1 : e.virtual !== !1) && g.value !== !1;
- }), y = V(() => e.size || n.value), _ = V(() => {
- var C, P, $;
- return (C = e.autocomplete) !== null && C !== void 0 ? C : ($ = (P = i.input) === null || P === void 0 ? void 0 : P.value) === null || $ === void 0 ? void 0 : $.autocomplete;
- }), O = V(() => {
- var C;
- return (C = e.disabled) !== null && C !== void 0 ? C : r.value;
- }), S = V(() => {
- var C;
- return (C = e.csp) !== null && C !== void 0 ? C : i.csp;
- }), x = V(() => {
- var C, P;
- return (C = e.wave) !== null && C !== void 0 ? C : (P = i.wave) === null || P === void 0 ? void 0 : P.value;
- });
- return {
- configProvider: i,
- prefixCls: a,
- direction: o,
- size: y,
- getTargetContainer: p,
- getPopupContainer: v,
- space: f,
- pageHeader: d,
- form: h,
- autoInsertSpaceInButton: u,
- renderEmpty: c,
- virtual: m,
- dropdownMatchSelectWidth: g,
- rootPrefixCls: l,
- getPrefixCls: i.getPrefixCls,
- autocomplete: _,
- csp: S,
- iconPrefixCls: s,
- disabled: O,
- select: i.select,
- wave: x
- };
- };
- function si(t, e) {
- const n = k({}, t);
- for (let r = 0; r < e.length; r += 1) {
- const i = e[r];
- delete n[i];
- }
- return n;
- }
- function f7(t) {
- return typeof t == "object" && t != null && t.nodeType === 1;
- }
- function d7(t, e) {
- return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
- }
- function eE(t, e) {
- if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
- var n = getComputedStyle(t, null);
- return d7(n.overflowY, e) || d7(n.overflowX, e) || function(r) {
- var i = function(a) {
- if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
- try {
- return a.ownerDocument.defaultView.frameElement;
- } catch {
- return null;
- }
- }(r);
- return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
- }(t);
- }
- return !1;
- }
- function jO(t, e, n, r, i, a, o, s) {
- return a < t && o > e || a > t && o < e ? 0 : a <= t && s <= n || o >= e && s >= n ? a - t - r : o > e && s < n || a < t && s > n ? o - e + i : 0;
- }
- var h7 = function(t, e) {
- var n = window, r = e.scrollMode, i = e.block, a = e.inline, o = e.boundary, s = e.skipOverflowHiddenElements, l = typeof o == "function" ? o : function(we) {
- return we !== o;
- };
- if (!f7(t)) throw new TypeError("Invalid target");
- for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; f7(h) && l(h); ) {
- if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
- d.push(h);
- break;
- }
- h != null && h === document.body && eE(h) && !eE(document.documentElement) || h != null && eE(h, s) && d.push(h);
- }
- for (var p = n.visualViewport ? n.visualViewport.width : innerWidth, v = n.visualViewport ? n.visualViewport.height : innerHeight, g = window.scrollX || pageXOffset, m = window.scrollY || pageYOffset, y = t.getBoundingClientRect(), _ = y.height, O = y.width, S = y.top, x = y.right, C = y.bottom, P = y.left, $ = i === "start" || i === "nearest" ? S : i === "end" ? C : S + _ / 2, T = a === "center" ? P + O / 2 : a === "end" ? x : P, E = [], M = 0; M < d.length; M++) {
- var R = d[M], N = R.getBoundingClientRect(), I = N.height, B = N.width, Q = N.top, W = N.right, H = N.bottom, U = N.left;
- if (r === "if-needed" && S >= 0 && P >= 0 && C <= v && x <= p && S >= Q && C <= H && P >= U && x <= W) return E;
- var j = getComputedStyle(R), Y = parseInt(j.borderLeftWidth, 10), ne = parseInt(j.borderTopWidth, 10), fe = parseInt(j.borderRightWidth, 10), ue = parseInt(j.borderBottomWidth, 10), ye = 0, se = 0, he = "offsetWidth" in R ? R.offsetWidth - R.clientWidth - Y - fe : 0, re = "offsetHeight" in R ? R.offsetHeight - R.clientHeight - ne - ue : 0, q = "offsetWidth" in R ? R.offsetWidth === 0 ? 0 : B / R.offsetWidth : 0, K = "offsetHeight" in R ? R.offsetHeight === 0 ? 0 : I / R.offsetHeight : 0;
- if (f === R) ye = i === "start" ? $ : i === "end" ? $ - v : i === "nearest" ? jO(m, m + v, v, ne, ue, m + $, m + $ + _, _) : $ - v / 2, se = a === "start" ? T : a === "center" ? T - p / 2 : a === "end" ? T - p : jO(g, g + p, p, Y, fe, g + T, g + T + O, O), ye = Math.max(0, ye + m), se = Math.max(0, se + g);
- else {
- ye = i === "start" ? $ - Q - ne : i === "end" ? $ - H + ue + re : i === "nearest" ? jO(Q, H, I, ne, ue + re, $, $ + _, _) : $ - (Q + I / 2) + re / 2, se = a === "start" ? T - U - Y : a === "center" ? T - (U + B / 2) + he / 2 : a === "end" ? T - W + fe + he : jO(U, W, B, Y, fe + he, T, T + O, O);
- var de = R.scrollLeft, xe = R.scrollTop;
- $ += xe - (ye = Math.max(0, Math.min(xe + ye / K, R.scrollHeight - I / K + re))), T += de - (se = Math.max(0, Math.min(de + se / q, R.scrollWidth - B / q + he)));
- }
- E.push({ el: R, top: ye, left: se });
- }
- return E;
- };
- function xre(t) {
- return t === Object(t) && Object.keys(t).length !== 0;
- }
- function ULe(t, e) {
- e === void 0 && (e = "auto");
- var n = "scrollBehavior" in document.body.style;
- t.forEach(function(r) {
- var i = r.el, a = r.top, o = r.left;
- i.scroll && n ? i.scroll({
- top: a,
- left: o,
- behavior: e
- }) : (i.scrollTop = a, i.scrollLeft = o);
- });
- }
- function XLe(t) {
- return t === !1 ? {
- block: "end",
- inline: "nearest"
- } : xre(t) ? t : {
- block: "start",
- inline: "nearest"
- };
- }
- function YLe(t, e) {
- var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
- if (xre(e) && typeof e.behavior == "function")
- return e.behavior(n ? h7(t, e) : []);
- if (n) {
- var r = XLe(e);
- return ULe(h7(t, r), r.behavior);
- }
- }
- function qLe(t, e) {
- for (var n = 0; n < e.length; n++) {
- var r = e[n];
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
- }
- }
- function wre(t, e, n) {
- return n && qLe(t, n), t;
- }
- function Ux() {
- return (Ux = Object.assign || function(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
- }
- return t;
- }).apply(this, arguments);
- }
- function Cre(t, e) {
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
- }
- function Tre(t, e) {
- if (t == null) return {};
- var n, r, i = {}, a = Object.keys(t);
- for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
- return i;
- }
- function p7(t) {
- return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
- var e;
- }
- var Pre = Object.prototype, $re = Pre.toString, KLe = Pre.hasOwnProperty, Are = /^\s*function (\w+)/;
- function v7(t) {
- var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
- if (n) {
- var r = n.toString().match(Are);
- return r ? r[1] : "";
- }
- return "";
- }
- var zh = function(t) {
- var e, n;
- return p7(t) !== !1 && typeof (e = t.constructor) == "function" && p7(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
- }, Ere = function(t) {
- return t;
- }, Bi = Ere;
- if (process.env.NODE_ENV !== "production") {
- var JLe = typeof console < "u";
- Bi = JLe ? function(t) {
- console.warn("[VueTypes warn]: " + t);
- } : Ere;
- }
- var Db = function(t, e) {
- return KLe.call(t, e);
- }, e4e = Number.isInteger || function(t) {
- return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
- }, Ig = Array.isArray || function(t) {
- return $re.call(t) === "[object Array]";
- }, Dg = function(t) {
- return $re.call(t) === "[object Function]";
- }, Jw = function(t) {
- return zh(t) && Db(t, "_vueTypes_name");
- }, Mre = function(t) {
- return zh(t) && (Db(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
- return Db(t, e);
- }));
- };
- function GN(t, e) {
- return Object.defineProperty(t.bind(e), "__original", { value: t });
- }
- function up(t, e, n) {
- var r;
- n === void 0 && (n = !1);
- var i = !0, a = "";
- r = zh(t) ? t : { type: t };
- var o = Jw(r) ? r._vueTypes_name + " - " : "";
- if (Mre(r) && r.type !== null) {
- if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
- Ig(r.type) ? (i = r.type.some(function(f) {
- return up(f, e, !0) === !0;
- }), a = r.type.map(function(f) {
- return v7(f);
- }).join(" or ")) : i = (a = v7(r)) === "Array" ? Ig(e) : a === "Object" ? zh(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
- if (f == null) return "";
- var d = f.constructor.toString().match(Are);
- return d ? d[1] : "";
- }(e) === a : e instanceof r.type;
- }
- if (!i) {
- var s = o + 'value "' + e + '" should be of type "' + a + '"';
- return n === !1 ? (Bi(s), !1) : s;
- }
- if (Db(r, "validator") && Dg(r.validator)) {
- var l = Bi, u = [];
- if (Bi = function(f) {
- u.push(f);
- }, i = r.validator(e), Bi = l, !i) {
- var c = (u.length > 1 ? "* " : "") + u.join(`
- * `);
- return u.length = 0, n === !1 ? (Bi(c), i) : c;
- }
- }
- return i;
- }
- function vo(t, e) {
- var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
- return this.required = !0, this;
- } }, def: { value: function(i) {
- return i !== void 0 || this.default ? Dg(i) || up(this, i, !0) === !0 ? (this.default = Ig(i) ? function() {
- return [].concat(i);
- } : zh(i) ? function() {
- return Object.assign({}, i);
- } : i, this) : (Bi(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
- } } }), r = n.validator;
- return Dg(r) && (n.validator = GN(r, n)), n;
- }
- function Fl(t, e) {
- var n = vo(t, e);
- return Object.defineProperty(n, "validate", { value: function(r) {
- return Dg(this.validator) && Bi(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
- ` + JSON.stringify(this)), this.validator = GN(r, this), this;
- } });
- }
- function g7(t, e, n) {
- var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
- i[f] = Object.getOwnPropertyDescriptor(r, f);
- }), Object.defineProperties({}, i));
- if (a._vueTypes_name = t, !zh(n)) return a;
- var o, s, l = n.validator, u = Tre(n, ["validator"]);
- if (Dg(l)) {
- var c = a.validator;
- c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = GN(c ? function(f) {
- return c.call(this, f) && l.call(this, f);
- } : l, a);
- }
- return Object.assign(a, u);
- }
- function P2(t) {
- return t.replace(/^(?!\s*$)/gm, " ");
- }
- var t4e = function() {
- return Fl("any", {});
- }, n4e = function() {
- return Fl("function", { type: Function });
- }, r4e = function() {
- return Fl("boolean", { type: Boolean });
- }, i4e = function() {
- return Fl("string", { type: String });
- }, a4e = function() {
- return Fl("number", { type: Number });
- }, o4e = function() {
- return Fl("array", { type: Array });
- }, s4e = function() {
- return Fl("object", { type: Object });
- }, l4e = function() {
- return vo("integer", { type: Number, validator: function(t) {
- return e4e(t);
- } });
- }, u4e = function() {
- return vo("symbol", { validator: function(t) {
- return typeof t == "symbol";
- } });
- };
- function c4e(t, e) {
- if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
- return vo(t.name || "<<anonymous function>>", { validator: function(n) {
- var r = t(n);
- return r || Bi(this._vueTypes_name + " - " + e), r;
- } });
- }
- function f4e(t) {
- if (!Ig(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
- var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
- if (i != null) {
- var a = i.constructor;
- r.indexOf(a) === -1 && r.push(a);
- }
- return r;
- }, []);
- return vo("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
- var i = t.indexOf(r) !== -1;
- return i || Bi(e), i;
- } });
- }
- function d4e(t) {
- if (!Ig(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
- for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
- var i = t[r];
- if (Mre(i)) {
- if (Jw(i) && i._vueTypes_name === "oneOf") {
- n = n.concat(i.type);
- continue;
- }
- if (Dg(i.validator) && (e = !0), i.type !== !0 && i.type) {
- n = n.concat(i.type);
- continue;
- }
- }
- n.push(i);
- }
- return n = n.filter(function(a, o) {
- return n.indexOf(a) === o;
- }), vo("oneOfType", e ? { type: n, validator: function(a) {
- var o = [], s = t.some(function(l) {
- var u = up(Jw(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
- return typeof u == "string" && o.push(u), u === !0;
- });
- return s || Bi("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
- ` + P2(o.join(`
- `))), s;
- } } : { type: n });
- }
- function h4e(t) {
- return vo("arrayOf", { type: Array, validator: function(e) {
- var n, r = e.every(function(i) {
- return (n = up(t, i, !0)) === !0;
- });
- return r || Bi(`arrayOf - value validation error:
- ` + P2(n)), r;
- } });
- }
- function p4e(t) {
- return vo("instanceOf", { type: t });
- }
- function v4e(t) {
- return vo("objectOf", { type: Object, validator: function(e) {
- var n, r = Object.keys(e).every(function(i) {
- return (n = up(t, e[i], !0)) === !0;
- });
- return r || Bi(`objectOf - value validation error:
- ` + P2(n)), r;
- } });
- }
- function g4e(t) {
- var e = Object.keys(t), n = e.filter(function(i) {
- var a;
- return !!(!((a = t[i]) === null || a === void 0) && a.required);
- }), r = vo("shape", { type: Object, validator: function(i) {
- var a = this;
- if (!zh(i)) return !1;
- var o = Object.keys(i);
- if (n.length > 0 && n.some(function(l) {
- return o.indexOf(l) === -1;
- })) {
- var s = n.filter(function(l) {
- return o.indexOf(l) === -1;
- });
- return Bi(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
- }
- return o.every(function(l) {
- if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (Bi('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
- var u = up(t[l], i[l], !0);
- return typeof u == "string" && Bi('shape - "' + l + `" property validation error:
- ` + P2(u)), u === !0;
- });
- } });
- return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
- return this._vueTypes_isLoose = !0, this;
- } }), r;
- }
- var vl = function() {
- function t() {
- }
- return t.extend = function(e) {
- var n = this;
- if (Ig(e)) return e.forEach(function(f) {
- return n.extend(f);
- }), this;
- var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Tre(e, ["name", "validate", "getter"]);
- if (Db(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
- var u, c = l.type;
- return Jw(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
- return g7(r, c, l);
- } } : { value: function() {
- var f, d = g7(r, c, l);
- return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
- } })) : (u = s ? { get: function() {
- var f = Object.assign({}, l);
- return a ? Fl(r, f) : vo(r, f);
- }, enumerable: !0 } : { value: function() {
- var f, d, h = Object.assign({}, l);
- return f = a ? Fl(r, h) : vo(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
- }, enumerable: !0 }, Object.defineProperty(this, r, u));
- }, wre(t, null, [{ key: "any", get: function() {
- return t4e();
- } }, { key: "func", get: function() {
- return n4e().def(this.defaults.func);
- } }, { key: "bool", get: function() {
- return r4e().def(this.defaults.bool);
- } }, { key: "string", get: function() {
- return i4e().def(this.defaults.string);
- } }, { key: "number", get: function() {
- return a4e().def(this.defaults.number);
- } }, { key: "array", get: function() {
- return o4e().def(this.defaults.array);
- } }, { key: "object", get: function() {
- return s4e().def(this.defaults.object);
- } }, { key: "integer", get: function() {
- return l4e().def(this.defaults.integer);
- } }, { key: "symbol", get: function() {
- return u4e();
- } }]), t;
- }();
- function Ire(t) {
- var e;
- return t === void 0 && (t = { func: function() {
- }, bool: !0, string: "", number: 0, array: function() {
- return [];
- }, object: function() {
- return {};
- }, integer: 0 }), (e = function(n) {
- function r() {
- return n.apply(this, arguments) || this;
- }
- return Cre(r, n), wre(r, null, [{ key: "sensibleDefaults", get: function() {
- return Ux({}, this.defaults);
- }, set: function(i) {
- this.defaults = i !== !1 ? Ux({}, i !== !0 ? i : t) : {};
- } }]), r;
- }(vl)).defaults = Ux({}, t), e;
- }
- vl.defaults = {}, vl.custom = c4e, vl.oneOf = f4e, vl.instanceOf = p4e, vl.oneOfType = d4e, vl.arrayOf = h4e, vl.objectOf = v4e, vl.shape = g4e, vl.utils = { validate: function(t, e) {
- return up(e, t, !0) === !0;
- }, toType: function(t, e, n) {
- return n === void 0 && (n = !1), n ? Fl(t, e) : vo(t, e);
- } };
- (function(t) {
- function e() {
- return t.apply(this, arguments) || this;
- }
- return Cre(e, t), e;
- })(Ire());
- const oe = Ire({
- func: void 0,
- bool: void 0,
- string: void 0,
- number: void 0,
- array: void 0,
- object: void 0,
- integer: void 0
- });
- oe.extend([{
- name: "looseBool",
- getter: !0,
- type: Boolean,
- default: void 0
- }, {
- name: "style",
- getter: !0,
- type: [String, Object],
- default: void 0
- }, {
- name: "VueNode",
- getter: !0,
- type: null
- }]);
- function m4e(t) {
- return t.default = void 0, t;
- }
- const lo = (t, e, n) => {
- Lo(t, `[ant-design-vue: ${e}] ${n}`);
- };
- function m7(t, e) {
- const {
- key: n
- } = t;
- let r;
- return "value" in t && ({
- value: r
- } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
- }
- function Dre(t, e) {
- const {
- label: n,
- value: r,
- options: i
- } = t || {};
- return {
- label: n || (e ? "children" : "label"),
- value: r || "value",
- options: i || "options"
- };
- }
- function y4e(t) {
- let {
- fieldNames: e,
- childrenAsData: n
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- const r = [], {
- label: i,
- value: a,
- options: o
- } = Dre(e, !1);
- function s(l, u) {
- l.forEach((c) => {
- const f = c[i];
- if (u || !(o in c)) {
- const d = c[a];
- r.push({
- key: m7(c, r.length),
- groupOption: u,
- data: c,
- label: f,
- value: d
- });
- } else {
- let d = f;
- d === void 0 && n && (d = c.label), r.push({
- key: m7(c, r.length),
- group: !0,
- data: c,
- label: d
- }), s(c[o], !0);
- }
- });
- }
- return s(t, !1), r;
- }
- function SR(t) {
- const e = k({}, t);
- return "props" in e || Object.defineProperty(e, "props", {
- get() {
- return Nh(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
- }
- }), e;
- }
- function b4e(t, e) {
- if (!e || !e.length)
- return null;
- let n = !1;
- function r(a, o) {
- let [s, ...l] = o;
- if (!s)
- return [a];
- const u = a.split(s);
- return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
- }
- const i = r(t, e);
- return n ? i : null;
- }
- function _4e() {
- return "";
- }
- function O4e(t) {
- return t ? t.ownerDocument : window.document;
- }
- function Rre() {
- }
- const S4e = () => ({
- action: oe.oneOfType([oe.string, oe.arrayOf(oe.string)]).def([]),
- showAction: oe.any.def([]),
- hideAction: oe.any.def([]),
- getPopupClassNameFromAlign: oe.any.def(_4e),
- onPopupVisibleChange: Function,
- afterPopupVisibleChange: oe.func.def(Rre),
- popup: oe.any,
- arrow: oe.bool.def(!0),
- popupStyle: {
- type: Object,
- default: void 0
- },
- prefixCls: oe.string.def("rc-trigger-popup"),
- popupClassName: oe.string.def(""),
- popupPlacement: String,
- builtinPlacements: oe.object,
- popupTransitionName: String,
- popupAnimation: oe.any,
- mouseEnterDelay: oe.number.def(0),
- mouseLeaveDelay: oe.number.def(0.1),
- zIndex: Number,
- focusDelay: oe.number.def(0),
- blurDelay: oe.number.def(0.15),
- getPopupContainer: Function,
- getDocument: oe.func.def(O4e),
- forceRender: {
- type: Boolean,
- default: void 0
- },
- destroyPopupOnHide: {
- type: Boolean,
- default: !1
- },
- mask: {
- type: Boolean,
- default: !1
- },
- maskClosable: {
- type: Boolean,
- default: !0
- },
- // onPopupAlign: PropTypes.func.def(noop),
- popupAlign: oe.object.def(() => ({})),
- popupVisible: {
- type: Boolean,
- default: void 0
- },
- defaultPopupVisible: {
- type: Boolean,
- default: !1
- },
- maskTransitionName: String,
- maskAnimation: String,
- stretch: String,
- alignPoint: {
- type: Boolean,
- default: void 0
- },
- autoDestroy: {
- type: Boolean,
- default: !1
- },
- mobile: Object,
- getTriggerDOMNode: Function
- }), jN = {
- visible: Boolean,
- prefixCls: String,
- zIndex: Number,
- destroyPopupOnHide: Boolean,
- forceRender: Boolean,
- arrow: {
- type: Boolean,
- default: !0
- },
- // Legacy Motion
- animation: [String, Object],
- transitionName: String,
- // Measure
- stretch: {
- type: String
- },
- // Align
- align: {
- type: Object
- },
- point: {
- type: Object
- },
- getRootDomNode: {
- type: Function
- },
- getClassNameFromAlign: {
- type: Function
- },
- onAlign: {
- type: Function
- },
- onMouseenter: {
- type: Function
- },
- onMouseleave: {
- type: Function
- },
- onMousedown: {
- type: Function
- },
- onTouchstart: {
- type: Function
- }
- }, x4e = k(k({}, jN), {
- mobile: {
- type: Object
- }
- }), w4e = k(k({}, jN), {
- mask: Boolean,
- mobile: {
- type: Object
- },
- maskAnimation: String,
- maskTransitionName: String
- });
- function ZN(t) {
- let {
- prefixCls: e,
- animation: n,
- transitionName: r
- } = t;
- return n ? {
- name: `${e}-${n}`
- } : r ? {
- name: r
- } : {};
- }
- function kre(t) {
- const {
- prefixCls: e,
- visible: n,
- zIndex: r,
- mask: i,
- maskAnimation: a,
- maskTransitionName: o
- } = t;
- if (!i)
- return null;
- let s = {};
- return (o || a) && (s = ZN({
- prefixCls: e,
- transitionName: o,
- animation: a
- })), D(mo, te({
- appear: !0
- }, s), {
- default: () => [Sr(D("div", {
- style: {
- zIndex: r
- },
- class: `${e}-mask`
- }, null), [[dxe("if"), n]])]
- });
- }
- kre.displayName = "Mask";
- const C4e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "MobilePopupInner",
- inheritAttrs: !1,
- props: x4e,
- emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
- setup(t, e) {
- let {
- expose: n,
- slots: r
- } = e;
- const i = ee();
- return n({
- forceAlign: () => {
- },
- getElement: () => i.value
- }), () => {
- var a;
- const {
- zIndex: o,
- visible: s,
- prefixCls: l,
- mobile: {
- popupClassName: u,
- popupStyle: c,
- popupMotion: f = {},
- popupRender: d
- } = {}
- } = t, h = k({
- zIndex: o
- }, c);
- let p = qr((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
- p.length > 1 && (p = D("div", {
- class: `${l}-content`
- }, [p])), d && (p = d(p));
- const v = Re(l, u);
- return D(mo, te({
- ref: i
- }, f), {
- default: () => [s ? D("div", {
- class: v,
- style: h
- }, [p]) : null]
- });
- };
- }
- });
- var T4e = function(t, e, n, r) {
- function i(a) {
- return a instanceof n ? a : new n(function(o) {
- o(a);
- });
- }
- return new (n || (n = Promise))(function(a, o) {
- function s(c) {
- try {
- u(r.next(c));
- } catch (f) {
- o(f);
- }
- }
- function l(c) {
- try {
- u(r.throw(c));
- } catch (f) {
- o(f);
- }
- }
- function u(c) {
- c.done ? a(c.value) : i(c.value).then(s, l);
- }
- u((r = r.apply(t, e || [])).next());
- });
- };
- const y7 = ["measure", "align", null, "motion"], P4e = (t, e) => {
- const n = ve(null), r = ve(), i = ve(!1);
- function a(l) {
- i.value || (n.value = l);
- }
- function o() {
- en.cancel(r.value);
- }
- function s(l) {
- o(), r.value = en(() => {
- let u = n.value;
- switch (n.value) {
- case "align":
- u = "motion";
- break;
- case "motion":
- u = "stable";
- break;
- }
- a(u), l == null || l();
- });
- }
- return me(t, () => {
- a("measure");
- }, {
- immediate: !0,
- flush: "post"
- }), _t(() => {
- me(n, () => {
- switch (n.value) {
- case "measure":
- e();
- break;
- }
- n.value && (r.value = en(() => T4e(void 0, void 0, void 0, function* () {
- const l = y7.indexOf(n.value), u = y7[l + 1];
- u && l !== -1 && a(u);
- })));
- }, {
- immediate: !0,
- flush: "post"
- });
- }), Qt(() => {
- i.value = !0, o();
- }), [n, s];
- }, $4e = (t) => {
- const e = ve({
- width: 0,
- height: 0
- });
- function n(i) {
- e.value = {
- width: i.offsetWidth,
- height: i.offsetHeight
- };
- }
- return [V(() => {
- const i = {};
- if (t.value) {
- const {
- width: a,
- height: o
- } = e.value;
- t.value.indexOf("height") !== -1 && o ? i.height = `${o}px` : t.value.indexOf("minHeight") !== -1 && o && (i.minHeight = `${o}px`), t.value.indexOf("width") !== -1 && a ? i.width = `${a}px` : t.value.indexOf("minWidth") !== -1 && a && (i.minWidth = `${a}px`);
- }
- return i;
- }), n];
- };
- function b7(t, e) {
- var n = Object.keys(t);
- if (Object.getOwnPropertySymbols) {
- var r = Object.getOwnPropertySymbols(t);
- e && (r = r.filter(function(i) {
- return Object.getOwnPropertyDescriptor(t, i).enumerable;
- })), n.push.apply(n, r);
- }
- return n;
- }
- function _7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? arguments[e] : {};
- e % 2 ? b7(Object(n), !0).forEach(function(r) {
- A4e(t, r, n[r]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : b7(Object(n)).forEach(function(r) {
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
- });
- }
- return t;
- }
- function xR(t) {
- "@babel/helpers - typeof";
- return xR = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
- return typeof e;
- } : function(e) {
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
- }, xR(t);
- }
- function A4e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = n, t;
- }
- var _0, E4e = {
- Webkit: "-webkit-",
- Moz: "-moz-",
- // IE did it wrong again ...
- ms: "-ms-",
- O: "-o-"
- };
- function eC() {
- if (_0 !== void 0)
- return _0;
- _0 = "";
- var t = document.createElement("p").style, e = "Transform";
- for (var n in E4e)
- n + e in t && (_0 = n);
- return _0;
- }
- function Lre() {
- return eC() ? "".concat(eC(), "TransitionProperty") : "transitionProperty";
- }
- function $2() {
- return eC() ? "".concat(eC(), "Transform") : "transform";
- }
- function O7(t, e) {
- var n = Lre();
- n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
- }
- function tE(t, e) {
- var n = $2();
- n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
- }
- function M4e(t) {
- return t.style.transitionProperty || t.style[Lre()];
- }
- function I4e(t) {
- var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue($2());
- if (n && n !== "none") {
- var r = n.replace(/[^0-9\-.,]/g, "").split(",");
- return {
- x: parseFloat(r[12] || r[4], 0),
- y: parseFloat(r[13] || r[5], 0)
- };
- }
- return {
- x: 0,
- y: 0
- };
- }
- var D4e = /matrix\((.*)\)/, R4e = /matrix3d\((.*)\)/;
- function k4e(t, e) {
- var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue($2());
- if (r && r !== "none") {
- var i, a = r.match(D4e);
- if (a)
- a = a[1], i = a.split(",").map(function(s) {
- return parseFloat(s, 10);
- }), i[4] = e.x, i[5] = e.y, tE(t, "matrix(".concat(i.join(","), ")"));
- else {
- var o = r.match(R4e)[1];
- i = o.split(",").map(function(s) {
- return parseFloat(s, 10);
- }), i[12] = e.x, i[13] = e.y, tE(t, "matrix3d(".concat(i.join(","), ")"));
- }
- } else
- tE(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
- }
- var L4e = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, j_;
- function S7(t) {
- var e = t.style.display;
- t.style.display = "none", t.offsetHeight, t.style.display = e;
- }
- function Qv(t, e, n) {
- var r = n;
- if (xR(e) === "object") {
- for (var i in e)
- e.hasOwnProperty(i) && Qv(t, i, e[i]);
- return;
- }
- if (typeof r < "u") {
- typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
- return;
- }
- return j_(t, e);
- }
- function N4e(t) {
- var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
- return e = t.getBoundingClientRect(), n = Math.floor(e.left), r = Math.floor(e.top), n -= o.clientLeft || a.clientLeft || 0, r -= o.clientTop || a.clientTop || 0, {
- left: n,
- top: r
- };
- }
- function Nre(t, e) {
- var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
- if (typeof n != "number") {
- var i = t.document;
- n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
- }
- return n;
- }
- function Bre(t) {
- return Nre(t);
- }
- function zre(t) {
- return Nre(t, !0);
- }
- function Rb(t) {
- var e = N4e(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
- return e.left += Bre(r), e.top += zre(r), e;
- }
- function UN(t) {
- return t != null && t == t.window;
- }
- function Vre(t) {
- return UN(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
- }
- function B4e(t, e, n) {
- var r = n, i = "", a = Vre(t);
- return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
- }
- var z4e = new RegExp("^(".concat(L4e, ")(?!px)[a-z%]+$"), "i"), V4e = /^(top|right|bottom|left)$/, nE = "currentStyle", rE = "runtimeStyle", id = "left", F4e = "px";
- function W4e(t, e) {
- var n = t[nE] && t[nE][e];
- if (z4e.test(n) && !V4e.test(e)) {
- var r = t.style, i = r[id], a = t[rE][id];
- t[rE][id] = t[nE][id], r[id] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + F4e, r[id] = i, t[rE][id] = a;
- }
- return n === "" ? "auto" : n;
- }
- typeof window < "u" && (j_ = window.getComputedStyle ? B4e : W4e);
- function ZO(t, e) {
- return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
- }
- function x7(t) {
- if (t === "left")
- return "right";
- if (t === "right")
- return "left";
- if (t === "top")
- return "bottom";
- if (t === "bottom")
- return "top";
- }
- function w7(t, e, n) {
- Qv(t, "position") === "static" && (t.style.position = "relative");
- var r = -999, i = -999, a = ZO("left", n), o = ZO("top", n), s = x7(a), l = x7(o);
- a !== "left" && (r = 999), o !== "top" && (i = 999);
- var u = "", c = Rb(t);
- ("left" in e || "top" in e) && (u = M4e(t) || "", O7(t, "none")), "left" in e && (t.style[s] = "", t.style[a] = "".concat(r, "px")), "top" in e && (t.style[l] = "", t.style[o] = "".concat(i, "px")), S7(t);
- var f = Rb(t), d = {};
- for (var h in e)
- if (e.hasOwnProperty(h)) {
- var p = ZO(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
- p === h ? d[p] = v + g : d[p] = v - g;
- }
- Qv(t, d), S7(t), ("left" in e || "top" in e) && O7(t, u);
- var m = {};
- for (var y in e)
- if (e.hasOwnProperty(y)) {
- var _ = ZO(y, n), O = e[y] - c[y];
- y === _ ? m[_] = d[_] + O : m[_] = d[_] - O;
- }
- Qv(t, m);
- }
- function Q4e(t, e) {
- var n = Rb(t), r = I4e(t), i = {
- x: r.x,
- y: r.y
- };
- "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), k4e(t, i);
- }
- function H4e(t, e, n) {
- if (n.ignoreShake) {
- var r = Rb(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
- if (i === o && a === s)
- return;
- }
- n.useCssRight || n.useCssBottom ? w7(t, e, n) : n.useCssTransform && $2() in document.body.style ? Q4e(t, e) : w7(t, e, n);
- }
- function XN(t, e) {
- for (var n = 0; n < t.length; n++)
- e(t[n]);
- }
- function Fre(t) {
- return j_(t, "boxSizing") === "border-box";
- }
- var G4e = ["margin", "border", "padding"], wR = -1, j4e = 2, CR = 1, Z4e = 0;
- function U4e(t, e, n) {
- var r = {}, i = t.style, a;
- for (a in e)
- e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
- n.call(t);
- for (a in e)
- e.hasOwnProperty(a) && (i[a] = r[a]);
- }
- function fy(t, e, n) {
- var r = 0, i, a, o;
- for (a = 0; a < e.length; a++)
- if (i = e[a], i)
- for (o = 0; o < n.length; o++) {
- var s = void 0;
- i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(j_(t, s)) || 0;
- }
- return r;
- }
- var Pl = {
- getParent: function(e) {
- var n = e;
- do
- n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
- while (n && n.nodeType !== 1 && n.nodeType !== 9);
- return n;
- }
- };
- XN(["Width", "Height"], function(t) {
- Pl["doc".concat(t)] = function(e) {
- var n = e.document;
- return Math.max(
- // firefox chrome documentElement.scrollHeight< body.scrollHeight
- // ie standard mode : documentElement.scrollHeight> body.scrollHeight
- n.documentElement["scroll".concat(t)],
- // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
- n.body["scroll".concat(t)],
- Pl["viewport".concat(t)](n)
- );
- }, Pl["viewport".concat(t)] = function(e) {
- var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
- return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
- };
- });
- function C7(t, e, n) {
- var r = n;
- if (UN(t))
- return e === "width" ? Pl.viewportWidth(t) : Pl.viewportHeight(t);
- if (t.nodeType === 9)
- return e === "width" ? Pl.docWidth(t) : Pl.docHeight(t);
- var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = Fre(t), s = 0;
- (a == null || a <= 0) && (a = void 0, s = j_(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? CR : wR);
- var l = a !== void 0 || o, u = a || s;
- return r === wR ? l ? u - fy(t, ["border", "padding"], i) : s : l ? r === CR ? u : u + (r === j4e ? -fy(t, ["border"], i) : fy(t, ["margin"], i)) : s + fy(t, G4e.slice(r), i);
- }
- var X4e = {
- position: "absolute",
- visibility: "hidden",
- display: "block"
- };
- function T7() {
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
- e[n] = arguments[n];
- var r, i = e[0];
- return i.offsetWidth !== 0 ? r = C7.apply(void 0, e) : U4e(i, X4e, function() {
- r = C7.apply(void 0, e);
- }), r;
- }
- XN(["width", "height"], function(t) {
- var e = t.charAt(0).toUpperCase() + t.slice(1);
- Pl["outer".concat(e)] = function(r, i) {
- return r && T7(r, t, i ? Z4e : CR);
- };
- var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
- Pl[t] = function(r, i) {
- var a = i;
- if (a !== void 0) {
- if (r) {
- var o = Fre(r);
- return o && (a += fy(r, ["padding", "border"], n)), Qv(r, t, a);
- }
- return;
- }
- return r && T7(r, t, wR);
- };
- });
- function Wre(t, e) {
- for (var n in e)
- e.hasOwnProperty(n) && (t[n] = e[n]);
- return t;
- }
- var Nt = {
- getWindow: function(e) {
- if (e && e.document && e.setTimeout)
- return e;
- var n = e.ownerDocument || e;
- return n.defaultView || n.parentWindow;
- },
- getDocument: Vre,
- offset: function(e, n, r) {
- if (typeof n < "u")
- H4e(e, n, r || {});
- else
- return Rb(e);
- },
- isWindow: UN,
- each: XN,
- css: Qv,
- clone: function(e) {
- var n, r = {};
- for (n in e)
- e.hasOwnProperty(n) && (r[n] = e[n]);
- var i = e.overflow;
- if (i)
- for (n in e)
- e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
- return r;
- },
- mix: Wre,
- getWindowScrollLeft: function(e) {
- return Bre(e);
- },
- getWindowScrollTop: function(e) {
- return zre(e);
- },
- merge: function() {
- for (var e = {}, n = 0; n < arguments.length; n++)
- Nt.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
- return e;
- },
- viewportWidth: 0,
- viewportHeight: 0
- };
- Wre(Nt, Pl);
- var iE = Nt.getParent;
- function TR(t) {
- if (Nt.isWindow(t) || t.nodeType === 9)
- return null;
- var e = Nt.getDocument(t), n = e.body, r, i = Nt.css(t, "position"), a = i === "fixed" || i === "absolute";
- if (!a)
- return t.nodeName.toLowerCase() === "html" ? null : iE(t);
- for (r = iE(t); r && r !== n && r.nodeType !== 9; r = iE(r))
- if (i = Nt.css(r, "position"), i !== "static")
- return r;
- return null;
- }
- var P7 = Nt.getParent;
- function Y4e(t) {
- if (Nt.isWindow(t) || t.nodeType === 9)
- return !1;
- var e = Nt.getDocument(t), n = e.body, r = null;
- for (
- r = P7(t);
- // 修复元素位于 document.documentElement 下导致崩溃问题
- r && r !== n && r !== e;
- r = P7(r)
- ) {
- var i = Nt.css(r, "position");
- if (i === "fixed")
- return !0;
- }
- return !1;
- }
- function YN(t, e) {
- for (var n = {
- left: 0,
- right: 1 / 0,
- top: 0,
- bottom: 1 / 0
- }, r = TR(t), i = Nt.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
- if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
- // viewport. In some browsers, el.offsetParent may be
- // document.documentElement, so check for that too.
- r !== o && r !== s && Nt.css(r, "overflow") !== "visible") {
- var l = Nt.offset(r);
- l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
- n.right,
- // consider area without scrollBar
- l.left + r.clientWidth
- ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
- } else if (r === o || r === s)
- break;
- r = TR(r);
- }
- var u = null;
- if (!Nt.isWindow(t) && t.nodeType !== 9) {
- u = t.style.position;
- var c = Nt.css(t, "position");
- c === "absolute" && (t.style.position = "fixed");
- }
- var f = Nt.getWindowScrollLeft(a), d = Nt.getWindowScrollTop(a), h = Nt.viewportWidth(a), p = Nt.viewportHeight(a), v = s.scrollWidth, g = s.scrollHeight, m = window.getComputedStyle(o);
- if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Y4e(t))
- n.left = Math.max(n.left, f), n.top = Math.max(n.top, d), n.right = Math.min(n.right, f + h), n.bottom = Math.min(n.bottom, d + p);
- else {
- var y = Math.max(v, f + h);
- n.right = Math.min(n.right, y);
- var _ = Math.max(g, d + p);
- n.bottom = Math.min(n.bottom, _);
- }
- return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
- }
- function q4e(t, e, n, r) {
- var i = Nt.clone(t), a = {
- width: e.width,
- height: e.height
- };
- return r.adjustX && i.left < n.left && (i.left = n.left), r.resizeWidth && i.left >= n.left && i.left + a.width > n.right && (a.width -= i.left + a.width - n.right), r.adjustX && i.left + a.width > n.right && (i.left = Math.max(n.right - a.width, n.left)), r.adjustY && i.top < n.top && (i.top = n.top), r.resizeHeight && i.top >= n.top && i.top + a.height > n.bottom && (a.height -= i.top + a.height - n.bottom), r.adjustY && i.top + a.height > n.bottom && (i.top = Math.max(n.bottom - a.height, n.top)), Nt.mix(i, a);
- }
- function qN(t) {
- var e, n, r;
- if (!Nt.isWindow(t) && t.nodeType !== 9)
- e = Nt.offset(t), n = Nt.outerWidth(t), r = Nt.outerHeight(t);
- else {
- var i = Nt.getWindow(t);
- e = {
- left: Nt.getWindowScrollLeft(i),
- top: Nt.getWindowScrollTop(i)
- }, n = Nt.viewportWidth(i), r = Nt.viewportHeight(i);
- }
- return e.width = n, e.height = r, e;
- }
- function $7(t, e) {
- var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
- return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
- left: o,
- top: s
- };
- }
- function UO(t, e, n, r, i) {
- var a = $7(e, n[1]), o = $7(t, n[0]), s = [o.left - a.left, o.top - a.top];
- return {
- left: Math.round(t.left - s[0] + r[0] - i[0]),
- top: Math.round(t.top - s[1] + r[1] - i[1])
- };
- }
- function A7(t, e, n) {
- return t.left < n.left || t.left + e.width > n.right;
- }
- function E7(t, e, n) {
- return t.top < n.top || t.top + e.height > n.bottom;
- }
- function K4e(t, e, n) {
- return t.left > n.right || t.left + e.width < n.left;
- }
- function J4e(t, e, n) {
- return t.top > n.bottom || t.top + e.height < n.top;
- }
- function XO(t, e, n) {
- var r = [];
- return Nt.each(t, function(i) {
- r.push(i.replace(e, function(a) {
- return n[a];
- }));
- }), r;
- }
- function YO(t, e) {
- return t[e] = -t[e], t;
- }
- function M7(t, e) {
- var n;
- return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
- }
- function I7(t, e) {
- t[0] = M7(t[0], e.width), t[1] = M7(t[1], e.height);
- }
- function Qre(t, e, n, r) {
- var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
- a = [].concat(a), o = [].concat(o), s = s || {};
- var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = YN(l, f), h = qN(l);
- I7(a, h), I7(o, e);
- var p = UO(h, e, i, a, o), v = Nt.merge(h, p);
- if (d && (s.adjustX || s.adjustY) && r) {
- if (s.adjustX && A7(p, h, d)) {
- var g = XO(i, /[lr]/gi, {
- l: "r",
- r: "l"
- }), m = YO(a, 0), y = YO(o, 0), _ = UO(h, e, g, m, y);
- K4e(_, h, d) || (c = 1, i = g, a = m, o = y);
- }
- if (s.adjustY && E7(p, h, d)) {
- var O = XO(i, /[tb]/gi, {
- t: "b",
- b: "t"
- }), S = YO(a, 1), x = YO(o, 1), C = UO(h, e, O, S, x);
- J4e(C, h, d) || (c = 1, i = O, a = S, o = x);
- }
- c && (p = UO(h, e, i, a, o), Nt.mix(v, p));
- var P = A7(p, h, d), $ = E7(p, h, d);
- if (P || $) {
- var T = i;
- P && (T = XO(i, /[lr]/gi, {
- l: "r",
- r: "l"
- })), $ && (T = XO(i, /[tb]/gi, {
- t: "b",
- b: "t"
- })), i = T, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
- }
- u.adjustX = s.adjustX && P, u.adjustY = s.adjustY && $, (u.adjustX || u.adjustY) && (v = q4e(p, h, d, u));
- }
- return v.width !== h.width && Nt.css(l, "width", Nt.width(l) + v.width - h.width), v.height !== h.height && Nt.css(l, "height", Nt.height(l) + v.height - h.height), Nt.offset(l, {
- left: v.left,
- top: v.top
- }, {
- useCssRight: n.useCssRight,
- useCssBottom: n.useCssBottom,
- useCssTransform: n.useCssTransform,
- ignoreShake: n.ignoreShake
- }), {
- points: i,
- offset: a,
- targetOffset: o,
- overflow: u
- };
- }
- function eNe(t, e) {
- var n = YN(t, e), r = qN(t);
- return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
- }
- function KN(t, e, n) {
- var r = n.target || e, i = qN(r), a = !eNe(r, n.overflow && n.overflow.alwaysByViewport);
- return Qre(t, i, n, a);
- }
- KN.__getOffsetParent = TR;
- KN.__getVisibleRectForElement = YN;
- function tNe(t, e, n) {
- var r, i, a = Nt.getDocument(t), o = a.defaultView || a.parentWindow, s = Nt.getWindowScrollLeft(o), l = Nt.getWindowScrollTop(o), u = Nt.viewportWidth(o), c = Nt.viewportHeight(o);
- "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
- var f = {
- left: r,
- top: i,
- width: 0,
- height: 0
- }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
- return Qre(t, f, _7(_7({}, n), {}, {
- points: h
- }), d);
- }
- function xr(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = t;
- if (Array.isArray(t) && (i = Zl(t)[0]), !i)
- return null;
- const a = ku(i, e, r);
- return a.props = n ? k(k({}, a.props), e) : a.props, aa(typeof a.props.class != "object", "class must be string"), a;
- }
- function nNe(t, e, n) {
- Ih(ku(t, k({}, e)), n);
- }
- const Hre = (t) => {
- if (!t)
- return !1;
- if (t.offsetParent)
- return !0;
- if (t.getBBox) {
- const e = t.getBBox();
- if (e.width || e.height)
- return !0;
- }
- if (t.getBoundingClientRect) {
- const e = t.getBoundingClientRect();
- if (e.width || e.height)
- return !0;
- }
- return !1;
- };
- function rNe(t, e) {
- return t === e ? !0 : !t || !e ? !1 : "pageX" in e && "pageY" in e ? t.pageX === e.pageX && t.pageY === e.pageY : "clientX" in e && "clientY" in e ? t.clientX === e.clientX && t.clientY === e.clientY : !1;
- }
- function iNe(t, e) {
- t !== document.activeElement && kc(e, t) && typeof t.focus == "function" && t.focus();
- }
- function D7(t, e) {
- let n = null, r = null;
- function i(o) {
- let [{
- target: s
- }] = o;
- if (!document.documentElement.contains(s)) return;
- const {
- width: l,
- height: u
- } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
- (n !== c || r !== f) && Promise.resolve().then(() => {
- e({
- width: c,
- height: f
- });
- }), n = c, r = f;
- }
- const a = new Ene(i);
- return t && a.observe(t), () => {
- a.disconnect();
- };
- }
- const aNe = (t, e) => {
- let n = !1, r = null;
- function i() {
- clearTimeout(r);
- }
- function a(o) {
- if (!n || o === !0) {
- if (t() === !1)
- return;
- n = !0, i(), r = setTimeout(() => {
- n = !1;
- }, e.value);
- } else
- i(), r = setTimeout(() => {
- n = !1, a();
- }, e.value);
- }
- return [a, () => {
- n = !1, i();
- }];
- }, oNe = {
- align: Object,
- target: [Object, Function],
- onAlign: Function,
- monitorBufferTime: Number,
- monitorWindowResize: Boolean,
- disabled: Boolean
- };
- function R7(t) {
- return typeof t != "function" ? null : t();
- }
- function k7(t) {
- return typeof t != "object" || !t ? null : t;
- }
- const sNe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Align",
- props: oNe,
- emits: ["align"],
- setup(t, e) {
- let {
- expose: n,
- slots: r
- } = e;
- const i = ee({}), a = ee(), [o, s] = aNe(() => {
- const {
- disabled: d,
- target: h,
- align: p,
- onAlign: v
- } = t;
- if (!d && h && a.value) {
- const g = a.value;
- let m;
- const y = R7(h), _ = k7(h);
- i.value.element = y, i.value.point = _, i.value.align = p;
- const {
- activeElement: O
- } = document;
- return y && Hre(y) ? m = KN(g, y, p) : _ && (m = tNe(g, _, p)), iNe(O, g), v && m && v(g, m), !0;
- }
- return !1;
- }, V(() => t.monitorBufferTime)), l = ee({
- cancel: () => {
- }
- }), u = ee({
- cancel: () => {
- }
- }), c = () => {
- const d = t.target, h = R7(d), p = k7(d);
- a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = D7(a.value, o)), (i.value.element !== h || !rNe(i.value.point, p) || !z_(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = D7(h, o)));
- };
- _t(() => {
- Bt(() => {
- c();
- });
- }), rp(() => {
- Bt(() => {
- c();
- });
- }), me(() => t.disabled, (d) => {
- d ? s() : o();
- }, {
- immediate: !0,
- flush: "post"
- });
- const f = ee(null);
- return me(() => t.monitorWindowResize, (d) => {
- d ? f.value || (f.value = yi(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
- }, {
- flush: "post"
- }), qu(() => {
- l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
- }), n({
- forceAlign: () => o(!0)
- }), () => {
- const d = r == null ? void 0 : r.default();
- return d ? xr(d[0], {
- ref: a
- }, !0, !0) : null;
- };
- }
- });
- pf("bottomLeft", "bottomRight", "topLeft", "topRight");
- const lNe = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", Z_ = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- return k(t ? {
- name: t,
- appear: !0,
- // type: 'animation',
- // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
- // appearActiveClass: `antdv-base-transtion`,
- // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
- enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
- enterActiveClass: `${t}-enter ${t}-enter-prepare`,
- enterToClass: `${t}-enter ${t}-enter-active`,
- leaveFromClass: ` ${t}-leave`,
- leaveActiveClass: `${t}-leave ${t}-leave-active`,
- leaveToClass: `${t}-leave ${t}-leave-active`
- } : {
- css: !1
- }, e);
- }, JN = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- return k(t ? {
- name: t,
- appear: !0,
- // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
- appearActiveClass: `${t}`,
- appearToClass: `${t}-appear ${t}-appear-active`,
- enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
- enterActiveClass: `${t}`,
- enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
- leaveActiveClass: `${t} ${t}-leave`,
- leaveToClass: `${t}-leave-active`
- } : {
- css: !1
- }, e);
- }, Wl = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, uNe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "PopupInner",
- inheritAttrs: !1,
- props: jN,
- emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
- setup(t, e) {
- let {
- expose: n,
- attrs: r,
- slots: i
- } = e;
- const a = ve(), o = ve(), s = ve(), [l, u] = $4e(Lr(t, "stretch")), c = () => {
- t.stretch && u(t.getRootDomNode());
- }, f = ve(!1);
- let d;
- me(() => t.visible, (x) => {
- clearTimeout(d), x ? d = setTimeout(() => {
- f.value = t.visible;
- }) : f.value = !1;
- }, {
- immediate: !0
- });
- const [h, p] = P4e(f, c), v = ve(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
- var x;
- (x = a.value) === null || x === void 0 || x.forceAlign();
- }, y = (x, C) => {
- var P;
- const $ = t.getClassNameFromAlign(C), T = s.value;
- s.value !== $ && (s.value = $), h.value === "align" && (T !== $ ? Promise.resolve().then(() => {
- m();
- }) : p(() => {
- var E;
- (E = v.value) === null || E === void 0 || E.call(v);
- }), (P = t.onAlign) === null || P === void 0 || P.call(t, x, C));
- }, _ = V(() => {
- const x = typeof t.animation == "object" ? t.animation : ZN(t);
- return ["onAfterEnter", "onAfterLeave"].forEach((C) => {
- const P = x[C];
- x[C] = ($) => {
- p(), h.value = "stable", P == null || P($);
- };
- }), x;
- }), O = () => new Promise((x) => {
- v.value = x;
- });
- me([_, h], () => {
- !_.value && h.value === "motion" && p();
- }, {
- immediate: !0
- }), n({
- forceAlign: m,
- getElement: () => o.value.$el || o.value
- });
- const S = V(() => {
- var x;
- return !(!((x = t.align) === null || x === void 0) && x.points && (h.value === "align" || h.value === "stable"));
- });
- return () => {
- var x;
- const {
- zIndex: C,
- align: P,
- prefixCls: $,
- destroyPopupOnHide: T,
- onMouseenter: E,
- onMouseleave: M,
- onTouchstart: R = () => {
- },
- onMousedown: N
- } = t, I = h.value, B = [k(k({}, l.value), {
- zIndex: C,
- opacity: I === "motion" || I === "stable" || !f.value ? null : 0,
- // pointerEvents: statusValue === 'stable' ? null : 'none',
- pointerEvents: !f.value && I !== "stable" ? "none" : null
- }), r.style];
- let Q = qr((x = i.default) === null || x === void 0 ? void 0 : x.call(i, {
- visible: t.visible
- }));
- Q.length > 1 && (Q = D("div", {
- class: `${$}-content`
- }, [Q]));
- const W = Re($, r.class, s.value, !t.arrow && `${$}-arrow-hidden`), U = f.value || !t.visible ? Z_(_.value.name, _.value) : {};
- return D(mo, te(te({
- ref: o
- }, U), {}, {
- onBeforeEnter: O
- }), {
- default: () => !T || t.visible ? Sr(D(sNe, {
- target: g(),
- key: "popup",
- ref: a,
- monitorWindowResize: !0,
- disabled: S.value,
- align: P,
- onAlign: y
- }, {
- default: () => D("div", {
- class: W,
- onMouseenter: E,
- onMouseleave: M,
- onMousedown: ai(N, ["capture"]),
- [mi ? "onTouchstartPassive" : "onTouchstart"]: ai(R, ["capture"]),
- style: B
- }, [Q])
- }), [[ho, f.value]]) : null
- });
- };
- }
- }), cNe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Popup",
- inheritAttrs: !1,
- props: w4e,
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- expose: i
- } = e;
- const a = ve(!1), o = ve(!1), s = ve(), l = ve();
- return me([() => t.visible, () => t.mobile], () => {
- a.value = t.visible, t.visible && t.mobile && (o.value = !0);
- }, {
- immediate: !0,
- flush: "post"
- }), i({
- forceAlign: () => {
- var u;
- (u = s.value) === null || u === void 0 || u.forceAlign();
- },
- getElement: () => {
- var u;
- return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
- }
- }), () => {
- const u = k(k(k({}, t), n), {
- visible: a.value
- }), c = o.value ? D(C4e, te(te({}, u), {}, {
- mobile: t.mobile,
- ref: s
- }), {
- default: r.default
- }) : D(uNe, te(te({}, u), {}, {
- ref: s
- }), {
- default: r.default
- });
- return D("div", {
- ref: l
- }, [D(kre, u, null), c]);
- };
- }
- });
- function fNe(t, e, n) {
- return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
- }
- function L7(t, e, n) {
- const r = t[e] || {};
- return k(k({}, r), n);
- }
- function dNe(t, e, n, r) {
- const {
- points: i
- } = n, a = Object.keys(t);
- for (let o = 0; o < a.length; o += 1) {
- const s = a[o];
- if (fNe(t[s].points, i, r))
- return `${e}-placement-${s}`;
- }
- return "";
- }
- const A2 = {
- methods: {
- setState() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0, n = typeof t == "function" ? t(this.$data, this.$props) : t;
- if (this.getDerivedStateFromProps) {
- const r = this.getDerivedStateFromProps(oke(this), k(k({}, this.$data), n));
- if (r === null)
- return;
- n = k(k({}, n), r || {});
- }
- k(this.$data, n), this._.isMounted && this.$forceUpdate(), Bt(() => {
- e && e();
- });
- },
- __emit() {
- const t = [].slice.call(arguments, 0);
- let e = t[0];
- e = `on${e[0].toUpperCase()}${e.substring(1)}`;
- const n = this.$props[e] || this.$attrs[e];
- if (t.length && n)
- if (Array.isArray(n))
- for (let r = 0, i = n.length; r < i; r++)
- n[r](...t.slice(1));
- else
- n(...t.slice(1));
- }
- }
- }, Gre = Symbol("PortalContextKey"), e8 = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
- inTriggerContext: !0
- };
- Et(Gre, {
- inTriggerContext: e.inTriggerContext,
- shouldRender: V(() => {
- const {
- sPopupVisible: n,
- popupRef: r,
- forceRender: i,
- autoDestroy: a
- } = t || {};
- let o = !1;
- return (n || r || i) && (o = !0), !n && a && (o = !1), o;
- })
- });
- }, hNe = () => {
- e8({}, {
- inTriggerContext: !1
- });
- const t = et(Gre, {
- shouldRender: V(() => !1),
- inTriggerContext: !1
- });
- return {
- shouldRender: V(() => t.shouldRender.value || t.inTriggerContext === !1)
- };
- }, jre = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Portal",
- inheritAttrs: !1,
- props: {
- getContainer: oe.func.isRequired,
- didUpdate: Function
- },
- setup(t, e) {
- let {
- slots: n
- } = e, r = !0, i;
- const {
- shouldRender: a
- } = hNe();
- function o() {
- a.value && (i = t.getContainer());
- }
- $ee(() => {
- r = !1, o();
- }), _t(() => {
- i || o();
- });
- const s = me(a, () => {
- a.value && !i && (i = t.getContainer()), i && s();
- });
- return rp(() => {
- Bt(() => {
- var l;
- a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
- });
- }), () => {
- var l;
- return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? D(R_, {
- to: i
- }, n) : null : null;
- };
- }
- });
- let aE;
- function pNe(t) {
- if (typeof document > "u")
- return 0;
- if (aE === void 0) {
- const e = document.createElement("div");
- e.style.width = "100%", e.style.height = "200px";
- const n = document.createElement("div"), r = n.style;
- r.position = "absolute", r.top = "0", r.left = "0", r.pointerEvents = "none", r.visibility = "hidden", r.width = "200px", r.height = "150px", r.overflow = "hidden", n.appendChild(e), document.body.appendChild(n);
- const i = e.offsetWidth;
- n.style.overflow = "scroll";
- let a = e.offsetWidth;
- i === a && (a = n.clientWidth), document.body.removeChild(n), aE = i - a;
- }
- return aE;
- }
- const vNe = `vc-util-locker-${Date.now()}`;
- let N7 = 0;
- function gNe() {
- return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
- }
- function mNe(t) {
- const e = V(() => !!t && !!t.value);
- N7 += 1;
- const n = `${vNe}_${N7}`;
- Vt((r) => {
- if (is()) {
- if (e.value) {
- const i = pNe(), a = gNe();
- Eb(`
- html body {
- overflow-y: hidden;
- ${a ? `width: calc(100% - ${i}px);` : ""}
- }`, n);
- } else
- Xw(n);
- r(() => {
- Xw(n);
- });
- }
- }, {
- flush: "post"
- });
- }
- let ad = 0;
- const Xx = is(), B7 = (t) => {
- if (!Xx)
- return null;
- if (t) {
- if (typeof t == "string")
- return document.querySelectorAll(t)[0];
- if (typeof t == "function")
- return t();
- if (typeof t == "object" && t instanceof window.HTMLElement)
- return t;
- }
- return document.body;
- }, Zre = ae({
- compatConfig: {
- MODE: 3
- },
- name: "PortalWrapper",
- inheritAttrs: !1,
- props: {
- wrapperClassName: String,
- forceRender: {
- type: Boolean,
- default: void 0
- },
- getContainer: oe.any,
- visible: {
- type: Boolean,
- default: void 0
- },
- autoLock: Tt(),
- didUpdate: Function
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = ve(), i = ve(), a = ve(), o = ve(1), s = is() && document.createElement("div"), l = () => {
- var h, p;
- r.value === s && ((p = (h = r.value) === null || h === void 0 ? void 0 : h.parentNode) === null || p === void 0 || p.removeChild(r.value)), r.value = null;
- };
- let u = null;
- const c = function() {
- return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = B7(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
- }, f = () => Xx ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
- const {
- wrapperClassName: h
- } = t;
- r.value && h && h !== r.value.className && (r.value.className = h);
- };
- return rp(() => {
- d(), c();
- }), mNe(V(() => t.autoLock && t.visible && is() && (r.value === document.body || r.value === s))), _t(() => {
- let h = !1;
- me([() => t.visible, () => t.getContainer], (p, v) => {
- let [g, m] = p, [y, _] = v;
- Xx && (u = B7(t.getContainer), u === document.body && (g && !y ? ad += 1 : h && (ad -= 1))), h && (typeof m == "function" && typeof _ == "function" ? m.toString() !== _.toString() : m !== _) && l(), h = !0;
- }, {
- immediate: !0,
- flush: "post"
- }), Bt(() => {
- c() || (a.value = en(() => {
- o.value += 1;
- }));
- });
- }), Qt(() => {
- const {
- visible: h
- } = t;
- Xx && u === document.body && (ad = h && ad ? ad - 1 : ad), l(), en.cancel(a.value);
- }), () => {
- const {
- forceRender: h,
- visible: p
- } = t;
- let v = null;
- const g = {
- getOpenCount: () => ad,
- getContainer: f
- };
- return o.value && (h || p || i.value) && (v = D(jre, {
- getContainer: f,
- ref: i,
- didUpdate: t.didUpdate
- }, {
- default: () => {
- var m;
- return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
- }
- })), v;
- };
- }
- }), yNe = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], E2 = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Trigger",
- mixins: [A2],
- inheritAttrs: !1,
- props: S4e(),
- setup(t) {
- const e = V(() => {
- const {
- popupPlacement: i,
- popupAlign: a,
- builtinPlacements: o
- } = t;
- return i && o ? L7(o, i, a) : a;
- }), n = ve(null), r = (i) => {
- n.value = i;
- };
- return {
- vcTriggerContext: et("vcTriggerContext", {}),
- popupRef: n,
- setPopupRef: r,
- triggerRef: ve(null),
- align: e,
- focusTime: null,
- clickOutsideHandler: null,
- contextmenuOutsideHandler1: null,
- contextmenuOutsideHandler2: null,
- touchOutsideHandler: null,
- attachId: null,
- delayTimer: null,
- hasPopupMouseDown: !1,
- preClickTime: null,
- preTouchTime: null,
- mouseDownTimeout: null,
- childOriginEvents: {}
- };
- },
- data() {
- const t = this.$props;
- let e;
- return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, yNe.forEach((n) => {
- this[`fire${n}`] = (r) => {
- this.fireEvents(n, r);
- };
- }), {
- prevPopupVisible: e,
- sPopupVisible: e,
- point: null
- };
- },
- watch: {
- popupVisible(t) {
- t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
- }
- },
- created() {
- Et("vcTriggerContext", {
- onPopupMouseDown: this.onPopupMouseDown,
- onPopupMouseenter: this.onPopupMouseenter,
- onPopupMouseleave: this.onPopupMouseleave
- }), e8(this);
- },
- deactivated() {
- this.setPopupVisible(!1);
- },
- mounted() {
- this.$nextTick(() => {
- this.updatedCal();
- });
- },
- updated() {
- this.$nextTick(() => {
- this.updatedCal();
- });
- },
- beforeUnmount() {
- this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), en.cancel(this.attachId);
- },
- methods: {
- updatedCal() {
- const t = this.$props;
- if (this.$data.sPopupVisible) {
- let n;
- !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = t.getDocument(this.getRootDomNode()), this.clickOutsideHandler = yi(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || t.getDocument(this.getRootDomNode()), this.touchOutsideHandler = yi(n, "touchstart", this.onDocumentClick, mi ? {
- passive: !1
- } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || t.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = yi(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = yi(window, "blur", this.onContextmenuClose));
- } else
- this.clearOutsideHandler();
- },
- onMouseenter(t) {
- const {
- mouseEnterDelay: e
- } = this.$props;
- this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
- },
- onMouseMove(t) {
- this.fireEvents("onMousemove", t), this.setPoint(t);
- },
- onMouseleave(t) {
- this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
- },
- onPopupMouseenter() {
- const {
- vcTriggerContext: t = {}
- } = this;
- t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
- },
- onPopupMouseleave(t) {
- var e;
- if (t && t.relatedTarget && !t.relatedTarget.setTimeout && kc((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
- return;
- this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
- const {
- vcTriggerContext: n = {}
- } = this;
- n.onPopupMouseleave && n.onPopupMouseleave(t);
- },
- onFocus(t) {
- this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
- },
- onMousedown(t) {
- this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
- },
- onTouchstart(t) {
- this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
- },
- onBlur(t) {
- kc(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
- },
- onContextmenu(t) {
- t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
- },
- onContextmenuClose() {
- this.isContextmenuToShow() && this.close();
- },
- onClick(t) {
- if (this.fireEvents("onClick", t), this.focusTime) {
- let n;
- if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
- return;
- this.focusTime = 0;
- }
- this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
- const e = !this.$data.sPopupVisible;
- (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
- },
- onPopupMouseDown() {
- const {
- vcTriggerContext: t = {}
- } = this;
- this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
- this.hasPopupMouseDown = !1;
- }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
- },
- onDocumentClick(t) {
- if (this.$props.mask && !this.$props.maskClosable)
- return;
- const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
- // mousedown on the target should also close popup when action is contextMenu.
- // https://github.com/ant-design/ant-design/issues/29853
- (!kc(n, e) || this.isContextMenuOnly()) && !kc(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
- },
- getPopupDomNode() {
- var t;
- return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
- },
- getRootDomNode() {
- var t, e, n, r;
- const {
- getTriggerDOMNode: i
- } = this.$props;
- if (i) {
- const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : xu(this.triggerRef);
- return xu(i(a));
- }
- try {
- const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : xu(this.triggerRef);
- if (a)
- return a;
- } catch {
- }
- return xu(this);
- },
- handleGetPopupClassFromAlign(t) {
- const e = [], n = this.$props, {
- popupPlacement: r,
- builtinPlacements: i,
- prefixCls: a,
- alignPoint: o,
- getPopupClassNameFromAlign: s
- } = n;
- return r && i && e.push(dNe(i, a, t, o)), s && e.push(s(t)), e.join(" ");
- },
- getPopupAlign() {
- const t = this.$props, {
- popupPlacement: e,
- popupAlign: n,
- builtinPlacements: r
- } = t;
- return e && r ? L7(r, e, n) : n;
- },
- getComponent() {
- const t = {};
- this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[mi ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
- const {
- handleGetPopupClassFromAlign: e,
- getRootDomNode: n,
- $attrs: r
- } = this, {
- prefixCls: i,
- destroyPopupOnHide: a,
- popupClassName: o,
- popupAnimation: s,
- popupTransitionName: l,
- popupStyle: u,
- mask: c,
- maskAnimation: f,
- maskTransitionName: d,
- zIndex: h,
- stretch: p,
- alignPoint: v,
- mobile: g,
- arrow: m,
- forceRender: y
- } = this.$props, {
- sPopupVisible: _,
- point: O
- } = this.$data, S = k(k({
- prefixCls: i,
- arrow: m,
- destroyPopupOnHide: a,
- visible: _,
- point: v ? O : null,
- align: this.align,
- animation: s,
- getClassNameFromAlign: e,
- stretch: p,
- getRootDomNode: n,
- mask: c,
- zIndex: h,
- transitionName: l,
- maskAnimation: f,
- maskTransitionName: d,
- class: o,
- style: u,
- onAlign: r.onPopupAlign || Rre
- }, t), {
- ref: this.setPopupRef,
- mobile: g,
- forceRender: y
- });
- return D(cNe, S, {
- default: this.$slots.popup || (() => ske(this, "popup"))
- });
- },
- attachParent(t) {
- en.cancel(this.attachId);
- const {
- getPopupContainer: e,
- getDocument: n
- } = this.$props, r = this.getRootDomNode();
- let i;
- e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = en(() => {
- this.attachParent(t);
- });
- },
- getContainer() {
- const {
- $props: t
- } = this, {
- getDocument: e
- } = t, n = e(this.getRootDomNode()).createElement("div");
- return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
- },
- setPopupVisible(t, e) {
- const {
- alignPoint: n,
- sPopupVisible: r,
- onPopupVisibleChange: i
- } = this;
- this.clearDelayTimer(), r !== t && (Zw(this, "popupVisible") || this.setState({
- sPopupVisible: t,
- prevPopupVisible: r
- }), i && i(t)), n && e && t && this.setPoint(e);
- },
- setPoint(t) {
- const {
- alignPoint: e
- } = this.$props;
- !e || !t || this.setState({
- point: {
- pageX: t.pageX,
- pageY: t.pageY
- }
- });
- },
- handlePortalUpdate() {
- this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
- },
- delaySetPopupVisible(t, e, n) {
- const r = e * 1e3;
- if (this.clearDelayTimer(), r) {
- const i = n ? {
- pageX: n.pageX,
- pageY: n.pageY
- } : null;
- this.delayTimer = setTimeout(() => {
- this.setPopupVisible(t, i), this.clearDelayTimer();
- }, r);
- } else
- this.setPopupVisible(t, n);
- },
- clearDelayTimer() {
- this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
- },
- clearOutsideHandler() {
- this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
- },
- createTwoChains(t) {
- let e = () => {
- };
- const n = jW(this);
- return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
- },
- isClickToShow() {
- const {
- action: t,
- showAction: e
- } = this.$props;
- return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
- },
- isContextMenuOnly() {
- const {
- action: t
- } = this.$props;
- return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
- },
- isContextmenuToShow() {
- const {
- action: t,
- showAction: e
- } = this.$props;
- return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
- },
- isClickToHide() {
- const {
- action: t,
- hideAction: e
- } = this.$props;
- return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
- },
- isMouseEnterToShow() {
- const {
- action: t,
- showAction: e
- } = this.$props;
- return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
- },
- isMouseLeaveToHide() {
- const {
- action: t,
- hideAction: e
- } = this.$props;
- return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
- },
- isFocusToShow() {
- const {
- action: t,
- showAction: e
- } = this.$props;
- return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
- },
- isBlurToHide() {
- const {
- action: t,
- hideAction: e
- } = this.$props;
- return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
- },
- forcePopupAlign() {
- var t;
- this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
- },
- fireEvents(t, e) {
- this.childOriginEvents[t] && this.childOriginEvents[t](e);
- const n = this.$props[t] || this.$attrs[t];
- n && n(e);
- },
- close() {
- this.setPopupVisible(!1);
- }
- },
- render() {
- const {
- $attrs: t
- } = this, e = Zl(Ine(this)), {
- alignPoint: n,
- getPopupContainer: r
- } = this.$props, i = e[0];
- this.childOriginEvents = jW(i);
- const a = {
- key: "trigger"
- };
- this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[mi ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[mi ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (a.onMouseenter = this.onMouseenter, n && (a.onMousemove = this.onMouseMove)) : a.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? a.onMouseleave = this.onMouseleave : a.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (a.onFocus = this.onFocus, a.onBlur = this.onBlur) : (a.onFocus = this.createTwoChains("onFocus"), a.onBlur = (u) => {
- u && (!u.relatedTarget || !kc(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
- });
- const o = Re(i && i.props && i.props.class, t.class);
- o && (a.class = o);
- const s = xr(i, k(k({}, a), {
- ref: "triggerRef"
- }), !0, !0), l = D(Zre, {
- key: "portal",
- getContainer: r && (() => r(this.getRootDomNode())),
- didUpdate: this.handlePortalUpdate,
- visible: this.$data.sPopupVisible
- }, {
- default: this.getComponent
- });
- return D(Wt, null, [s, l]);
- }
- });
- var bNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const _Ne = (t) => {
- const e = t === !0 ? 0 : 1;
- return {
- bottomLeft: {
- points: ["tl", "bl"],
- offset: [0, 4],
- overflow: {
- adjustX: e,
- adjustY: 1
- }
- },
- bottomRight: {
- points: ["tr", "br"],
- offset: [0, 4],
- overflow: {
- adjustX: e,
- adjustY: 1
- }
- },
- topLeft: {
- points: ["bl", "tl"],
- offset: [0, -4],
- overflow: {
- adjustX: e,
- adjustY: 1
- }
- },
- topRight: {
- points: ["br", "tr"],
- offset: [0, -4],
- overflow: {
- adjustX: e,
- adjustY: 1
- }
- }
- };
- }, ONe = ae({
- name: "SelectTrigger",
- inheritAttrs: !1,
- props: {
- dropdownAlign: Object,
- visible: {
- type: Boolean,
- default: void 0
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- dropdownClassName: String,
- dropdownStyle: oe.object,
- placement: String,
- empty: {
- type: Boolean,
- default: void 0
- },
- prefixCls: String,
- popupClassName: String,
- animation: String,
- transitionName: String,
- getPopupContainer: Function,
- dropdownRender: Function,
- containerWidth: Number,
- dropdownMatchSelectWidth: oe.oneOfType([Number, Boolean]).def(!0),
- popupElement: oe.any,
- direction: String,
- getTriggerDOMNode: Function,
- onPopupVisibleChange: Function,
- onPopupMouseEnter: Function,
- onPopupFocusin: Function,
- onPopupFocusout: Function
- },
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i
- } = e;
- const a = V(() => {
- const {
- dropdownMatchSelectWidth: s
- } = t;
- return _Ne(s);
- }), o = ee();
- return i({
- getPopupElement: () => o.value
- }), () => {
- const s = k(k({}, t), r), {
- empty: l = !1
- } = s, u = bNe(s, ["empty"]), {
- visible: c,
- dropdownAlign: f,
- prefixCls: d,
- popupElement: h,
- dropdownClassName: p,
- dropdownStyle: v,
- direction: g = "ltr",
- placement: m,
- dropdownMatchSelectWidth: y,
- containerWidth: _,
- dropdownRender: O,
- animation: S,
- transitionName: x,
- getPopupContainer: C,
- getTriggerDOMNode: P,
- onPopupVisibleChange: $,
- onPopupMouseEnter: T,
- onPopupFocusin: E,
- onPopupFocusout: M
- } = u, R = `${d}-dropdown`;
- let N = h;
- O && (N = O({
- menuNode: h,
- props: t
- }));
- const I = S ? `${R}-${S}` : x, B = k({
- minWidth: `${_}px`
- }, v);
- return typeof y == "number" ? B.width = `${y}px` : y && (B.width = `${_}px`), D(E2, te(te({}, t), {}, {
- showAction: $ ? ["click"] : [],
- hideAction: $ ? ["click"] : [],
- popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
- builtinPlacements: a.value,
- prefixCls: R,
- popupTransitionName: I,
- popupAlign: f,
- popupVisible: c,
- getPopupContainer: C,
- popupClassName: Re(p, {
- [`${R}-empty`]: l
- }),
- popupStyle: B,
- getTriggerDOMNode: P,
- onPopupVisibleChange: $
- }), {
- default: n.default,
- popup: () => D("div", {
- ref: o,
- onMouseenter: T,
- onFocusin: E,
- onFocusout: M
- }, [N])
- });
- };
- }
- }), Me = {
- /**
- * MAC_ENTER
- */
- MAC_ENTER: 3,
- /**
- * BACKSPACE
- */
- BACKSPACE: 8,
- /**
- * TAB
- */
- TAB: 9,
- /**
- * NUMLOCK on FF/Safari Mac
- */
- NUM_CENTER: 12,
- /**
- * ENTER
- */
- ENTER: 13,
- /**
- * SHIFT
- */
- SHIFT: 16,
- /**
- * CTRL
- */
- CTRL: 17,
- /**
- * ALT
- */
- ALT: 18,
- /**
- * PAUSE
- */
- PAUSE: 19,
- /**
- * CAPS_LOCK
- */
- CAPS_LOCK: 20,
- /**
- * ESC
- */
- ESC: 27,
- /**
- * SPACE
- */
- SPACE: 32,
- /**
- * PAGE_UP
- */
- PAGE_UP: 33,
- /**
- * PAGE_DOWN
- */
- PAGE_DOWN: 34,
- /**
- * END
- */
- END: 35,
- /**
- * HOME
- */
- HOME: 36,
- /**
- * LEFT
- */
- LEFT: 37,
- /**
- * UP
- */
- UP: 38,
- /**
- * RIGHT
- */
- RIGHT: 39,
- /**
- * DOWN
- */
- DOWN: 40,
- /**
- * PRINT_SCREEN
- */
- PRINT_SCREEN: 44,
- /**
- * INSERT
- */
- INSERT: 45,
- /**
- * DELETE
- */
- DELETE: 46,
- /**
- * ZERO
- */
- ZERO: 48,
- /**
- * ONE
- */
- ONE: 49,
- /**
- * TWO
- */
- TWO: 50,
- /**
- * THREE
- */
- THREE: 51,
- /**
- * FOUR
- */
- FOUR: 52,
- /**
- * FIVE
- */
- FIVE: 53,
- /**
- * SIX
- */
- SIX: 54,
- /**
- * SEVEN
- */
- SEVEN: 55,
- /**
- * EIGHT
- */
- EIGHT: 56,
- /**
- * NINE
- */
- NINE: 57,
- /**
- * QUESTION_MARK
- */
- QUESTION_MARK: 63,
- /**
- * A
- */
- A: 65,
- /**
- * B
- */
- B: 66,
- /**
- * C
- */
- C: 67,
- /**
- * D
- */
- D: 68,
- /**
- * E
- */
- E: 69,
- /**
- * F
- */
- F: 70,
- /**
- * G
- */
- G: 71,
- /**
- * H
- */
- H: 72,
- /**
- * I
- */
- I: 73,
- /**
- * J
- */
- J: 74,
- /**
- * K
- */
- K: 75,
- /**
- * L
- */
- L: 76,
- /**
- * M
- */
- M: 77,
- /**
- * N
- */
- N: 78,
- /**
- * O
- */
- O: 79,
- /**
- * P
- */
- P: 80,
- /**
- * Q
- */
- Q: 81,
- /**
- * R
- */
- R: 82,
- /**
- * S
- */
- S: 83,
- /**
- * T
- */
- T: 84,
- /**
- * U
- */
- U: 85,
- /**
- * V
- */
- V: 86,
- /**
- * W
- */
- W: 87,
- /**
- * X
- */
- X: 88,
- /**
- * Y
- */
- Y: 89,
- /**
- * Z
- */
- Z: 90,
- /**
- * META
- */
- META: 91,
- /**
- * WIN_KEY_RIGHT
- */
- WIN_KEY_RIGHT: 92,
- /**
- * CONTEXT_MENU
- */
- CONTEXT_MENU: 93,
- /**
- * NUM_ZERO
- */
- NUM_ZERO: 96,
- /**
- * NUM_ONE
- */
- NUM_ONE: 97,
- /**
- * NUM_TWO
- */
- NUM_TWO: 98,
- /**
- * NUM_THREE
- */
- NUM_THREE: 99,
- /**
- * NUM_FOUR
- */
- NUM_FOUR: 100,
- /**
- * NUM_FIVE
- */
- NUM_FIVE: 101,
- /**
- * NUM_SIX
- */
- NUM_SIX: 102,
- /**
- * NUM_SEVEN
- */
- NUM_SEVEN: 103,
- /**
- * NUM_EIGHT
- */
- NUM_EIGHT: 104,
- /**
- * NUM_NINE
- */
- NUM_NINE: 105,
- /**
- * NUM_MULTIPLY
- */
- NUM_MULTIPLY: 106,
- /**
- * NUM_PLUS
- */
- NUM_PLUS: 107,
- /**
- * NUM_MINUS
- */
- NUM_MINUS: 109,
- /**
- * NUM_PERIOD
- */
- NUM_PERIOD: 110,
- /**
- * NUM_DIVISION
- */
- NUM_DIVISION: 111,
- /**
- * F1
- */
- F1: 112,
- /**
- * F2
- */
- F2: 113,
- /**
- * F3
- */
- F3: 114,
- /**
- * F4
- */
- F4: 115,
- /**
- * F5
- */
- F5: 116,
- /**
- * F6
- */
- F6: 117,
- /**
- * F7
- */
- F7: 118,
- /**
- * F8
- */
- F8: 119,
- /**
- * F9
- */
- F9: 120,
- /**
- * F10
- */
- F10: 121,
- /**
- * F11
- */
- F11: 122,
- /**
- * F12
- */
- F12: 123,
- /**
- * NUMLOCK
- */
- NUMLOCK: 144,
- /**
- * SEMICOLON
- */
- SEMICOLON: 186,
- /**
- * DASH
- */
- DASH: 189,
- /**
- * EQUALS
- */
- EQUALS: 187,
- /**
- * COMMA
- */
- COMMA: 188,
- /**
- * PERIOD
- */
- PERIOD: 190,
- /**
- * SLASH
- */
- SLASH: 191,
- /**
- * APOSTROPHE
- */
- APOSTROPHE: 192,
- /**
- * SINGLE_QUOTE
- */
- SINGLE_QUOTE: 222,
- /**
- * OPEN_SQUARE_BRACKET
- */
- OPEN_SQUARE_BRACKET: 219,
- /**
- * BACKSLASH
- */
- BACKSLASH: 220,
- /**
- * CLOSE_SQUARE_BRACKET
- */
- CLOSE_SQUARE_BRACKET: 221,
- /**
- * WIN_KEY
- */
- WIN_KEY: 224,
- /**
- * MAC_FF_META
- */
- MAC_FF_META: 224,
- /**
- * WIN_IME
- */
- WIN_IME: 229,
- // ======================== Function ========================
- /**
- * whether text and modified key is entered at the same time.
- */
- isTextModifyingKeyEvent: function(e) {
- const {
- keyCode: n
- } = e;
- if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
- n >= Me.F1 && n <= Me.F12)
- return !1;
- switch (n) {
- case Me.ALT:
- case Me.CAPS_LOCK:
- case Me.CONTEXT_MENU:
- case Me.CTRL:
- case Me.DOWN:
- case Me.END:
- case Me.ESC:
- case Me.HOME:
- case Me.INSERT:
- case Me.LEFT:
- case Me.MAC_FF_META:
- case Me.META:
- case Me.NUMLOCK:
- case Me.NUM_CENTER:
- case Me.PAGE_DOWN:
- case Me.PAGE_UP:
- case Me.PAUSE:
- case Me.PRINT_SCREEN:
- case Me.RIGHT:
- case Me.SHIFT:
- case Me.UP:
- case Me.WIN_KEY:
- case Me.WIN_KEY_RIGHT:
- return !1;
- default:
- return !0;
- }
- },
- /**
- * whether character is entered.
- */
- isCharacterKey: function(e) {
- if (e >= Me.ZERO && e <= Me.NINE || e >= Me.NUM_ZERO && e <= Me.NUM_MULTIPLY || e >= Me.A && e <= Me.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0)
- return !0;
- switch (e) {
- case Me.SPACE:
- case Me.QUESTION_MARK:
- case Me.NUM_PLUS:
- case Me.NUM_MINUS:
- case Me.NUM_PERIOD:
- case Me.NUM_DIVISION:
- case Me.SEMICOLON:
- case Me.DASH:
- case Me.EQUALS:
- case Me.COMMA:
- case Me.PERIOD:
- case Me.SLASH:
- case Me.APOSTROPHE:
- case Me.SINGLE_QUOTE:
- case Me.OPEN_SQUARE_BRACKET:
- case Me.BACKSLASH:
- case Me.CLOSE_SQUARE_BRACKET:
- return !0;
- default:
- return !1;
- }
- }
- }, Vh = (t, e) => {
- let {
- slots: n
- } = e;
- var r;
- const {
- class: i,
- customizeIcon: a,
- customizeIconProps: o,
- onMousedown: s,
- onClick: l
- } = t;
- let u;
- return typeof a == "function" ? u = a(o) : u = df(a) ? ku(a) : a, D("span", {
- class: i,
- onMousedown: (c) => {
- c.preventDefault(), s && s(c);
- },
- style: {
- userSelect: "none",
- WebkitUserSelect: "none"
- },
- unselectable: "on",
- onClick: l,
- "aria-hidden": !0
- }, [u !== void 0 ? u : D("span", {
- class: i.split(/\s+/).map((c) => `${c}-icon`)
- }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
- };
- Vh.inheritAttrs = !1;
- Vh.displayName = "TransBtn";
- Vh.props = {
- class: String,
- customizeIcon: oe.any,
- customizeIconProps: oe.any,
- onMousedown: Function,
- onClick: Function
- };
- var SNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const xNe = ae({
- compatConfig: {
- MODE: 3
- },
- // inheritAttrs: false,
- props: {
- disabled: oe.looseBool,
- type: oe.string,
- value: oe.any,
- tag: {
- type: String,
- default: "input"
- },
- size: oe.string,
- onChange: Function,
- onInput: Function,
- onBlur: Function,
- onFocus: Function,
- onKeydown: Function,
- onCompositionstart: Function,
- onCompositionend: Function,
- onKeyup: Function,
- onPaste: Function,
- onMousedown: Function
- },
- emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
- setup(t, e) {
- let {
- expose: n
- } = e;
- const r = ve(null);
- return n({
- focus: () => {
- r.value && r.value.focus();
- },
- blur: () => {
- r.value && r.value.blur();
- },
- input: r,
- setSelectionRange: (l, u, c) => {
- var f;
- (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
- },
- select: () => {
- var l;
- (l = r.value) === null || l === void 0 || l.select();
- },
- getSelectionStart: () => {
- var l;
- return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
- },
- getSelectionEnd: () => {
- var l;
- return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
- },
- getScrollTop: () => {
- var l;
- return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
- }
- }), () => {
- const {
- tag: l,
- value: u
- } = t, c = SNe(t, ["tag", "value"]);
- return D(l, te(te({}, c), {}, {
- ref: r,
- value: u
- }), null);
- };
- }
- });
- function wNe() {
- const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
- return {
- width: t,
- height: e
- };
- }
- function Ure(t) {
- const e = t.getBoundingClientRect(), n = document.documentElement;
- return {
- left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
- top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
- };
- }
- function CNe(t) {
- return Object.keys(t).reduce((e, n) => {
- const r = t[n];
- return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
- }, "");
- }
- var TNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const t8 = ae({
- compatConfig: {
- MODE: 3
- },
- inheritAttrs: !1,
- props: {
- disabled: oe.looseBool,
- type: oe.string,
- value: oe.any,
- lazy: oe.bool.def(!0),
- tag: {
- type: String,
- default: "input"
- },
- size: oe.string,
- style: oe.oneOfType([String, Object]),
- class: oe.string
- },
- emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
- setup(t, e) {
- let {
- emit: n,
- attrs: r,
- expose: i
- } = e;
- const a = ve(null), o = ee(), s = ee(!1);
- me([() => t.value, s], () => {
- s.value || (o.value = t.value);
- }, {
- immediate: !0
- });
- const l = (C) => {
- n("change", C);
- }, u = (C) => {
- s.value = !0, C.target.composing = !0, n("compositionstart", C);
- }, c = (C) => {
- s.value = !1, C.target.composing = !1, n("compositionend", C);
- const P = document.createEvent("HTMLEvents");
- P.initEvent("input", !0, !0), C.target.dispatchEvent(P), l(C);
- }, f = (C) => {
- if (s.value && t.lazy) {
- o.value = C.target.value;
- return;
- }
- n("input", C);
- }, d = (C) => {
- n("blur", C);
- }, h = (C) => {
- n("focus", C);
- }, p = () => {
- a.value && a.value.focus();
- }, v = () => {
- a.value && a.value.blur();
- }, g = (C) => {
- n("keydown", C);
- }, m = (C) => {
- n("keyup", C);
- }, y = (C, P, $) => {
- var T;
- (T = a.value) === null || T === void 0 || T.setSelectionRange(C, P, $);
- }, _ = () => {
- var C;
- (C = a.value) === null || C === void 0 || C.select();
- };
- i({
- focus: p,
- blur: v,
- input: V(() => {
- var C;
- return (C = a.value) === null || C === void 0 ? void 0 : C.input;
- }),
- setSelectionRange: y,
- select: _,
- getSelectionStart: () => {
- var C;
- return (C = a.value) === null || C === void 0 ? void 0 : C.getSelectionStart();
- },
- getSelectionEnd: () => {
- var C;
- return (C = a.value) === null || C === void 0 ? void 0 : C.getSelectionEnd();
- },
- getScrollTop: () => {
- var C;
- return (C = a.value) === null || C === void 0 ? void 0 : C.getScrollTop();
- }
- });
- const O = (C) => {
- n("mousedown", C);
- }, S = (C) => {
- n("paste", C);
- }, x = V(() => t.style && typeof t.style != "string" ? CNe(t.style) : t.style);
- return () => {
- const C = TNe(t, ["style", "lazy"]);
- return D(xNe, te(te(te({}, C), r), {}, {
- style: x.value,
- onInput: f,
- onChange: l,
- onBlur: d,
- onFocus: h,
- ref: a,
- value: o.value,
- onCompositionstart: u,
- onCompositionend: c,
- onKeyup: m,
- onKeydown: g,
- onPaste: S,
- onMousedown: O
- }), null);
- };
- }
- }), PNe = {
- inputRef: oe.any,
- prefixCls: String,
- id: String,
- inputElement: oe.VueNode,
- disabled: {
- type: Boolean,
- default: void 0
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- autocomplete: String,
- editable: {
- type: Boolean,
- default: void 0
- },
- activeDescendantId: String,
- value: String,
- open: {
- type: Boolean,
- default: void 0
- },
- tabindex: oe.oneOfType([oe.number, oe.string]),
- /** Pass accessibility props to input */
- attrs: oe.object,
- onKeydown: {
- type: Function
- },
- onMousedown: {
- type: Function
- },
- onChange: {
- type: Function
- },
- onPaste: {
- type: Function
- },
- onCompositionstart: {
- type: Function
- },
- onCompositionend: {
- type: Function
- },
- onFocus: {
- type: Function
- },
- onBlur: {
- type: Function
- }
- }, Xre = ae({
- compatConfig: {
- MODE: 3
- },
- name: "SelectInput",
- inheritAttrs: !1,
- props: PNe,
- setup(t) {
- let e = null;
- const n = et("VCSelectContainerEvent");
- return () => {
- var r;
- const {
- prefixCls: i,
- id: a,
- inputElement: o,
- disabled: s,
- tabindex: l,
- autofocus: u,
- autocomplete: c,
- editable: f,
- activeDescendantId: d,
- value: h,
- onKeydown: p,
- onMousedown: v,
- onChange: g,
- onPaste: m,
- onCompositionstart: y,
- onCompositionend: _,
- onFocus: O,
- onBlur: S,
- open: x,
- inputRef: C,
- attrs: P
- } = t;
- let $ = o || D(t8, null, null);
- const T = $.props || {}, {
- onKeydown: E,
- onInput: M,
- onFocus: R,
- onBlur: N,
- onMousedown: I,
- onCompositionstart: B,
- onCompositionend: Q,
- style: W
- } = T;
- return $ = xr($, k(k(k(k(k({
- type: "search"
- }, T), {
- id: a,
- ref: C,
- disabled: s,
- tabindex: l,
- lazy: !1,
- autocomplete: c || "off",
- autofocus: u,
- class: Re(`${i}-selection-search-input`, (r = $ == null ? void 0 : $.props) === null || r === void 0 ? void 0 : r.class),
- role: "combobox",
- "aria-expanded": x,
- "aria-haspopup": "listbox",
- "aria-owns": `${a}_list`,
- "aria-autocomplete": "list",
- "aria-controls": `${a}_list`,
- "aria-activedescendant": d
- }), P), {
- value: f ? h : "",
- readonly: !f,
- unselectable: f ? null : "on",
- style: k(k({}, W), {
- opacity: f ? null : 0
- }),
- onKeydown: (H) => {
- p(H), E && E(H);
- },
- onMousedown: (H) => {
- v(H), I && I(H);
- },
- onInput: (H) => {
- g(H), M && M(H);
- },
- onCompositionstart(H) {
- y(H), B && B(H);
- },
- onCompositionend(H) {
- _(H), Q && Q(H);
- },
- onPaste: m,
- onFocus: function() {
- clearTimeout(e), R && R(arguments.length <= 0 ? void 0 : arguments[0]), O && O(arguments.length <= 0 ? void 0 : arguments[0]), n == null || n.focus(arguments.length <= 0 ? void 0 : arguments[0]);
- },
- onBlur: function() {
- for (var H = arguments.length, U = new Array(H), j = 0; j < H; j++)
- U[j] = arguments[j];
- e = setTimeout(() => {
- N && N(U[0]), S && S(U[0]), n == null || n.blur(U[0]);
- }, 100);
- }
- }), $.type === "textarea" ? {} : {
- type: "search"
- }), !0, !0), $;
- };
- }
- }), $Ne = `accept acceptcharset accesskey action allowfullscreen allowtransparency
- alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
- charset checked classid classname colspan cols content contenteditable contextmenu
- controls coords crossorigin data datetime default defer dir disabled download draggable
- enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
- headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
- is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
- mediagroup method min minlength multiple muted name novalidate nonce open
- optimum pattern placeholder poster preload radiogroup readonly rel required
- reversed role rowspan rows sandbox scope scoped scrolling seamless selected
- shape size sizes span spellcheck src srcdoc srclang srcset start step style
- summary tabindex target title type usemap value width wmode wrap`, ANe = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
- onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
- onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
- onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
- onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
- onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
- onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, z7 = `${$Ne} ${ANe}`.split(/[\s\n]+/), ENe = "aria-", MNe = "data-";
- function V7(t, e) {
- return t.indexOf(e) === 0;
- }
- function M2(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
- e === !1 ? n = {
- aria: !0,
- data: !0,
- attr: !0
- } : e === !0 ? n = {
- aria: !0
- } : n = k({}, e);
- const r = {};
- return Object.keys(t).forEach((i) => {
- // Aria
- (n.aria && (i === "role" || V7(i, ENe)) || // Data
- n.data && V7(i, MNe) || // Attr
- n.attr && (z7.includes(i) || z7.includes(i.toLowerCase()))) && (r[i] = t[i]);
- }), r;
- }
- const Yre = Symbol("OverflowContextProviderKey"), PR = ae({
- compatConfig: {
- MODE: 3
- },
- name: "OverflowContextProvider",
- inheritAttrs: !1,
- props: {
- value: {
- type: Object
- }
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- return Et(Yre, V(() => t.value)), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- }), INe = () => et(Yre, V(() => null));
- var DNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const Fp = void 0, Yx = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Item",
- props: {
- prefixCls: String,
- item: oe.any,
- renderItem: Function,
- responsive: Boolean,
- itemKey: {
- type: [String, Number]
- },
- registerSize: Function,
- display: Boolean,
- order: Number,
- component: oe.any,
- invalidate: Boolean
- },
- setup(t, e) {
- let {
- slots: n,
- expose: r
- } = e;
- const i = V(() => t.responsive && !t.display), a = ee();
- r({
- itemNodeRef: a
- });
- function o(s) {
- t.registerSize(t.itemKey, s);
- }
- return qu(() => {
- o(null);
- }), () => {
- var s;
- const {
- prefixCls: l,
- invalidate: u,
- item: c,
- renderItem: f,
- responsive: d,
- registerSize: h,
- itemKey: p,
- display: v,
- order: g,
- component: m = "div"
- } = t, y = DNe(t, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), _ = (s = n.default) === null || s === void 0 ? void 0 : s.call(n), O = f && c !== Fp ? f(c) : _;
- let S;
- u || (S = {
- opacity: i.value ? 0 : 1,
- height: i.value ? 0 : Fp,
- overflowY: i.value ? "hidden" : Fp,
- order: d ? g : Fp,
- pointerEvents: i.value ? "none" : Fp,
- position: i.value ? "absolute" : Fp
- });
- const x = {};
- return i.value && (x["aria-hidden"] = !0), D($g, {
- disabled: !d,
- onResize: (C) => {
- let {
- offsetWidth: P
- } = C;
- o(P);
- }
- }, {
- default: () => D(m, te(te(te({
- class: Re(!u && l),
- style: S
- }, x), y), {}, {
- ref: a
- }), {
- default: () => [O]
- })
- });
- };
- }
- });
- var oE = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const RNe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "RawItem",
- inheritAttrs: !1,
- props: {
- component: oe.any,
- title: oe.any,
- id: String,
- onMouseenter: {
- type: Function
- },
- onMouseleave: {
- type: Function
- },
- onClick: {
- type: Function
- },
- onKeydown: {
- type: Function
- },
- onFocus: {
- type: Function
- },
- role: String,
- tabindex: Number
- },
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const i = INe();
- return () => {
- var a;
- if (!i.value) {
- const {
- component: f = "div"
- } = t, d = oE(t, ["component"]);
- return D(f, te(te({}, d), r), {
- default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
- });
- }
- const o = i.value, {
- className: s
- } = o, l = oE(o, ["className"]), {
- class: u
- } = r, c = oE(r, ["class"]);
- return D(PR, {
- value: null
- }, {
- default: () => [D(Yx, te(te(te({
- class: Re(s, u)
- }, l), c), t), n)]
- });
- };
- }
- });
- var kNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const qre = "responsive", Kre = "invalidate";
- function LNe(t) {
- return `+ ${t.length} ...`;
- }
- const NNe = () => ({
- id: String,
- prefixCls: String,
- data: Array,
- itemKey: [String, Number, Function],
- /** Used for `responsive`. It will limit render node to avoid perf issue */
- itemWidth: {
- type: Number,
- default: 10
- },
- renderItem: Function,
- /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
- renderRawItem: Function,
- maxCount: [Number, String],
- renderRest: Function,
- /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
- renderRawRest: Function,
- suffix: oe.any,
- component: String,
- itemComponent: oe.any,
- /** @private This API may be refactor since not well design */
- onVisibleChange: Function,
- /** When set to `full`, ssr will render full items by default and remove at client side */
- ssr: String,
- onMousedown: Function
- }), Au = ae({
- name: "Overflow",
- inheritAttrs: !1,
- props: NNe(),
- emits: ["visibleChange"],
- setup(t, e) {
- let {
- attrs: n,
- emit: r,
- slots: i
- } = e;
- const a = V(() => t.ssr === "full"), o = ve(null), s = V(() => o.value || 0), l = ve(/* @__PURE__ */ new Map()), u = ve(0), c = ve(0), f = ve(0), d = ve(null), h = ve(null), p = V(() => h.value === null && a.value ? Number.MAX_SAFE_INTEGER : h.value || 0), v = ve(!1), g = V(() => `${t.prefixCls}-item`), m = V(() => Math.max(u.value, c.value)), y = V(() => !!(t.data.length && t.maxCount === qre)), _ = V(() => t.maxCount === Kre), O = V(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), S = V(() => {
- let I = t.data;
- return y.value ? o.value === null && a.value ? I = t.data : I = t.data.slice(0, Math.min(t.data.length, s.value / t.itemWidth)) : typeof t.maxCount == "number" && (I = t.data.slice(0, t.maxCount)), I;
- }), x = V(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(S.value.length)), C = (I, B) => {
- var Q;
- return typeof t.itemKey == "function" ? t.itemKey(I) : (Q = t.itemKey && (I == null ? void 0 : I[t.itemKey])) !== null && Q !== void 0 ? Q : B;
- }, P = V(() => t.renderItem || ((I) => I)), $ = (I, B) => {
- h.value = I, B || (v.value = I < t.data.length - 1, r("visibleChange", I));
- }, T = (I, B) => {
- o.value = B.clientWidth;
- }, E = (I, B) => {
- const Q = new Map(l.value);
- B === null ? Q.delete(I) : Q.set(I, B), l.value = Q;
- }, M = (I, B) => {
- u.value = c.value, c.value = B;
- }, R = (I, B) => {
- f.value = B;
- }, N = (I) => l.value.get(C(S.value[I], I));
- return me([s, l, c, f, () => t.itemKey, S], () => {
- if (s.value && m.value && S.value) {
- let I = f.value;
- const B = S.value.length, Q = B - 1;
- if (!B) {
- $(0), d.value = null;
- return;
- }
- for (let W = 0; W < B; W += 1) {
- const H = N(W);
- if (H === void 0) {
- $(W - 1, !0);
- break;
- }
- if (I += H, // Only one means `totalWidth` is the final width
- Q === 0 && I <= s.value || // Last two width will be the final width
- W === Q - 1 && I + N(Q) <= s.value) {
- $(Q), d.value = null;
- break;
- } else if (I + m.value > s.value) {
- $(W - 1), d.value = I - H - f.value + c.value;
- break;
- }
- }
- t.suffix && N(0) + f.value > s.value && (d.value = null);
- }
- }), () => {
- const I = v.value && !!x.value.length, {
- itemComponent: B,
- renderRawItem: Q,
- renderRawRest: W,
- renderRest: H,
- prefixCls: U = "rc-overflow",
- suffix: j,
- component: Y = "div",
- id: ne,
- onMousedown: fe
- } = t, {
- class: ue,
- style: ye
- } = n, se = kNe(n, ["class", "style"]);
- let he = {};
- d.value !== null && y.value && (he = {
- position: "absolute",
- left: `${d.value}px`,
- top: 0
- });
- const re = {
- prefixCls: g.value,
- responsive: y.value,
- component: B,
- invalidate: _.value
- }, q = Q ? (we, He) => {
- const je = C(we, He);
- return D(PR, {
- key: je,
- value: k(k({}, re), {
- order: He,
- item: we,
- itemKey: je,
- registerSize: E,
- display: He <= p.value
- })
- }, {
- default: () => [Q(we, He)]
- });
- } : (we, He) => {
- const je = C(we, He);
- return D(Yx, te(te({}, re), {}, {
- order: He,
- key: je,
- item: we,
- renderItem: P.value,
- itemKey: je,
- registerSize: E,
- display: He <= p.value
- }), null);
- };
- let K = () => null;
- const de = {
- order: I ? p.value : Number.MAX_SAFE_INTEGER,
- className: `${g.value} ${g.value}-rest`,
- registerSize: M,
- display: I
- };
- if (W)
- W && (K = () => D(PR, {
- value: k(k({}, re), de)
- }, {
- default: () => [W(x.value)]
- }));
- else {
- const we = H || LNe;
- K = () => D(Yx, te(te({}, re), de), {
- default: () => typeof we == "function" ? we(x.value) : we
- });
- }
- const xe = () => {
- var we;
- return D(Y, te({
- id: ne,
- class: Re(!_.value && U, ue),
- style: ye,
- onMousedown: fe
- }, se), {
- default: () => [S.value.map(q), O.value ? K() : null, j && D(Yx, te(te({}, re), {}, {
- order: p.value,
- class: `${g.value}-suffix`,
- registerSize: R,
- display: !0,
- style: he
- }), {
- default: () => j
- }), (we = i.default) === null || we === void 0 ? void 0 : we.call(i)]
- });
- };
- return D($g, {
- disabled: !y.value,
- onResize: T
- }, {
- default: xe
- });
- };
- }
- });
- Au.Item = RNe;
- Au.RESPONSIVE = qre;
- Au.INVALIDATE = Kre;
- const BNe = Symbol("TreeSelectLegacyContextPropsKey");
- function n8() {
- return et(BNe, {});
- }
- const zNe = {
- id: String,
- prefixCls: String,
- values: oe.array,
- open: {
- type: Boolean,
- default: void 0
- },
- searchValue: String,
- inputRef: oe.any,
- placeholder: oe.any,
- disabled: {
- type: Boolean,
- default: void 0
- },
- mode: String,
- showSearch: {
- type: Boolean,
- default: void 0
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- autocomplete: String,
- activeDescendantId: String,
- tabindex: oe.oneOfType([oe.number, oe.string]),
- compositionStatus: Boolean,
- removeIcon: oe.any,
- choiceTransitionName: String,
- maxTagCount: oe.oneOfType([oe.number, oe.string]),
- maxTagTextLength: Number,
- maxTagPlaceholder: oe.any.def(() => (t) => `+ ${t.length} ...`),
- tagRender: Function,
- onToggleOpen: {
- type: Function
- },
- onRemove: Function,
- onInputChange: Function,
- onInputPaste: Function,
- onInputKeyDown: Function,
- onInputMouseDown: Function,
- onInputCompositionStart: Function,
- onInputCompositionEnd: Function
- }, F7 = (t) => {
- t.preventDefault(), t.stopPropagation();
- }, VNe = ae({
- name: "MultipleSelectSelector",
- inheritAttrs: !1,
- props: zNe,
- setup(t) {
- const e = ve(), n = ve(0), r = ve(!1), i = n8(), a = V(() => `${t.prefixCls}-selection`), o = V(() => t.open || t.mode === "tags" ? t.searchValue : ""), s = V(() => t.mode === "tags" || t.showSearch && (t.open || r.value)), l = ee("");
- Vt(() => {
- l.value = o.value;
- }), _t(() => {
- me(l, () => {
- n.value = e.value.scrollWidth;
- }, {
- flush: "post",
- immediate: !0
- });
- });
- function u(p, v, g, m, y) {
- return D("span", {
- class: Re(`${a.value}-item`, {
- [`${a.value}-item-disabled`]: g
- }),
- title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
- }, [D("span", {
- class: `${a.value}-item-content`
- }, [v]), m && D(Vh, {
- class: `${a.value}-item-remove`,
- onMousedown: F7,
- onClick: y,
- customizeIcon: t.removeIcon
- }, {
- default: () => [On("×")]
- })]);
- }
- function c(p, v, g, m, y, _) {
- var O;
- const S = (C) => {
- F7(C), t.onToggleOpen(!open);
- };
- let x = _;
- return i.keyEntities && (x = ((O = i.keyEntities[p]) === null || O === void 0 ? void 0 : O.node) || {}), D("span", {
- key: p,
- onMousedown: S
- }, [t.tagRender({
- label: v,
- value: p,
- disabled: g,
- closable: m,
- onClose: y,
- option: x
- })]);
- }
- function f(p) {
- const {
- disabled: v,
- label: g,
- value: m,
- option: y
- } = p, _ = !t.disabled && !v;
- let O = g;
- if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
- const x = String(O);
- x.length > t.maxTagTextLength && (O = `${x.slice(0, t.maxTagTextLength)}...`);
- }
- const S = (x) => {
- var C;
- x && x.stopPropagation(), (C = t.onRemove) === null || C === void 0 || C.call(t, p);
- };
- return typeof t.tagRender == "function" ? c(m, O, v, _, S, y) : u(g, O, v, _, S);
- }
- function d(p) {
- const {
- maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
- } = t, g = typeof v == "function" ? v(p) : v;
- return u(g, g, !1);
- }
- const h = (p) => {
- const v = p.target.composing;
- l.value = p.target.value, v || t.onInputChange(p);
- };
- return () => {
- const {
- id: p,
- prefixCls: v,
- values: g,
- open: m,
- inputRef: y,
- placeholder: _,
- disabled: O,
- autofocus: S,
- autocomplete: x,
- activeDescendantId: C,
- tabindex: P,
- compositionStatus: $,
- onInputPaste: T,
- onInputKeyDown: E,
- onInputMouseDown: M,
- onInputCompositionStart: R,
- onInputCompositionEnd: N
- } = t, I = D("div", {
- class: `${a.value}-search`,
- style: {
- width: n.value + "px"
- },
- key: "input"
- }, [D(Xre, {
- inputRef: y,
- open: m,
- prefixCls: v,
- id: p,
- inputElement: null,
- disabled: O,
- autofocus: S,
- autocomplete: x,
- editable: s.value,
- activeDescendantId: C,
- value: l.value,
- onKeydown: E,
- onMousedown: M,
- onChange: h,
- onPaste: T,
- onCompositionstart: R,
- onCompositionend: N,
- tabindex: P,
- attrs: M2(t, !0),
- onFocus: () => r.value = !0,
- onBlur: () => r.value = !1
- }, null), D("span", {
- ref: e,
- class: `${a.value}-search-mirror`,
- "aria-hidden": !0
- }, [l.value, On(" ")])]), B = D(Au, {
- prefixCls: `${a.value}-overflow`,
- data: g,
- renderItem: f,
- renderRest: d,
- suffix: I,
- itemKey: "key",
- maxCount: t.maxTagCount,
- key: "overflow"
- }, null);
- return D(Wt, null, [B, !g.length && !o.value && !$ && D("span", {
- class: `${a.value}-placeholder`
- }, [_])]);
- };
- }
- }), FNe = {
- inputElement: oe.any,
- id: String,
- prefixCls: String,
- values: oe.array,
- open: {
- type: Boolean,
- default: void 0
- },
- searchValue: String,
- inputRef: oe.any,
- placeholder: oe.any,
- compositionStatus: {
- type: Boolean,
- default: void 0
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- mode: String,
- showSearch: {
- type: Boolean,
- default: void 0
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- autocomplete: String,
- activeDescendantId: String,
- tabindex: oe.oneOfType([oe.number, oe.string]),
- activeValue: String,
- backfill: {
- type: Boolean,
- default: void 0
- },
- optionLabelRender: Function,
- onInputChange: Function,
- onInputPaste: Function,
- onInputKeyDown: Function,
- onInputMouseDown: Function,
- onInputCompositionStart: Function,
- onInputCompositionEnd: Function
- }, r8 = ae({
- name: "SingleSelector",
- setup(t) {
- const e = ve(!1), n = V(() => t.mode === "combobox"), r = V(() => n.value || t.showSearch), i = V(() => {
- let c = t.searchValue || "";
- return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
- }), a = n8();
- me([n, () => t.activeValue], () => {
- n.value && (e.value = !1);
- }, {
- immediate: !0
- });
- const o = V(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = V(() => {
- const c = t.values[0];
- return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
- }), l = () => {
- if (t.values[0])
- return null;
- const c = o.value ? {
- visibility: "hidden"
- } : void 0;
- return D("span", {
- class: `${t.prefixCls}-selection-placeholder`,
- style: c
- }, [t.placeholder]);
- }, u = (c) => {
- c.target.composing || (e.value = !0, t.onInputChange(c));
- };
- return () => {
- var c, f, d, h;
- const {
- inputElement: p,
- prefixCls: v,
- id: g,
- values: m,
- inputRef: y,
- disabled: _,
- autofocus: O,
- autocomplete: S,
- activeDescendantId: x,
- open: C,
- tabindex: P,
- optionLabelRender: $,
- onInputKeyDown: T,
- onInputMouseDown: E,
- onInputPaste: M,
- onInputCompositionStart: R,
- onInputCompositionEnd: N
- } = t, I = m[0];
- let B = null;
- if (I && a.customSlots) {
- const Q = (c = I.key) !== null && c !== void 0 ? c : I.value, W = ((f = a.keyEntities[Q]) === null || f === void 0 ? void 0 : f.node) || {};
- B = a.customSlots[(d = W.slots) === null || d === void 0 ? void 0 : d.title] || a.customSlots.title || I.label, typeof B == "function" && (B = B(W));
- } else
- B = $ && I ? $(I.option) : I == null ? void 0 : I.label;
- return D(Wt, null, [D("span", {
- class: `${v}-selection-search`
- }, [D(Xre, {
- inputRef: y,
- prefixCls: v,
- id: g,
- open: C,
- inputElement: p,
- disabled: _,
- autofocus: O,
- autocomplete: S,
- editable: r.value,
- activeDescendantId: x,
- value: i.value,
- onKeydown: T,
- onMousedown: E,
- onChange: u,
- onPaste: M,
- onCompositionstart: R,
- onCompositionend: N,
- tabindex: P,
- attrs: M2(t, !0)
- }, null)]), !n.value && I && !o.value && D("span", {
- class: `${v}-selection-item`,
- title: s.value
- }, [D(Wt, {
- key: (h = I.key) !== null && h !== void 0 ? h : I.value
- }, [B])]), l()]);
- };
- }
- });
- r8.props = FNe;
- r8.inheritAttrs = !1;
- function WNe(t) {
- return ![
- // System function button
- Me.ESC,
- Me.SHIFT,
- Me.BACKSPACE,
- Me.TAB,
- Me.WIN_KEY,
- Me.ALT,
- Me.META,
- Me.WIN_KEY_RIGHT,
- Me.CTRL,
- Me.SEMICOLON,
- Me.EQUALS,
- Me.CAPS_LOCK,
- Me.CONTEXT_MENU,
- // F1-F12
- Me.F1,
- Me.F2,
- Me.F3,
- Me.F4,
- Me.F5,
- Me.F6,
- Me.F7,
- Me.F8,
- Me.F9,
- Me.F10,
- Me.F11,
- Me.F12
- ].includes(t);
- }
- function Jre() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
- Qt(() => {
- clearTimeout(n);
- });
- function r(i) {
- (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
- e = null;
- }, t);
- }
- return [() => e, r];
- }
- function kb() {
- const t = (e) => {
- t.current = e;
- };
- return t;
- }
- const QNe = ae({
- name: "Selector",
- inheritAttrs: !1,
- props: {
- id: String,
- prefixCls: String,
- showSearch: {
- type: Boolean,
- default: void 0
- },
- open: {
- type: Boolean,
- default: void 0
- },
- /** Display in the Selector value, it's not same as `value` prop */
- values: oe.array,
- multiple: {
- type: Boolean,
- default: void 0
- },
- mode: String,
- searchValue: String,
- activeValue: String,
- inputElement: oe.any,
- autofocus: {
- type: Boolean,
- default: void 0
- },
- activeDescendantId: String,
- tabindex: oe.oneOfType([oe.number, oe.string]),
- disabled: {
- type: Boolean,
- default: void 0
- },
- placeholder: oe.any,
- removeIcon: oe.any,
- // Tags
- maxTagCount: oe.oneOfType([oe.number, oe.string]),
- maxTagTextLength: Number,
- maxTagPlaceholder: oe.any,
- tagRender: Function,
- optionLabelRender: Function,
- /** Check if `tokenSeparators` contains `\n` or `\r\n` */
- tokenWithEnter: {
- type: Boolean,
- default: void 0
- },
- // Motion
- choiceTransitionName: String,
- onToggleOpen: {
- type: Function
- },
- /** `onSearch` returns go next step boolean to check if need do toggle open */
- onSearch: Function,
- onSearchSubmit: Function,
- onRemove: Function,
- onInputKeyDown: {
- type: Function
- },
- /**
- * @private get real dom for trigger align.
- * This may be removed after React provides replacement of `findDOMNode`
- */
- domRef: Function
- },
- setup(t, e) {
- let {
- expose: n
- } = e;
- const r = kb(), i = ee(!1), [a, o] = Jre(0), s = (m) => {
- const {
- which: y
- } = m;
- (y === Me.UP || y === Me.DOWN) && m.preventDefault(), t.onInputKeyDown && t.onInputKeyDown(m), y === Me.ENTER && t.mode === "tags" && !i.value && !t.open && t.onSearchSubmit(m.target.value), WNe(y) && t.onToggleOpen(!0);
- }, l = () => {
- o(!0);
- };
- let u = null;
- const c = (m) => {
- t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
- }, f = () => {
- i.value = !0;
- }, d = (m) => {
- i.value = !1, t.mode !== "combobox" && c(m.target.value);
- }, h = (m) => {
- let {
- target: {
- value: y
- }
- } = m;
- if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
- const _ = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
- y = y.replace(_, u);
- }
- u = null, c(y);
- }, p = (m) => {
- const {
- clipboardData: y
- } = m;
- u = y.getData("text");
- }, v = (m) => {
- let {
- target: y
- } = m;
- y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
- r.current.focus();
- }) : r.current.focus());
- }, g = (m) => {
- const y = a();
- m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
- };
- return n({
- focus: () => {
- r.current.focus();
- },
- blur: () => {
- r.current.blur();
- }
- }), () => {
- const {
- prefixCls: m,
- domRef: y,
- mode: _
- } = t, O = {
- inputRef: r,
- onInputKeyDown: s,
- onInputMouseDown: l,
- onInputChange: h,
- onInputPaste: p,
- compositionStatus: i.value,
- onInputCompositionStart: f,
- onInputCompositionEnd: d
- }, S = _ === "multiple" || _ === "tags" ? D(VNe, te(te({}, t), O), null) : D(r8, te(te({}, t), O), null);
- return D("div", {
- ref: y,
- class: `${m}-selector`,
- onClick: v,
- onMousedown: g
- }, [S]);
- };
- }
- });
- function HNe(t, e, n) {
- function r(i) {
- var a, o, s;
- let l = i.target;
- l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
- const u = [(a = t[0]) === null || a === void 0 ? void 0 : a.value, (s = (o = t[1]) === null || o === void 0 ? void 0 : o.value) === null || s === void 0 ? void 0 : s.getPopupElement()];
- e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
- }
- _t(() => {
- window.addEventListener("mousedown", r);
- }), Qt(() => {
- window.removeEventListener("mousedown", r);
- });
- }
- function GNe() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
- const e = ve(!1);
- let n;
- const r = () => {
- clearTimeout(n);
- };
- return _t(() => {
- r();
- }), [e, (a, o) => {
- r(), n = setTimeout(() => {
- e.value = a, o && o();
- }, t);
- }, r];
- }
- const eie = Symbol("BaseSelectContextKey");
- function jNe(t) {
- return Et(eie, t);
- }
- function ZNe() {
- return et(eie, {});
- }
- const i8 = () => {
- if (typeof navigator > "u" || typeof window > "u")
- return !1;
- const t = navigator.userAgent || navigator.vendor || window.opera;
- return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t == null ? void 0 : t.substring(0, 4));
- };
- function tie(t) {
- if (!Vs(t)) return zn(t);
- const e = new Proxy({}, {
- get(n, r, i) {
- return Reflect.get(t.value, r, i);
- },
- set(n, r, i) {
- return t.value[r] = i, !0;
- },
- deleteProperty(n, r) {
- return Reflect.deleteProperty(t.value, r);
- },
- has(n, r) {
- return Reflect.has(t.value, r);
- },
- ownKeys() {
- return Object.keys(t.value);
- },
- getOwnPropertyDescriptor() {
- return {
- enumerable: !0,
- configurable: !0
- };
- }
- });
- return zn(e);
- }
- var UNe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const XNe = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], YNe = () => ({
- prefixCls: String,
- id: String,
- omitDomProps: Array,
- // >>> Value
- displayValues: Array,
- onDisplayValuesChange: Function,
- // >>> Active
- /** Current dropdown list active item string value */
- activeValue: String,
- /** Link search input with target element */
- activeDescendantId: String,
- onActiveValueChange: Function,
- // >>> Search
- searchValue: String,
- /** Trigger onSearch, return false to prevent trigger open event */
- onSearch: Function,
- /** Trigger when search text match the `tokenSeparators`. Will provide split content */
- onSearchSplit: Function,
- maxLength: Number,
- OptionList: oe.any,
- /** Tell if provided `options` is empty */
- emptyOptions: Boolean
- }), nie = () => ({
- showSearch: {
- type: Boolean,
- default: void 0
- },
- tagRender: {
- type: Function
- },
- optionLabelRender: {
- type: Function
- },
- direction: {
- type: String
- },
- // MISC
- tabindex: Number,
- autofocus: Boolean,
- notFoundContent: oe.any,
- placeholder: oe.any,
- onClear: Function,
- choiceTransitionName: String,
- // >>> Mode
- mode: String,
- // >>> Status
- disabled: {
- type: Boolean,
- default: void 0
- },
- loading: {
- type: Boolean,
- default: void 0
- },
- // >>> Open
- open: {
- type: Boolean,
- default: void 0
- },
- defaultOpen: {
- type: Boolean,
- default: void 0
- },
- onDropdownVisibleChange: {
- type: Function
- },
- // >>> Customize Input
- /** @private Internal usage. Do not use in your production. */
- getInputElement: {
- type: Function
- },
- /** @private Internal usage. Do not use in your production. */
- getRawInputElement: {
- type: Function
- },
- // >>> Selector
- maxTagTextLength: Number,
- maxTagCount: {
- type: [String, Number]
- },
- maxTagPlaceholder: oe.any,
- // >>> Search
- tokenSeparators: {
- type: Array
- },
- // >>> Icons
- allowClear: {
- type: Boolean,
- default: void 0
- },
- showArrow: {
- type: Boolean,
- default: void 0
- },
- inputIcon: oe.any,
- /** Clear all icon */
- clearIcon: oe.any,
- /** Selector remove icon */
- removeIcon: oe.any,
- // >>> Dropdown
- animation: String,
- transitionName: String,
- dropdownStyle: {
- type: Object
- },
- dropdownClassName: String,
- dropdownMatchSelectWidth: {
- type: [Boolean, Number],
- default: void 0
- },
- dropdownRender: {
- type: Function
- },
- dropdownAlign: Object,
- placement: {
- type: String
- },
- getPopupContainer: {
- type: Function
- },
- // >>> Focus
- showAction: {
- type: Array
- },
- onBlur: {
- type: Function
- },
- onFocus: {
- type: Function
- },
- // >>> Rest Events
- onKeyup: Function,
- onKeydown: Function,
- onMousedown: Function,
- onPopupScroll: Function,
- onInputKeyDown: Function,
- onMouseenter: Function,
- onMouseleave: Function,
- onClick: Function
- }), qNe = () => k(k({}, YNe()), nie());
- function a8(t) {
- return t === "tags" || t === "multiple";
- }
- const KNe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "BaseSelect",
- inheritAttrs: !1,
- props: li(qNe(), {
- showAction: [],
- notFoundContent: "Not Found"
- }),
- setup(t, e) {
- let {
- attrs: n,
- expose: r,
- slots: i
- } = e;
- const a = V(() => a8(t.mode)), o = V(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ve(!1);
- _t(() => {
- s.value = i8();
- });
- const l = n8(), u = ve(null), c = kb(), f = ve(null), d = ve(null), h = ve(null), p = ee(!1), [v, g, m] = GNe();
- r({
- focus: () => {
- var q;
- (q = d.value) === null || q === void 0 || q.focus();
- },
- blur: () => {
- var q;
- (q = d.value) === null || q === void 0 || q.blur();
- },
- scrollTo: (q) => {
- var K;
- return (K = h.value) === null || K === void 0 ? void 0 : K.scrollTo(q);
- }
- });
- const O = V(() => {
- var q;
- if (t.mode !== "combobox")
- return t.searchValue;
- const K = (q = t.displayValues[0]) === null || q === void 0 ? void 0 : q.value;
- return typeof K == "string" || typeof K == "number" ? String(K) : "";
- }), S = t.open !== void 0 ? t.open : t.defaultOpen, x = ve(S), C = ve(S), P = (q) => {
- x.value = t.open !== void 0 ? t.open : q, C.value = x.value;
- };
- me(() => t.open, () => {
- P(t.open);
- });
- const $ = V(() => !t.notFoundContent && t.emptyOptions);
- Vt(() => {
- C.value = x.value, (t.disabled || $.value && C.value && t.mode === "combobox") && (C.value = !1);
- });
- const T = V(() => $.value ? !1 : C.value), E = (q) => {
- const K = q !== void 0 ? q : !C.value;
- C.value !== K && !t.disabled && (P(K), t.onDropdownVisibleChange && t.onDropdownVisibleChange(K));
- }, M = V(() => (t.tokenSeparators || []).some((q) => [`
- `, `\r
- `].includes(q))), R = (q, K, de) => {
- var xe, we;
- let He = !0, je = q;
- (xe = t.onActiveValueChange) === null || xe === void 0 || xe.call(t, null);
- const Be = de ? null : b4e(q, t.tokenSeparators);
- return t.mode !== "combobox" && Be && (je = "", (we = t.onSearchSplit) === null || we === void 0 || we.call(t, Be), E(!1), He = !1), t.onSearch && O.value !== je && t.onSearch(je, {
- source: K ? "typing" : "effect"
- }), He;
- }, N = (q) => {
- var K;
- !q || !q.trim() || (K = t.onSearch) === null || K === void 0 || K.call(t, q, {
- source: "submit"
- });
- };
- me(C, () => {
- !C.value && !a.value && t.mode !== "combobox" && R("", !1, !1);
- }, {
- immediate: !0,
- flush: "post"
- }), me(() => t.disabled, () => {
- x.value && t.disabled && P(!1), t.disabled && !p.value && g(!1);
- }, {
- immediate: !0
- });
- const [I, B] = Jre(), Q = function(q) {
- var K;
- const de = I(), {
- which: xe
- } = q;
- if (xe === Me.ENTER && (t.mode !== "combobox" && q.preventDefault(), C.value || E(!0)), B(!!O.value), xe === Me.BACKSPACE && !de && a.value && !O.value && t.displayValues.length) {
- const Be = [...t.displayValues];
- let Le = null;
- for (let Pe = Be.length - 1; Pe >= 0; Pe -= 1) {
- const Fe = Be[Pe];
- if (!Fe.disabled) {
- Be.splice(Pe, 1), Le = Fe;
- break;
- }
- }
- Le && t.onDisplayValuesChange(Be, {
- type: "remove",
- values: [Le]
- });
- }
- for (var we = arguments.length, He = new Array(we > 1 ? we - 1 : 0), je = 1; je < we; je++)
- He[je - 1] = arguments[je];
- C.value && h.value && h.value.onKeydown(q, ...He), (K = t.onKeydown) === null || K === void 0 || K.call(t, q, ...He);
- }, W = function(q) {
- for (var K = arguments.length, de = new Array(K > 1 ? K - 1 : 0), xe = 1; xe < K; xe++)
- de[xe - 1] = arguments[xe];
- C.value && h.value && h.value.onKeyup(q, ...de), t.onKeyup && t.onKeyup(q, ...de);
- }, H = (q) => {
- const K = t.displayValues.filter((de) => de !== q);
- t.onDisplayValuesChange(K, {
- type: "remove",
- values: [q]
- });
- }, U = ve(!1), j = function() {
- g(!0), t.disabled || (t.onFocus && !U.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && E(!0)), U.value = !0;
- }, Y = ee(!1), ne = function() {
- if (Y.value || (p.value = !0, g(!1, () => {
- U.value = !1, p.value = !1, E(!1);
- }), t.disabled))
- return;
- const q = O.value;
- q && (t.mode === "tags" ? t.onSearch(q, {
- source: "submit"
- }) : t.mode === "multiple" && t.onSearch("", {
- source: "blur"
- })), t.onBlur && t.onBlur(...arguments);
- }, fe = () => {
- Y.value = !0;
- }, ue = () => {
- Y.value = !1;
- };
- Et("VCSelectContainerEvent", {
- focus: j,
- blur: ne
- });
- const ye = [];
- _t(() => {
- ye.forEach((q) => clearTimeout(q)), ye.splice(0, ye.length);
- }), Qt(() => {
- ye.forEach((q) => clearTimeout(q)), ye.splice(0, ye.length);
- });
- const se = function(q) {
- var K, de;
- const {
- target: xe
- } = q, we = (K = f.value) === null || K === void 0 ? void 0 : K.getPopupElement();
- if (we && we.contains(xe)) {
- const Le = setTimeout(() => {
- var Pe;
- const Fe = ye.indexOf(Le);
- Fe !== -1 && ye.splice(Fe, 1), m(), !s.value && !we.contains(document.activeElement) && ((Pe = d.value) === null || Pe === void 0 || Pe.focus());
- });
- ye.push(Le);
- }
- for (var He = arguments.length, je = new Array(He > 1 ? He - 1 : 0), Be = 1; Be < He; Be++)
- je[Be - 1] = arguments[Be];
- (de = t.onMousedown) === null || de === void 0 || de.call(t, q, ...je);
- }, he = ve(null), re = () => {
- };
- return _t(() => {
- me(T, () => {
- var q;
- if (T.value) {
- const K = Math.ceil((q = u.value) === null || q === void 0 ? void 0 : q.offsetWidth);
- he.value !== K && !Number.isNaN(K) && (he.value = K);
- }
- }, {
- immediate: !0,
- flush: "post"
- });
- }), HNe([u, f], T, E), jNe(tie(k(k({}, k_(t)), {
- open: C,
- triggerOpen: T,
- showSearch: o,
- multiple: a,
- toggleOpen: E
- }))), () => {
- const q = k(k({}, t), n), {
- prefixCls: K,
- id: de,
- open: xe,
- defaultOpen: we,
- mode: He,
- // Search related
- showSearch: je,
- searchValue: Be,
- onSearch: Le,
- // Icons
- allowClear: Pe,
- clearIcon: Fe,
- showArrow: Ye,
- inputIcon: xt,
- // Others
- disabled: It,
- loading: an,
- getInputElement: Ae,
- getPopupContainer: gt,
- placement: Xt,
- // Dropdown
- animation: Bn,
- transitionName: Dn,
- dropdownStyle: Dr,
- dropdownClassName: ji,
- dropdownMatchSelectWidth: tu,
- dropdownRender: nu,
- dropdownAlign: oc,
- showAction: Qf,
- direction: rl,
- // Tags
- tokenSeparators: Hf,
- tagRender: Gf,
- optionLabelRender: Gm,
- // Events
- onPopupScroll: sc,
- onDropdownVisibleChange: jm,
- onFocus: g$,
- onBlur: FB,
- onKeyup: WB,
- onKeydown: QB,
- onMousedown: HB,
- onClear: Sp,
- omitDomProps: Zm,
- getRawInputElement: z1,
- displayValues: xp,
- onDisplayValuesChange: Um,
- emptyOptions: m$,
- activeDescendantId: Xm,
- activeValue: y$,
- OptionList: b$
- } = q, _$ = UNe(q, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), V1 = He === "combobox" && Ae && Ae() || null, jf = typeof z1 == "function" && z1(), Ym = k({}, _$);
- let F1;
- jf && (F1 = (yo) => {
- E(yo);
- }), XNe.forEach((yo) => {
- delete Ym[yo];
- }), Zm == null || Zm.forEach((yo) => {
- delete Ym[yo];
- });
- const W1 = Ye !== void 0 ? Ye : an || !a.value && He !== "combobox";
- let qm;
- W1 && (qm = D(Vh, {
- class: Re(`${K}-arrow`, {
- [`${K}-arrow-loading`]: an
- }),
- customizeIcon: xt,
- customizeIconProps: {
- loading: an,
- searchValue: O.value,
- open: C.value,
- focused: v.value,
- showSearch: o.value
- }
- }, null));
- let Q1;
- const O$ = () => {
- Sp == null || Sp(), Um([], {
- type: "clear",
- values: xp
- }), R("", !1, !1);
- };
- !It && Pe && (xp.length || O.value) && (Q1 = D(Vh, {
- class: `${K}-clear`,
- onMousedown: O$,
- customizeIcon: Fe
- }, {
- default: () => [On("×")]
- }));
- const S$ = D(b$, {
- ref: h
- }, k(k({}, l.customSlots), {
- option: i.option
- })), x$ = Re(K, n.class, {
- [`${K}-focused`]: v.value,
- [`${K}-multiple`]: a.value,
- [`${K}-single`]: !a.value,
- [`${K}-allow-clear`]: Pe,
- [`${K}-show-arrow`]: W1,
- [`${K}-disabled`]: It,
- [`${K}-loading`]: an,
- [`${K}-open`]: C.value,
- [`${K}-customize-input`]: V1,
- [`${K}-show-search`]: o.value
- }), H1 = D(ONe, {
- ref: f,
- disabled: It,
- prefixCls: K,
- visible: T.value,
- popupElement: S$,
- containerWidth: he.value,
- animation: Bn,
- transitionName: Dn,
- dropdownStyle: Dr,
- dropdownClassName: ji,
- direction: rl,
- dropdownMatchSelectWidth: tu,
- dropdownRender: nu,
- dropdownAlign: oc,
- placement: Xt,
- getPopupContainer: gt,
- empty: m$,
- getTriggerDOMNode: () => c.current,
- onPopupVisibleChange: F1,
- onPopupMouseEnter: re,
- onPopupFocusin: fe,
- onPopupFocusout: ue
- }, {
- default: () => jf ? po(jf) && xr(jf, {
- ref: c
- }, !1, !0) : D(QNe, te(te({}, t), {}, {
- domRef: c,
- prefixCls: K,
- inputElement: V1,
- ref: d,
- id: de,
- showSearch: o.value,
- mode: He,
- activeDescendantId: Xm,
- tagRender: Gf,
- optionLabelRender: Gm,
- values: xp,
- open: C.value,
- onToggleOpen: E,
- activeValue: y$,
- searchValue: O.value,
- onSearch: R,
- onSearchSubmit: N,
- onRemove: H,
- tokenWithEnter: M.value
- }), null)
- });
- let Km;
- return jf ? Km = H1 : Km = D("div", te(te({}, Ym), {}, {
- class: x$,
- ref: u,
- onMousedown: se,
- onKeydown: Q,
- onKeyup: W
- }), [v.value && !C.value && D("span", {
- style: {
- width: 0,
- height: 0,
- position: "absolute",
- overflow: "hidden",
- opacity: 0
- },
- "aria-live": "polite"
- }, [`${xp.map((yo) => {
- let {
- label: G1,
- value: wp
- } = yo;
- return ["number", "string"].includes(typeof G1) ? G1 : wp;
- }).join(", ")}`]), H1, qm, Q1]), Km;
- };
- }
- }), I2 = (t, e) => {
- let {
- height: n,
- offset: r,
- prefixCls: i,
- onInnerResize: a
- } = t, {
- slots: o
- } = e;
- var s;
- let l = {}, u = {
- display: "flex",
- flexDirection: "column"
- };
- return r !== void 0 && (l = {
- height: `${n}px`,
- position: "relative",
- overflow: "hidden"
- }, u = k(k({}, u), {
- transform: `translateY(${r}px)`,
- position: "absolute",
- left: 0,
- right: 0,
- top: 0
- })), D("div", {
- style: l
- }, [D($g, {
- onResize: (c) => {
- let {
- offsetHeight: f
- } = c;
- f && a && a();
- }
- }, {
- default: () => [D("div", {
- style: u,
- class: Re({
- [`${i}-holder-inner`]: i
- })
- }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
- })]);
- };
- I2.displayName = "Filter";
- I2.inheritAttrs = !1;
- I2.props = {
- prefixCls: String,
- /** Virtual filler height. Should be `count * itemMinHeight` */
- height: Number,
- /** Set offset of visible items. Should be the top of start item position */
- offset: Number,
- onInnerResize: Function
- };
- const rie = (t, e) => {
- let {
- setRef: n
- } = t, {
- slots: r
- } = e;
- var i;
- const a = qr((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
- return a && a.length ? ku(a[0], {
- ref: n
- }) : a;
- };
- rie.props = {
- setRef: {
- type: Function,
- default: () => {
- }
- }
- };
- const JNe = 20;
- function W7(t) {
- return "touches" in t ? t.touches[0].pageY : t.pageY;
- }
- const e8e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ScrollBar",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- scrollTop: Number,
- scrollHeight: Number,
- height: Number,
- count: Number,
- onScroll: {
- type: Function
- },
- onStartMove: {
- type: Function
- },
- onStopMove: {
- type: Function
- }
- },
- setup() {
- return {
- moveRaf: null,
- scrollbarRef: kb(),
- thumbRef: kb(),
- visibleTimeout: null,
- state: zn({
- dragging: !1,
- pageY: null,
- startTop: null,
- visible: !1
- })
- };
- },
- watch: {
- scrollTop: {
- handler() {
- this.delayHidden();
- },
- flush: "post"
- }
- },
- mounted() {
- var t, e;
- (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, mi ? {
- passive: !1
- } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, mi ? {
- passive: !1
- } : !1);
- },
- beforeUnmount() {
- this.removeEvents(), clearTimeout(this.visibleTimeout);
- },
- methods: {
- delayHidden() {
- clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
- this.state.visible = !1;
- }, 2e3);
- },
- onScrollbarTouchStart(t) {
- t.preventDefault();
- },
- onContainerMouseDown(t) {
- t.stopPropagation(), t.preventDefault();
- },
- // ======================= Clean =======================
- patchEvents() {
- window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, mi ? {
- passive: !1
- } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
- },
- removeEvents() {
- window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, mi ? {
- passive: !1
- } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, mi ? {
- passive: !1
- } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, mi ? {
- passive: !1
- } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), en.cancel(this.moveRaf);
- },
- // ======================= Thumb =======================
- onMouseDown(t) {
- const {
- onStartMove: e
- } = this.$props;
- k(this.state, {
- dragging: !0,
- pageY: W7(t),
- startTop: this.getTop()
- }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
- },
- onMouseMove(t) {
- const {
- dragging: e,
- pageY: n,
- startTop: r
- } = this.state, {
- onScroll: i
- } = this.$props;
- if (en.cancel(this.moveRaf), e) {
- const a = W7(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
- this.moveRaf = en(() => {
- i(c);
- });
- }
- },
- onMouseUp() {
- const {
- onStopMove: t
- } = this.$props;
- this.state.dragging = !1, t(), this.removeEvents();
- },
- // ===================== Calculate =====================
- getSpinHeight() {
- const {
- height: t,
- scrollHeight: e
- } = this.$props;
- let n = t / e * 100;
- return n = Math.max(n, JNe), n = Math.min(n, t / 2), Math.floor(n);
- },
- getEnableScrollRange() {
- const {
- scrollHeight: t,
- height: e
- } = this.$props;
- return t - e || 0;
- },
- getEnableHeightRange() {
- const {
- height: t
- } = this.$props, e = this.getSpinHeight();
- return t - e || 0;
- },
- getTop() {
- const {
- scrollTop: t
- } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
- return t === 0 || e === 0 ? 0 : t / e * n;
- },
- // Not show scrollbar when height is large than scrollHeight
- showScroll() {
- const {
- height: t,
- scrollHeight: e
- } = this.$props;
- return e > t;
- }
- },
- render() {
- const {
- dragging: t,
- visible: e
- } = this.state, {
- prefixCls: n
- } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
- return D("div", {
- ref: this.scrollbarRef,
- class: Re(`${n}-scrollbar`, {
- [`${n}-scrollbar-show`]: a
- }),
- style: {
- width: "8px",
- top: 0,
- bottom: 0,
- right: 0,
- position: "absolute",
- display: o ? void 0 : "none"
- },
- onMousedown: this.onContainerMouseDown,
- onMousemove: this.delayHidden
- }, [D("div", {
- ref: this.thumbRef,
- class: Re(`${n}-scrollbar-thumb`, {
- [`${n}-scrollbar-thumb-moving`]: t
- }),
- style: {
- width: "100%",
- height: r,
- top: i,
- left: 0,
- position: "absolute",
- background: "rgba(0, 0, 0, 0.5)",
- borderRadius: "99px",
- cursor: "pointer",
- userSelect: "none"
- },
- onMousedown: this.onMouseDown
- }, null)]);
- }
- });
- function t8e(t, e, n, r) {
- const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = ee(Symbol("update"));
- me(t, () => {
- o.value = Symbol("update");
- });
- let s;
- function l() {
- en.cancel(s);
- }
- function u() {
- l(), s = en(() => {
- i.forEach((f, d) => {
- if (f && f.offsetParent) {
- const {
- offsetHeight: h
- } = f;
- a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
- }
- });
- });
- }
- function c(f, d) {
- const h = e(f);
- i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
- }
- return qu(() => {
- l();
- }), [c, u, a, o];
- }
- function n8e(t, e, n, r, i, a, o, s) {
- let l;
- return (u) => {
- if (u == null) {
- s();
- return;
- }
- en.cancel(l);
- const c = e.value, f = r.itemHeight;
- if (typeof u == "number")
- o(u);
- else if (u && typeof u == "object") {
- let d;
- const {
- align: h
- } = u;
- "index" in u ? {
- index: d
- } = u : d = c.findIndex((g) => i(g) === u.key);
- const {
- offset: p = 0
- } = u, v = (g, m) => {
- if (g < 0 || !t.value) return;
- const y = t.value.clientHeight;
- let _ = !1, O = m;
- if (y) {
- const S = m || h;
- let x = 0, C = 0, P = 0;
- const $ = Math.min(c.length, d);
- for (let M = 0; M <= $; M += 1) {
- const R = i(c[M]);
- C = x;
- const N = n.get(R);
- P = C + (N === void 0 ? f : N), x = P, M === d && N === void 0 && (_ = !0);
- }
- const T = t.value.scrollTop;
- let E = null;
- switch (S) {
- case "top":
- E = C - p;
- break;
- case "bottom":
- E = P - y + p;
- break;
- default: {
- const M = T + y;
- C < T ? O = "top" : P > M && (O = "bottom");
- }
- }
- E !== null && E !== T && o(E);
- }
- l = en(() => {
- _ && a(), v(g - 1, O);
- }, 2);
- };
- v(5);
- }
- };
- }
- const r8e = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), iie = (t, e) => {
- let n = !1, r = null;
- function i() {
- clearTimeout(r), n = !0, r = setTimeout(() => {
- n = !1;
- }, 50);
- }
- return function(a) {
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- const s = (
- // Pass origin wheel when on the top
- a < 0 && t.value || // Pass origin wheel when on the bottom
- a > 0 && e.value
- );
- return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
- };
- };
- function i8e(t, e, n, r) {
- let i = 0, a = null, o = null, s = !1;
- const l = iie(e, n);
- function u(f) {
- if (!t.value) return;
- en.cancel(a);
- const {
- deltaY: d
- } = f;
- i += d, o = d, !l(d) && (r8e || f.preventDefault(), a = en(() => {
- r(i * (s ? 10 : 1)), i = 0;
- }));
- }
- function c(f) {
- t.value && (s = f.detail === o);
- }
- return [u, c];
- }
- const a8e = 14 / 15;
- function o8e(t, e, n) {
- let r = !1, i = 0, a = null, o = null;
- const s = () => {
- a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
- }, l = (d) => {
- if (r) {
- const h = Math.ceil(d.touches[0].pageY);
- let p = i - h;
- i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
- p *= a8e, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
- }, 16);
- }
- }, u = () => {
- r = !1, s();
- }, c = (d) => {
- s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
- passive: !1
- }), a.addEventListener("touchend", u));
- }, f = () => {
- };
- _t(() => {
- document.addEventListener("touchmove", f, {
- passive: !1
- }), me(t, (d) => {
- e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
- passive: !1
- });
- }, {
- immediate: !0
- });
- }), Qt(() => {
- document.removeEventListener("touchmove", f);
- });
- }
- var s8e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const l8e = [], u8e = {
- overflowY: "auto",
- overflowAnchor: "none"
- };
- function c8e(t, e, n, r, i, a) {
- let {
- getKey: o
- } = a;
- return t.slice(e, n + 1).map((s, l) => {
- const u = e + l, c = i(s, u, {
- // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
- }), f = o(s);
- return D(rie, {
- key: f,
- setRef: (d) => r(s, d)
- }, {
- default: () => [c]
- });
- });
- }
- const f8e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "List",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- data: oe.array,
- height: Number,
- itemHeight: Number,
- /** If not match virtual scroll condition, Set List still use height of container. */
- fullHeight: {
- type: Boolean,
- default: void 0
- },
- itemKey: {
- type: [String, Number, Function],
- required: !0
- },
- component: {
- type: [String, Object]
- },
- /** Set `false` will always use real scroll instead of virtual one */
- virtual: {
- type: Boolean,
- default: void 0
- },
- children: Function,
- onScroll: Function,
- onMousedown: Function,
- onMouseenter: Function,
- onVisibleChange: Function
- },
- setup(t, e) {
- let {
- expose: n
- } = e;
- const r = V(() => {
- const {
- height: H,
- itemHeight: U,
- virtual: j
- } = t;
- return !!(j !== !1 && H && U);
- }), i = V(() => {
- const {
- height: H,
- itemHeight: U,
- data: j
- } = t;
- return r.value && j && U * j.length > H;
- }), a = zn({
- scrollTop: 0,
- scrollMoving: !1
- }), o = V(() => t.data || l8e), s = ve([]);
- me(o, () => {
- s.value = es(o.value).slice();
- }, {
- immediate: !0
- });
- const l = ve((H) => {
- });
- me(() => t.itemKey, (H) => {
- typeof H == "function" ? l.value = H : l.value = (U) => U == null ? void 0 : U[H];
- }, {
- immediate: !0
- });
- const u = ve(), c = ve(), f = ve(), d = (H) => l.value(H), h = {
- getKey: d
- };
- function p(H) {
- let U;
- typeof H == "function" ? U = H(a.scrollTop) : U = H;
- const j = x(U);
- u.value && (u.value.scrollTop = j), a.scrollTop = j;
- }
- const [v, g, m, y] = t8e(s, d), _ = zn({
- scrollHeight: void 0,
- start: 0,
- end: 0,
- offset: void 0
- }), O = ve(0);
- _t(() => {
- Bt(() => {
- var H;
- O.value = ((H = c.value) === null || H === void 0 ? void 0 : H.offsetHeight) || 0;
- });
- }), rp(() => {
- Bt(() => {
- var H;
- O.value = ((H = c.value) === null || H === void 0 ? void 0 : H.offsetHeight) || 0;
- });
- }), me([r, s], () => {
- r.value || k(_, {
- scrollHeight: void 0,
- start: 0,
- end: s.value.length - 1,
- offset: void 0
- });
- }, {
- immediate: !0
- }), me([r, s, O, i], () => {
- r.value && !i.value && k(_, {
- scrollHeight: O.value,
- start: 0,
- end: s.value.length - 1,
- offset: void 0
- }), u.value && (a.scrollTop = u.value.scrollTop);
- }, {
- immediate: !0
- }), me([i, r, () => a.scrollTop, s, y, () => t.height, O], () => {
- if (!r.value || !i.value)
- return;
- let H = 0, U, j, Y;
- const ne = s.value.length, fe = s.value, ue = a.scrollTop, {
- itemHeight: ye,
- height: se
- } = t, he = ue + se;
- for (let re = 0; re < ne; re += 1) {
- const q = fe[re], K = d(q);
- let de = m.get(K);
- de === void 0 && (de = ye);
- const xe = H + de;
- U === void 0 && xe >= ue && (U = re, j = H), Y === void 0 && xe > he && (Y = re), H = xe;
- }
- U === void 0 && (U = 0, j = 0, Y = Math.ceil(se / ye)), Y === void 0 && (Y = ne - 1), Y = Math.min(Y + 1, ne), k(_, {
- scrollHeight: H,
- start: U,
- end: Y,
- offset: j
- });
- }, {
- immediate: !0
- });
- const S = V(() => _.scrollHeight - t.height);
- function x(H) {
- let U = H;
- return Number.isNaN(S.value) || (U = Math.min(U, S.value)), U = Math.max(U, 0), U;
- }
- const C = V(() => a.scrollTop <= 0), P = V(() => a.scrollTop >= S.value), $ = iie(C, P);
- function T(H) {
- p(H);
- }
- function E(H) {
- var U;
- const {
- scrollTop: j
- } = H.currentTarget;
- j !== a.scrollTop && p(j), (U = t.onScroll) === null || U === void 0 || U.call(t, H);
- }
- const [M, R] = i8e(r, C, P, (H) => {
- p((U) => U + H);
- });
- o8e(r, u, (H, U) => $(H, U) ? !1 : (M({
- preventDefault() {
- },
- deltaY: H
- }), !0));
- function N(H) {
- r.value && H.preventDefault();
- }
- const I = () => {
- u.value && (u.value.removeEventListener("wheel", M, mi ? {
- passive: !1
- } : !1), u.value.removeEventListener("DOMMouseScroll", R), u.value.removeEventListener("MozMousePixelScroll", N));
- };
- Vt(() => {
- Bt(() => {
- u.value && (I(), u.value.addEventListener("wheel", M, mi ? {
- passive: !1
- } : !1), u.value.addEventListener("DOMMouseScroll", R), u.value.addEventListener("MozMousePixelScroll", N));
- });
- }), Qt(() => {
- I();
- });
- const B = n8e(u, s, m, t, d, g, p, () => {
- var H;
- (H = f.value) === null || H === void 0 || H.delayHidden();
- });
- n({
- scrollTo: B
- });
- const Q = V(() => {
- let H = null;
- return t.height && (H = k({
- [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
- }, u8e), r.value && (H.overflowY = "hidden", a.scrollMoving && (H.pointerEvents = "none"))), H;
- });
- return me([() => _.start, () => _.end, s], () => {
- if (t.onVisibleChange) {
- const H = s.value.slice(_.start, _.end + 1);
- t.onVisibleChange(H, s.value);
- }
- }, {
- flush: "post"
- }), {
- state: a,
- mergedData: s,
- componentStyle: Q,
- onFallbackScroll: E,
- onScrollBar: T,
- componentRef: u,
- useVirtual: r,
- calRes: _,
- collectHeight: g,
- setInstance: v,
- sharedConfig: h,
- scrollBarRef: f,
- fillerInnerRef: c,
- delayHideScrollBar: () => {
- var H;
- (H = f.value) === null || H === void 0 || H.delayHidden();
- }
- };
- },
- render() {
- const t = k(k({}, this.$props), this.$attrs), {
- prefixCls: e = "rc-virtual-list",
- height: n,
- itemHeight: r,
- // eslint-disable-next-line no-unused-vars
- fullHeight: i,
- data: a,
- itemKey: o,
- virtual: s,
- component: l = "div",
- onScroll: u,
- children: c = this.$slots.default,
- style: f,
- class: d
- } = t, h = s8e(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = Re(e, d), {
- scrollTop: v
- } = this.state, {
- scrollHeight: g,
- offset: m,
- start: y,
- end: _
- } = this.calRes, {
- componentStyle: O,
- onFallbackScroll: S,
- onScrollBar: x,
- useVirtual: C,
- collectHeight: P,
- sharedConfig: $,
- setInstance: T,
- mergedData: E,
- delayHideScrollBar: M
- } = this;
- return D("div", te({
- style: k(k({}, f), {
- position: "relative"
- }),
- class: p
- }, h), [D(l, {
- class: `${e}-holder`,
- style: O,
- ref: "componentRef",
- onScroll: S,
- onMouseenter: M
- }, {
- default: () => [D(I2, {
- prefixCls: e,
- height: g,
- offset: m,
- onInnerResize: P,
- ref: "fillerInnerRef"
- }, {
- default: () => c8e(E, y, _, T, c, $)
- })]
- }), C && D(e8e, {
- ref: "scrollBarRef",
- prefixCls: e,
- scrollTop: v,
- height: n,
- scrollHeight: g,
- count: E.length,
- onScroll: x,
- onStartMove: () => {
- this.state.scrollMoving = !0;
- },
- onStopMove: () => {
- this.state.scrollMoving = !1;
- }
- }, null)]);
- }
- });
- function d8e(t, e, n) {
- const r = ee(t());
- return me(e, (i, a) => {
- n ? n(i, a) && (r.value = t()) : r.value = t();
- }), r;
- }
- function h8e() {
- return /(mac\sos|macintosh)/i.test(navigator.appVersion);
- }
- const aie = Symbol("SelectContextKey");
- function p8e(t) {
- return Et(aie, t);
- }
- function v8e() {
- return et(aie, {});
- }
- var g8e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function Q7(t) {
- return typeof t == "string" || typeof t == "number";
- }
- const m8e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "OptionList",
- inheritAttrs: !1,
- setup(t, e) {
- let {
- expose: n,
- slots: r
- } = e;
- const i = ZNe(), a = v8e(), o = V(() => `${i.prefixCls}-item`), s = d8e(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (S) => S[0]), l = kb(), u = (S) => {
- S.preventDefault();
- }, c = (S) => {
- l.current && l.current.scrollTo(typeof S == "number" ? {
- index: S
- } : S);
- }, f = function(S) {
- let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
- const C = s.value.length;
- for (let P = 0; P < C; P += 1) {
- const $ = (S + P * x + C) % C, {
- group: T,
- data: E
- } = s.value[$];
- if (!T && !E.disabled)
- return $;
- }
- return -1;
- }, d = zn({
- activeIndex: f(0)
- }), h = function(S) {
- let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- d.activeIndex = S;
- const C = {
- source: x ? "keyboard" : "mouse"
- }, P = s.value[S];
- if (!P) {
- a.onActiveValue(null, -1, C);
- return;
- }
- a.onActiveValue(P.value, S, C);
- };
- me([() => s.value.length, () => i.searchValue], () => {
- h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
- }, {
- immediate: !0
- });
- const p = (S) => a.rawValues.has(S) && i.mode !== "combobox";
- me([() => i.open, () => i.searchValue], () => {
- if (!i.multiple && i.open && a.rawValues.size === 1) {
- const S = Array.from(a.rawValues)[0], x = es(s.value).findIndex((C) => {
- let {
- data: P
- } = C;
- return P[a.fieldNames.value] === S;
- });
- x !== -1 && (h(x), Bt(() => {
- c(x);
- }));
- }
- i.open && Bt(() => {
- var S;
- (S = l.current) === null || S === void 0 || S.scrollTo(void 0);
- });
- }, {
- immediate: !0,
- flush: "post"
- });
- const v = (S) => {
- S !== void 0 && a.onSelect(S, {
- selected: !a.rawValues.has(S)
- }), i.multiple || i.toggleOpen(!1);
- }, g = (S) => typeof S.label == "function" ? S.label() : S.label;
- function m(S) {
- const x = s.value[S];
- if (!x) return null;
- const C = x.data || {}, {
- value: P
- } = C, {
- group: $
- } = x, T = M2(C, !0), E = g(x);
- return x ? D("div", te(te({
- "aria-label": typeof E == "string" && !$ ? E : null
- }, T), {}, {
- key: S,
- role: $ ? "presentation" : "option",
- id: `${i.id}_list_${S}`,
- "aria-selected": p(P)
- }), [P]) : null;
- }
- return n({
- onKeydown: (S) => {
- const {
- which: x,
- ctrlKey: C
- } = S;
- switch (x) {
- case Me.N:
- case Me.P:
- case Me.UP:
- case Me.DOWN: {
- let P = 0;
- if (x === Me.UP ? P = -1 : x === Me.DOWN ? P = 1 : h8e() && C && (x === Me.N ? P = 1 : x === Me.P && (P = -1)), P !== 0) {
- const $ = f(d.activeIndex + P, P);
- c($), h($, !0);
- }
- break;
- }
- case Me.ENTER: {
- const P = s.value[d.activeIndex];
- P && !P.data.disabled ? v(P.value) : v(void 0), i.open && S.preventDefault();
- break;
- }
- case Me.ESC:
- i.toggleOpen(!1), i.open && S.stopPropagation();
- }
- },
- onKeyup: () => {
- },
- scrollTo: (S) => {
- c(S);
- }
- }), () => {
- const {
- id: S,
- notFoundContent: x,
- onPopupScroll: C
- } = i, {
- menuItemSelectedIcon: P,
- fieldNames: $,
- virtual: T,
- listHeight: E,
- listItemHeight: M
- } = a, R = r.option, {
- activeIndex: N
- } = d, I = Object.keys($).map((B) => $[B]);
- return s.value.length === 0 ? D("div", {
- role: "listbox",
- id: `${S}_list`,
- class: `${o.value}-empty`,
- onMousedown: u
- }, [x]) : D(Wt, null, [D("div", {
- role: "listbox",
- id: `${S}_list`,
- style: {
- height: 0,
- width: 0,
- overflow: "hidden"
- }
- }, [m(N - 1), m(N), m(N + 1)]), D(f8e, {
- itemKey: "key",
- ref: l,
- data: s.value,
- height: E,
- itemHeight: M,
- fullHeight: !1,
- onMousedown: u,
- onScroll: C,
- virtual: T
- }, {
- default: (B, Q) => {
- var W;
- const {
- group: H,
- groupOption: U,
- data: j,
- value: Y
- } = B, {
- key: ne
- } = j, fe = typeof B.label == "function" ? B.label() : B.label;
- if (H) {
- const Fe = (W = j.title) !== null && W !== void 0 ? W : Q7(fe) && fe;
- return D("div", {
- class: Re(o.value, `${o.value}-group`),
- title: Fe
- }, [R ? R(j) : fe !== void 0 ? fe : ne]);
- }
- const {
- disabled: ue,
- title: ye,
- children: se,
- style: he,
- class: re,
- className: q
- } = j, K = g8e(j, ["disabled", "title", "children", "style", "class", "className"]), de = si(K, I), xe = p(Y), we = `${o.value}-option`, He = Re(o.value, we, re, q, {
- [`${we}-grouped`]: U,
- [`${we}-active`]: N === Q && !ue,
- [`${we}-disabled`]: ue,
- [`${we}-selected`]: xe
- }), je = g(B), Be = !P || typeof P == "function" || xe, Le = typeof je == "number" ? je : je || Y;
- let Pe = Q7(Le) ? Le.toString() : void 0;
- return ye !== void 0 && (Pe = ye), D("div", te(te({}, de), {}, {
- "aria-selected": xe,
- class: He,
- title: Pe,
- onMousemove: (Fe) => {
- K.onMousemove && K.onMousemove(Fe), !(N === Q || ue) && h(Q);
- },
- onClick: (Fe) => {
- ue || v(Y), K.onClick && K.onClick(Fe);
- },
- style: he
- }), [D("div", {
- class: `${we}-content`
- }, [R ? R(j) : Le]), po(P) || xe, Be && D(Vh, {
- class: `${o.value}-option-state`,
- customizeIcon: P,
- customizeIconProps: {
- isSelected: xe
- }
- }, {
- default: () => [xe ? "✓" : null]
- })]);
- }
- })]);
- };
- }
- });
- var y8e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function b8e(t) {
- const e = t, {
- key: n,
- children: r
- } = e, i = e.props, {
- value: a,
- disabled: o
- } = i, s = y8e(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
- return k({
- key: n,
- value: a !== void 0 ? a : n,
- children: l,
- disabled: o || o === ""
- }, s);
- }
- function o8(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- return qr(t).map((r, i) => {
- var a;
- if (!po(r) || !r.type)
- return null;
- const {
- type: {
- isSelectOptGroup: o
- },
- key: s,
- children: l,
- props: u
- } = r;
- if (e || !o)
- return b8e(r);
- const c = l && l.default ? l.default() : void 0, f = (u == null ? void 0 : u.label) || ((a = l.label) === null || a === void 0 ? void 0 : a.call(l)) || s;
- return k(k({
- key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
- }, u), {
- label: f,
- options: o8(c || [])
- });
- }).filter((r) => r);
- }
- function _8e(t, e, n) {
- const r = ve(), i = ve(), a = ve(), o = ve([]);
- return me([t, e], () => {
- t.value ? o.value = es(t.value).slice() : o.value = o8(e.value);
- }, {
- immediate: !0,
- deep: !0
- }), Vt(() => {
- const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
- function f(d) {
- let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- for (let p = 0; p < d.length; p += 1) {
- const v = d[p];
- !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
- }
- }
- f(s), r.value = s, i.value = l, a.value = u;
- }), {
- options: r,
- valueOptions: i,
- labelOptions: a
- };
- }
- let H7 = 0;
- const O8e = process.env.NODE_ENV !== "test" && is();
- function S8e() {
- let t;
- return O8e ? (t = H7, H7 += 1) : t = "TEST_OR_SSR", t;
- }
- function x8e() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ee("");
- const e = `rc_select_${S8e()}`;
- return t.value || e;
- }
- function s8(t) {
- return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
- }
- const w8e = typeof window < "u" && window.document && window.document.documentElement;
- process.env.NODE_ENV;
- function C8e(t) {
- const {
- mode: e,
- options: n,
- children: r,
- backfill: i,
- allowClear: a,
- placeholder: o,
- getInputElement: s,
- showSearch: l,
- onSearch: u,
- defaultOpen: c,
- autofocus: f,
- labelInValue: d,
- value: h,
- inputValue: p,
- optionLabelProp: v
- } = t, g = a8(e), m = l !== void 0 ? l : g || e === "combobox", y = n || o8(r);
- if (Lo(e !== "tags" || y.every((_) => !_.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), Lo(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Lo(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), Lo(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), qW(e !== "combobox" || !s || !a || !o, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !m && e !== "combobox" && e !== "tags" && Lo(!1, "`onSearch` should work with `showSearch` instead of use alone."), qW(!c || f, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), h != null) {
- const _ = s8(h);
- Lo(!d || _.every((O) => typeof O == "object" && ("key" in O || "value" in O)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), Lo(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
- }
- if (r) {
- let _ = null;
- r.some((O) => {
- var S;
- if (!po(O) || !O.type)
- return !1;
- const {
- type: x
- } = O;
- return x.isSelectOption ? !1 : x.isSelectOptGroup ? !(((S = O.children) === null || S === void 0 ? void 0 : S.default()) || []).every(($) => !po($) || !O.type || $.type.isSelectOption ? !0 : (_ = $.type, !1)) : (_ = x, !0);
- }), _ && Lo(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${_.displayName || _.name || _}\`.`), Lo(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
- }
- }
- function sE(t, e) {
- return s8(t).join("").toUpperCase().includes(e);
- }
- const T8e = (t, e, n, r, i) => V(() => {
- const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
- if (!a || s === !1)
- return t.value;
- const {
- options: l,
- label: u,
- value: c
- } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? sE(m[o], h) : m[l] ? sE(m[u !== "children" ? u : "label"], h) : sE(m[c], h), v = d ? (g) => SR(g) : (g) => g;
- return t.value.forEach((g) => {
- if (g[l]) {
- if (p(a, v(g)))
- f.push(g);
- else {
- const y = g[l].filter((_) => p(a, v(_)));
- y.length && f.push(k(k({}, g), {
- [l]: y
- }));
- }
- return;
- }
- p(a, v(g)) && f.push(g);
- }), f;
- }), P8e = (t, e) => {
- const n = ve({
- values: /* @__PURE__ */ new Map(),
- options: /* @__PURE__ */ new Map()
- });
- return [V(() => {
- const {
- values: a,
- options: o
- } = n.value, s = t.value.map((c) => {
- var f;
- return c.label === void 0 ? k(k({}, c), {
- label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
- }) : c;
- }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
- return s.forEach((c) => {
- l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
- }), n.value.values = l, n.value.options = u, s;
- }), (a) => e.value.get(a) || n.value.options.get(a)];
- };
- function Rg(t, e) {
- const {
- defaultValue: n,
- value: r = ee()
- } = e || {};
- let i = typeof t == "function" ? t() : t;
- r.value !== void 0 && (i = z(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
- const a = ee(i), o = ee(i);
- Vt(() => {
- let l = r.value !== void 0 ? r.value : a.value;
- e.postState && (l = e.postState(l)), o.value = l;
- });
- function s(l) {
- const u = o.value;
- a.value = l, es(o.value) !== l && e.onChange && e.onChange(l, u);
- }
- return me(r, () => {
- a.value = r.value;
- }), [o, s];
- }
- function tr(t) {
- const e = typeof t == "function" ? t() : t, n = ee(e);
- function r(i) {
- n.value = i;
- }
- return [n, r];
- }
- const $8e = ["inputValue"];
- function oie() {
- return k(k({}, nie()), {
- prefixCls: String,
- id: String,
- backfill: {
- type: Boolean,
- default: void 0
- },
- // >>> Field Names
- fieldNames: Object,
- // >>> Search
- /** @deprecated Use `searchValue` instead */
- inputValue: String,
- searchValue: String,
- onSearch: Function,
- autoClearSearchValue: {
- type: Boolean,
- default: void 0
- },
- // >>> Select
- onSelect: Function,
- onDeselect: Function,
- // >>> Options
- /**
- * In Select, `false` means do nothing.
- * In TreeSelect, `false` will highlight match item.
- * It's by design.
- */
- filterOption: {
- type: [Boolean, Function],
- default: void 0
- },
- filterSort: Function,
- optionFilterProp: String,
- optionLabelProp: String,
- options: Array,
- defaultActiveFirstOption: {
- type: Boolean,
- default: void 0
- },
- virtual: {
- type: Boolean,
- default: void 0
- },
- listHeight: Number,
- listItemHeight: Number,
- // >>> Icon
- menuItemSelectedIcon: oe.any,
- mode: String,
- labelInValue: {
- type: Boolean,
- default: void 0
- },
- value: oe.any,
- defaultValue: oe.any,
- onChange: Function,
- children: Array
- });
- }
- function A8e(t) {
- return !t || typeof t != "object";
- }
- const E8e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "VcSelect",
- inheritAttrs: !1,
- props: li(oie(), {
- prefixCls: "vc-select",
- autoClearSearchValue: !0,
- listHeight: 200,
- listItemHeight: 20,
- dropdownMatchSelectWidth: !0
- }),
- setup(t, e) {
- let {
- expose: n,
- attrs: r,
- slots: i
- } = e;
- const a = x8e(Lr(t, "id")), o = V(() => a8(t.mode)), s = V(() => !!(!t.options && t.children)), l = V(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = V(() => Dre(t.fieldNames, s.value)), [c, f] = Rg("", {
- value: V(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
- postState: (re) => re || ""
- }), d = _8e(Lr(t, "options"), Lr(t, "children"), u), {
- valueOptions: h,
- labelOptions: p,
- options: v
- } = d, g = (re) => s8(re).map((K) => {
- var de, xe;
- let we, He, je, Be;
- A8e(K) ? we = K : (je = K.key, He = K.label, we = (de = K.value) !== null && de !== void 0 ? de : je);
- const Le = h.value.get(we);
- return Le && (He === void 0 && (He = Le == null ? void 0 : Le[t.optionLabelProp || u.value.label]), je === void 0 && (je = (xe = Le == null ? void 0 : Le.key) !== null && xe !== void 0 ? xe : we), Be = Le == null ? void 0 : Le.disabled), {
- label: He,
- value: we,
- key: je,
- disabled: Be,
- option: Le
- };
- }), [m, y] = Rg(t.defaultValue, {
- value: Lr(t, "value")
- }), _ = V(() => {
- var re;
- const q = g(m.value);
- return t.mode === "combobox" && !(!((re = q[0]) === null || re === void 0) && re.value) ? [] : q;
- }), [O, S] = P8e(_, h), x = V(() => {
- if (!t.mode && O.value.length === 1) {
- const re = O.value[0];
- if (re.value === null && (re.label === null || re.label === void 0))
- return [];
- }
- return O.value.map((re) => {
- var q;
- return k(k({}, re), {
- label: (q = typeof re.label == "function" ? re.label() : re.label) !== null && q !== void 0 ? q : re.value
- });
- });
- }), C = V(() => new Set(O.value.map((re) => re.value)));
- Vt(() => {
- var re;
- if (t.mode === "combobox") {
- const q = (re = O.value[0]) === null || re === void 0 ? void 0 : re.value;
- q != null && f(String(q));
- }
- }, {
- flush: "post"
- });
- const P = (re, q) => {
- const K = q ?? re;
- return {
- [u.value.value]: re,
- [u.value.label]: K
- };
- }, $ = ve();
- Vt(() => {
- if (t.mode !== "tags") {
- $.value = v.value;
- return;
- }
- const re = v.value.slice(), q = (K) => h.value.has(K);
- [...O.value].sort((K, de) => K.value < de.value ? -1 : 1).forEach((K) => {
- const de = K.value;
- q(de) || re.push(P(de, K.label));
- }), $.value = re;
- });
- const T = T8e($, u, c, l, Lr(t, "optionFilterProp")), E = V(() => t.mode !== "tags" || !c.value || T.value.some((re) => re[t.optionFilterProp || "value"] === c.value) ? T.value : [P(c.value), ...T.value]), M = V(() => t.filterSort ? [...E.value].sort((re, q) => t.filterSort(re, q)) : E.value), R = V(() => y4e(M.value, {
- fieldNames: u.value,
- childrenAsData: s.value
- })), N = (re) => {
- const q = g(re);
- if (y(q), t.onChange && // Trigger event only when value changed
- (q.length !== O.value.length || q.some((K, de) => {
- var xe;
- return ((xe = O.value[de]) === null || xe === void 0 ? void 0 : xe.value) !== (K == null ? void 0 : K.value);
- }))) {
- const K = t.labelInValue ? q.map((xe) => k(k({}, xe), {
- originLabel: xe.label,
- label: typeof xe.label == "function" ? xe.label() : xe.label
- })) : q.map((xe) => xe.value), de = q.map((xe) => SR(S(xe.value)));
- t.onChange(
- // Value
- o.value ? K : K[0],
- // Option
- o.value ? de : de[0]
- );
- }
- }, [I, B] = tr(null), [Q, W] = tr(0), H = V(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), U = function(re, q) {
- let {
- source: K = "keyboard"
- } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
- W(q), t.backfill && t.mode === "combobox" && re !== null && K === "keyboard" && B(String(re));
- }, j = (re, q) => {
- const K = () => {
- var de;
- const xe = S(re), we = xe == null ? void 0 : xe[u.value.label];
- return [t.labelInValue ? {
- label: typeof we == "function" ? we() : we,
- originLabel: we,
- value: re,
- key: (de = xe == null ? void 0 : xe.key) !== null && de !== void 0 ? de : re
- } : re, SR(xe)];
- };
- if (q && t.onSelect) {
- const [de, xe] = K();
- t.onSelect(de, xe);
- } else if (!q && t.onDeselect) {
- const [de, xe] = K();
- t.onDeselect(de, xe);
- }
- }, Y = (re, q) => {
- let K;
- const de = o.value ? q.selected : !0;
- de ? K = o.value ? [...O.value, re] : [re] : K = O.value.filter((xe) => xe.value !== re), N(K), j(re, de), t.mode === "combobox" ? B("") : (!o.value || t.autoClearSearchValue) && (f(""), B(""));
- }, ne = (re, q) => {
- N(re), (q.type === "remove" || q.type === "clear") && q.values.forEach((K) => {
- j(K.value, !1);
- });
- }, fe = (re, q) => {
- var K;
- if (f(re), B(null), q.source === "submit") {
- const de = (re || "").trim();
- if (de) {
- const xe = Array.from(/* @__PURE__ */ new Set([...C.value, de]));
- N(xe), j(de, !0), f("");
- }
- return;
- }
- q.source !== "blur" && (t.mode === "combobox" && N(re), (K = t.onSearch) === null || K === void 0 || K.call(t, re));
- }, ue = (re) => {
- let q = re;
- t.mode !== "tags" && (q = re.map((de) => {
- const xe = p.value.get(de);
- return xe == null ? void 0 : xe.value;
- }).filter((de) => de !== void 0));
- const K = Array.from(/* @__PURE__ */ new Set([...C.value, ...q]));
- N(K), K.forEach((de) => {
- j(de, !0);
- });
- }, ye = V(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
- p8e(tie(k(k({}, d), {
- flattenOptions: R,
- onActiveValue: U,
- defaultActiveFirstOption: H,
- onSelect: Y,
- menuItemSelectedIcon: Lr(t, "menuItemSelectedIcon"),
- rawValues: C,
- fieldNames: u,
- virtual: ye,
- listHeight: Lr(t, "listHeight"),
- listItemHeight: Lr(t, "listItemHeight"),
- childrenAsData: s
- }))), process.env.NODE_ENV !== "production" && Vt(() => {
- C8e(t);
- }, {
- flush: "post"
- });
- const se = ee();
- n({
- focus() {
- var re;
- (re = se.value) === null || re === void 0 || re.focus();
- },
- blur() {
- var re;
- (re = se.value) === null || re === void 0 || re.blur();
- },
- scrollTo(re) {
- var q;
- (q = se.value) === null || q === void 0 || q.scrollTo(re);
- }
- });
- const he = V(() => si(t, [
- "id",
- "mode",
- "prefixCls",
- "backfill",
- "fieldNames",
- // Search
- "inputValue",
- "searchValue",
- "onSearch",
- "autoClearSearchValue",
- // Select
- "onSelect",
- "onDeselect",
- "dropdownMatchSelectWidth",
- // Options
- "filterOption",
- "filterSort",
- "optionFilterProp",
- "optionLabelProp",
- "options",
- "children",
- "defaultActiveFirstOption",
- "menuItemSelectedIcon",
- "virtual",
- "listHeight",
- "listItemHeight",
- // Value
- "value",
- "defaultValue",
- "labelInValue",
- "onChange"
- ]));
- return () => D(KNe, te(te(te({}, he.value), r), {}, {
- id: a,
- prefixCls: t.prefixCls,
- ref: se,
- omitDomProps: $8e,
- mode: t.mode,
- displayValues: x.value,
- onDisplayValuesChange: ne,
- searchValue: c.value,
- onSearch: fe,
- onSearchSplit: ue,
- dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
- OptionList: m8e,
- emptyOptions: !R.value.length,
- activeValue: I.value,
- activeDescendantId: `${a}_list_${Q.value}`
- }), i);
- }
- }), l8 = () => null;
- l8.isSelectOption = !0;
- l8.displayName = "ASelectOption";
- const u8 = () => null;
- u8.isSelectOptGroup = !0;
- u8.displayName = "ASelectOptGroup";
- var M8e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, I8e = Symbol("iconContext"), sie = function() {
- return et(I8e, {
- prefixCls: ee("anticon"),
- rootClassName: ee(""),
- csp: ee()
- });
- };
- function c8() {
- return !!(typeof window < "u" && window.document && window.document.createElement);
- }
- function D8e(t, e) {
- return t && t.contains ? t.contains(e) : !1;
- }
- var G7 = "data-vc-order", R8e = "vc-icon-key", $R = /* @__PURE__ */ new Map();
- function lie() {
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
- return e ? e.startsWith("data-") ? e : "data-".concat(e) : R8e;
- }
- function f8(t) {
- if (t.attachTo)
- return t.attachTo;
- var e = document.querySelector("head");
- return e || document.body;
- }
- function k8e(t) {
- return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
- }
- function uie(t) {
- return Array.from(($R.get(t) || t).children).filter(function(e) {
- return e.tagName === "STYLE";
- });
- }
- function cie(t) {
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- if (!c8())
- return null;
- var n = e.csp, r = e.prepend, i = document.createElement("style");
- i.setAttribute(G7, k8e(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
- var a = f8(e), o = a.firstChild;
- if (r) {
- if (r === "queue") {
- var s = uie(a).filter(function(l) {
- return ["prepend", "prependQueue"].includes(l.getAttribute(G7));
- });
- if (s.length)
- return a.insertBefore(i, s[s.length - 1].nextSibling), i;
- }
- a.insertBefore(i, o);
- } else
- a.appendChild(i);
- return i;
- }
- function L8e(t) {
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = f8(e);
- return uie(n).find(function(r) {
- return r.getAttribute(lie(e)) === t;
- });
- }
- function N8e(t, e) {
- var n = $R.get(t);
- if (!n || !D8e(document, n)) {
- var r = cie("", e), i = r.parentNode;
- $R.set(t, i), t.removeChild(r);
- }
- }
- function B8e(t, e) {
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = f8(n);
- N8e(r, n);
- var i = L8e(e, n);
- if (i)
- return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
- var a = cie(t, n);
- return a.setAttribute(lie(n), e), a;
- }
- function j7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- z8e(t, i, n[i]);
- });
- }
- return t;
- }
- function z8e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- function V8e(t, e) {
- process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
- }
- function F8e(t, e) {
- V8e(t, "[@ant-design/icons-vue] ".concat(e));
- }
- function Z7(t) {
- return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
- }
- function AR(t, e, n) {
- return n ? ff(t.tag, j7({
- key: e
- }, n, t.attrs), (t.children || []).map(function(r, i) {
- return AR(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
- })) : ff(t.tag, j7({
- key: e
- }, t.attrs), (t.children || []).map(function(r, i) {
- return AR(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
- }));
- }
- function fie(t) {
- return Bh(t)[0];
- }
- function die(t) {
- return t ? Array.isArray(t) ? t : [t] : [];
- }
- var W8e = `
- .anticon {
- display: inline-block;
- color: inherit;
- font-style: normal;
- line-height: 0;
- text-align: center;
- text-transform: none;
- vertical-align: -0.125em;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
- .anticon > * {
- line-height: 1;
- }
- .anticon svg {
- display: inline-block;
- }
- .anticon::before {
- display: none;
- }
- .anticon .anticon-icon {
- display: block;
- }
- .anticon[tabindex] {
- cursor: pointer;
- }
- .anticon-spin::before,
- .anticon-spin {
- display: inline-block;
- -webkit-animation: loadingCircle 1s infinite linear;
- animation: loadingCircle 1s infinite linear;
- }
- @-webkit-keyframes loadingCircle {
- 100% {
- -webkit-transform: rotate(360deg);
- transform: rotate(360deg);
- }
- }
- @keyframes loadingCircle {
- 100% {
- -webkit-transform: rotate(360deg);
- transform: rotate(360deg);
- }
- }
- `;
- function hie(t) {
- return t && t.getRootNode && t.getRootNode();
- }
- function Q8e(t) {
- return c8() ? hie(t) instanceof ShadowRoot : !1;
- }
- function H8e(t) {
- return Q8e(t) ? hie(t) : null;
- }
- var G8e = function() {
- var e = sie(), n = e.prefixCls, r = e.csp, i = In(), a = W8e;
- n && (a = a.replace(/anticon/g, n.value)), Bt(function() {
- if (c8()) {
- var o = i.vnode.el, s = H8e(o);
- B8e(a, "@ant-design-vue-icons", {
- prepend: !0,
- csp: r.value,
- attachTo: s
- });
- }
- });
- }, j8e = ["icon", "primaryColor", "secondaryColor"];
- function Z8e(t, e) {
- if (t == null) return {};
- var n = U8e(t, e), r, i;
- if (Object.getOwnPropertySymbols) {
- var a = Object.getOwnPropertySymbols(t);
- for (i = 0; i < a.length; i++)
- r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
- }
- return n;
- }
- function U8e(t, e) {
- if (t == null) return {};
- var n = {}, r = Object.keys(t), i, a;
- for (a = 0; a < r.length; a++)
- i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
- return n;
- }
- function qx(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- X8e(t, i, n[i]);
- });
- }
- return t;
- }
- function X8e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Fy = zn({
- primaryColor: "#333",
- secondaryColor: "#E6E6E6",
- calculated: !1
- });
- function Y8e(t) {
- var e = t.primaryColor, n = t.secondaryColor;
- Fy.primaryColor = e, Fy.secondaryColor = n || fie(e), Fy.calculated = !!n;
- }
- function q8e() {
- return qx({}, Fy);
- }
- var If = function(e, n) {
- var r = qx({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = Z8e(r, j8e), l = Fy;
- if (a && (l = {
- primaryColor: a,
- secondaryColor: o || fie(a)
- }), F8e(Z7(i), "icon should be icon definiton, but got ".concat(i)), !Z7(i))
- return null;
- var u = i;
- return u && typeof u.icon == "function" && (u = qx({}, u, {
- icon: u.icon(l.primaryColor, l.secondaryColor)
- })), AR(u.icon, "svg-".concat(u.name), qx({}, s, {
- "data-icon": u.name,
- width: "1em",
- height: "1em",
- fill: "currentColor",
- "aria-hidden": "true"
- }));
- };
- If.props = {
- icon: Object,
- primaryColor: String,
- secondaryColor: String,
- focusable: String
- };
- If.inheritAttrs = !1;
- If.displayName = "IconBase";
- If.getTwoToneColors = q8e;
- If.setTwoToneColors = Y8e;
- function K8e(t, e) {
- return n5e(t) || t5e(t, e) || e5e(t, e) || J8e();
- }
- function J8e() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function e5e(t, e) {
- if (t) {
- if (typeof t == "string") return U7(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return U7(t, e);
- }
- }
- function U7(t, e) {
- (e == null || e > t.length) && (e = t.length);
- for (var n = 0, r = new Array(e); n < e; n++)
- r[n] = t[n];
- return r;
- }
- function t5e(t, e) {
- var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
- if (n != null) {
- var r = [], i = !0, a = !1, o, s;
- try {
- for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
- ;
- } catch (l) {
- a = !0, s = l;
- } finally {
- try {
- !i && n.return != null && n.return();
- } finally {
- if (a) throw s;
- }
- }
- return r;
- }
- }
- function n5e(t) {
- if (Array.isArray(t)) return t;
- }
- function pie(t) {
- var e = die(t), n = K8e(e, 2), r = n[0], i = n[1];
- return If.setTwoToneColors({
- primaryColor: r,
- secondaryColor: i
- });
- }
- function r5e() {
- var t = If.getTwoToneColors();
- return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
- }
- var i5e = ae({
- name: "InsertStyles",
- setup: function() {
- return G8e(), function() {
- return null;
- };
- }
- }), a5e = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
- function o5e(t, e) {
- return c5e(t) || u5e(t, e) || l5e(t, e) || s5e();
- }
- function s5e() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function l5e(t, e) {
- if (t) {
- if (typeof t == "string") return X7(t, e);
- var n = Object.prototype.toString.call(t).slice(8, -1);
- if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return X7(t, e);
- }
- }
- function X7(t, e) {
- (e == null || e > t.length) && (e = t.length);
- for (var n = 0, r = new Array(e); n < e; n++)
- r[n] = t[n];
- return r;
- }
- function u5e(t, e) {
- var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
- if (n != null) {
- var r = [], i = !0, a = !1, o, s;
- try {
- for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
- ;
- } catch (l) {
- a = !0, s = l;
- } finally {
- try {
- !i && n.return != null && n.return();
- } finally {
- if (a) throw s;
- }
- }
- return r;
- }
- }
- function c5e(t) {
- if (Array.isArray(t)) return t;
- }
- function Y7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- dy(t, i, n[i]);
- });
- }
- return t;
- }
- function dy(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- function f5e(t, e) {
- if (t == null) return {};
- var n = d5e(t, e), r, i;
- if (Object.getOwnPropertySymbols) {
- var a = Object.getOwnPropertySymbols(t);
- for (i = 0; i < a.length; i++)
- r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
- }
- return n;
- }
- function d5e(t, e) {
- if (t == null) return {};
- var n = {}, r = Object.keys(t), i, a;
- for (a = 0; a < r.length; a++)
- i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
- return n;
- }
- pie(OLe.primary);
- var Rt = function(e, n) {
- var r, i = Y7({}, e, n.attrs), a = i.class, o = i.icon, s = i.spin, l = i.rotate, u = i.tabindex, c = i.twoToneColor, f = i.onClick, d = f5e(i, a5e), h = sie(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, dy(r, v.value, !!v.value), dy(r, p.value, !0), dy(r, "".concat(p.value, "-").concat(o.name), !!o.name), dy(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
- m === void 0 && f && (m = -1);
- var y = l ? {
- msTransform: "rotate(".concat(l, "deg)"),
- transform: "rotate(".concat(l, "deg)")
- } : void 0, _ = die(c), O = o5e(_, 2), S = O[0], x = O[1];
- return D("span", Y7({
- role: "img",
- "aria-label": o.name
- }, d, {
- onClick: f,
- class: [g, a],
- tabindex: m
- }), [D(If, {
- icon: o,
- primaryColor: S,
- secondaryColor: x,
- style: y
- }, null), D(i5e, null, null)]);
- };
- Rt.props = {
- spin: Boolean,
- rotate: Number,
- icon: Object,
- twoToneColor: [String, Array]
- };
- Rt.displayName = "AntdIcon";
- Rt.inheritAttrs = !1;
- Rt.getTwoToneColor = r5e;
- Rt.setTwoToneColor = pie;
- function q7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- h5e(t, i, n[i]);
- });
- }
- return t;
- }
- function h5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var D2 = function(e, n) {
- var r = q7({}, e, n.attrs);
- return D(Rt, q7({}, r, {
- icon: M8e
- }), null);
- };
- D2.displayName = "DownOutlined";
- D2.inheritAttrs = !1;
- var p5e = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
- function K7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- v5e(t, i, n[i]);
- });
- }
- return t;
- }
- function v5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Ql = function(e, n) {
- var r = K7({}, e, n.attrs);
- return D(Rt, K7({}, r, {
- icon: p5e
- }), null);
- };
- Ql.displayName = "LoadingOutlined";
- Ql.inheritAttrs = !1;
- var g5e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
- function J7(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- m5e(t, i, n[i]);
- });
- }
- return t;
- }
- function m5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var d8 = function(e, n) {
- var r = J7({}, e, n.attrs);
- return D(Rt, J7({}, r, {
- icon: g5e
- }), null);
- };
- d8.displayName = "CheckOutlined";
- d8.inheritAttrs = !1;
- var y5e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
- function eQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- b5e(t, i, n[i]);
- });
- }
- return t;
- }
- function b5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var tc = function(e, n) {
- var r = eQ({}, e, n.attrs);
- return D(Rt, eQ({}, r, {
- icon: y5e
- }), null);
- };
- tc.displayName = "CloseOutlined";
- tc.inheritAttrs = !1;
- var _5e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
- function tQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- O5e(t, i, n[i]);
- });
- }
- return t;
- }
- function O5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var cs = function(e, n) {
- var r = tQ({}, e, n.attrs);
- return D(Rt, tQ({}, r, {
- icon: _5e
- }), null);
- };
- cs.displayName = "CloseCircleFilled";
- cs.inheritAttrs = !1;
- var S5e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
- function nQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- x5e(t, i, n[i]);
- });
- }
- return t;
- }
- function x5e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var R2 = function(e, n) {
- var r = nQ({}, e, n.attrs);
- return D(Rt, nQ({}, r, {
- icon: S5e
- }), null);
- };
- R2.displayName = "SearchOutlined";
- R2.inheritAttrs = !1;
- function w5e(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- const {
- loading: n,
- multiple: r,
- prefixCls: i,
- hasFeedback: a,
- feedbackIcon: o,
- showArrow: s
- } = t, l = t.suffixIcon || e.suffixIcon && e.suffixIcon(), u = t.clearIcon || e.clearIcon && e.clearIcon(), c = t.menuItemSelectedIcon || e.menuItemSelectedIcon && e.menuItemSelectedIcon(), f = t.removeIcon || e.removeIcon && e.removeIcon(), d = u ?? D(cs, null, null), h = (m) => D(Wt, null, [s !== !1 && m, a && o]);
- let p = null;
- if (l !== void 0)
- p = h(l);
- else if (n)
- p = h(D(Ql, {
- spin: !0
- }, null));
- else {
- const m = `${i}-suffix`;
- p = (y) => {
- let {
- open: _,
- showSearch: O
- } = y;
- return h(_ && O ? D(R2, {
- class: m
- }, null) : D(D2, {
- class: m
- }, null));
- };
- }
- let v = null;
- c !== void 0 ? v = c : r ? v = D(d8, null, null) : v = null;
- let g = null;
- return f !== void 0 ? g = f : g = D(tc, null, null), {
- clearIcon: d,
- suffixIcon: p,
- itemIcon: v,
- removeIcon: g
- };
- }
- function h8(t) {
- const e = Symbol("contextKey");
- return {
- useProvide: (i, a) => {
- const o = zn({});
- return Et(e, o), Vt(() => {
- k(o, i, a || {});
- }), o;
- },
- useInject: () => et(e, t) || {}
- };
- }
- const tC = Symbol("ContextProps"), nC = Symbol("InternalContextProps"), C5e = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : V(() => !0);
- const n = ee(/* @__PURE__ */ new Map()), r = (o, s) => {
- n.value.set(o, s), n.value = new Map(n.value);
- }, i = (o) => {
- n.value.delete(o), n.value = new Map(n.value);
- }, a = In();
- me([e, n], () => {
- if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
- lo(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((s) => `\`${s.name}\``).join(", ")} ${n.value.size} field items.
- You can set not need to be collected fields into \`a-form-item-rest\``);
- let o = a;
- for (; o.parent; )
- console.warn("at", o.type), o = o.parent;
- }
- }), Et(tC, t), Et(nC, {
- addFormItemField: r,
- removeFormItemField: i
- });
- }, ER = {
- id: V(() => {
- }),
- onFieldBlur: () => {
- },
- onFieldChange: () => {
- },
- clearValidate: () => {
- }
- }, MR = {
- addFormItemField: () => {
- },
- removeFormItemField: () => {
- }
- }, Ul = () => {
- const t = et(nC, MR), e = Symbol("FormItemFieldKey"), n = In();
- return t.addFormItemField(e, n.type), Qt(() => {
- t.removeFormItemField(e);
- }), Et(nC, MR), Et(tC, ER), et(tC, ER);
- }, Lb = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AFormItemRest",
- setup(t, e) {
- let {
- slots: n
- } = e;
- return Et(nC, MR), Et(tC, ER), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- }), Qs = h8({}), rC = ae({
- name: "NoFormStatus",
- setup(t, e) {
- let {
- slots: n
- } = e;
- return Qs.useProvide({}), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- });
- function Eu(t, e, n) {
- return Re({
- [`${t}-status-success`]: e === "success",
- [`${t}-status-warning`]: e === "warning",
- [`${t}-status-error`]: e === "error",
- [`${t}-status-validating`]: e === "validating",
- [`${t}-has-feedback`]: n
- });
- }
- const U_ = (t, e) => e || t, T5e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [e]: {
- display: "inline-flex",
- "&-block": {
- display: "flex",
- width: "100%"
- },
- "&-vertical": {
- flexDirection: "column"
- }
- }
- };
- }, P5e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [e]: {
- display: "inline-flex",
- "&-rtl": {
- direction: "rtl"
- },
- "&-vertical": {
- flexDirection: "column"
- },
- "&-align": {
- flexDirection: "column",
- "&-center": {
- alignItems: "center"
- },
- "&-start": {
- alignItems: "flex-start"
- },
- "&-end": {
- alignItems: "flex-end"
- },
- "&-baseline": {
- alignItems: "baseline"
- }
- },
- [`${e}-item`]: {
- "&:empty": {
- display: "none"
- }
- }
- }
- };
- }, $5e = pr("Space", (t) => [P5e(t), T5e(t)]), A5e = () => ({
- compactSize: String,
- compactDirection: oe.oneOf(pf("horizontal", "vertical")).def("horizontal"),
- isFirstItem: Tt(),
- isLastItem: Tt()
- }), k2 = h8(null), L2 = (t, e) => {
- const n = k2.useInject(), r = V(() => {
- if (!n || vte(n)) return "";
- const {
- compactDirection: i,
- isFirstItem: a,
- isLastItem: o
- } = n, s = i === "vertical" ? "-vertical-" : "-";
- return Re({
- [`${t.value}-compact${s}item`]: !0,
- [`${t.value}-compact${s}first-item`]: a,
- [`${t.value}-compact${s}last-item`]: o,
- [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
- });
- });
- return {
- compactSize: V(() => n == null ? void 0 : n.compactSize),
- compactDirection: V(() => n == null ? void 0 : n.compactDirection),
- compactItemClassnames: r
- };
- }, iC = ae({
- name: "NoCompactStyle",
- setup(t, e) {
- let {
- slots: n
- } = e;
- return k2.useProvide(null), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- }), E5e = () => ({
- prefixCls: String,
- size: {
- type: String
- },
- direction: oe.oneOf(pf("horizontal", "vertical")).def("horizontal"),
- align: oe.oneOf(pf("start", "end", "center", "baseline")),
- block: {
- type: Boolean,
- default: void 0
- }
- }), M5e = ae({
- name: "CompactItem",
- props: A5e(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- return k2.useProvide(t), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- });
- ae({
- name: "ASpaceCompact",
- inheritAttrs: !1,
- props: E5e(),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const {
- prefixCls: i,
- direction: a
- } = hn("space-compact", t), o = k2.useInject(), [s, l] = $5e(i), u = V(() => Re(i.value, l.value, {
- [`${i.value}-rtl`]: a.value === "rtl",
- [`${i.value}-block`]: t.block,
- [`${i.value}-vertical`]: t.direction === "vertical"
- }));
- return () => {
- var c;
- const f = qr(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
- return f.length === 0 ? null : s(D("div", te(te({}, n), {}, {
- class: [u.value, n.class]
- }), [f.map((d, h) => {
- var p;
- const v = d && d.key || `${i.value}-item-${h}`, g = !o || vte(o);
- return D(M5e, {
- key: v,
- compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
- compactDirection: t.direction,
- isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
- isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
- }, {
- default: () => [d]
- });
- })]));
- };
- }
- });
- const I5e = (t) => ({
- animationDuration: t,
- animationFillMode: "both"
- }), D5e = (t) => ({
- animationDuration: t,
- animationFillMode: "both"
- }), N2 = function(t, e, n, r) {
- const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
- return {
- [`
- ${a}${t}-enter,
- ${a}${t}-appear
- `]: k(k({}, I5e(r)), {
- animationPlayState: "paused"
- }),
- [`${a}${t}-leave`]: k(k({}, D5e(r)), {
- animationPlayState: "paused"
- }),
- [`
- ${a}${t}-enter${t}-enter-active,
- ${a}${t}-appear${t}-appear-active
- `]: {
- animationName: e,
- animationPlayState: "running"
- },
- [`${a}${t}-leave${t}-leave-active`]: {
- animationName: n,
- animationPlayState: "running",
- pointerEvents: "none"
- }
- };
- }, R5e = new qt("antFadeIn", {
- "0%": {
- opacity: 0
- },
- "100%": {
- opacity: 1
- }
- }), k5e = new qt("antFadeOut", {
- "0%": {
- opacity: 1
- },
- "100%": {
- opacity: 0
- }
- }), vie = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- const {
- antCls: n
- } = t, r = `${n}-fade`, i = e ? "&" : "";
- return [N2(r, R5e, k5e, t.motionDurationMid, e), {
- [`
- ${i}${r}-enter,
- ${i}${r}-appear
- `]: {
- opacity: 0,
- animationTimingFunction: "linear"
- },
- [`${i}${r}-leave`]: {
- animationTimingFunction: "linear"
- }
- }];
- }, L5e = new qt("antMoveDownIn", {
- "0%": {
- transform: "translate3d(0, 100%, 0)",
- transformOrigin: "0 0",
- opacity: 0
- },
- "100%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- }
- }), N5e = new qt("antMoveDownOut", {
- "0%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- },
- "100%": {
- transform: "translate3d(0, 100%, 0)",
- transformOrigin: "0 0",
- opacity: 0
- }
- }), B5e = new qt("antMoveLeftIn", {
- "0%": {
- transform: "translate3d(-100%, 0, 0)",
- transformOrigin: "0 0",
- opacity: 0
- },
- "100%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- }
- }), z5e = new qt("antMoveLeftOut", {
- "0%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- },
- "100%": {
- transform: "translate3d(-100%, 0, 0)",
- transformOrigin: "0 0",
- opacity: 0
- }
- }), V5e = new qt("antMoveRightIn", {
- "0%": {
- transform: "translate3d(100%, 0, 0)",
- transformOrigin: "0 0",
- opacity: 0
- },
- "100%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- }
- }), F5e = new qt("antMoveRightOut", {
- "0%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- },
- "100%": {
- transform: "translate3d(100%, 0, 0)",
- transformOrigin: "0 0",
- opacity: 0
- }
- }), W5e = new qt("antMoveUpIn", {
- "0%": {
- transform: "translate3d(0, -100%, 0)",
- transformOrigin: "0 0",
- opacity: 0
- },
- "100%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- }
- }), Q5e = new qt("antMoveUpOut", {
- "0%": {
- transform: "translate3d(0, 0, 0)",
- transformOrigin: "0 0",
- opacity: 1
- },
- "100%": {
- transform: "translate3d(0, -100%, 0)",
- transformOrigin: "0 0",
- opacity: 0
- }
- }), H5e = {
- "move-up": {
- inKeyframes: W5e,
- outKeyframes: Q5e
- },
- "move-down": {
- inKeyframes: L5e,
- outKeyframes: N5e
- },
- "move-left": {
- inKeyframes: B5e,
- outKeyframes: z5e
- },
- "move-right": {
- inKeyframes: V5e,
- outKeyframes: F5e
- }
- }, rQ = (t, e) => {
- const {
- antCls: n
- } = t, r = `${n}-${e}`, {
- inKeyframes: i,
- outKeyframes: a
- } = H5e[e];
- return [N2(r, i, a, t.motionDurationMid), {
- [`
- ${r}-enter,
- ${r}-appear
- `]: {
- opacity: 0,
- animationTimingFunction: t.motionEaseOutCirc
- },
- [`${r}-leave`]: {
- animationTimingFunction: t.motionEaseInOutCirc
- }
- }];
- }, gie = new qt("antSlideUpIn", {
- "0%": {
- transform: "scaleY(0.8)",
- transformOrigin: "0% 0%",
- opacity: 0
- },
- "100%": {
- transform: "scaleY(1)",
- transformOrigin: "0% 0%",
- opacity: 1
- }
- }), mie = new qt("antSlideUpOut", {
- "0%": {
- transform: "scaleY(1)",
- transformOrigin: "0% 0%",
- opacity: 1
- },
- "100%": {
- transform: "scaleY(0.8)",
- transformOrigin: "0% 0%",
- opacity: 0
- }
- }), yie = new qt("antSlideDownIn", {
- "0%": {
- transform: "scaleY(0.8)",
- transformOrigin: "100% 100%",
- opacity: 0
- },
- "100%": {
- transform: "scaleY(1)",
- transformOrigin: "100% 100%",
- opacity: 1
- }
- }), bie = new qt("antSlideDownOut", {
- "0%": {
- transform: "scaleY(1)",
- transformOrigin: "100% 100%",
- opacity: 1
- },
- "100%": {
- transform: "scaleY(0.8)",
- transformOrigin: "100% 100%",
- opacity: 0
- }
- }), G5e = new qt("antSlideLeftIn", {
- "0%": {
- transform: "scaleX(0.8)",
- transformOrigin: "0% 0%",
- opacity: 0
- },
- "100%": {
- transform: "scaleX(1)",
- transformOrigin: "0% 0%",
- opacity: 1
- }
- }), j5e = new qt("antSlideLeftOut", {
- "0%": {
- transform: "scaleX(1)",
- transformOrigin: "0% 0%",
- opacity: 1
- },
- "100%": {
- transform: "scaleX(0.8)",
- transformOrigin: "0% 0%",
- opacity: 0
- }
- }), Z5e = new qt("antSlideRightIn", {
- "0%": {
- transform: "scaleX(0.8)",
- transformOrigin: "100% 0%",
- opacity: 0
- },
- "100%": {
- transform: "scaleX(1)",
- transformOrigin: "100% 0%",
- opacity: 1
- }
- }), U5e = new qt("antSlideRightOut", {
- "0%": {
- transform: "scaleX(1)",
- transformOrigin: "100% 0%",
- opacity: 1
- },
- "100%": {
- transform: "scaleX(0.8)",
- transformOrigin: "100% 0%",
- opacity: 0
- }
- }), X5e = {
- "slide-up": {
- inKeyframes: gie,
- outKeyframes: mie
- },
- "slide-down": {
- inKeyframes: yie,
- outKeyframes: bie
- },
- "slide-left": {
- inKeyframes: G5e,
- outKeyframes: j5e
- },
- "slide-right": {
- inKeyframes: Z5e,
- outKeyframes: U5e
- }
- }, kg = (t, e) => {
- const {
- antCls: n
- } = t, r = `${n}-${e}`, {
- inKeyframes: i,
- outKeyframes: a
- } = X5e[e];
- return [N2(r, i, a, t.motionDurationMid), {
- [`
- ${r}-enter,
- ${r}-appear
- `]: {
- transform: "scale(0)",
- transformOrigin: "0% 0%",
- opacity: 0,
- animationTimingFunction: t.motionEaseOutQuint
- },
- [`${r}-leave`]: {
- animationTimingFunction: t.motionEaseInQuint
- }
- }];
- }, p8 = new qt("antZoomIn", {
- "0%": {
- transform: "scale(0.2)",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- opacity: 1
- }
- }), Y5e = new qt("antZoomOut", {
- "0%": {
- transform: "scale(1)"
- },
- "100%": {
- transform: "scale(0.2)",
- opacity: 0
- }
- }), iQ = new qt("antZoomBigIn", {
- "0%": {
- transform: "scale(0.8)",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- opacity: 1
- }
- }), aQ = new qt("antZoomBigOut", {
- "0%": {
- transform: "scale(1)"
- },
- "100%": {
- transform: "scale(0.8)",
- opacity: 0
- }
- }), q5e = new qt("antZoomUpIn", {
- "0%": {
- transform: "scale(0.8)",
- transformOrigin: "50% 0%",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- transformOrigin: "50% 0%"
- }
- }), K5e = new qt("antZoomUpOut", {
- "0%": {
- transform: "scale(1)",
- transformOrigin: "50% 0%"
- },
- "100%": {
- transform: "scale(0.8)",
- transformOrigin: "50% 0%",
- opacity: 0
- }
- }), J5e = new qt("antZoomLeftIn", {
- "0%": {
- transform: "scale(0.8)",
- transformOrigin: "0% 50%",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- transformOrigin: "0% 50%"
- }
- }), e3e = new qt("antZoomLeftOut", {
- "0%": {
- transform: "scale(1)",
- transformOrigin: "0% 50%"
- },
- "100%": {
- transform: "scale(0.8)",
- transformOrigin: "0% 50%",
- opacity: 0
- }
- }), t3e = new qt("antZoomRightIn", {
- "0%": {
- transform: "scale(0.8)",
- transformOrigin: "100% 50%",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- transformOrigin: "100% 50%"
- }
- }), n3e = new qt("antZoomRightOut", {
- "0%": {
- transform: "scale(1)",
- transformOrigin: "100% 50%"
- },
- "100%": {
- transform: "scale(0.8)",
- transformOrigin: "100% 50%",
- opacity: 0
- }
- }), r3e = new qt("antZoomDownIn", {
- "0%": {
- transform: "scale(0.8)",
- transformOrigin: "50% 100%",
- opacity: 0
- },
- "100%": {
- transform: "scale(1)",
- transformOrigin: "50% 100%"
- }
- }), i3e = new qt("antZoomDownOut", {
- "0%": {
- transform: "scale(1)",
- transformOrigin: "50% 100%"
- },
- "100%": {
- transform: "scale(0.8)",
- transformOrigin: "50% 100%",
- opacity: 0
- }
- }), a3e = {
- zoom: {
- inKeyframes: p8,
- outKeyframes: Y5e
- },
- "zoom-big": {
- inKeyframes: iQ,
- outKeyframes: aQ
- },
- "zoom-big-fast": {
- inKeyframes: iQ,
- outKeyframes: aQ
- },
- "zoom-left": {
- inKeyframes: J5e,
- outKeyframes: e3e
- },
- "zoom-right": {
- inKeyframes: t3e,
- outKeyframes: n3e
- },
- "zoom-up": {
- inKeyframes: q5e,
- outKeyframes: K5e
- },
- "zoom-down": {
- inKeyframes: r3e,
- outKeyframes: i3e
- }
- }, B2 = (t, e) => {
- const {
- antCls: n
- } = t, r = `${n}-${e}`, {
- inKeyframes: i,
- outKeyframes: a
- } = a3e[e];
- return [N2(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
- [`
- ${r}-enter,
- ${r}-appear
- `]: {
- transform: "scale(0)",
- opacity: 0,
- animationTimingFunction: t.motionEaseOutCirc,
- "&-prepare": {
- transform: "none"
- }
- },
- [`${r}-leave`]: {
- animationTimingFunction: t.motionEaseInOutCirc
- }
- }];
- }, v8 = (t) => ({
- [t.componentCls]: {
- // For common/openAnimation
- [`${t.antCls}-motion-collapse-legacy`]: {
- overflow: "hidden",
- "&-active": {
- transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
- opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
- }
- },
- [`${t.antCls}-motion-collapse`]: {
- overflow: "hidden",
- transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
- opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
- }
- }
- }), oQ = (t) => {
- const {
- controlPaddingHorizontal: e
- } = t;
- return {
- position: "relative",
- display: "block",
- minHeight: t.controlHeight,
- padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
- color: t.colorText,
- fontWeight: "normal",
- fontSize: t.fontSize,
- lineHeight: t.lineHeight,
- boxSizing: "border-box"
- };
- }, o3e = (t) => {
- const {
- antCls: e,
- componentCls: n
- } = t, r = `${n}-item`;
- return [
- {
- [`${n}-dropdown`]: k(k({}, Gn(t)), {
- position: "absolute",
- top: -9999,
- zIndex: t.zIndexPopup,
- boxSizing: "border-box",
- padding: t.paddingXXS,
- overflow: "hidden",
- fontSize: t.fontSize,
- // Fix select render lag of long text in chrome
- // https://github.com/ant-design/ant-design/issues/11456
- // https://github.com/ant-design/ant-design/issues/11843
- fontVariant: "initial",
- backgroundColor: t.colorBgElevated,
- borderRadius: t.borderRadiusLG,
- outline: "none",
- boxShadow: t.boxShadowSecondary,
- [`
- &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
- &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
- `]: {
- animationName: gie
- },
- [`
- &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
- &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
- `]: {
- animationName: yie
- },
- [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
- animationName: mie
- },
- [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
- animationName: bie
- },
- "&-hidden": {
- display: "none"
- },
- "&-empty": {
- color: t.colorTextDisabled
- },
- // ========================= Options =========================
- [`${r}-empty`]: k(k({}, oQ(t)), {
- color: t.colorTextDisabled
- }),
- [`${r}`]: k(k({}, oQ(t)), {
- cursor: "pointer",
- transition: `background ${t.motionDurationSlow} ease`,
- borderRadius: t.borderRadiusSM,
- // =========== Group ============
- "&-group": {
- color: t.colorTextDescription,
- fontSize: t.fontSizeSM,
- cursor: "default"
- },
- // =========== Option ===========
- "&-option": {
- display: "flex",
- "&-content": k({
- flex: "auto"
- }, Mg),
- "&-state": {
- flex: "none"
- },
- [`&-active:not(${r}-option-disabled)`]: {
- backgroundColor: t.controlItemBgHover
- },
- [`&-selected:not(${r}-option-disabled)`]: {
- color: t.colorText,
- fontWeight: t.fontWeightStrong,
- backgroundColor: t.controlItemBgActive,
- [`${r}-option-state`]: {
- color: t.colorPrimary
- }
- },
- "&-disabled": {
- [`&${r}-option-selected`]: {
- backgroundColor: t.colorBgContainerDisabled
- },
- color: t.colorTextDisabled,
- cursor: "not-allowed"
- },
- "&-grouped": {
- paddingInlineStart: t.controlPaddingHorizontal * 2
- }
- }
- }),
- // =========================== RTL ===========================
- "&-rtl": {
- direction: "rtl"
- }
- })
- },
- // Follow code may reuse in other components
- kg(t, "slide-up"),
- kg(t, "slide-down"),
- rQ(t, "move-up"),
- rQ(t, "move-down")
- ];
- }, Wp = 2;
- function _ie(t) {
- let {
- controlHeightSM: e,
- controlHeight: n,
- lineWidth: r
- } = t;
- const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
- return [i, a];
- }
- function lE(t, e) {
- const {
- componentCls: n,
- iconCls: r
- } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = _ie(t), s = e ? `${n}-${e}` : "";
- return {
- [`${n}-multiple${s}`]: {
- fontSize: t.fontSize,
- /**
- * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
- * may update to redesign with its align logic.
- */
- // =========================== Overflow ===========================
- [i]: {
- position: "relative",
- display: "flex",
- flex: "auto",
- flexWrap: "wrap",
- maxWidth: "100%",
- "&-item": {
- flex: "none",
- alignSelf: "center",
- maxWidth: "100%",
- display: "inline-flex"
- }
- },
- // ========================= Selector =========================
- [`${n}-selector`]: {
- display: "flex",
- flexWrap: "wrap",
- alignItems: "center",
- // Multiple is little different that horizontal is follow the vertical
- padding: `${o - Wp}px ${Wp * 2}px`,
- borderRadius: t.borderRadius,
- [`${n}-show-search&`]: {
- cursor: "text"
- },
- [`${n}-disabled&`]: {
- background: t.colorBgContainerDisabled,
- cursor: "not-allowed"
- },
- "&:after": {
- display: "inline-block",
- width: 0,
- margin: `${Wp}px 0`,
- lineHeight: `${a}px`,
- content: '"\\a0"'
- }
- },
- [`
- &${n}-show-arrow ${n}-selector,
- &${n}-allow-clear ${n}-selector
- `]: {
- paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
- },
- // ======================== Selections ========================
- [`${n}-selection-item`]: {
- position: "relative",
- display: "flex",
- flex: "none",
- boxSizing: "border-box",
- maxWidth: "100%",
- height: a,
- marginTop: Wp,
- marginBottom: Wp,
- lineHeight: `${a - t.lineWidth * 2}px`,
- background: t.colorFillSecondary,
- border: `${t.lineWidth}px solid ${t.colorSplit}`,
- borderRadius: t.borderRadiusSM,
- cursor: "default",
- transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
- userSelect: "none",
- marginInlineEnd: Wp * 2,
- paddingInlineStart: t.paddingXS,
- paddingInlineEnd: t.paddingXS / 2,
- [`${n}-disabled&`]: {
- color: t.colorTextDisabled,
- borderColor: t.colorBorder,
- cursor: "not-allowed"
- },
- // It's ok not to do this, but 24px makes bottom narrow in view should adjust
- "&-content": {
- display: "inline-block",
- marginInlineEnd: t.paddingXS / 2,
- overflow: "hidden",
- whiteSpace: "pre",
- textOverflow: "ellipsis"
- },
- "&-remove": k(k({}, hm()), {
- display: "inline-block",
- color: t.colorIcon,
- fontWeight: "bold",
- fontSize: 10,
- lineHeight: "inherit",
- cursor: "pointer",
- [`> ${r}`]: {
- verticalAlign: "-0.2em"
- },
- "&:hover": {
- color: t.colorIconHover
- }
- })
- },
- // ========================== Input ==========================
- [`${i}-item + ${i}-item`]: {
- [`${n}-selection-search`]: {
- marginInlineStart: 0
- }
- },
- [`${n}-selection-search`]: {
- display: "inline-flex",
- position: "relative",
- maxWidth: "100%",
- marginInlineStart: t.inputPaddingHorizontalBase - o,
- "\n &-input,\n &-mirror\n ": {
- height: a,
- fontFamily: t.fontFamily,
- lineHeight: `${a}px`,
- transition: `all ${t.motionDurationSlow}`
- },
- "&-input": {
- width: "100%",
- minWidth: 4.1
- // fix search cursor missing
- },
- "&-mirror": {
- position: "absolute",
- top: 0,
- insetInlineStart: 0,
- insetInlineEnd: "auto",
- zIndex: 999,
- whiteSpace: "pre",
- visibility: "hidden"
- }
- },
- // ======================= Placeholder =======================
- [`${n}-selection-placeholder `]: {
- position: "absolute",
- top: "50%",
- insetInlineStart: t.inputPaddingHorizontalBase,
- insetInlineEnd: t.inputPaddingHorizontalBase,
- transform: "translateY(-50%)",
- transition: `all ${t.motionDurationSlow}`
- }
- }
- };
- }
- function s3e(t) {
- const {
- componentCls: e
- } = t, n = bn(t, {
- controlHeight: t.controlHeightSM,
- controlHeightSM: t.controlHeightXS,
- borderRadius: t.borderRadiusSM,
- borderRadiusSM: t.borderRadiusXS
- }), [, r] = _ie(t);
- return [
- lE(t),
- // ======================== Small ========================
- // Shared
- lE(n, "sm"),
- // Padding
- {
- [`${e}-multiple${e}-sm`]: {
- [`${e}-selection-placeholder`]: {
- insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
- insetInlineEnd: "auto"
- },
- // https://github.com/ant-design/ant-design/issues/29559
- [`${e}-selection-search`]: {
- marginInlineStart: r
- }
- }
- },
- // ======================== Large ========================
- // Shared
- lE(bn(t, {
- fontSize: t.fontSizeLG,
- controlHeight: t.controlHeightLG,
- controlHeightSM: t.controlHeight,
- borderRadius: t.borderRadiusLG,
- borderRadiusSM: t.borderRadius
- }), "lg")
- ];
- }
- function uE(t, e) {
- const {
- componentCls: n,
- inputPaddingHorizontalBase: r,
- borderRadius: i
- } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
- return {
- [`${n}-single${s}`]: {
- fontSize: t.fontSize,
- // ========================= Selector =========================
- [`${n}-selector`]: k(k({}, Gn(t)), {
- display: "flex",
- borderRadius: i,
- [`${n}-selection-search`]: {
- position: "absolute",
- top: 0,
- insetInlineStart: r,
- insetInlineEnd: r,
- bottom: 0,
- "&-input": {
- width: "100%"
- }
- },
- [`
- ${n}-selection-item,
- ${n}-selection-placeholder
- `]: {
- padding: 0,
- lineHeight: `${a}px`,
- transition: `all ${t.motionDurationSlow}`,
- // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
- "@supports (-moz-appearance: meterbar)": {
- lineHeight: `${a}px`
- }
- },
- [`${n}-selection-item`]: {
- position: "relative",
- userSelect: "none"
- },
- [`${n}-selection-placeholder`]: {
- transition: "none",
- pointerEvents: "none"
- },
- // For common baseline align
- [[
- "&:after",
- /* For '' value baseline align */
- `${n}-selection-item:after`,
- /* For undefined value baseline align */
- `${n}-selection-placeholder:after`
- ].join(",")]: {
- display: "inline-block",
- width: 0,
- visibility: "hidden",
- content: '"\\a0"'
- }
- }),
- [`
- &${n}-show-arrow ${n}-selection-item,
- &${n}-show-arrow ${n}-selection-placeholder
- `]: {
- paddingInlineEnd: o
- },
- // Opacity selection if open
- [`&${n}-open ${n}-selection-item`]: {
- color: t.colorTextPlaceholder
- },
- // ========================== Input ==========================
- // We only change the style of non-customize input which is only support by `combobox` mode.
- // Not customize
- [`&:not(${n}-customize-input)`]: {
- [`${n}-selector`]: {
- width: "100%",
- height: t.controlHeight,
- padding: `0 ${r}px`,
- [`${n}-selection-search-input`]: {
- height: a
- },
- "&:after": {
- lineHeight: `${a}px`
- }
- }
- },
- [`&${n}-customize-input`]: {
- [`${n}-selector`]: {
- "&:after": {
- display: "none"
- },
- [`${n}-selection-search`]: {
- position: "static",
- width: "100%"
- },
- [`${n}-selection-placeholder`]: {
- position: "absolute",
- insetInlineStart: 0,
- insetInlineEnd: 0,
- padding: `0 ${r}px`,
- "&:after": {
- display: "none"
- }
- }
- }
- }
- }
- };
- }
- function l3e(t) {
- const {
- componentCls: e
- } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
- return [
- uE(t),
- // ======================== Small ========================
- // Shared
- uE(bn(t, {
- controlHeight: t.controlHeightSM,
- borderRadius: t.borderRadiusSM
- }), "sm"),
- // padding
- {
- [`${e}-single${e}-sm`]: {
- [`&:not(${e}-customize-input)`]: {
- [`${e}-selection-search`]: {
- insetInlineStart: n,
- insetInlineEnd: n
- },
- [`${e}-selector`]: {
- padding: `0 ${n}px`
- },
- // With arrow should provides `padding-right` to show the arrow
- [`&${e}-show-arrow ${e}-selection-search`]: {
- insetInlineEnd: n + t.fontSize * 1.5
- },
- [`
- &${e}-show-arrow ${e}-selection-item,
- &${e}-show-arrow ${e}-selection-placeholder
- `]: {
- paddingInlineEnd: t.fontSize * 1.5
- }
- }
- }
- },
- // ======================== Large ========================
- // Shared
- uE(bn(t, {
- controlHeight: t.controlHeightLG,
- fontSize: t.fontSizeLG,
- borderRadius: t.borderRadiusLG
- }), "lg")
- ];
- }
- function u3e(t, e, n) {
- const {
- focusElCls: r,
- focus: i,
- borderElCls: a
- } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
- return {
- [`&-item:not(${e}-last-item)`]: {
- marginInlineEnd: -t.lineWidth
- },
- "&-item": k(k({
- [s]: {
- zIndex: 2
- }
- }, r ? {
- [`&${r}`]: {
- zIndex: 2
- }
- } : {}), {
- [`&[disabled] ${o}`]: {
- zIndex: 0
- }
- })
- };
- }
- function c3e(t, e, n) {
- const {
- borderElCls: r
- } = n, i = r ? `> ${r}` : "";
- return {
- [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
- borderRadius: 0
- },
- [`&-item:not(${e}-last-item)${e}-first-item`]: {
- [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- [`&-item:not(${e}-first-item)${e}-last-item`]: {
- [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- }
- };
- }
- function z2(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
- focus: !0
- };
- const {
- componentCls: n
- } = t, r = `${n}-compact`;
- return {
- [r]: k(k({}, u3e(t, r, e)), c3e(n, r, e))
- };
- }
- const f3e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- position: "relative",
- backgroundColor: t.colorBgContainer,
- border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
- transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
- input: {
- cursor: "pointer"
- },
- [`${e}-show-search&`]: {
- cursor: "text",
- input: {
- cursor: "auto",
- color: "inherit"
- }
- },
- [`${e}-disabled&`]: {
- color: t.colorTextDisabled,
- background: t.colorBgContainerDisabled,
- cursor: "not-allowed",
- [`${e}-multiple&`]: {
- background: t.colorBgContainerDisabled
- },
- input: {
- cursor: "not-allowed"
- }
- }
- };
- }, cE = function(t, e) {
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
- const {
- componentCls: r,
- borderHoverColor: i,
- outlineColor: a,
- antCls: o
- } = e, s = n ? {
- [`${r}-selector`]: {
- borderColor: i
- }
- } : {};
- return {
- [t]: {
- [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: k(k({}, s), {
- [`${r}-focused& ${r}-selector`]: {
- borderColor: i,
- boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
- borderInlineEndWidth: `${e.controlLineWidth}px !important`,
- outline: 0
- },
- [`&:hover ${r}-selector`]: {
- borderColor: i,
- borderInlineEndWidth: `${e.controlLineWidth}px !important`
- }
- })
- }
- };
- }, d3e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [`${e}-selection-search-input`]: {
- margin: 0,
- padding: 0,
- background: "transparent",
- border: "none",
- outline: "none",
- appearance: "none",
- "&::-webkit-search-cancel-button": {
- display: "none",
- "-webkit-appearance": "none"
- }
- }
- };
- }, h3e = (t) => {
- const {
- componentCls: e,
- inputPaddingHorizontalBase: n,
- iconCls: r
- } = t;
- return {
- [e]: k(k({}, Gn(t)), {
- position: "relative",
- display: "inline-block",
- cursor: "pointer",
- [`&:not(${e}-customize-input) ${e}-selector`]: k(k({}, f3e(t)), d3e(t)),
- // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
- // ...genHoverStyle(token),
- // },
- // ======================== Selection ========================
- [`${e}-selection-item`]: k({
- flex: 1,
- fontWeight: "normal"
- }, Mg),
- // ======================= Placeholder =======================
- [`${e}-selection-placeholder`]: k(k({}, Mg), {
- flex: 1,
- color: t.colorTextPlaceholder,
- pointerEvents: "none"
- }),
- // ========================== Arrow ==========================
- [`${e}-arrow`]: k(k({}, hm()), {
- position: "absolute",
- top: "50%",
- insetInlineStart: "auto",
- insetInlineEnd: n,
- height: t.fontSizeIcon,
- marginTop: -t.fontSizeIcon / 2,
- color: t.colorTextQuaternary,
- fontSize: t.fontSizeIcon,
- lineHeight: 1,
- textAlign: "center",
- pointerEvents: "none",
- display: "flex",
- alignItems: "center",
- [r]: {
- verticalAlign: "top",
- transition: `transform ${t.motionDurationSlow}`,
- "> svg": {
- verticalAlign: "top"
- },
- [`&:not(${e}-suffix)`]: {
- pointerEvents: "auto"
- }
- },
- [`${e}-disabled &`]: {
- cursor: "not-allowed"
- },
- "> *:not(:last-child)": {
- marginInlineEnd: 8
- // FIXME: magic
- }
- }),
- // ========================== Clear ==========================
- [`${e}-clear`]: {
- position: "absolute",
- top: "50%",
- insetInlineStart: "auto",
- insetInlineEnd: n,
- zIndex: 1,
- display: "inline-block",
- width: t.fontSizeIcon,
- height: t.fontSizeIcon,
- marginTop: -t.fontSizeIcon / 2,
- color: t.colorTextQuaternary,
- fontSize: t.fontSizeIcon,
- fontStyle: "normal",
- lineHeight: 1,
- textAlign: "center",
- textTransform: "none",
- background: t.colorBgContainer,
- cursor: "pointer",
- opacity: 0,
- transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
- textRendering: "auto",
- "&:before": {
- display: "block"
- },
- "&:hover": {
- color: t.colorTextTertiary
- }
- },
- "&:hover": {
- [`${e}-clear`]: {
- opacity: 1
- }
- }
- }),
- // ========================= Feedback ==========================
- [`${e}-has-feedback`]: {
- [`${e}-clear`]: {
- insetInlineEnd: n + t.fontSize + t.paddingXXS
- }
- }
- };
- }, p3e = (t) => {
- const {
- componentCls: e
- } = t;
- return [
- {
- [e]: {
- // ==================== BorderLess ====================
- [`&-borderless ${e}-selector`]: {
- backgroundColor: "transparent !important",
- borderColor: "transparent !important",
- boxShadow: "none !important"
- },
- // ==================== In Form ====================
- [`&${e}-in-form-item`]: {
- width: "100%"
- }
- }
- },
- // =====================================================
- // == LTR ==
- // =====================================================
- // Base
- h3e(t),
- // Single
- l3e(t),
- // Multiple
- s3e(t),
- // Dropdown
- o3e(t),
- // =====================================================
- // == RTL ==
- // =====================================================
- {
- [`${e}-rtl`]: {
- direction: "rtl"
- }
- },
- // =====================================================
- // == Status ==
- // =====================================================
- cE(e, bn(t, {
- borderHoverColor: t.colorPrimaryHover,
- outlineColor: t.controlOutline
- })),
- cE(`${e}-status-error`, bn(t, {
- borderHoverColor: t.colorErrorHover,
- outlineColor: t.colorErrorOutline
- }), !0),
- cE(`${e}-status-warning`, bn(t, {
- borderHoverColor: t.colorWarningHover,
- outlineColor: t.colorWarningOutline
- }), !0),
- // =====================================================
- // == Space Compact ==
- // =====================================================
- z2(t, {
- borderElCls: `${e}-selector`,
- focusElCls: `${e}-focused`
- })
- ];
- }, v3e = pr("Select", (t, e) => {
- let {
- rootPrefixCls: n
- } = e;
- const r = bn(t, {
- rootPrefixCls: n,
- inputPaddingHorizontalBase: t.paddingSM - 1
- });
- return [p3e(r)];
- }, (t) => ({
- zIndexPopup: t.zIndexPopupBase + 50
- })), g3e = () => k(k({}, si(oie(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
- value: or([Array, Object, String, Number]),
- defaultValue: or([Array, Object, String, Number]),
- notFoundContent: oe.any,
- suffixIcon: oe.any,
- itemIcon: oe.any,
- size: rr(),
- mode: rr(),
- bordered: Tt(!0),
- transitionName: String,
- choiceTransitionName: rr(""),
- popupClassName: String,
- /** @deprecated Please use `popupClassName` instead */
- dropdownClassName: String,
- placement: rr(),
- status: rr(),
- "onUpdate:value": Ct()
- }), sQ = "SECRET_COMBOBOX_MODE_DO_NOT_USE", Ca = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ASelect",
- Option: l8,
- OptGroup: u8,
- inheritAttrs: !1,
- props: li(g3e(), {
- listHeight: 256,
- listItemHeight: 24
- }),
- SECRET_COMBOBOX_MODE_DO_NOT_USE: sQ,
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- emit: r,
- slots: i,
- expose: a
- } = e;
- const o = ee(), s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), c = () => {
- var Y;
- (Y = o.value) === null || Y === void 0 || Y.focus();
- }, f = () => {
- var Y;
- (Y = o.value) === null || Y === void 0 || Y.blur();
- }, d = (Y) => {
- var ne;
- (ne = o.value) === null || ne === void 0 || ne.scrollTo(Y);
- }, h = V(() => {
- const {
- mode: Y
- } = t;
- if (Y !== "combobox")
- return Y === sQ ? "combobox" : Y;
- });
- process.env.NODE_ENV !== "production" && lo(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
- const {
- prefixCls: p,
- direction: v,
- configProvider: g,
- renderEmpty: m,
- size: y,
- getPrefixCls: _,
- getPopupContainer: O,
- disabled: S,
- select: x
- } = hn("select", t), {
- compactSize: C,
- compactItemClassnames: P
- } = L2(p, v), $ = V(() => C.value || y.value), T = Vl(), E = V(() => {
- var Y;
- return (Y = S.value) !== null && Y !== void 0 ? Y : T.value;
- }), [M, R] = v3e(p), N = V(() => _()), I = V(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), B = V(() => Wl(N.value, lNe(I.value), t.transitionName)), Q = V(() => Re({
- [`${p.value}-lg`]: $.value === "large",
- [`${p.value}-sm`]: $.value === "small",
- [`${p.value}-rtl`]: v.value === "rtl",
- [`${p.value}-borderless`]: !t.bordered,
- [`${p.value}-in-form-item`]: l.isFormItemInput
- }, Eu(p.value, u.value, l.hasFeedback), P.value, R.value)), W = function() {
- for (var Y = arguments.length, ne = new Array(Y), fe = 0; fe < Y; fe++)
- ne[fe] = arguments[fe];
- r("update:value", ne[0]), r("change", ...ne), s.onFieldChange();
- }, H = (Y) => {
- r("blur", Y), s.onFieldBlur();
- };
- a({
- blur: f,
- focus: c,
- scrollTo: d
- });
- const U = V(() => h.value === "multiple" || h.value === "tags"), j = V(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(U.value || h.value === "combobox"));
- return () => {
- var Y, ne, fe, ue;
- const {
- notFoundContent: ye,
- listHeight: se = 256,
- listItemHeight: he = 24,
- popupClassName: re,
- dropdownClassName: q,
- virtual: K,
- dropdownMatchSelectWidth: de,
- id: xe = s.id.value,
- placeholder: we = (Y = i.placeholder) === null || Y === void 0 ? void 0 : Y.call(i),
- showArrow: He
- } = t, {
- hasFeedback: je,
- feedbackIcon: Be
- } = l;
- let Le;
- ye !== void 0 ? Le = ye : i.notFoundContent ? Le = i.notFoundContent() : h.value === "combobox" ? Le = null : Le = (m == null ? void 0 : m("Select")) || D(HN, {
- componentName: "Select"
- }, null);
- const {
- suffixIcon: Pe,
- itemIcon: Fe,
- removeIcon: Ye,
- clearIcon: xt
- } = w5e(k(k({}, t), {
- multiple: U.value,
- prefixCls: p.value,
- hasFeedback: je,
- feedbackIcon: Be,
- showArrow: j.value
- }), i), It = si(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), an = Re(re || q, {
- [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
- }, R.value);
- return M(D(E8e, te(te(te({
- ref: o,
- virtual: K,
- dropdownMatchSelectWidth: de
- }, It), n), {}, {
- showSearch: (ne = t.showSearch) !== null && ne !== void 0 ? ne : (fe = x == null ? void 0 : x.value) === null || fe === void 0 ? void 0 : fe.showSearch,
- placeholder: we,
- listHeight: se,
- listItemHeight: he,
- mode: h.value,
- prefixCls: p.value,
- direction: v.value,
- inputIcon: Pe,
- menuItemSelectedIcon: Fe,
- removeIcon: Ye,
- clearIcon: xt,
- notFoundContent: Le,
- class: [Q.value, n.class],
- getPopupContainer: O == null ? void 0 : O.value,
- dropdownClassName: an,
- onChange: W,
- onBlur: H,
- id: xe,
- dropdownRender: It.dropdownRender || i.dropdownRender,
- transitionName: B.value,
- children: (ue = i.default) === null || ue === void 0 ? void 0 : ue.call(i),
- tagRender: t.tagRender || i.tagRender,
- optionLabelRender: i.optionLabel,
- maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
- showArrow: je || He,
- disabled: E.value
- }), {
- option: i.option
- }));
- };
- }
- });
- Ca.install = function(t) {
- return t.component(Ca.name, Ca), t.component(Ca.Option.displayName, Ca.Option), t.component(Ca.OptGroup.displayName, Ca.OptGroup), t;
- };
- const Ev = Ca.Option;
- Ca.OptGroup;
- var m3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
- function lQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- y3e(t, i, n[i]);
- });
- }
- return t;
- }
- function y3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var g8 = function(e, n) {
- var r = lQ({}, e, n.attrs);
- return D(Rt, lQ({}, r, {
- icon: m3e
- }), null);
- };
- g8.displayName = "CheckCircleOutlined";
- g8.inheritAttrs = !1;
- var b3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
- function uQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- _3e(t, i, n[i]);
- });
- }
- return t;
- }
- function _3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var m8 = function(e, n) {
- var r = uQ({}, e, n.attrs);
- return D(Rt, uQ({}, r, {
- icon: b3e
- }), null);
- };
- m8.displayName = "ExclamationCircleOutlined";
- m8.inheritAttrs = !1;
- var O3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
- function cQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- S3e(t, i, n[i]);
- });
- }
- return t;
- }
- function S3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var V2 = function(e, n) {
- var r = cQ({}, e, n.attrs);
- return D(Rt, cQ({}, r, {
- icon: O3e
- }), null);
- };
- V2.displayName = "InfoCircleOutlined";
- V2.inheritAttrs = !1;
- var x3e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
- function fQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- w3e(t, i, n[i]);
- });
- }
- return t;
- }
- function w3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var y8 = function(e, n) {
- var r = fQ({}, e, n.attrs);
- return D(Rt, fQ({}, r, {
- icon: x3e
- }), null);
- };
- y8.displayName = "CloseCircleOutlined";
- y8.inheritAttrs = !1;
- var C3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
- function dQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- T3e(t, i, n[i]);
- });
- }
- return t;
- }
- function T3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Df = function(e, n) {
- var r = dQ({}, e, n.attrs);
- return D(Rt, dQ({}, r, {
- icon: C3e
- }), null);
- };
- Df.displayName = "CheckCircleFilled";
- Df.inheritAttrs = !1;
- var P3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
- function hQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- $3e(t, i, n[i]);
- });
- }
- return t;
- }
- function $3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Rf = function(e, n) {
- var r = hQ({}, e, n.attrs);
- return D(Rt, hQ({}, r, {
- icon: P3e
- }), null);
- };
- Rf.displayName = "ExclamationCircleFilled";
- Rf.inheritAttrs = !1;
- var A3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
- function pQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- E3e(t, i, n[i]);
- });
- }
- return t;
- }
- function E3e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var cp = function(e, n) {
- var r = pQ({}, e, n.attrs);
- return D(Rt, pQ({}, r, {
- icon: A3e
- }), null);
- };
- cp.displayName = "InfoCircleFilled";
- cp.inheritAttrs = !1;
- const qO = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], M3e = (t) => ({
- xs: `(max-width: ${t.screenXSMax}px)`,
- sm: `(min-width: ${t.screenSM}px)`,
- md: `(min-width: ${t.screenMD}px)`,
- lg: `(min-width: ${t.screenLG}px)`,
- xl: `(min-width: ${t.screenXL}px)`,
- xxl: `(min-width: ${t.screenXXL}px)`,
- xxxl: `{min-width: ${t.screenXXXL}px}`
- });
- function I3e() {
- const [, t] = pm();
- return V(() => {
- const e = M3e(t.value), n = /* @__PURE__ */ new Map();
- let r = -1, i = {};
- return {
- matchHandlers: {},
- dispatch(a) {
- return i = a, n.forEach((o) => o(i)), n.size >= 1;
- },
- subscribe(a) {
- return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
- },
- unsubscribe(a) {
- n.delete(a), n.size || this.unregister();
- },
- unregister() {
- Object.keys(e).forEach((a) => {
- const o = e[a], s = this.matchHandlers[o];
- s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
- }), n.clear();
- },
- register() {
- Object.keys(e).forEach((a) => {
- const o = e[a], s = (u) => {
- let {
- matches: c
- } = u;
- this.dispatch(k(k({}, i), {
- [a]: c
- }));
- }, l = window.matchMedia(o);
- l.addListener(s), this.matchHandlers[o] = {
- mql: l,
- listener: s
- }, s(l);
- });
- },
- responsiveMap: e
- };
- });
- }
- const Po = {
- adjustX: 1,
- adjustY: 1
- }, $o = [0, 0], Oie = {
- left: {
- points: ["cr", "cl"],
- overflow: Po,
- offset: [-4, 0],
- targetOffset: $o
- },
- right: {
- points: ["cl", "cr"],
- overflow: Po,
- offset: [4, 0],
- targetOffset: $o
- },
- top: {
- points: ["bc", "tc"],
- overflow: Po,
- offset: [0, -4],
- targetOffset: $o
- },
- bottom: {
- points: ["tc", "bc"],
- overflow: Po,
- offset: [0, 4],
- targetOffset: $o
- },
- topLeft: {
- points: ["bl", "tl"],
- overflow: Po,
- offset: [0, -4],
- targetOffset: $o
- },
- leftTop: {
- points: ["tr", "tl"],
- overflow: Po,
- offset: [-4, 0],
- targetOffset: $o
- },
- topRight: {
- points: ["br", "tr"],
- overflow: Po,
- offset: [0, -4],
- targetOffset: $o
- },
- rightTop: {
- points: ["tl", "tr"],
- overflow: Po,
- offset: [4, 0],
- targetOffset: $o
- },
- bottomRight: {
- points: ["tr", "br"],
- overflow: Po,
- offset: [0, 4],
- targetOffset: $o
- },
- rightBottom: {
- points: ["bl", "br"],
- overflow: Po,
- offset: [4, 0],
- targetOffset: $o
- },
- bottomLeft: {
- points: ["tl", "bl"],
- overflow: Po,
- offset: [0, 4],
- targetOffset: $o
- },
- leftBottom: {
- points: ["br", "bl"],
- overflow: Po,
- offset: [-4, 0],
- targetOffset: $o
- }
- }, D3e = {
- prefixCls: String,
- id: String,
- overlayInnerStyle: oe.any
- }, R3e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "TooltipContent",
- props: D3e,
- setup(t, e) {
- let {
- slots: n
- } = e;
- return () => {
- var r;
- return D("div", {
- class: `${t.prefixCls}-inner`,
- id: t.id,
- role: "tooltip",
- style: t.overlayInnerStyle
- }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
- };
- }
- });
- var k3e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function vQ() {
- }
- const L3e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Tooltip",
- inheritAttrs: !1,
- props: {
- trigger: oe.any.def(["hover"]),
- defaultVisible: {
- type: Boolean,
- default: void 0
- },
- visible: {
- type: Boolean,
- default: void 0
- },
- placement: oe.string.def("right"),
- transitionName: String,
- animation: oe.any,
- afterVisibleChange: oe.func.def(() => {
- }),
- overlayStyle: {
- type: Object,
- default: void 0
- },
- overlayClassName: String,
- prefixCls: oe.string.def("rc-tooltip"),
- mouseEnterDelay: oe.number.def(0.1),
- mouseLeaveDelay: oe.number.def(0.1),
- getPopupContainer: Function,
- destroyTooltipOnHide: {
- type: Boolean,
- default: !1
- },
- align: oe.object.def(() => ({})),
- arrowContent: oe.any.def(null),
- tipId: String,
- builtinPlacements: oe.object,
- overlayInnerStyle: {
- type: Object,
- default: void 0
- },
- popupVisible: {
- type: Boolean,
- default: void 0
- },
- onVisibleChange: Function,
- onPopupAlign: Function,
- arrow: {
- type: Boolean,
- default: !0
- }
- },
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i
- } = e;
- const a = ve(), o = () => {
- const {
- prefixCls: c,
- tipId: f,
- overlayInnerStyle: d
- } = t;
- return [t.arrow ? D("div", {
- class: `${c}-arrow`,
- key: "arrow"
- }, [y2(n, t, "arrowContent")]) : null, D(R3e, {
- key: "content",
- prefixCls: c,
- id: f,
- overlayInnerStyle: d
- }, {
- overlay: n.overlay
- })];
- };
- i({
- getPopupDomNode: () => a.value.getPopupDomNode(),
- triggerDOM: a,
- forcePopupAlign: () => {
- var c;
- return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
- }
- });
- const l = ve(!1), u = ve(!1);
- return Vt(() => {
- const {
- destroyTooltipOnHide: c
- } = t;
- if (typeof c == "boolean")
- l.value = c;
- else if (c && typeof c == "object") {
- const {
- keepParent: f
- } = c;
- l.value = f === !0, u.value = f === !1;
- }
- }), () => {
- const {
- overlayClassName: c,
- trigger: f,
- mouseEnterDelay: d,
- mouseLeaveDelay: h,
- overlayStyle: p,
- prefixCls: v,
- afterVisibleChange: g,
- transitionName: m,
- animation: y,
- placement: _,
- align: O,
- destroyTooltipOnHide: S,
- defaultVisible: x
- } = t, C = k3e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), P = k({}, C);
- t.visible !== void 0 && (P.popupVisible = t.visible);
- const $ = k(k(k({
- popupClassName: c,
- prefixCls: v,
- action: f,
- builtinPlacements: Oie,
- popupPlacement: _,
- popupAlign: O,
- afterPopupVisibleChange: g,
- popupTransitionName: m,
- popupAnimation: y,
- defaultPopupVisible: x,
- destroyPopupOnHide: l.value,
- autoDestroy: u.value,
- mouseLeaveDelay: h,
- popupStyle: p,
- mouseEnterDelay: d
- }, P), r), {
- onPopupVisibleChange: t.onVisibleChange || vQ,
- onPopupAlign: t.onPopupAlign || vQ,
- ref: a,
- arrow: !!t.arrow,
- popup: o()
- });
- return D(E2, $, {
- default: n.default
- });
- };
- }
- }), N3e = () => ({
- trigger: [String, Array],
- open: {
- type: Boolean,
- default: void 0
- },
- /** @deprecated Please use `open` instead. */
- visible: {
- type: Boolean,
- default: void 0
- },
- placement: String,
- color: String,
- transitionName: String,
- overlayStyle: sn(),
- overlayInnerStyle: sn(),
- overlayClassName: String,
- openClassName: String,
- prefixCls: String,
- mouseEnterDelay: Number,
- mouseLeaveDelay: Number,
- getPopupContainer: Function,
- /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
- arrowPointAtCenter: {
- type: Boolean,
- default: void 0
- },
- arrow: {
- type: [Boolean, Object],
- default: !0
- },
- autoAdjustOverflow: {
- type: [Boolean, Object],
- default: void 0
- },
- destroyTooltipOnHide: {
- type: Boolean,
- default: void 0
- },
- align: sn(),
- builtinPlacements: sn(),
- children: Array,
- /** @deprecated Please use `onOpenChange` instead. */
- onVisibleChange: Function,
- /** @deprecated Please use `onUpdate:open` instead. */
- "onUpdate:visible": Function,
- onOpenChange: Function,
- "onUpdate:open": Function
- }), B3e = {
- adjustX: 1,
- adjustY: 1
- }, gQ = {
- adjustX: 0,
- adjustY: 0
- }, z3e = [0, 0];
- function mQ(t) {
- return typeof t == "boolean" ? t ? B3e : gQ : k(k({}, gQ), t);
- }
- function V3e(t) {
- const {
- arrowWidth: e = 4,
- horizontalArrowShift: n = 16,
- verticalArrowShift: r = 8,
- autoAdjustOverflow: i,
- arrowPointAtCenter: a
- } = t, o = {
- left: {
- points: ["cr", "cl"],
- offset: [-4, 0]
- },
- right: {
- points: ["cl", "cr"],
- offset: [4, 0]
- },
- top: {
- points: ["bc", "tc"],
- offset: [0, -4]
- },
- bottom: {
- points: ["tc", "bc"],
- offset: [0, 4]
- },
- topLeft: {
- points: ["bl", "tc"],
- offset: [-(n + e), -4]
- },
- leftTop: {
- points: ["tr", "cl"],
- offset: [-4, -(r + e)]
- },
- topRight: {
- points: ["br", "tc"],
- offset: [n + e, -4]
- },
- rightTop: {
- points: ["tl", "cr"],
- offset: [4, -(r + e)]
- },
- bottomRight: {
- points: ["tr", "bc"],
- offset: [n + e, 4]
- },
- rightBottom: {
- points: ["bl", "cr"],
- offset: [4, r + e]
- },
- bottomLeft: {
- points: ["tl", "bc"],
- offset: [-(n + e), 4]
- },
- leftBottom: {
- points: ["br", "cl"],
- offset: [-4, r + e]
- }
- };
- return Object.keys(o).forEach((s) => {
- o[s] = a ? k(k({}, o[s]), {
- overflow: mQ(i),
- targetOffset: z3e
- }) : k(k({}, Oie[s]), {
- overflow: mQ(i)
- }), o[s].ignoreShake = !0;
- }), o;
- }
- function Sie() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- for (let e = 0, n = t.length; e < n; e++)
- if (t[e] !== void 0)
- return t[e];
- }
- const F3e = qw.map((t) => `${t}-inverse`);
- function W3e(t) {
- return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...F3e, ...qw].includes(t) : qw.includes(t);
- }
- function Q3e(t, e) {
- const n = W3e(e), r = Re({
- [`${t}-${e}`]: e && n
- }), i = {}, a = {};
- return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
- className: r,
- overlayStyle: i,
- arrowStyle: a
- };
- }
- function KO(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
- return t.map((n) => `${e}${n}`).join(",");
- }
- const xie = 8;
- function H3e(t) {
- const e = xie, {
- sizePopupArrow: n,
- contentRadius: r,
- borderRadiusOuter: i,
- limitVerticalRadius: a
- } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
- return {
- dropdownArrowOffset: s,
- dropdownArrowOffsetVertical: l
- };
- }
- function G3e(t, e) {
- const {
- componentCls: n,
- sizePopupArrow: r,
- marginXXS: i,
- borderRadiusXS: a,
- borderRadiusOuter: o,
- boxShadowPopoverArrow: s
- } = t, {
- colorBg: l,
- showArrowCls: u,
- contentRadius: c = t.borderRadiusLG,
- limitVerticalRadius: f
- } = e, {
- dropdownArrowOffsetVertical: d,
- dropdownArrowOffset: h
- } = H3e({
- sizePopupArrow: r,
- contentRadius: c,
- borderRadiusOuter: o,
- limitVerticalRadius: f
- }), p = r / 2 + i;
- return {
- [n]: {
- // ============================ Basic ============================
- [`${n}-arrow`]: [k(k({
- position: "absolute",
- zIndex: 1,
- display: "block"
- }, RLe(r, a, o, l, s)), {
- "&:before": {
- background: l
- }
- })],
- // ========================== Placement ==========================
- // Here handle the arrow position and rotate stuff
- // >>>>> Top
- [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
- bottom: 0,
- transform: "translateY(100%) rotate(180deg)"
- },
- [`&-placement-top ${n}-arrow`]: {
- left: {
- _skip_check_: !0,
- value: "50%"
- },
- transform: "translateX(-50%) translateY(100%) rotate(180deg)"
- },
- [`&-placement-topLeft ${n}-arrow`]: {
- left: {
- _skip_check_: !0,
- value: h
- }
- },
- [`&-placement-topRight ${n}-arrow`]: {
- right: {
- _skip_check_: !0,
- value: h
- }
- },
- // >>>>> Bottom
- [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
- top: 0,
- transform: "translateY(-100%)"
- },
- [`&-placement-bottom ${n}-arrow`]: {
- left: {
- _skip_check_: !0,
- value: "50%"
- },
- transform: "translateX(-50%) translateY(-100%)"
- },
- [`&-placement-bottomLeft ${n}-arrow`]: {
- left: {
- _skip_check_: !0,
- value: h
- }
- },
- [`&-placement-bottomRight ${n}-arrow`]: {
- right: {
- _skip_check_: !0,
- value: h
- }
- },
- // >>>>> Left
- [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
- right: {
- _skip_check_: !0,
- value: 0
- },
- transform: "translateX(100%) rotate(90deg)"
- },
- [`&-placement-left ${n}-arrow`]: {
- top: {
- _skip_check_: !0,
- value: "50%"
- },
- transform: "translateY(-50%) translateX(100%) rotate(90deg)"
- },
- [`&-placement-leftTop ${n}-arrow`]: {
- top: d
- },
- [`&-placement-leftBottom ${n}-arrow`]: {
- bottom: d
- },
- // >>>>> Right
- [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
- left: {
- _skip_check_: !0,
- value: 0
- },
- transform: "translateX(-100%) rotate(-90deg)"
- },
- [`&-placement-right ${n}-arrow`]: {
- top: {
- _skip_check_: !0,
- value: "50%"
- },
- transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
- },
- [`&-placement-rightTop ${n}-arrow`]: {
- top: d
- },
- [`&-placement-rightBottom ${n}-arrow`]: {
- bottom: d
- },
- // =========================== Offset ============================
- // Offset the popover to account for the dropdown arrow
- // >>>>> Top
- [KO(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
- paddingBottom: p
- },
- // >>>>> Bottom
- [KO(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
- paddingTop: p
- },
- // >>>>> Left
- [KO(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
- paddingRight: {
- _skip_check_: !0,
- value: p
- }
- },
- // >>>>> Right
- [KO(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
- paddingLeft: {
- _skip_check_: !0,
- value: p
- }
- }
- }
- };
- }
- const j3e = (t) => {
- const {
- componentCls: e,
- // ant-tooltip
- tooltipMaxWidth: n,
- tooltipColor: r,
- tooltipBg: i,
- tooltipBorderRadius: a,
- zIndexPopup: o,
- controlHeight: s,
- boxShadowSecondary: l,
- paddingSM: u,
- paddingXS: c,
- tooltipRadiusOuter: f
- } = t;
- return [
- {
- [e]: k(k(k(k({}, Gn(t)), {
- position: "absolute",
- zIndex: o,
- display: "block",
- "&": [{
- width: "max-content"
- }, {
- width: "intrinsic"
- }],
- maxWidth: n,
- visibility: "visible",
- "&-hidden": {
- display: "none"
- },
- "--antd-arrow-background-color": i,
- // Wrapper for the tooltip content
- [`${e}-inner`]: {
- minWidth: s,
- minHeight: s,
- padding: `${u / 2}px ${c}px`,
- color: r,
- textAlign: "start",
- textDecoration: "none",
- wordWrap: "break-word",
- backgroundColor: i,
- borderRadius: a,
- boxShadow: l
- },
- // Limit left and right placement radius
- [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
- [`${e}-inner`]: {
- borderRadius: Math.min(a, xie)
- }
- },
- [`${e}-content`]: {
- position: "relative"
- }
- }), kLe(t, (d, h) => {
- let {
- darkColor: p
- } = h;
- return {
- [`&${e}-${d}`]: {
- [`${e}-inner`]: {
- backgroundColor: p
- },
- [`${e}-arrow`]: {
- "--antd-arrow-background-color": p
- }
- }
- };
- })), {
- // RTL
- "&-rtl": {
- direction: "rtl"
- }
- })
- },
- // Arrow Style
- G3e(bn(t, {
- borderRadiusOuter: f
- }), {
- colorBg: "var(--antd-arrow-background-color)",
- showArrowCls: "",
- contentRadius: a,
- limitVerticalRadius: !0
- }),
- // Pure Render
- {
- [`${e}-pure`]: {
- position: "relative",
- maxWidth: "none"
- }
- }
- ];
- }, Z3e = (t, e) => pr("Tooltip", (r) => {
- if ((e == null ? void 0 : e.value) === !1)
- return [];
- const {
- borderRadius: i,
- colorTextLightSolid: a,
- colorBgDefault: o,
- borderRadiusOuter: s
- } = r, l = bn(r, {
- // default variables
- tooltipMaxWidth: 250,
- tooltipColor: a,
- tooltipBorderRadius: i,
- tooltipBg: o,
- tooltipRadiusOuter: s > 4 ? 4 : s
- });
- return [j3e(l), B2(r, "zoom-big-fast")];
- }, (r) => {
- let {
- zIndexPopupBase: i,
- colorBgSpotlight: a
- } = r;
- return {
- zIndexPopup: i + 70,
- colorBgDefault: a
- };
- })(t), U3e = (t, e) => {
- const n = {}, r = k({}, t);
- return e.forEach((i) => {
- t && i in t && (n[i] = t[i], delete r[i]);
- }), {
- picked: n,
- omitted: r
- };
- }, wie = () => k(k({}, N3e()), {
- title: oe.any
- }), X3e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ATooltip",
- inheritAttrs: !1,
- props: li(wie(), {
- trigger: "hover",
- align: {},
- placement: "top",
- mouseEnterDelay: 0.1,
- mouseLeaveDelay: 0.1,
- arrowPointAtCenter: !1,
- autoAdjustOverflow: !0
- }),
- slots: Object,
- // emits: ['update:visible', 'visibleChange'],
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- attrs: i,
- expose: a
- } = e;
- process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((T) => {
- let [E, M] = T;
- aa(t[E] === void 0, "Tooltip", `\`${E}\` is deprecated, please use \`${M}\` instead.`);
- });
- const {
- prefixCls: o,
- getPopupContainer: s,
- direction: l,
- rootPrefixCls: u
- } = hn("tooltip", t), c = V(() => {
- var T;
- return (T = t.open) !== null && T !== void 0 ? T : t.visible;
- }), f = ee(Sie([t.open, t.visible])), d = ee();
- let h;
- me(c, (T) => {
- en.cancel(h), h = en(() => {
- f.value = !!T;
- });
- });
- const p = () => {
- var T;
- const E = (T = t.title) !== null && T !== void 0 ? T : n.title;
- return !E && E !== 0;
- }, v = (T) => {
- const E = p();
- c.value === void 0 && (f.value = E ? !1 : T), E || (r("update:visible", T), r("visibleChange", T), r("update:open", T), r("openChange", T));
- };
- a({
- getPopupDomNode: () => d.value.getPopupDomNode(),
- open: f,
- forcePopupAlign: () => {
- var T;
- return (T = d.value) === null || T === void 0 ? void 0 : T.forcePopupAlign();
- }
- });
- const m = V(() => {
- var T;
- const {
- builtinPlacements: E,
- autoAdjustOverflow: M,
- arrow: R,
- arrowPointAtCenter: N
- } = t;
- let I = N;
- return typeof R == "object" && (I = (T = R.pointAtCenter) !== null && T !== void 0 ? T : N), E || V3e({
- arrowPointAtCenter: I,
- autoAdjustOverflow: M
- });
- }), y = (T) => T || T === "", _ = (T) => {
- const E = T.type;
- if (typeof E == "object" && T.props && ((E.__ANT_BUTTON === !0 || E === "button") && y(T.props.disabled) || E.__ANT_SWITCH === !0 && (y(T.props.disabled) || y(T.props.loading)) || E.__ANT_RADIO === !0 && y(T.props.disabled))) {
- const {
- picked: M,
- omitted: R
- } = U3e(lke(T), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), N = k(k({
- display: "inline-block"
- }, M), {
- cursor: "not-allowed",
- lineHeight: 1,
- width: T.props && T.props.block ? "100%" : void 0
- }), I = k(k({}, R), {
- pointerEvents: "none"
- }), B = xr(T, {
- style: I
- }, !0);
- return D("span", {
- style: N,
- class: `${o.value}-disabled-compatible-wrapper`
- }, [B]);
- }
- return T;
- }, O = () => {
- var T, E;
- return (T = t.title) !== null && T !== void 0 ? T : (E = n.title) === null || E === void 0 ? void 0 : E.call(n);
- }, S = (T, E) => {
- const M = m.value, R = Object.keys(M).find((N) => {
- var I, B;
- return M[N].points[0] === ((I = E.points) === null || I === void 0 ? void 0 : I[0]) && M[N].points[1] === ((B = E.points) === null || B === void 0 ? void 0 : B[1]);
- });
- if (R) {
- const N = T.getBoundingClientRect(), I = {
- top: "50%",
- left: "50%"
- };
- R.indexOf("top") >= 0 || R.indexOf("Bottom") >= 0 ? I.top = `${N.height - E.offset[1]}px` : (R.indexOf("Top") >= 0 || R.indexOf("bottom") >= 0) && (I.top = `${-E.offset[1]}px`), R.indexOf("left") >= 0 || R.indexOf("Right") >= 0 ? I.left = `${N.width - E.offset[0]}px` : (R.indexOf("right") >= 0 || R.indexOf("Left") >= 0) && (I.left = `${-E.offset[0]}px`), T.style.transformOrigin = `${I.left} ${I.top}`;
- }
- }, x = V(() => Q3e(o.value, t.color)), C = V(() => i["data-popover-inject"]), [P, $] = Z3e(o, V(() => !C.value));
- return () => {
- var T, E;
- const {
- openClassName: M,
- overlayClassName: R,
- overlayStyle: N,
- overlayInnerStyle: I
- } = t;
- let B = (E = Zl((T = n.default) === null || T === void 0 ? void 0 : T.call(n))) !== null && E !== void 0 ? E : null;
- B = B.length === 1 ? B[0] : B;
- let Q = f.value;
- if (c.value === void 0 && p() && (Q = !1), !B)
- return null;
- const W = _(po(B) && !uke(B) ? B : D("span", null, [B])), H = Re({
- [M || `${o.value}-open`]: !0,
- [W.props && W.props.class]: W.props && W.props.class
- }), U = Re(R, {
- [`${o.value}-rtl`]: l.value === "rtl"
- }, x.value.className, $.value), j = k(k({}, x.value.overlayStyle), I), Y = x.value.arrowStyle, ne = k(k(k({}, i), t), {
- prefixCls: o.value,
- arrow: !!t.arrow,
- getPopupContainer: s == null ? void 0 : s.value,
- builtinPlacements: m.value,
- visible: Q,
- ref: d,
- overlayClassName: U,
- overlayStyle: k(k({}, Y), N),
- overlayInnerStyle: j,
- onVisibleChange: v,
- onPopupAlign: S,
- transitionName: Wl(u.value, "zoom-big-fast", t.transitionName)
- });
- return P(D(L3e, ne, {
- default: () => [f.value ? xr(W, {
- class: H
- }) : W],
- arrowContent: () => D("span", {
- class: `${o.value}-arrow-content`
- }, null),
- overlay: O
- }));
- };
- }
- }), F2 = fm(X3e), Qp = {
- adjustX: 1,
- adjustY: 1
- }, Hp = [0, 0], Y3e = {
- topLeft: {
- points: ["bl", "tl"],
- overflow: Qp,
- offset: [0, -4],
- targetOffset: Hp
- },
- topCenter: {
- points: ["bc", "tc"],
- overflow: Qp,
- offset: [0, -4],
- targetOffset: Hp
- },
- topRight: {
- points: ["br", "tr"],
- overflow: Qp,
- offset: [0, -4],
- targetOffset: Hp
- },
- bottomLeft: {
- points: ["tl", "bl"],
- overflow: Qp,
- offset: [0, 4],
- targetOffset: Hp
- },
- bottomCenter: {
- points: ["tc", "bc"],
- overflow: Qp,
- offset: [0, 4],
- targetOffset: Hp
- },
- bottomRight: {
- points: ["tr", "br"],
- overflow: Qp,
- offset: [0, 4],
- targetOffset: Hp
- }
- };
- var q3e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const K3e = ae({
- compatConfig: {
- MODE: 3
- },
- props: {
- minOverlayWidthMatchTrigger: {
- type: Boolean,
- default: void 0
- },
- arrow: {
- type: Boolean,
- default: !1
- },
- prefixCls: oe.string.def("rc-dropdown"),
- transitionName: String,
- overlayClassName: oe.string.def(""),
- openClassName: String,
- animation: oe.any,
- align: oe.object,
- overlayStyle: {
- type: Object,
- default: void 0
- },
- placement: oe.string.def("bottomLeft"),
- overlay: oe.any,
- trigger: oe.oneOfType([oe.string, oe.arrayOf(oe.string)]).def("hover"),
- alignPoint: {
- type: Boolean,
- default: void 0
- },
- showAction: oe.array,
- hideAction: oe.array,
- getPopupContainer: Function,
- visible: {
- type: Boolean,
- default: void 0
- },
- defaultVisible: {
- type: Boolean,
- default: !1
- },
- mouseEnterDelay: oe.number.def(0.15),
- mouseLeaveDelay: oe.number.def(0.1)
- },
- emits: ["visibleChange", "overlayClick"],
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- expose: i
- } = e;
- const a = ee(!!t.visible);
- me(() => t.visible, (h) => {
- h !== void 0 && (a.value = h);
- });
- const o = ee();
- i({
- triggerRef: o
- });
- const s = (h) => {
- t.visible === void 0 && (a.value = !1), r("overlayClick", h);
- }, l = (h) => {
- t.visible === void 0 && (a.value = h), r("visibleChange", h);
- }, u = () => {
- var h;
- const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
- prefixCls: `${t.prefixCls}-menu`,
- onClick: s
- };
- return D(Wt, {
- key: Mne
- }, [t.arrow && D("div", {
- class: `${t.prefixCls}-arrow`
- }, null), xr(p, v, !1)]);
- }, c = V(() => {
- const {
- minOverlayWidthMatchTrigger: h = !t.alignPoint
- } = t;
- return h;
- }), f = () => {
- var h;
- const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
- return a.value && p ? xr(p[0], {
- class: t.openClassName || `${t.prefixCls}-open`
- }, !1) : p;
- }, d = V(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
- return () => {
- const {
- prefixCls: h,
- arrow: p,
- showAction: v,
- overlayStyle: g,
- trigger: m,
- placement: y,
- align: _,
- getPopupContainer: O,
- transitionName: S,
- animation: x,
- overlayClassName: C
- } = t, P = q3e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
- return D(E2, te(te({}, P), {}, {
- prefixCls: h,
- ref: o,
- popupClassName: Re(C, {
- [`${h}-show-arrow`]: p
- }),
- popupStyle: g,
- builtinPlacements: Y3e,
- action: m,
- showAction: v,
- hideAction: d.value || [],
- popupPlacement: y,
- popupAlign: _,
- popupTransitionName: S,
- popupAnimation: x,
- popupVisible: a.value,
- stretch: c.value ? "minWidth" : "",
- onPopupVisibleChange: l,
- getPopupContainer: O
- }), {
- popup: u,
- default: f
- });
- };
- }
- }), J3e = (t) => {
- const {
- componentCls: e,
- colorPrimary: n
- } = t;
- return {
- [e]: {
- position: "absolute",
- background: "transparent",
- pointerEvents: "none",
- boxSizing: "border-box",
- color: `var(--wave-color, ${n})`,
- boxShadow: "0 0 0 0 currentcolor",
- opacity: 0.2,
- // =================== Motion ===================
- "&.wave-motion-appear": {
- transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
- "&-active": {
- boxShadow: "0 0 0 6px currentcolor",
- opacity: 0
- }
- }
- }
- };
- }, e6e = pr("Wave", (t) => [J3e(t)]);
- function t6e(t) {
- const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
- return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
- }
- function fE(t) {
- return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && t6e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
- t !== "transparent";
- }
- function n6e(t) {
- const {
- borderTopColor: e,
- borderColor: n,
- backgroundColor: r
- } = getComputedStyle(t);
- return fE(e) ? e : fE(n) ? n : fE(r) ? r : null;
- }
- function dE(t) {
- return Number.isNaN(t) ? 0 : t;
- }
- const r6e = ae({
- props: {
- target: sn(),
- className: String
- },
- setup(t) {
- const e = ve(null), [n, r] = tr(null), [i, a] = tr([]), [o, s] = tr(0), [l, u] = tr(0), [c, f] = tr(0), [d, h] = tr(0), [p, v] = tr(!1);
- function g() {
- const {
- target: C
- } = t, P = getComputedStyle(C);
- r(n6e(C));
- const $ = P.position === "static", {
- borderLeftWidth: T,
- borderTopWidth: E
- } = P;
- s($ ? C.offsetLeft : dE(-parseFloat(T))), u($ ? C.offsetTop : dE(-parseFloat(E))), f(C.offsetWidth), h(C.offsetHeight);
- const {
- borderTopLeftRadius: M,
- borderTopRightRadius: R,
- borderBottomLeftRadius: N,
- borderBottomRightRadius: I
- } = P;
- a([M, R, I, N].map((B) => dE(parseFloat(B))));
- }
- let m, y, _;
- const O = () => {
- clearTimeout(_), en.cancel(y), m == null || m.disconnect();
- }, S = () => {
- var C;
- const P = (C = e.value) === null || C === void 0 ? void 0 : C.parentElement;
- P && (Ih(null, P), P.parentElement && P.parentElement.removeChild(P));
- };
- _t(() => {
- O(), _ = setTimeout(() => {
- S();
- }, 5e3);
- const {
- target: C
- } = t;
- C && (y = en(() => {
- g(), v(!0);
- }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(C)));
- }), Qt(() => {
- O();
- });
- const x = (C) => {
- C.propertyName === "opacity" && S();
- };
- return () => {
- if (!p.value)
- return null;
- const C = {
- left: `${o.value}px`,
- top: `${l.value}px`,
- width: `${c.value}px`,
- height: `${d.value}px`,
- borderRadius: i.value.map((P) => `${P}px`).join(" ")
- };
- return n && (C["--wave-color"] = n.value), D(mo, {
- appear: !0,
- name: "wave-motion",
- appearFromClass: "wave-motion-appear",
- appearActiveClass: "wave-motion-appear",
- appearToClass: "wave-motion-appear wave-motion-appear-active"
- }, {
- default: () => [D("div", {
- ref: e,
- class: t.className,
- style: C,
- onTransitionend: x
- }, null)]
- });
- };
- }
- });
- function i6e(t, e) {
- const n = document.createElement("div");
- n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), Ih(D(r6e, {
- target: t,
- className: e
- }, null), n);
- }
- function a6e(t, e, n) {
- function r() {
- var i;
- const a = xu(t);
- !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || i6e(a, e.value);
- }
- return r;
- }
- const o6e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Wave",
- props: {
- disabled: Boolean
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = In(), {
- prefixCls: i,
- wave: a
- } = hn("wave", t), [, o] = e6e(i), s = a6e(r, V(() => Re(i.value, o.value)), a);
- let l;
- const u = () => {
- xu(r).removeEventListener("click", l, !0);
- };
- return _t(() => {
- me(() => t.disabled, () => {
- u(), Bt(() => {
- const c = xu(r);
- c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
- f.target.tagName === "INPUT" || !Hre(f.target) || // No need wave
- !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
- }, c.addEventListener("click", l, !0));
- });
- }, {
- immediate: !0,
- flush: "post"
- });
- }), Qt(() => {
- u();
- }), () => {
- var c;
- return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
- };
- }
- });
- function Cie(t) {
- return t === "danger" ? {
- danger: !0
- } : {
- type: t
- };
- }
- const s6e = () => ({
- prefixCls: String,
- type: String,
- htmlType: {
- type: String,
- default: "button"
- },
- shape: {
- type: String
- },
- size: {
- type: String
- },
- loading: {
- type: [Boolean, Object],
- default: () => !1
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- ghost: {
- type: Boolean,
- default: void 0
- },
- block: {
- type: Boolean,
- default: void 0
- },
- danger: {
- type: Boolean,
- default: void 0
- },
- icon: oe.any,
- href: String,
- target: String,
- title: String,
- onClick: Uw(),
- onMousedown: Uw()
- }), yQ = (t) => {
- t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
- }, bQ = (t) => {
- Bt(() => {
- t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
- });
- }, _Q = (t) => {
- t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
- }, l6e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "LoadingIcon",
- props: {
- prefixCls: String,
- loading: [Boolean, Object],
- existIcon: Boolean
- },
- setup(t) {
- return () => {
- const {
- existIcon: e,
- prefixCls: n,
- loading: r
- } = t;
- if (e)
- return D("span", {
- class: `${n}-loading-icon`
- }, [D(Ql, null, null)]);
- const i = !!r;
- return D(mo, {
- name: `${n}-loading-icon-motion`,
- onBeforeEnter: yQ,
- onEnter: bQ,
- onAfterEnter: _Q,
- onBeforeLeave: bQ,
- onLeave: (a) => {
- setTimeout(() => {
- yQ(a);
- });
- },
- onAfterLeave: _Q
- }, {
- default: () => [i ? D("span", {
- class: `${n}-loading-icon`
- }, [D(Ql, null, null)]) : null]
- });
- };
- }
- }), OQ = (t, e) => ({
- // Border
- [`> span, > ${t}`]: {
- "&:not(:last-child)": {
- [`&, & > ${t}`]: {
- "&:not(:disabled)": {
- borderInlineEndColor: e
- }
- }
- },
- "&:not(:first-child)": {
- [`&, & > ${t}`]: {
- "&:not(:disabled)": {
- borderInlineStartColor: e
- }
- }
- }
- }
- }), u6e = (t) => {
- const {
- componentCls: e,
- fontSize: n,
- lineWidth: r,
- colorPrimaryHover: i,
- colorErrorHover: a
- } = t;
- return {
- [`${e}-group`]: [
- {
- position: "relative",
- display: "inline-flex",
- // Border
- [`> span, > ${e}`]: {
- "&:not(:last-child)": {
- [`&, & > ${e}`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- "&:not(:first-child)": {
- marginInlineStart: -r,
- [`&, & > ${e}`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- }
- },
- [e]: {
- position: "relative",
- zIndex: 1,
- "&:hover,\n &:focus,\n &:active": {
- zIndex: 2
- },
- "&[disabled]": {
- zIndex: 0
- }
- },
- [`${e}-icon-only`]: {
- fontSize: n
- }
- },
- // Border Color
- OQ(`${e}-primary`, i),
- OQ(`${e}-danger`, a)
- ]
- };
- };
- function c6e(t, e) {
- return {
- // border collapse
- [`&-item:not(${e}-last-item)`]: {
- marginBottom: -t.lineWidth
- },
- "&-item": {
- "&:hover,&:focus,&:active": {
- zIndex: 2
- },
- "&[disabled]": {
- zIndex: 0
- }
- }
- };
- }
- function f6e(t, e) {
- return {
- [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
- borderRadius: 0
- },
- [`&-item${e}-first-item:not(${e}-last-item)`]: {
- [`&, &${t}-sm, &${t}-lg`]: {
- borderEndEndRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`&-item${e}-last-item:not(${e}-first-item)`]: {
- [`&, &${t}-sm, &${t}-lg`]: {
- borderStartStartRadius: 0,
- borderStartEndRadius: 0
- }
- }
- };
- }
- function d6e(t) {
- const e = `${t.componentCls}-compact-vertical`;
- return {
- [e]: k(k({}, c6e(t, e)), f6e(t.componentCls, e))
- };
- }
- const h6e = (t) => {
- const {
- componentCls: e,
- iconCls: n
- } = t;
- return {
- [e]: {
- outline: "none",
- position: "relative",
- display: "inline-block",
- fontWeight: 400,
- whiteSpace: "nowrap",
- textAlign: "center",
- backgroundImage: "none",
- backgroundColor: "transparent",
- border: `${t.lineWidth}px ${t.lineType} transparent`,
- cursor: "pointer",
- transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
- userSelect: "none",
- touchAction: "manipulation",
- lineHeight: t.lineHeight,
- color: t.colorText,
- "> span": {
- display: "inline-block"
- },
- // Leave a space between icon and text.
- [`> ${n} + span, > span + ${n}`]: {
- marginInlineStart: t.marginXS
- },
- "> a": {
- color: "currentColor"
- },
- "&:not(:disabled)": k({}, T2(t)),
- // make `btn-icon-only` not too narrow
- [`&-icon-only${e}-compact-item`]: {
- flex: "none"
- },
- // Special styles for Primary Button
- [`&-compact-item${e}-primary`]: {
- [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
- position: "relative",
- "&:before": {
- position: "absolute",
- top: -t.lineWidth,
- insetInlineStart: -t.lineWidth,
- display: "inline-block",
- width: t.lineWidth,
- height: `calc(100% + ${t.lineWidth * 2}px)`,
- backgroundColor: t.colorPrimaryHover,
- content: '""'
- }
- }
- },
- // Special styles for Primary Button
- "&-compact-vertical-item": {
- [`&${e}-primary`]: {
- [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
- position: "relative",
- "&:before": {
- position: "absolute",
- top: -t.lineWidth,
- insetInlineStart: -t.lineWidth,
- display: "inline-block",
- width: `calc(100% + ${t.lineWidth * 2}px)`,
- height: t.lineWidth,
- backgroundColor: t.colorPrimaryHover,
- content: '""'
- }
- }
- }
- }
- }
- };
- }, Bu = (t, e) => ({
- "&:not(:disabled)": {
- "&:hover": t,
- "&:active": e
- }
- }), p6e = (t) => ({
- minWidth: t.controlHeight,
- paddingInlineStart: 0,
- paddingInlineEnd: 0,
- borderRadius: "50%"
- }), v6e = (t) => ({
- borderRadius: t.controlHeight,
- paddingInlineStart: t.controlHeight / 2,
- paddingInlineEnd: t.controlHeight / 2
- }), IR = (t) => ({
- cursor: "not-allowed",
- borderColor: t.colorBorder,
- color: t.colorTextDisabled,
- backgroundColor: t.colorBgContainerDisabled,
- boxShadow: "none"
- }), aC = (t, e, n, r, i, a, o) => ({
- [`&${t}-background-ghost`]: k(k({
- color: e || void 0,
- backgroundColor: "transparent",
- borderColor: n || void 0,
- boxShadow: "none"
- }, Bu(k({
- backgroundColor: "transparent"
- }, a), k({
- backgroundColor: "transparent"
- }, o))), {
- "&:disabled": {
- cursor: "not-allowed",
- color: r || void 0,
- borderColor: i || void 0
- }
- })
- }), b8 = (t) => ({
- "&:disabled": k({}, IR(t))
- }), Tie = (t) => k({}, b8(t)), oC = (t) => ({
- "&:disabled": {
- cursor: "not-allowed",
- color: t.colorTextDisabled
- }
- }), Pie = (t) => k(k(k(k(k({}, Tie(t)), {
- backgroundColor: t.colorBgContainer,
- borderColor: t.colorBorder,
- boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
- }), Bu({
- color: t.colorPrimaryHover,
- borderColor: t.colorPrimaryHover
- }, {
- color: t.colorPrimaryActive,
- borderColor: t.colorPrimaryActive
- })), aC(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
- [`&${t.componentCls}-dangerous`]: k(k(k({
- color: t.colorError,
- borderColor: t.colorError
- }, Bu({
- color: t.colorErrorHover,
- borderColor: t.colorErrorBorderHover
- }, {
- color: t.colorErrorActive,
- borderColor: t.colorErrorActive
- })), aC(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), b8(t))
- }), g6e = (t) => k(k(k(k(k({}, Tie(t)), {
- color: t.colorTextLightSolid,
- backgroundColor: t.colorPrimary,
- boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
- }), Bu({
- color: t.colorTextLightSolid,
- backgroundColor: t.colorPrimaryHover
- }, {
- color: t.colorTextLightSolid,
- backgroundColor: t.colorPrimaryActive
- })), aC(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
- color: t.colorPrimaryHover,
- borderColor: t.colorPrimaryHover
- }, {
- color: t.colorPrimaryActive,
- borderColor: t.colorPrimaryActive
- })), {
- [`&${t.componentCls}-dangerous`]: k(k(k({
- backgroundColor: t.colorError,
- boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
- }, Bu({
- backgroundColor: t.colorErrorHover
- }, {
- backgroundColor: t.colorErrorActive
- })), aC(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
- color: t.colorErrorHover,
- borderColor: t.colorErrorHover
- }, {
- color: t.colorErrorActive,
- borderColor: t.colorErrorActive
- })), b8(t))
- }), m6e = (t) => k(k({}, Pie(t)), {
- borderStyle: "dashed"
- }), y6e = (t) => k(k(k({
- color: t.colorLink
- }, Bu({
- color: t.colorLinkHover
- }, {
- color: t.colorLinkActive
- })), oC(t)), {
- [`&${t.componentCls}-dangerous`]: k(k({
- color: t.colorError
- }, Bu({
- color: t.colorErrorHover
- }, {
- color: t.colorErrorActive
- })), oC(t))
- }), b6e = (t) => k(k(k({}, Bu({
- color: t.colorText,
- backgroundColor: t.colorBgTextHover
- }, {
- color: t.colorText,
- backgroundColor: t.colorBgTextActive
- })), oC(t)), {
- [`&${t.componentCls}-dangerous`]: k(k({
- color: t.colorError
- }, oC(t)), Bu({
- color: t.colorErrorHover,
- backgroundColor: t.colorErrorBg
- }, {
- color: t.colorErrorHover,
- backgroundColor: t.colorErrorBg
- }))
- }), _6e = (t) => k(k({}, IR(t)), {
- [`&${t.componentCls}:hover`]: k({}, IR(t))
- }), O6e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [`${e}-default`]: Pie(t),
- [`${e}-primary`]: g6e(t),
- [`${e}-dashed`]: m6e(t),
- [`${e}-link`]: y6e(t),
- [`${e}-text`]: b6e(t),
- [`${e}-disabled`]: _6e(t)
- };
- }, _8 = function(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
- const {
- componentCls: n,
- iconCls: r,
- controlHeight: i,
- fontSize: a,
- lineHeight: o,
- lineWidth: s,
- borderRadius: l,
- buttonPaddingHorizontal: u
- } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
- return [
- // Size
- {
- [`${n}${e}`]: {
- fontSize: a,
- height: i,
- padding: `${c}px ${f}px`,
- borderRadius: l,
- [`&${d}`]: {
- width: i,
- paddingInlineStart: 0,
- paddingInlineEnd: 0,
- [`&${n}-round`]: {
- width: "auto"
- },
- "> span": {
- transform: "scale(1.143)"
- // 14px -> 16px
- }
- },
- // Loading
- [`&${n}-loading`]: {
- opacity: t.opacityLoading,
- cursor: "default"
- },
- [`${n}-loading-icon`]: {
- transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
- },
- [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
- marginInlineEnd: t.marginXS
- }
- }
- },
- // Shape - patch prefixCls again to override solid border radius style
- {
- [`${n}${n}-circle${e}`]: p6e(t)
- },
- {
- [`${n}${n}-round${e}`]: v6e(t)
- }
- ];
- }, S6e = (t) => _8(t), x6e = (t) => {
- const e = bn(t, {
- controlHeight: t.controlHeightSM,
- padding: t.paddingXS,
- buttonPaddingHorizontal: 8,
- borderRadius: t.borderRadiusSM
- });
- return _8(e, `${t.componentCls}-sm`);
- }, w6e = (t) => {
- const e = bn(t, {
- controlHeight: t.controlHeightLG,
- fontSize: t.fontSizeLG,
- borderRadius: t.borderRadiusLG
- });
- return _8(e, `${t.componentCls}-lg`);
- }, C6e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [e]: {
- [`&${e}-block`]: {
- width: "100%"
- }
- }
- };
- }, T6e = pr("Button", (t) => {
- const {
- controlTmpOutline: e,
- paddingContentHorizontal: n
- } = t, r = bn(t, {
- colorOutlineDefault: e,
- buttonPaddingHorizontal: n
- });
- return [
- // Shared
- h6e(r),
- // Size
- x6e(r),
- S6e(r),
- w6e(r),
- // Block
- C6e(r),
- // Group (type, ghost, danger, disabled, loading)
- O6e(r),
- // Button Group
- u6e(r),
- // Space Compact
- z2(t, {
- focus: !1
- }),
- d6e(t)
- ];
- }), P6e = () => ({
- prefixCls: String,
- size: {
- type: String
- }
- }), $ie = h8(), DR = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AButtonGroup",
- props: P6e(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- const {
- prefixCls: r,
- direction: i
- } = hn("btn-group", t), [, , a] = pm();
- $ie.useProvide(zn({
- size: V(() => t.size)
- }));
- const o = V(() => {
- const {
- size: s
- } = t;
- let l = "";
- switch (s) {
- case "large":
- l = "lg";
- break;
- case "small":
- l = "sm";
- break;
- case "middle":
- case void 0:
- break;
- default:
- lo(!s, "Button.Group", "Invalid prop `size`.");
- }
- return {
- [`${r.value}`]: !0,
- [`${r.value}-${l}`]: l,
- [`${r.value}-rtl`]: i.value === "rtl",
- [a.value]: !0
- };
- });
- return () => {
- var s;
- return D("div", {
- class: o.value
- }, [qr((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
- };
- }
- }), SQ = /^[\u4e00-\u9fa5]{2}$/, xQ = SQ.test.bind(SQ);
- function JO(t) {
- return t === "text" || t === "link";
- }
- const Vi = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AButton",
- inheritAttrs: !1,
- __ANT_BUTTON: !0,
- props: li(s6e(), {
- type: "default"
- }),
- slots: Object,
- // emits: ['click', 'mousedown'],
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- emit: i,
- expose: a
- } = e;
- const {
- prefixCls: o,
- autoInsertSpaceInButton: s,
- direction: l,
- size: u
- } = hn("btn", t), [c, f] = T6e(o), d = $ie.useInject(), h = Vl(), p = V(() => {
- var I;
- return (I = t.disabled) !== null && I !== void 0 ? I : h.value;
- }), v = ve(null), g = ve(void 0);
- let m = !1;
- const y = ve(!1), _ = ve(!1), O = V(() => s.value !== !1), {
- compactSize: S,
- compactItemClassnames: x
- } = L2(o, l), C = V(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
- me(C, (I) => {
- clearTimeout(g.value), typeof C.value == "number" ? g.value = setTimeout(() => {
- y.value = I;
- }, C.value) : y.value = I;
- }, {
- immediate: !0
- });
- const P = V(() => {
- const {
- type: I,
- shape: B = "default",
- ghost: Q,
- block: W,
- danger: H
- } = t, U = o.value, j = {
- large: "lg",
- small: "sm",
- middle: void 0
- }, Y = S.value || (d == null ? void 0 : d.size) || u.value, ne = Y && j[Y] || "";
- return [x.value, {
- [f.value]: !0,
- [`${U}`]: !0,
- [`${U}-${B}`]: B !== "default" && B,
- [`${U}-${I}`]: I,
- [`${U}-${ne}`]: ne,
- [`${U}-loading`]: y.value,
- [`${U}-background-ghost`]: Q && !JO(I),
- [`${U}-two-chinese-chars`]: _.value && O.value,
- [`${U}-block`]: W,
- [`${U}-dangerous`]: !!H,
- [`${U}-rtl`]: l.value === "rtl"
- }];
- }), $ = () => {
- const I = v.value;
- if (!I || s.value === !1)
- return;
- const B = I.textContent;
- m && xQ(B) ? _.value || (_.value = !0) : _.value && (_.value = !1);
- }, T = (I) => {
- if (y.value || p.value) {
- I.preventDefault();
- return;
- }
- i("click", I);
- }, E = (I) => {
- i("mousedown", I);
- }, M = (I, B) => {
- const Q = B ? " " : "";
- if (I.type === KT) {
- let W = I.children.trim();
- return xQ(W) && (W = W.split("").join(Q)), D("span", null, [W]);
- }
- return I;
- };
- return Vt(() => {
- lo(!(t.ghost && JO(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
- }), _t($), rp($), Qt(() => {
- g.value && clearTimeout(g.value);
- }), a({
- focus: () => {
- var I;
- (I = v.value) === null || I === void 0 || I.focus();
- },
- blur: () => {
- var I;
- (I = v.value) === null || I === void 0 || I.blur();
- }
- }), () => {
- var I, B;
- const {
- icon: Q = (I = n.icon) === null || I === void 0 ? void 0 : I.call(n)
- } = t, W = qr((B = n.default) === null || B === void 0 ? void 0 : B.call(n));
- m = W.length === 1 && !Q && !JO(t.type);
- const {
- type: H,
- htmlType: U,
- href: j,
- title: Y,
- target: ne
- } = t, fe = y.value ? "loading" : Q, ue = k(k({}, r), {
- title: Y,
- disabled: p.value,
- class: [P.value, r.class, {
- [`${o.value}-icon-only`]: W.length === 0 && !!fe
- }],
- onClick: T,
- onMousedown: E
- });
- p.value || delete ue.disabled;
- const ye = Q && !y.value ? Q : D(l6e, {
- existIcon: !!Q,
- prefixCls: o.value,
- loading: !!y.value
- }, null), se = W.map((re) => M(re, m && O.value));
- if (j !== void 0)
- return c(D("a", te(te({}, ue), {}, {
- href: j,
- target: ne,
- ref: v
- }), [ye, se]));
- let he = D("button", te(te({}, ue), {}, {
- ref: v,
- type: U
- }), [ye, se]);
- if (!JO(H)) {
- const re = /* @__PURE__ */ function() {
- return he;
- }();
- he = D(o6e, {
- ref: "wave",
- disabled: !!y.value
- }, {
- default: () => [re]
- });
- }
- return c(he);
- };
- }
- });
- Vi.Group = DR;
- Vi.install = function(t) {
- return t.component(Vi.name, Vi), t.component(DR.name, DR), t;
- };
- var $6e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
- function wQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- A6e(t, i, n[i]);
- });
- }
- return t;
- }
- function A6e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var W2 = function(e, n) {
- var r = wQ({}, e, n.attrs);
- return D(Rt, wQ({}, r, {
- icon: $6e
- }), null);
- };
- W2.displayName = "EllipsisOutlined";
- W2.inheritAttrs = !1;
- var E6e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
- function CQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- M6e(t, i, n[i]);
- });
- }
- return t;
- }
- function M6e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Q2 = function(e, n) {
- var r = CQ({}, e, n.attrs);
- return D(Rt, CQ({}, r, {
- icon: E6e
- }), null);
- };
- Q2.displayName = "RightOutlined";
- Q2.inheritAttrs = !1;
- const Aie = Symbol("OverrideContextKey"), Eie = () => et(Aie, void 0), I6e = (t) => {
- var e, n, r;
- const {
- prefixCls: i,
- mode: a,
- selectable: o,
- validator: s,
- onClick: l,
- expandIcon: u
- } = Eie() || {};
- Et(Aie, {
- prefixCls: V(() => {
- var c, f;
- return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
- }),
- mode: V(() => {
- var c, f;
- return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
- }),
- selectable: V(() => {
- var c, f;
- return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
- }),
- validator: (e = t.validator) !== null && e !== void 0 ? e : s,
- onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
- expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
- });
- };
- function D6e(t, e, n, r) {
- let i;
- if (i !== void 0)
- return !!i;
- if (t === e)
- return !0;
- if (typeof t != "object" || !t || typeof e != "object" || !e)
- return !1;
- const a = Object.keys(t), o = Object.keys(e);
- if (a.length !== o.length)
- return !1;
- const s = Object.prototype.hasOwnProperty.bind(e);
- for (let l = 0; l < a.length; l++) {
- const u = a[l];
- if (!s(u))
- return !1;
- const c = t[u], f = e[u];
- if (i = void 0, i === !1 || i === void 0 && c !== f)
- return !1;
- }
- return !0;
- }
- function O0(t, e) {
- return D6e(es(t), es(e));
- }
- const Mie = Symbol("menuContextKey"), Iie = (t) => {
- Et(Mie, t);
- }, nc = () => et(Mie), Die = Symbol("ForceRenderKey"), R6e = (t) => {
- Et(Die, t);
- }, Rie = () => et(Die, !1), kie = Symbol("menuFirstLevelContextKey"), Lie = (t) => {
- Et(kie, t);
- }, k6e = () => et(kie, !0), sC = ae({
- compatConfig: {
- MODE: 3
- },
- name: "MenuContextProvider",
- inheritAttrs: !1,
- props: {
- mode: {
- type: String,
- default: void 0
- },
- overflowDisabled: {
- type: Boolean,
- default: void 0
- }
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = nc(), i = k({}, r);
- return t.mode !== void 0 && (i.mode = Lr(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Lr(t, "overflowDisabled")), Iie(i), () => {
- var a;
- return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
- };
- }
- }), L6e = Iie, N6e = Symbol("siderCollapsed"), eS = "$$__vc-menu-more__key", Nie = Symbol("KeyPathContext"), O8 = () => et(Nie, {
- parentEventKeys: V(() => []),
- parentKeys: V(() => []),
- parentInfo: {}
- }), B6e = (t, e, n) => {
- const {
- parentEventKeys: r,
- parentKeys: i
- } = O8(), a = V(() => [...r.value, t]), o = V(() => [...i.value, e]);
- return Et(Nie, {
- parentEventKeys: a,
- parentKeys: o,
- parentInfo: n
- }), o;
- }, Bie = Symbol("measure"), TQ = ae({
- compatConfig: {
- MODE: 3
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- return Et(Bie, !0), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- }), S8 = () => et(Bie, !1), z6e = B6e;
- function zie(t) {
- const {
- mode: e,
- rtl: n,
- inlineIndent: r
- } = nc();
- return V(() => e.value !== "inline" ? null : n.value ? {
- paddingRight: `${t.value * r.value}px`
- } : {
- paddingLeft: `${t.value * r.value}px`
- });
- }
- let V6e = 0;
- const F6e = () => ({
- id: String,
- role: String,
- disabled: Boolean,
- danger: Boolean,
- title: {
- type: [String, Boolean],
- default: void 0
- },
- icon: oe.any,
- onMouseenter: Function,
- onMouseleave: Function,
- onClick: Function,
- onKeydown: Function,
- onFocus: Function,
- // Internal user prop
- originItemValue: sn()
- }), Lg = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AMenuItem",
- inheritAttrs: !1,
- props: F6e(),
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- attrs: i
- } = e;
- const a = In(), o = S8(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
- lo(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
- const l = `menu_item_${++V6e}_$$_${s}`, {
- parentEventKeys: u,
- parentKeys: c
- } = O8(), {
- prefixCls: f,
- activeKeys: d,
- disabled: h,
- changeActiveKeys: p,
- rtl: v,
- inlineCollapsed: g,
- siderCollapsed: m,
- onItemClick: y,
- selectedKeys: _,
- registerMenuInfo: O,
- unRegisterMenuInfo: S
- } = nc(), x = k6e(), C = ve(!1), P = V(() => [...c.value, s]);
- O(l, {
- eventKey: l,
- key: s,
- parentEventKeys: u,
- parentKeys: c,
- isLeaf: !0
- }), Qt(() => {
- S(l);
- }), me(d, () => {
- C.value = !!d.value.find((j) => j === s);
- }, {
- immediate: !0
- });
- const T = V(() => h.value || t.disabled), E = V(() => _.value.includes(s)), M = V(() => {
- const j = `${f.value}-item`;
- return {
- [`${j}`]: !0,
- [`${j}-danger`]: t.danger,
- [`${j}-active`]: C.value,
- [`${j}-selected`]: E.value,
- [`${j}-disabled`]: T.value
- };
- }), R = (j) => ({
- key: s,
- eventKey: l,
- keyPath: P.value,
- eventKeyPath: [...u.value, l],
- domEvent: j,
- item: k(k({}, t), i)
- }), N = (j) => {
- if (T.value)
- return;
- const Y = R(j);
- r("click", j), y(Y);
- }, I = (j) => {
- T.value || (p(P.value), r("mouseenter", j));
- }, B = (j) => {
- T.value || (p([]), r("mouseleave", j));
- }, Q = (j) => {
- if (r("keydown", j), j.which === Me.ENTER) {
- const Y = R(j);
- r("click", j), y(Y);
- }
- }, W = (j) => {
- p(P.value), r("focus", j);
- }, H = (j, Y) => {
- const ne = D("span", {
- class: `${f.value}-title-content`
- }, [Y]);
- return (!j || po(Y) && Y.type === "span") && Y && g.value && x && typeof Y == "string" ? D("div", {
- class: `${f.value}-inline-collapsed-noicon`
- }, [Y.charAt(0)]) : ne;
- }, U = zie(V(() => P.value.length));
- return () => {
- var j, Y, ne, fe, ue;
- if (o) return null;
- const ye = (j = t.title) !== null && j !== void 0 ? j : (Y = n.title) === null || Y === void 0 ? void 0 : Y.call(n), se = qr((ne = n.default) === null || ne === void 0 ? void 0 : ne.call(n)), he = se.length;
- let re = ye;
- typeof ye > "u" ? re = x && he ? se : "" : ye === !1 && (re = "");
- const q = {
- title: re
- };
- !m.value && !g.value && (q.title = null, q.open = !1);
- const K = {};
- t.role === "option" && (K["aria-selected"] = E.value);
- const de = (fe = t.icon) !== null && fe !== void 0 ? fe : (ue = n.icon) === null || ue === void 0 ? void 0 : ue.call(n, t);
- return D(F2, te(te({}, q), {}, {
- placement: v.value ? "left" : "right",
- overlayClassName: `${f.value}-inline-collapsed-tooltip`
- }), {
- default: () => [D(Au.Item, te(te(te({
- component: "li"
- }, i), {}, {
- id: t.id,
- style: k(k({}, i.style || {}), U.value),
- class: [M.value, {
- [`${i.class}`]: !!i.class,
- [`${f.value}-item-only-child`]: (de ? he + 1 : he) === 1
- }],
- role: t.role || "menuitem",
- tabindex: t.disabled ? null : -1,
- "data-menu-id": s,
- "aria-disabled": t.disabled
- }, K), {}, {
- onMouseenter: I,
- onMouseleave: B,
- onClick: N,
- onKeydown: Q,
- onFocus: W,
- title: typeof ye == "string" ? ye : void 0
- }), {
- default: () => [xr(typeof de == "function" ? de(t.originItemValue) : de, {
- class: `${f.value}-item-icon`
- }, !1), H(de, se)]
- })]
- });
- };
- }
- }), Fc = {
- adjustX: 1,
- adjustY: 1
- }, W6e = {
- topLeft: {
- points: ["bl", "tl"],
- overflow: Fc,
- offset: [0, -7]
- },
- bottomLeft: {
- points: ["tl", "bl"],
- overflow: Fc,
- offset: [0, 7]
- },
- leftTop: {
- points: ["tr", "tl"],
- overflow: Fc,
- offset: [-4, 0]
- },
- rightTop: {
- points: ["tl", "tr"],
- overflow: Fc,
- offset: [4, 0]
- }
- }, Q6e = {
- topLeft: {
- points: ["bl", "tl"],
- overflow: Fc,
- offset: [0, -7]
- },
- bottomLeft: {
- points: ["tl", "bl"],
- overflow: Fc,
- offset: [0, 7]
- },
- rightTop: {
- points: ["tr", "tl"],
- overflow: Fc,
- offset: [-4, 0]
- },
- leftTop: {
- points: ["tl", "tr"],
- overflow: Fc,
- offset: [4, 0]
- }
- }, H6e = {
- horizontal: "bottomLeft",
- vertical: "rightTop",
- "vertical-left": "rightTop",
- "vertical-right": "leftTop"
- }, PQ = ae({
- compatConfig: {
- MODE: 3
- },
- name: "PopupTrigger",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- mode: String,
- visible: Boolean,
- // popup: React.ReactNode;
- popupClassName: String,
- popupOffset: Array,
- disabled: Boolean,
- onVisibleChange: Function
- },
- slots: Object,
- emits: ["visibleChange"],
- setup(t, e) {
- let {
- slots: n,
- emit: r
- } = e;
- const i = ve(!1), {
- getPopupContainer: a,
- rtl: o,
- subMenuOpenDelay: s,
- subMenuCloseDelay: l,
- builtinPlacements: u,
- triggerSubMenuAction: c,
- forceSubMenuRender: f,
- motion: d,
- defaultMotions: h,
- rootClassName: p
- } = nc(), v = Rie(), g = V(() => o.value ? k(k({}, Q6e), u.value) : k(k({}, W6e), u.value)), m = V(() => H6e[t.mode]), y = ve();
- me(() => t.visible, (S) => {
- en.cancel(y.value), y.value = en(() => {
- i.value = S;
- });
- }, {
- immediate: !0
- }), Qt(() => {
- en.cancel(y.value);
- });
- const _ = (S) => {
- r("visibleChange", S);
- }, O = V(() => {
- var S, x;
- const C = d.value || ((S = h.value) === null || S === void 0 ? void 0 : S[t.mode]) || ((x = h.value) === null || x === void 0 ? void 0 : x.other), P = typeof C == "function" ? C() : C;
- return P ? Z_(P.name, {
- css: !0
- }) : void 0;
- });
- return () => {
- const {
- prefixCls: S,
- popupClassName: x,
- mode: C,
- popupOffset: P,
- disabled: $
- } = t;
- return D(E2, {
- prefixCls: S,
- popupClassName: Re(`${S}-popup`, {
- [`${S}-rtl`]: o.value
- }, x, p.value),
- stretch: C === "horizontal" ? "minWidth" : null,
- getPopupContainer: a.value,
- builtinPlacements: g.value,
- popupPlacement: m.value,
- popupVisible: i.value,
- popupAlign: P && {
- offset: P
- },
- action: $ ? [] : [c.value],
- mouseEnterDelay: s.value,
- mouseLeaveDelay: l.value,
- onPopupVisibleChange: _,
- forceRender: v || f.value,
- popupAnimation: O.value
- }, {
- popup: n.popup,
- default: n.default
- });
- };
- }
- }), x8 = (t, e) => {
- let {
- slots: n,
- attrs: r
- } = e;
- var i;
- const {
- prefixCls: a,
- mode: o
- } = nc();
- return D("ul", te(te({}, r), {}, {
- class: Re(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
- "data-menu-list": !0
- }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
- };
- x8.displayName = "SubMenuList";
- const G6e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "InlineSubMenuList",
- inheritAttrs: !1,
- props: {
- id: String,
- open: Boolean,
- keyPath: Array
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = V(() => "inline"), {
- motion: i,
- mode: a,
- defaultMotions: o
- } = nc(), s = V(() => a.value === r.value), l = ee(!s.value), u = V(() => s.value ? t.open : !1);
- me(a, () => {
- s.value && (l.value = !1);
- }, {
- flush: "post"
- });
- const c = V(() => {
- var f, d;
- const h = i.value || ((f = o.value) === null || f === void 0 ? void 0 : f[r.value]) || ((d = o.value) === null || d === void 0 ? void 0 : d.other), p = typeof h == "function" ? h() : h;
- return k(k({}, p), {
- appear: t.keyPath.length <= 1
- });
- });
- return () => {
- var f;
- return l.value ? null : D(sC, {
- mode: r.value
- }, {
- default: () => [D(mo, c.value, {
- default: () => [Sr(D(x8, {
- id: t.id
- }, {
- default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
- }), [[ho, u.value]])]
- })]
- });
- };
- }
- });
- let $Q = 0;
- const j6e = () => ({
- icon: oe.any,
- title: oe.any,
- disabled: Boolean,
- level: Number,
- popupClassName: String,
- popupOffset: Array,
- internalPopupClose: Boolean,
- eventKey: String,
- expandIcon: Function,
- theme: String,
- onMouseenter: Function,
- onMouseleave: Function,
- onTitleClick: Function,
- // Internal user prop
- originItemValue: sn()
- }), Ng = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ASubMenu",
- inheritAttrs: !1,
- props: j6e(),
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- emit: i
- } = e;
- var a, o;
- Lie(!1);
- const s = S8(), l = In(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
- lo(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
- const c = cR(u) ? u : `sub_menu_${++$Q}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : cR(u) ? `sub_menu_${++$Q}_$$_${u}` : c, {
- parentEventKeys: d,
- parentInfo: h,
- parentKeys: p
- } = O8(), v = V(() => [...p.value, c]), g = ve([]), m = {
- eventKey: f,
- key: c,
- parentEventKeys: d,
- childrenEventKeys: g,
- parentKeys: p
- };
- (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), Qt(() => {
- var Pe;
- h.childrenEventKeys && (h.childrenEventKeys.value = (Pe = h.childrenEventKeys) === null || Pe === void 0 ? void 0 : Pe.value.filter((Fe) => Fe != f));
- }), z6e(f, c, m);
- const {
- prefixCls: y,
- activeKeys: _,
- disabled: O,
- changeActiveKeys: S,
- mode: x,
- inlineCollapsed: C,
- openKeys: P,
- overflowDisabled: $,
- onOpenChange: T,
- registerMenuInfo: E,
- unRegisterMenuInfo: M,
- selectedSubMenuKeys: R,
- expandIcon: N,
- theme: I
- } = nc(), B = u != null, Q = !s && (Rie() || !B);
- R6e(Q), (s && B || !s && !B || Q) && (E(f, m), Qt(() => {
- M(f);
- }));
- const W = V(() => `${y.value}-submenu`), H = V(() => O.value || t.disabled), U = ve(), j = ve(), Y = V(() => P.value.includes(c)), ne = V(() => !$.value && Y.value), fe = V(() => R.value.includes(c)), ue = ve(!1);
- me(_, () => {
- ue.value = !!_.value.find((Pe) => Pe === c);
- }, {
- immediate: !0
- });
- const ye = (Pe) => {
- H.value || (i("titleClick", Pe, c), x.value === "inline" && T(c, !Y.value));
- }, se = (Pe) => {
- H.value || (S(v.value), i("mouseenter", Pe));
- }, he = (Pe) => {
- H.value || (S([]), i("mouseleave", Pe));
- }, re = zie(V(() => v.value.length)), q = (Pe) => {
- x.value !== "inline" && T(c, Pe);
- }, K = () => {
- S(v.value);
- }, de = f && `${f}-popup`, xe = V(() => Re(y.value, `${y.value}-${t.theme || I.value}`, t.popupClassName)), we = (Pe, Fe) => {
- if (!Fe)
- return C.value && !p.value.length && Pe && typeof Pe == "string" ? D("div", {
- class: `${y.value}-inline-collapsed-noicon`
- }, [Pe.charAt(0)]) : D("span", {
- class: `${y.value}-title-content`
- }, [Pe]);
- const Ye = po(Pe) && Pe.type === "span";
- return D(Wt, null, [xr(typeof Fe == "function" ? Fe(t.originItemValue) : Fe, {
- class: `${y.value}-item-icon`
- }, !1), Ye ? Pe : D("span", {
- class: `${y.value}-title-content`
- }, [Pe])]);
- }, He = V(() => x.value !== "inline" && v.value.length > 1 ? "vertical" : x.value), je = V(() => x.value === "horizontal" ? "vertical" : x.value), Be = V(() => He.value === "horizontal" ? "vertical" : He.value), Le = () => {
- var Pe, Fe;
- const Ye = W.value, xt = (Pe = t.icon) !== null && Pe !== void 0 ? Pe : (Fe = n.icon) === null || Fe === void 0 ? void 0 : Fe.call(n, t), It = t.expandIcon || n.expandIcon || N.value, an = we(y2(n, t, "title"), xt);
- return D("div", {
- style: re.value,
- class: `${Ye}-title`,
- tabindex: H.value ? null : -1,
- ref: U,
- title: typeof an == "string" ? an : null,
- "data-menu-id": c,
- "aria-expanded": ne.value,
- "aria-haspopup": !0,
- "aria-controls": de,
- "aria-disabled": H.value,
- onClick: ye,
- onFocus: K
- }, [an, x.value !== "horizontal" && It ? It(k(k({}, t), {
- isOpen: ne.value
- })) : D("i", {
- class: `${Ye}-arrow`
- }, null)]);
- };
- return () => {
- var Pe;
- if (s)
- return B ? (Pe = n.default) === null || Pe === void 0 ? void 0 : Pe.call(n) : null;
- const Fe = W.value;
- let Ye = () => null;
- if (!$.value && x.value !== "inline") {
- const xt = x.value === "horizontal" ? [0, 8] : [10, 0];
- Ye = () => D(PQ, {
- mode: He.value,
- prefixCls: Fe,
- visible: !t.internalPopupClose && ne.value,
- popupClassName: xe.value,
- popupOffset: t.popupOffset || xt,
- disabled: H.value,
- onVisibleChange: q
- }, {
- default: () => [Le()],
- popup: () => D(sC, {
- mode: Be.value
- }, {
- default: () => [D(x8, {
- id: de,
- ref: j
- }, {
- default: n.default
- })]
- })
- });
- } else
- Ye = () => D(PQ, null, {
- default: Le
- });
- return D(sC, {
- mode: je.value
- }, {
- default: () => [D(Au.Item, te(te({
- component: "li"
- }, r), {}, {
- role: "none",
- class: Re(Fe, `${Fe}-${x.value}`, r.class, {
- [`${Fe}-open`]: ne.value,
- [`${Fe}-active`]: ue.value,
- [`${Fe}-selected`]: fe.value,
- [`${Fe}-disabled`]: H.value
- }),
- onMouseenter: se,
- onMouseleave: he,
- "data-submenu-id": c
- }), {
- default: () => D(Wt, null, [Ye(), !$.value && D(G6e, {
- id: de,
- open: ne.value,
- keyPath: v.value
- }, {
- default: n.default
- })])
- })]
- });
- };
- }
- });
- function Vie(t, e) {
- return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
- }
- function AQ(t, e) {
- t.classList ? t.classList.add(e) : Vie(t, e) || (t.className = `${t.className} ${e}`);
- }
- function EQ(t, e) {
- if (t.classList)
- t.classList.remove(e);
- else if (Vie(t, e)) {
- const n = t.className;
- t.className = ` ${n} `.replace(` ${e} `, " ");
- }
- }
- const w8 = function() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
- return {
- name: t,
- appear: e,
- css: !0,
- onBeforeEnter: (n) => {
- n.style.height = "0px", n.style.opacity = "0", AQ(n, t);
- },
- onEnter: (n) => {
- Bt(() => {
- n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
- });
- },
- onAfterEnter: (n) => {
- n && (EQ(n, t), n.style.height = null, n.style.opacity = null);
- },
- onBeforeLeave: (n) => {
- AQ(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
- },
- onLeave: (n) => {
- setTimeout(() => {
- n.style.height = "0px", n.style.opacity = "0";
- });
- },
- onAfterLeave: (n) => {
- n && (EQ(n, t), n.style && (n.style.height = null, n.style.opacity = null));
- }
- };
- }, Z6e = () => ({
- title: oe.any,
- // Internal user prop
- originItemValue: sn()
- }), lC = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AMenuItemGroup",
- inheritAttrs: !1,
- props: Z6e(),
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i
- } = nc(), a = V(() => `${i.value}-item-group`), o = S8();
- return () => {
- var s, l;
- return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : D("li", te(te({}, r), {}, {
- onClick: (u) => u.stopPropagation(),
- class: a.value
- }), [D("div", {
- title: typeof t.title == "string" ? t.title : void 0,
- class: `${a.value}-title`
- }, [y2(n, t, "title")]), D("ul", {
- class: `${a.value}-list`
- }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
- };
- }
- }), U6e = () => ({
- prefixCls: String,
- dashed: Boolean
- }), uC = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AMenuDivider",
- props: U6e(),
- setup(t) {
- const {
- prefixCls: e
- } = nc(), n = V(() => ({
- [`${e.value}-item-divider`]: !0,
- [`${e.value}-item-divider-dashed`]: !!t.dashed
- }));
- return () => D("li", {
- class: n.value
- }, null);
- }
- });
- var X6e = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function RR(t, e, n) {
- return (t || []).map((r, i) => {
- if (r && typeof r == "object") {
- const a = r, {
- label: o,
- children: s,
- key: l,
- type: u
- } = a, c = X6e(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
- eventKey: f,
- key: f,
- parentEventKeys: ee(d),
- parentKeys: ee(d),
- childrenEventKeys: ee(h),
- isLeaf: !1
- };
- if (s || u === "group") {
- if (u === "group") {
- const g = RR(s, e, n);
- return D(lC, te(te({
- key: f
- }, c), {}, {
- title: o,
- originItemValue: r
- }), {
- default: () => [g]
- });
- }
- e.set(f, p), n && n.childrenEventKeys.push(f);
- const v = RR(s, e, {
- childrenEventKeys: h,
- parentKeys: [].concat(d, f)
- });
- return D(Ng, te(te({
- key: f
- }, c), {}, {
- title: o,
- originItemValue: r
- }), {
- default: () => [v]
- });
- }
- return u === "divider" ? D(uC, te({
- key: f
- }, c), null) : (p.isLeaf = !0, e.set(f, p), D(Lg, te(te({
- key: f
- }, c), {}, {
- originItemValue: r
- }), {
- default: () => [o]
- }));
- }
- return null;
- }).filter((r) => r);
- }
- function Y6e(t) {
- const e = ve([]), n = ve(!1), r = ve(/* @__PURE__ */ new Map());
- return me(() => t.items, () => {
- const i = /* @__PURE__ */ new Map();
- n.value = !1, t.items ? (n.value = !0, e.value = RR(t.items, i)) : e.value = void 0, r.value = i;
- }, {
- immediate: !0,
- deep: !0
- }), {
- itemsNodes: e,
- store: r,
- hasItmes: n
- };
- }
- const q6e = (t) => {
- const {
- componentCls: e,
- motionDurationSlow: n,
- menuHorizontalHeight: r,
- colorSplit: i,
- lineWidth: a,
- lineType: o,
- menuItemPaddingInline: s
- } = t;
- return {
- [`${e}-horizontal`]: {
- lineHeight: `${r}px`,
- border: 0,
- borderBottom: `${a}px ${o} ${i}`,
- boxShadow: "none",
- "&::after": {
- display: "block",
- clear: "both",
- height: 0,
- content: '"\\20"'
- },
- // ======================= Item =======================
- [`${e}-item, ${e}-submenu`]: {
- position: "relative",
- display: "inline-block",
- verticalAlign: "bottom",
- paddingInline: s
- },
- [`> ${e}-item:hover,
- > ${e}-item-active,
- > ${e}-submenu ${e}-submenu-title:hover`]: {
- backgroundColor: "transparent"
- },
- [`${e}-item, ${e}-submenu-title`]: {
- transition: [`border-color ${n}`, `background ${n}`].join(",")
- },
- // ===================== Sub Menu =====================
- [`${e}-submenu-arrow`]: {
- display: "none"
- }
- }
- };
- }, K6e = (t) => {
- let {
- componentCls: e,
- menuArrowOffset: n
- } = t;
- return {
- [`${e}-rtl`]: {
- direction: "rtl"
- },
- [`${e}-submenu-rtl`]: {
- transformOrigin: "100% 0"
- },
- // Vertical Arrow
- [`${e}-rtl${e}-vertical,
- ${e}-submenu-rtl ${e}-vertical`]: {
- [`${e}-submenu-arrow`]: {
- "&::before": {
- transform: `rotate(-45deg) translateY(-${n})`
- },
- "&::after": {
- transform: `rotate(45deg) translateY(${n})`
- }
- }
- }
- };
- }, MQ = (t) => k({}, G_(t)), IQ = (t, e) => {
- const {
- componentCls: n,
- colorItemText: r,
- colorItemTextSelected: i,
- colorGroupTitle: a,
- colorItemBg: o,
- colorSubItemBg: s,
- colorItemBgSelected: l,
- colorActiveBarHeight: u,
- colorActiveBarWidth: c,
- colorActiveBarBorderSize: f,
- motionDurationSlow: d,
- motionEaseInOut: h,
- motionEaseOut: p,
- menuItemPaddingInline: v,
- motionDurationMid: g,
- colorItemTextHover: m,
- lineType: y,
- colorSplit: _,
- // Disabled
- colorItemTextDisabled: O,
- // Danger
- colorDangerItemText: S,
- colorDangerItemTextHover: x,
- colorDangerItemTextSelected: C,
- colorDangerItemBgActive: P,
- colorDangerItemBgSelected: $,
- colorItemBgHover: T,
- menuSubMenuBg: E,
- // Horizontal
- colorItemTextSelectedHorizontal: M,
- colorItemBgSelectedHorizontal: R
- } = t;
- return {
- [`${n}-${e}`]: {
- color: r,
- background: o,
- [`&${n}-root:focus-visible`]: k({}, MQ(t)),
- // ======================== Item ========================
- [`${n}-item-group-title`]: {
- color: a
- },
- [`${n}-submenu-selected`]: {
- [`> ${n}-submenu-title`]: {
- color: i
- }
- },
- // Disabled
- [`${n}-item-disabled, ${n}-submenu-disabled`]: {
- color: `${O} !important`
- },
- // Hover
- [`${n}-item:hover, ${n}-submenu-title:hover`]: {
- [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
- color: m
- }
- },
- [`&:not(${n}-horizontal)`]: {
- [`${n}-item:not(${n}-item-selected)`]: {
- "&:hover": {
- backgroundColor: T
- },
- "&:active": {
- backgroundColor: l
- }
- },
- [`${n}-submenu-title`]: {
- "&:hover": {
- backgroundColor: T
- },
- "&:active": {
- backgroundColor: l
- }
- }
- },
- // Danger - only Item has
- [`${n}-item-danger`]: {
- color: S,
- [`&${n}-item:hover`]: {
- [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
- color: x
- }
- },
- [`&${n}-item:active`]: {
- background: P
- }
- },
- [`${n}-item a`]: {
- "&, &:hover": {
- color: "inherit"
- }
- },
- [`${n}-item-selected`]: {
- color: i,
- // Danger
- [`&${n}-item-danger`]: {
- color: C
- },
- "a, a:hover": {
- color: "inherit"
- }
- },
- [`& ${n}-item-selected`]: {
- backgroundColor: l,
- // Danger
- [`&${n}-item-danger`]: {
- backgroundColor: $
- }
- },
- [`${n}-item, ${n}-submenu-title`]: {
- [`&:not(${n}-item-disabled):focus-visible`]: k({}, MQ(t))
- },
- [`&${n}-submenu > ${n}`]: {
- backgroundColor: E
- },
- [`&${n}-popup > ${n}`]: {
- backgroundColor: o
- },
- // ====================== Horizontal ======================
- [`&${n}-horizontal`]: k(k({}, e === "dark" ? {
- borderBottom: 0
- } : {}), {
- [`> ${n}-item, > ${n}-submenu`]: {
- top: f,
- marginTop: -f,
- marginBottom: 0,
- borderRadius: 0,
- "&::after": {
- position: "absolute",
- insetInline: v,
- bottom: 0,
- borderBottom: `${u}px solid transparent`,
- transition: `border-color ${d} ${h}`,
- content: '""'
- },
- "&:hover, &-active, &-open": {
- "&::after": {
- borderBottomWidth: u,
- borderBottomColor: M
- }
- },
- "&-selected": {
- color: M,
- backgroundColor: R,
- "&::after": {
- borderBottomWidth: u,
- borderBottomColor: M
- }
- }
- }
- }),
- // ================== Inline & Vertical ===================
- //
- [`&${n}-root`]: {
- [`&${n}-inline, &${n}-vertical`]: {
- borderInlineEnd: `${f}px ${y} ${_}`
- }
- },
- // ======================== Inline ========================
- [`&${n}-inline`]: {
- // Sub
- [`${n}-sub${n}-inline`]: {
- background: s
- },
- // Item
- [`${n}-item, ${n}-submenu-title`]: f && c ? {
- width: `calc(100% + ${f}px)`
- } : {},
- [`${n}-item`]: {
- position: "relative",
- "&::after": {
- position: "absolute",
- insetBlock: 0,
- insetInlineEnd: 0,
- borderInlineEnd: `${c}px solid ${i}`,
- transform: "scaleY(0.0001)",
- opacity: 0,
- transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
- content: '""'
- },
- // Danger
- [`&${n}-item-danger`]: {
- "&::after": {
- borderInlineEndColor: C
- }
- }
- },
- [`${n}-selected, ${n}-item-selected`]: {
- "&::after": {
- transform: "scaleY(1)",
- opacity: 1,
- transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
- }
- }
- }
- }
- };
- }, DQ = (t) => {
- const {
- componentCls: e,
- menuItemHeight: n,
- itemMarginInline: r,
- padding: i,
- menuArrowSize: a,
- marginXS: o,
- marginXXS: s
- } = t, l = i + a + o;
- return {
- [`${e}-item`]: {
- position: "relative"
- },
- [`${e}-item, ${e}-submenu-title`]: {
- height: n,
- lineHeight: `${n}px`,
- paddingInline: i,
- overflow: "hidden",
- textOverflow: "ellipsis",
- marginInline: r,
- marginBlock: s,
- width: `calc(100% - ${r * 2}px)`
- },
- // disable margin collapsed
- [`${e}-submenu`]: {
- paddingBottom: 0.02
- },
- [`> ${e}-item,
- > ${e}-submenu > ${e}-submenu-title`]: {
- height: n,
- lineHeight: `${n}px`
- },
- [`${e}-item-group-list ${e}-submenu-title,
- ${e}-submenu-title`]: {
- paddingInlineEnd: l
- }
- };
- }, J6e = (t) => {
- const {
- componentCls: e,
- iconCls: n,
- menuItemHeight: r,
- colorTextLightSolid: i,
- dropdownWidth: a,
- controlHeightLG: o,
- motionDurationMid: s,
- motionEaseOut: l,
- paddingXL: u,
- fontSizeSM: c,
- fontSizeLG: f,
- motionDurationSlow: d,
- paddingXS: h,
- boxShadowSecondary: p
- } = t, v = {
- height: r,
- lineHeight: `${r}px`,
- listStylePosition: "inside",
- listStyleType: "disc"
- };
- return [
- {
- [e]: {
- "&-inline, &-vertical": k({
- [`&${e}-root`]: {
- boxShadow: "none"
- }
- }, DQ(t))
- },
- [`${e}-submenu-popup`]: {
- [`${e}-vertical`]: k(k({}, DQ(t)), {
- boxShadow: p
- })
- }
- },
- // Vertical only
- {
- [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
- minWidth: a,
- maxHeight: `calc(100vh - ${o * 2.5}px)`,
- padding: "0",
- overflow: "hidden",
- borderInlineEnd: 0,
- // https://github.com/ant-design/ant-design/issues/22244
- // https://github.com/ant-design/ant-design/issues/26812
- "&:not([class*='-active'])": {
- overflowX: "hidden",
- overflowY: "auto"
- }
- }
- },
- // Inline Only
- {
- [`${e}-inline`]: {
- width: "100%",
- // Motion enhance for first level
- [`&${e}-root`]: {
- [`${e}-item, ${e}-submenu-title`]: {
- display: "flex",
- alignItems: "center",
- transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
- [`> ${e}-title-content`]: {
- flex: "auto",
- minWidth: 0,
- overflow: "hidden",
- textOverflow: "ellipsis"
- },
- "> *": {
- flex: "none"
- }
- }
- },
- // >>>>> Sub
- [`${e}-sub${e}-inline`]: {
- padding: 0,
- border: 0,
- borderRadius: 0,
- boxShadow: "none",
- [`& > ${e}-submenu > ${e}-submenu-title`]: v,
- [`& ${e}-item-group-title`]: {
- paddingInlineStart: u
- }
- },
- // >>>>> Item
- [`${e}-item`]: v
- }
- },
- // Inline Collapse Only
- {
- [`${e}-inline-collapsed`]: {
- width: r * 2,
- [`&${e}-root`]: {
- [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
- [`> ${e}-inline-collapsed-noicon`]: {
- fontSize: f,
- textAlign: "center"
- }
- }
- },
- [`> ${e}-item,
- > ${e}-item-group > ${e}-item-group-list > ${e}-item,
- > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
- > ${e}-submenu > ${e}-submenu-title`]: {
- insetInlineStart: 0,
- paddingInline: `calc(50% - ${c}px)`,
- textOverflow: "clip",
- [`
- ${e}-submenu-arrow,
- ${e}-submenu-expand-icon
- `]: {
- opacity: 0
- },
- [`${e}-item-icon, ${n}`]: {
- margin: 0,
- fontSize: f,
- lineHeight: `${r}px`,
- "+ span": {
- display: "inline-block",
- opacity: 0
- }
- }
- },
- [`${e}-item-icon, ${n}`]: {
- display: "inline-block"
- },
- "&-tooltip": {
- pointerEvents: "none",
- [`${e}-item-icon, ${n}`]: {
- display: "none"
- },
- "a, a:hover": {
- color: i
- }
- },
- [`${e}-item-group-title`]: k(k({}, Mg), {
- paddingInline: h
- })
- }
- }
- ];
- }, RQ = (t) => {
- const {
- componentCls: e,
- fontSize: n,
- motionDurationSlow: r,
- motionDurationMid: i,
- motionEaseInOut: a,
- motionEaseOut: o,
- iconCls: s,
- controlHeightSM: l
- } = t;
- return {
- // >>>>> Item
- [`${e}-item, ${e}-submenu-title`]: {
- position: "relative",
- display: "block",
- margin: 0,
- whiteSpace: "nowrap",
- cursor: "pointer",
- transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
- [`${e}-item-icon, ${s}`]: {
- minWidth: n,
- fontSize: n,
- transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
- "+ span": {
- marginInlineStart: l - n,
- opacity: 1,
- transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
- }
- },
- [`${e}-item-icon`]: k({}, hm()),
- [`&${e}-item-only-child`]: {
- [`> ${s}, > ${e}-item-icon`]: {
- marginInlineEnd: 0
- }
- }
- },
- // Disabled state sets text to gray and nukes hover/tab effects
- [`${e}-item-disabled, ${e}-submenu-disabled`]: {
- background: "none !important",
- cursor: "not-allowed",
- "&::after": {
- borderColor: "transparent !important"
- },
- a: {
- color: "inherit !important"
- },
- [`> ${e}-submenu-title`]: {
- color: "inherit !important",
- cursor: "not-allowed"
- }
- }
- };
- }, kQ = (t) => {
- const {
- componentCls: e,
- motionDurationSlow: n,
- motionEaseInOut: r,
- borderRadius: i,
- menuArrowSize: a,
- menuArrowOffset: o
- } = t;
- return {
- [`${e}-submenu`]: {
- "&-expand-icon, &-arrow": {
- position: "absolute",
- top: "50%",
- insetInlineEnd: t.margin,
- width: a,
- color: "currentcolor",
- transform: "translateY(-50%)",
- transition: `transform ${n} ${r}, opacity ${n}`
- },
- "&-arrow": {
- // →
- "&::before, &::after": {
- position: "absolute",
- width: a * 0.6,
- height: a * 0.15,
- backgroundColor: "currentcolor",
- borderRadius: i,
- transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
- content: '""'
- },
- "&::before": {
- transform: `rotate(45deg) translateY(-${o})`
- },
- "&::after": {
- transform: `rotate(-45deg) translateY(${o})`
- }
- }
- }
- };
- }, eBe = (t) => {
- const {
- antCls: e,
- componentCls: n,
- fontSize: r,
- motionDurationSlow: i,
- motionDurationMid: a,
- motionEaseInOut: o,
- lineHeight: s,
- paddingXS: l,
- padding: u,
- colorSplit: c,
- lineWidth: f,
- zIndexPopup: d,
- borderRadiusLG: h,
- radiusSubMenuItem: p,
- menuArrowSize: v,
- menuArrowOffset: g,
- lineType: m,
- menuPanelMaskInset: y
- } = t;
- return [
- // Misc
- {
- "": {
- [`${n}`]: k(k({}, Kw()), {
- // Hidden
- "&-hidden": {
- display: "none"
- }
- })
- },
- [`${n}-submenu-hidden`]: {
- display: "none"
- }
- },
- {
- [n]: k(k(k(k(k(k(k({}, Gn(t)), Kw()), {
- marginBottom: 0,
- paddingInlineStart: 0,
- // Override default ul/ol
- fontSize: r,
- lineHeight: 0,
- listStyle: "none",
- outline: "none",
- transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
- "ul, ol": {
- margin: 0,
- padding: 0,
- listStyle: "none"
- },
- // Overflow ellipsis
- "&-overflow": {
- display: "flex",
- [`${n}-item`]: {
- flex: "none"
- }
- },
- [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
- borderRadius: t.radiusItem
- },
- [`${n}-item-group-title`]: {
- padding: `${l}px ${u}px`,
- fontSize: r,
- lineHeight: s,
- transition: `all ${i}`
- },
- [`&-horizontal ${n}-submenu`]: {
- transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
- },
- [`${n}-submenu, ${n}-submenu-inline`]: {
- transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
- },
- [`${n}-submenu ${n}-sub`]: {
- cursor: "initial",
- transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
- },
- [`${n}-title-content`]: {
- transition: `color ${i}`
- },
- [`${n}-item a`]: {
- "&::before": {
- position: "absolute",
- inset: 0,
- backgroundColor: "transparent",
- content: '""'
- }
- },
- // Removed a Badge related style seems it's safe
- // https://github.com/ant-design/ant-design/issues/19809
- // >>>>> Divider
- [`${n}-item-divider`]: {
- overflow: "hidden",
- lineHeight: 0,
- borderColor: c,
- borderStyle: m,
- borderWidth: 0,
- borderTopWidth: f,
- marginBlock: f,
- padding: 0,
- "&-dashed": {
- borderStyle: "dashed"
- }
- }
- }), RQ(t)), {
- [`${n}-item-group`]: {
- [`${n}-item-group-list`]: {
- margin: 0,
- padding: 0,
- [`${n}-item, ${n}-submenu-title`]: {
- paddingInline: `${r * 2}px ${u}px`
- }
- }
- },
- // ======================= Sub Menu =======================
- "&-submenu": {
- "&-popup": {
- position: "absolute",
- zIndex: d,
- background: "transparent",
- borderRadius: h,
- boxShadow: "none",
- transformOrigin: "0 0",
- // https://github.com/ant-design/ant-design/issues/13955
- "&::before": {
- position: "absolute",
- inset: `${y}px 0 0`,
- zIndex: -1,
- width: "100%",
- height: "100%",
- opacity: 0,
- content: '""'
- }
- },
- // https://github.com/ant-design/ant-design/issues/13955
- "&-placement-rightTop::before": {
- top: 0,
- insetInlineStart: y
- },
- [`> ${n}`]: k(k(k({
- borderRadius: h
- }, RQ(t)), kQ(t)), {
- [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
- borderRadius: p
- },
- [`${n}-submenu-title::after`]: {
- transition: `transform ${i} ${o}`
- }
- })
- }
- }), kQ(t)), {
- [`&-inline-collapsed ${n}-submenu-arrow,
- &-inline ${n}-submenu-arrow`]: {
- // ↓
- "&::before": {
- transform: `rotate(-45deg) translateX(${g})`
- },
- "&::after": {
- transform: `rotate(45deg) translateX(-${g})`
- }
- },
- [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
- // ↑
- transform: `translateY(-${v * 0.2}px)`,
- "&::after": {
- transform: `rotate(-45deg) translateX(-${g})`
- },
- "&::before": {
- transform: `rotate(45deg) translateX(${g})`
- }
- }
- })
- },
- // Integration with header element so menu items have the same height
- {
- [`${e}-layout-header`]: {
- [n]: {
- lineHeight: "inherit"
- }
- }
- }
- ];
- }, tBe = (t, e) => pr("Menu", (r, i) => {
- let {
- overrideComponentToken: a
- } = i;
- if ((e == null ? void 0 : e.value) === !1)
- return [];
- const {
- colorBgElevated: o,
- colorPrimary: s,
- colorError: l,
- colorErrorHover: u,
- colorTextLightSolid: c
- } = r, {
- controlHeightLG: f,
- fontSize: d
- } = r, h = d / 7 * 5, p = bn(r, {
- menuItemHeight: f,
- menuItemPaddingInline: r.margin,
- menuArrowSize: h,
- menuHorizontalHeight: f * 1.15,
- menuArrowOffset: `${h * 0.25}px`,
- menuPanelMaskInset: -7,
- menuSubMenuBg: o
- }), v = new Hn(c).setAlpha(0.65).toRgbString(), g = bn(p, {
- colorItemText: v,
- colorItemTextHover: c,
- colorGroupTitle: v,
- colorItemTextSelected: c,
- colorItemBg: "#001529",
- colorSubItemBg: "#000c17",
- colorItemBgActive: "transparent",
- colorItemBgSelected: s,
- colorActiveBarWidth: 0,
- colorActiveBarHeight: 0,
- colorActiveBarBorderSize: 0,
- // Disabled
- colorItemTextDisabled: new Hn(c).setAlpha(0.25).toRgbString(),
- // Danger
- colorDangerItemText: l,
- colorDangerItemTextHover: u,
- colorDangerItemTextSelected: c,
- colorDangerItemBgActive: l,
- colorDangerItemBgSelected: l,
- menuSubMenuBg: "#001529",
- // Horizontal
- colorItemTextSelectedHorizontal: c,
- colorItemBgSelectedHorizontal: s
- }, k({}, a));
- return [
- // Basic
- eBe(p),
- // Horizontal
- q6e(p),
- // Vertical
- J6e(p),
- // Theme
- IQ(p, "light"),
- IQ(g, "dark"),
- // RTL
- K6e(p),
- // Motion
- v8(p),
- kg(p, "slide-up"),
- kg(p, "slide-down"),
- B2(p, "zoom-big")
- ];
- }, (r) => {
- const {
- colorPrimary: i,
- colorError: a,
- colorTextDisabled: o,
- colorErrorBg: s,
- colorText: l,
- colorTextDescription: u,
- colorBgContainer: c,
- colorFillAlter: f,
- colorFillContent: d,
- lineWidth: h,
- lineWidthBold: p,
- controlItemBgActive: v,
- colorBgTextHover: g
- } = r;
- return {
- dropdownWidth: 160,
- zIndexPopup: r.zIndexPopupBase + 50,
- radiusItem: r.borderRadiusLG,
- radiusSubMenuItem: r.borderRadiusSM,
- colorItemText: l,
- colorItemTextHover: l,
- colorItemTextHoverHorizontal: i,
- colorGroupTitle: u,
- colorItemTextSelected: i,
- colorItemTextSelectedHorizontal: i,
- colorItemBg: c,
- colorItemBgHover: g,
- colorItemBgActive: d,
- colorSubItemBg: f,
- colorItemBgSelected: v,
- colorItemBgSelectedHorizontal: "transparent",
- colorActiveBarWidth: 0,
- colorActiveBarHeight: p,
- colorActiveBarBorderSize: h,
- // Disabled
- colorItemTextDisabled: o,
- // Danger
- colorDangerItemText: a,
- colorDangerItemTextHover: a,
- colorDangerItemTextSelected: a,
- colorDangerItemBgActive: s,
- colorDangerItemBgSelected: s,
- itemMarginInline: r.marginXXS
- };
- })(t), nBe = () => ({
- id: String,
- prefixCls: String,
- // donot use items, now only support inner use
- items: Array,
- disabled: Boolean,
- inlineCollapsed: Boolean,
- disabledOverflow: Boolean,
- forceSubMenuRender: Boolean,
- openKeys: Array,
- selectedKeys: Array,
- activeKey: String,
- selectable: {
- type: Boolean,
- default: !0
- },
- multiple: {
- type: Boolean,
- default: !1
- },
- tabindex: {
- type: [Number, String]
- },
- motion: Object,
- role: String,
- theme: {
- type: String,
- default: "light"
- },
- mode: {
- type: String,
- default: "vertical"
- },
- inlineIndent: {
- type: Number,
- default: 24
- },
- subMenuOpenDelay: {
- type: Number,
- default: 0
- },
- subMenuCloseDelay: {
- type: Number,
- default: 0.1
- },
- builtinPlacements: {
- type: Object
- },
- triggerSubMenuAction: {
- type: String,
- default: "hover"
- },
- getPopupContainer: Function,
- expandIcon: Function,
- onOpenChange: Function,
- onSelect: Function,
- onDeselect: Function,
- onClick: [Function, Array],
- onFocus: Function,
- onBlur: Function,
- onMousedown: Function,
- "onUpdate:openKeys": Function,
- "onUpdate:selectedKeys": Function,
- "onUpdate:activeKey": Function
- }), LQ = [], ef = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AMenu",
- inheritAttrs: !1,
- props: nBe(),
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- attrs: i
- } = e;
- const {
- direction: a,
- getPrefixCls: o
- } = hn("menu", t), s = Eie(), l = V(() => {
- var se;
- return o("menu", t.prefixCls || ((se = s == null ? void 0 : s.prefixCls) === null || se === void 0 ? void 0 : se.value));
- }), [u, c] = tBe(l, V(() => !s)), f = ve(/* @__PURE__ */ new Map()), d = et(N6e, ee(void 0)), h = V(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
- itemsNodes: p
- } = Y6e(t), v = ve(!1);
- _t(() => {
- v.value = !0;
- }), Vt(() => {
- lo(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), lo(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
- });
- const g = ee([]), m = ee([]), y = ee({});
- me(f, () => {
- const se = {};
- for (const he of f.value.values())
- se[he.key] = he;
- y.value = se;
- }, {
- flush: "post"
- }), Vt(() => {
- if (t.activeKey !== void 0) {
- let se = [];
- const he = t.activeKey ? y.value[t.activeKey] : void 0;
- he && t.activeKey !== void 0 ? se = BA([].concat(z(he.parentKeys), t.activeKey)) : se = [], O0(g.value, se) || (g.value = se);
- }
- }), me(() => t.selectedKeys, (se) => {
- se && (m.value = se.slice());
- }, {
- immediate: !0,
- deep: !0
- });
- const _ = ee([]);
- me([y, m], () => {
- let se = [];
- m.value.forEach((he) => {
- const re = y.value[he];
- re && (se = se.concat(z(re.parentKeys)));
- }), se = BA(se), O0(_.value, se) || (_.value = se);
- }, {
- immediate: !0
- });
- const O = (se) => {
- if (t.selectable) {
- const {
- key: he
- } = se, re = m.value.includes(he);
- let q;
- t.multiple ? re ? q = m.value.filter((de) => de !== he) : q = [...m.value, he] : q = [he];
- const K = k(k({}, se), {
- selectedKeys: q
- });
- O0(q, m.value) || (t.selectedKeys === void 0 && (m.value = q), r("update:selectedKeys", q), re && t.multiple ? r("deselect", K) : r("select", K));
- }
- T.value !== "inline" && !t.multiple && S.value.length && R(LQ);
- }, S = ee([]);
- me(() => t.openKeys, function() {
- let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : S.value;
- O0(S.value, se) || (S.value = se.slice());
- }, {
- immediate: !0,
- deep: !0
- });
- let x;
- const C = (se) => {
- clearTimeout(x), x = setTimeout(() => {
- t.activeKey === void 0 && (g.value = se), r("update:activeKey", se[se.length - 1]);
- });
- }, P = V(() => !!t.disabled), $ = V(() => a.value === "rtl"), T = ee("vertical"), E = ve(!1);
- Vt(() => {
- var se;
- (t.mode === "inline" || t.mode === "vertical") && h.value ? (T.value = "vertical", E.value = h.value) : (T.value = t.mode, E.value = !1), !((se = s == null ? void 0 : s.mode) === null || se === void 0) && se.value && (T.value = s.mode.value);
- });
- const M = V(() => T.value === "inline"), R = (se) => {
- S.value = se, r("update:openKeys", se), r("openChange", se);
- }, N = ee(S.value), I = ve(!1);
- me(S, () => {
- M.value && (N.value = S.value);
- }, {
- immediate: !0
- }), me(M, () => {
- if (!I.value) {
- I.value = !0;
- return;
- }
- M.value ? S.value = N.value : R(LQ);
- }, {
- immediate: !0
- });
- const B = V(() => ({
- [`${l.value}`]: !0,
- [`${l.value}-root`]: !0,
- [`${l.value}-${T.value}`]: !0,
- [`${l.value}-inline-collapsed`]: E.value,
- [`${l.value}-rtl`]: $.value,
- [`${l.value}-${t.theme}`]: !0
- })), Q = V(() => o()), W = V(() => ({
- horizontal: {
- name: `${Q.value}-slide-up`
- },
- inline: w8(`${Q.value}-motion-collapse`),
- other: {
- name: `${Q.value}-zoom-big`
- }
- }));
- Lie(!0);
- const H = function() {
- let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- const he = [], re = f.value;
- return se.forEach((q) => {
- const {
- key: K,
- childrenEventKeys: de
- } = re.get(q);
- he.push(K, ...H(z(de)));
- }), he;
- }, U = (se) => {
- var he;
- r("click", se), O(se), (he = s == null ? void 0 : s.onClick) === null || he === void 0 || he.call(s);
- }, j = (se, he) => {
- var re;
- const q = ((re = y.value[se]) === null || re === void 0 ? void 0 : re.childrenEventKeys) || [];
- let K = S.value.filter((de) => de !== se);
- if (he)
- K.push(se);
- else if (T.value !== "inline") {
- const de = H(z(q));
- K = BA(K.filter((xe) => !de.includes(xe)));
- }
- O0(S, K) || R(K);
- }, Y = (se, he) => {
- f.value.set(se, he), f.value = new Map(f.value);
- }, ne = (se) => {
- f.value.delete(se), f.value = new Map(f.value);
- }, fe = ee(0), ue = V(() => {
- var se;
- return t.expandIcon || n.expandIcon || !((se = s == null ? void 0 : s.expandIcon) === null || se === void 0) && se.value ? (he) => {
- let re = t.expandIcon || n.expandIcon;
- return re = typeof re == "function" ? re(he) : re, xr(re, {
- class: `${l.value}-submenu-expand-icon`
- }, !1);
- } : null;
- });
- L6e({
- prefixCls: l,
- activeKeys: g,
- openKeys: S,
- selectedKeys: m,
- changeActiveKeys: C,
- disabled: P,
- rtl: $,
- mode: T,
- inlineIndent: V(() => t.inlineIndent),
- subMenuCloseDelay: V(() => t.subMenuCloseDelay),
- subMenuOpenDelay: V(() => t.subMenuOpenDelay),
- builtinPlacements: V(() => t.builtinPlacements),
- triggerSubMenuAction: V(() => t.triggerSubMenuAction),
- getPopupContainer: V(() => t.getPopupContainer),
- inlineCollapsed: E,
- theme: V(() => t.theme),
- siderCollapsed: d,
- defaultMotions: V(() => v.value ? W.value : null),
- motion: V(() => v.value ? t.motion : null),
- overflowDisabled: ve(void 0),
- onOpenChange: j,
- onItemClick: U,
- registerMenuInfo: Y,
- unRegisterMenuInfo: ne,
- selectedSubMenuKeys: _,
- expandIcon: ue,
- forceSubMenuRender: V(() => t.forceSubMenuRender),
- rootClassName: c
- });
- const ye = () => {
- var se;
- return p.value || qr((se = n.default) === null || se === void 0 ? void 0 : se.call(n));
- };
- return () => {
- var se;
- const he = ye(), re = fe.value >= he.length - 1 || T.value !== "horizontal" || t.disabledOverflow, q = (de) => T.value !== "horizontal" || t.disabledOverflow ? de : (
- // Need wrap for overflow dropdown that do not response for open
- de.map((xe, we) => (
- // Always wrap provider to avoid sub node re-mount
- D(sC, {
- key: xe.key,
- overflowDisabled: we > fe.value
- }, {
- default: () => xe
- })
- ))
- ), K = ((se = n.overflowedIndicator) === null || se === void 0 ? void 0 : se.call(n)) || D(W2, null, null);
- return u(D(Au, te(te({}, i), {}, {
- onMousedown: t.onMousedown,
- prefixCls: `${l.value}-overflow`,
- component: "ul",
- itemComponent: Lg,
- class: [B.value, i.class, c.value],
- role: "menu",
- id: t.id,
- data: q(he),
- renderRawItem: (de) => de,
- renderRawRest: (de) => {
- const xe = de.length, we = xe ? he.slice(-xe) : null;
- return D(Wt, null, [D(Ng, {
- eventKey: eS,
- key: eS,
- title: K,
- disabled: re,
- internalPopupClose: xe === 0
- }, {
- default: () => we
- }), D(TQ, null, {
- default: () => [D(Ng, {
- eventKey: eS,
- key: eS,
- title: K,
- disabled: re,
- internalPopupClose: xe === 0
- }, {
- default: () => we
- })]
- })]);
- },
- maxCount: T.value !== "horizontal" || t.disabledOverflow ? Au.INVALIDATE : Au.RESPONSIVE,
- ssr: "full",
- "data-menu-list": !0,
- onVisibleChange: (de) => {
- fe.value = de;
- }
- }), {
- default: () => [D(R_, {
- to: "body"
- }, {
- default: () => [D("div", {
- style: {
- display: "none"
- },
- "aria-hidden": !0
- }, [D(TQ, null, {
- default: () => [q(ye())]
- })])]
- })]
- }));
- };
- }
- });
- ef.install = function(t) {
- return t.component(ef.name, ef), t.component(Lg.name, Lg), t.component(Ng.name, Ng), t.component(uC.name, uC), t.component(lC.name, lC), t;
- };
- ef.Item = Lg;
- ef.Divider = uC;
- ef.SubMenu = Ng;
- ef.ItemGroup = lC;
- var rBe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const iBe = {
- prefixCls: String,
- name: String,
- id: String,
- type: String,
- defaultChecked: {
- type: [Boolean, Number],
- default: void 0
- },
- checked: {
- type: [Boolean, Number],
- default: void 0
- },
- disabled: Boolean,
- tabindex: {
- type: [Number, String]
- },
- readonly: Boolean,
- autofocus: Boolean,
- value: oe.any,
- required: Boolean
- }, Fie = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Checkbox",
- inheritAttrs: !1,
- props: li(iBe, {
- prefixCls: "rc-checkbox",
- type: "checkbox",
- defaultChecked: !1
- }),
- emits: ["click", "change"],
- setup(t, e) {
- let {
- attrs: n,
- emit: r,
- expose: i
- } = e;
- const a = ee(t.checked === void 0 ? t.defaultChecked : t.checked), o = ee();
- me(() => t.checked, () => {
- a.value = t.checked;
- }), i({
- focus() {
- var c;
- (c = o.value) === null || c === void 0 || c.focus();
- },
- blur() {
- var c;
- (c = o.value) === null || c === void 0 || c.blur();
- }
- });
- const s = ee(), l = (c) => {
- if (t.disabled)
- return;
- t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
- const f = {
- target: k(k({}, t), {
- checked: c.target.checked
- }),
- stopPropagation() {
- c.stopPropagation();
- },
- preventDefault() {
- c.preventDefault();
- },
- nativeEvent: c
- };
- t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
- }, u = (c) => {
- r("click", c), s.value = c.shiftKey;
- };
- return () => {
- const {
- prefixCls: c,
- name: f,
- id: d,
- type: h,
- disabled: p,
- readonly: v,
- tabindex: g,
- autofocus: m,
- value: y,
- required: _
- } = t, O = rBe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
- class: S,
- onFocus: x,
- onBlur: C,
- onKeydown: P,
- onKeypress: $,
- onKeyup: T
- } = n, E = k(k({}, O), n), M = Object.keys(E).reduce((I, B) => ((B.startsWith("data-") || B.startsWith("aria-") || B === "role") && (I[B] = E[B]), I), {}), R = Re(c, S, {
- [`${c}-checked`]: a.value,
- [`${c}-disabled`]: p
- }), N = k(k({
- name: f,
- id: d,
- type: h,
- readonly: v,
- disabled: p,
- tabindex: g,
- class: `${c}-input`,
- checked: !!a.value,
- autofocus: m,
- value: y
- }, M), {
- onChange: l,
- onClick: u,
- onFocus: x,
- onBlur: C,
- onKeydown: P,
- onKeypress: $,
- onKeyup: T,
- required: _
- });
- return D("span", {
- class: R
- }, [D("input", te({
- ref: o
- }, N), null), D("span", {
- class: `${c}-inner`
- }, null)]);
- };
- }
- }), Wie = Symbol("radioGroupContextKey"), aBe = (t) => {
- Et(Wie, t);
- }, oBe = () => et(Wie, void 0), Qie = Symbol("radioOptionTypeContextKey"), sBe = (t) => {
- Et(Qie, t);
- }, lBe = () => et(Qie, void 0), uBe = new qt("antRadioEffect", {
- "0%": {
- transform: "scale(1)",
- opacity: 0.5
- },
- "100%": {
- transform: "scale(1.6)",
- opacity: 0
- }
- }), cBe = (t) => {
- const {
- componentCls: e,
- antCls: n
- } = t, r = `${e}-group`;
- return {
- [r]: k(k({}, Gn(t)), {
- display: "inline-block",
- fontSize: 0,
- // RTL
- [`&${r}-rtl`]: {
- direction: "rtl"
- },
- [`${n}-badge ${n}-badge-count`]: {
- zIndex: 1
- },
- [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
- borderInlineStart: "none"
- }
- })
- };
- }, fBe = (t) => {
- const {
- componentCls: e,
- radioWrapperMarginRight: n,
- radioCheckedColor: r,
- radioSize: i,
- motionDurationSlow: a,
- motionDurationMid: o,
- motionEaseInOut: s,
- motionEaseInOutCirc: l,
- radioButtonBg: u,
- colorBorder: c,
- lineWidth: f,
- radioDotSize: d,
- colorBgContainerDisabled: h,
- colorTextDisabled: p,
- paddingXS: v,
- radioDotDisabledColor: g,
- lineType: m,
- radioDotDisabledSize: y,
- wireframe: _,
- colorWhite: O
- } = t, S = `${e}-inner`;
- return {
- [`${e}-wrapper`]: k(k({}, Gn(t)), {
- position: "relative",
- display: "inline-flex",
- alignItems: "baseline",
- marginInlineStart: 0,
- marginInlineEnd: n,
- cursor: "pointer",
- // RTL
- [`&${e}-wrapper-rtl`]: {
- direction: "rtl"
- },
- "&-disabled": {
- cursor: "not-allowed",
- color: t.colorTextDisabled
- },
- "&::after": {
- display: "inline-block",
- width: 0,
- overflow: "hidden",
- content: '"\\a0"'
- },
- // hashId 在 wrapper 上,只能铺平
- [`${e}-checked::after`]: {
- position: "absolute",
- insetBlockStart: 0,
- insetInlineStart: 0,
- width: "100%",
- height: "100%",
- border: `${f}px ${m} ${r}`,
- borderRadius: "50%",
- visibility: "hidden",
- animationName: uBe,
- animationDuration: a,
- animationTimingFunction: s,
- animationFillMode: "both",
- content: '""'
- },
- [e]: k(k({}, Gn(t)), {
- position: "relative",
- display: "inline-block",
- outline: "none",
- cursor: "pointer",
- alignSelf: "center"
- }),
- [`${e}-wrapper:hover &,
- &:hover ${S}`]: {
- borderColor: r
- },
- [`${e}-input:focus-visible + ${S}`]: k({}, G_(t)),
- [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
- visibility: "visible"
- },
- [`${e}-inner`]: {
- "&::after": {
- boxSizing: "border-box",
- position: "absolute",
- insetBlockStart: "50%",
- insetInlineStart: "50%",
- display: "block",
- width: i,
- height: i,
- marginBlockStart: i / -2,
- marginInlineStart: i / -2,
- backgroundColor: _ ? r : O,
- borderBlockStart: 0,
- borderInlineStart: 0,
- borderRadius: i,
- transform: "scale(0)",
- opacity: 0,
- transition: `all ${a} ${l}`,
- content: '""'
- },
- boxSizing: "border-box",
- position: "relative",
- insetBlockStart: 0,
- insetInlineStart: 0,
- display: "block",
- width: i,
- height: i,
- backgroundColor: u,
- borderColor: c,
- borderStyle: "solid",
- borderWidth: f,
- borderRadius: "50%",
- transition: `all ${o}`
- },
- [`${e}-input`]: {
- position: "absolute",
- insetBlockStart: 0,
- insetInlineEnd: 0,
- insetBlockEnd: 0,
- insetInlineStart: 0,
- zIndex: 1,
- cursor: "pointer",
- opacity: 0
- },
- // 选中状态
- [`${e}-checked`]: {
- [S]: {
- borderColor: r,
- backgroundColor: _ ? u : r,
- "&::after": {
- transform: `scale(${d / i})`,
- opacity: 1,
- transition: `all ${a} ${l}`
- }
- }
- },
- [`${e}-disabled`]: {
- cursor: "not-allowed",
- [S]: {
- backgroundColor: h,
- borderColor: c,
- cursor: "not-allowed",
- "&::after": {
- backgroundColor: g
- }
- },
- [`${e}-input`]: {
- cursor: "not-allowed"
- },
- [`${e}-disabled + span`]: {
- color: p,
- cursor: "not-allowed"
- },
- [`&${e}-checked`]: {
- [S]: {
- "&::after": {
- transform: `scale(${y / i})`
- }
- }
- }
- },
- [`span${e} + *`]: {
- paddingInlineStart: v,
- paddingInlineEnd: v
- }
- })
- };
- }, dBe = (t) => {
- const {
- radioButtonColor: e,
- controlHeight: n,
- componentCls: r,
- lineWidth: i,
- lineType: a,
- colorBorder: o,
- motionDurationSlow: s,
- motionDurationMid: l,
- radioButtonPaddingHorizontal: u,
- fontSize: c,
- radioButtonBg: f,
- fontSizeLG: d,
- controlHeightLG: h,
- controlHeightSM: p,
- paddingXS: v,
- borderRadius: g,
- borderRadiusSM: m,
- borderRadiusLG: y,
- radioCheckedColor: _,
- radioButtonCheckedBg: O,
- radioButtonHoverColor: S,
- radioButtonActiveColor: x,
- radioSolidCheckedColor: C,
- colorTextDisabled: P,
- colorBgContainerDisabled: $,
- radioDisabledButtonCheckedColor: T,
- radioDisabledButtonCheckedBg: E
- } = t;
- return {
- [`${r}-button-wrapper`]: {
- position: "relative",
- display: "inline-block",
- height: n,
- margin: 0,
- paddingInline: u,
- paddingBlock: 0,
- color: e,
- fontSize: c,
- lineHeight: `${n - i * 2}px`,
- background: f,
- border: `${i}px ${a} ${o}`,
- // strange align fix for chrome but works
- // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
- borderBlockStartWidth: i + 0.02,
- borderInlineStartWidth: 0,
- borderInlineEndWidth: i,
- cursor: "pointer",
- transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
- a: {
- color: e
- },
- [`> ${r}-button`]: {
- position: "absolute",
- insetBlockStart: 0,
- insetInlineStart: 0,
- zIndex: -1,
- width: "100%",
- height: "100%"
- },
- "&:not(:first-child)": {
- "&::before": {
- position: "absolute",
- insetBlockStart: -i,
- insetInlineStart: -i,
- display: "block",
- boxSizing: "content-box",
- width: 1,
- height: "100%",
- paddingBlock: i,
- paddingInline: 0,
- backgroundColor: o,
- transition: `background-color ${s}`,
- content: '""'
- }
- },
- "&:first-child": {
- borderInlineStart: `${i}px ${a} ${o}`,
- borderStartStartRadius: g,
- borderEndStartRadius: g
- },
- "&:last-child": {
- borderStartEndRadius: g,
- borderEndEndRadius: g
- },
- "&:first-child:last-child": {
- borderRadius: g
- },
- [`${r}-group-large &`]: {
- height: h,
- fontSize: d,
- lineHeight: `${h - i * 2}px`,
- "&:first-child": {
- borderStartStartRadius: y,
- borderEndStartRadius: y
- },
- "&:last-child": {
- borderStartEndRadius: y,
- borderEndEndRadius: y
- }
- },
- [`${r}-group-small &`]: {
- height: p,
- paddingInline: v - i,
- paddingBlock: 0,
- lineHeight: `${p - i * 2}px`,
- "&:first-child": {
- borderStartStartRadius: m,
- borderEndStartRadius: m
- },
- "&:last-child": {
- borderStartEndRadius: m,
- borderEndEndRadius: m
- }
- },
- "&:hover": {
- position: "relative",
- color: _
- },
- "&:has(:focus-visible)": k({}, G_(t)),
- [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
- width: 0,
- height: 0,
- opacity: 0,
- pointerEvents: "none"
- },
- [`&-checked:not(${r}-button-wrapper-disabled)`]: {
- zIndex: 1,
- color: _,
- background: O,
- borderColor: _,
- "&::before": {
- backgroundColor: _
- },
- "&:first-child": {
- borderColor: _
- },
- "&:hover": {
- color: S,
- borderColor: S,
- "&::before": {
- backgroundColor: S
- }
- },
- "&:active": {
- color: x,
- borderColor: x,
- "&::before": {
- backgroundColor: x
- }
- }
- },
- [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
- color: C,
- background: _,
- borderColor: _,
- "&:hover": {
- color: C,
- background: S,
- borderColor: S
- },
- "&:active": {
- color: C,
- background: x,
- borderColor: x
- }
- },
- "&-disabled": {
- color: P,
- backgroundColor: $,
- borderColor: o,
- cursor: "not-allowed",
- "&:first-child, &:hover": {
- color: P,
- backgroundColor: $,
- borderColor: o
- }
- },
- [`&-disabled${r}-button-wrapper-checked`]: {
- color: T,
- backgroundColor: E,
- borderColor: o,
- boxShadow: "none"
- }
- }
- };
- }, Hie = pr("Radio", (t) => {
- const {
- padding: e,
- lineWidth: n,
- controlItemBgActiveDisabled: r,
- colorTextDisabled: i,
- colorBgContainer: a,
- fontSizeLG: o,
- controlOutline: s,
- colorPrimaryHover: l,
- colorPrimaryActive: u,
- colorText: c,
- colorPrimary: f,
- marginXS: d,
- controlOutlineWidth: h,
- colorTextLightSolid: p,
- wireframe: v
- } = t, g = `0 0 0 ${h}px ${s}`, m = g, y = o, _ = 4, O = y - _ * 2, S = v ? O : y - (_ + n) * 2, x = f, C = c, P = l, $ = u, T = e - n, R = bn(t, {
- radioFocusShadow: g,
- radioButtonFocusShadow: m,
- radioSize: y,
- radioDotSize: S,
- radioDotDisabledSize: O,
- radioCheckedColor: x,
- radioDotDisabledColor: i,
- radioSolidCheckedColor: p,
- radioButtonBg: a,
- radioButtonCheckedBg: a,
- radioButtonColor: C,
- radioButtonHoverColor: P,
- radioButtonActiveColor: $,
- radioButtonPaddingHorizontal: T,
- radioDisabledButtonCheckedBg: r,
- radioDisabledButtonCheckedColor: i,
- radioWrapperMarginRight: d
- });
- return [cBe(R), fBe(R), dBe(R)];
- });
- var hBe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const Gie = () => ({
- prefixCls: String,
- checked: Tt(),
- disabled: Tt(),
- isGroup: Tt(),
- value: oe.any,
- name: String,
- id: String,
- autofocus: Tt(),
- onChange: Ct(),
- onFocus: Ct(),
- onBlur: Ct(),
- onClick: Ct(),
- "onUpdate:checked": Ct(),
- "onUpdate:value": Ct()
- }), Ta = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ARadio",
- inheritAttrs: !1,
- props: Gie(),
- setup(t, e) {
- let {
- emit: n,
- expose: r,
- slots: i,
- attrs: a
- } = e;
- const o = Ul(), s = Qs.useInject(), l = lBe(), u = oBe(), c = Vl(), f = V(() => {
- var P;
- return (P = v.value) !== null && P !== void 0 ? P : c.value;
- }), d = ee(), {
- prefixCls: h,
- direction: p,
- disabled: v
- } = hn("radio", t), g = V(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Vl(), [y, _] = Hie(h);
- r({
- focus: () => {
- d.value.focus();
- },
- blur: () => {
- d.value.blur();
- }
- });
- const x = (P) => {
- const $ = P.target.checked;
- n("update:checked", $), n("update:value", $), n("change", P), o.onFieldChange();
- }, C = (P) => {
- n("change", P), u && u.onChange && u.onChange(P);
- };
- return () => {
- var P;
- const $ = u, {
- prefixCls: T,
- id: E = o.id.value
- } = t, M = hBe(t, ["prefixCls", "id"]), R = k(k({
- prefixCls: g.value,
- id: E
- }, si(M, ["onUpdate:checked", "onUpdate:value"])), {
- disabled: (P = v.value) !== null && P !== void 0 ? P : m.value
- });
- $ ? (R.name = $.name.value, R.onChange = C, R.checked = t.value === $.value.value, R.disabled = f.value || $.disabled.value) : R.onChange = x;
- const N = Re({
- [`${g.value}-wrapper`]: !0,
- [`${g.value}-wrapper-checked`]: R.checked,
- [`${g.value}-wrapper-disabled`]: R.disabled,
- [`${g.value}-wrapper-rtl`]: p.value === "rtl",
- [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
- }, a.class, _.value);
- return y(D("label", te(te({}, a), {}, {
- class: N
- }), [D(Fie, te(te({}, R), {}, {
- type: "radio",
- ref: d
- }), null), i.default && D("span", null, [i.default()])]));
- };
- }
- }), pBe = () => ({
- prefixCls: String,
- value: oe.any,
- size: rr(),
- options: Lh(),
- disabled: Tt(),
- name: String,
- buttonStyle: rr("outline"),
- id: String,
- optionType: rr("default"),
- onChange: Ct(),
- "onUpdate:value": Ct()
- }), Fh = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ARadioGroup",
- inheritAttrs: !1,
- props: pBe(),
- // emits: ['update:value', 'change'],
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- attrs: i
- } = e;
- const a = Ul(), {
- prefixCls: o,
- direction: s,
- size: l
- } = hn("radio", t), [u, c] = Hie(o), f = ee(t.value), d = ee(!1);
- return me(() => t.value, (p) => {
- f.value = p, d.value = !1;
- }), aBe({
- onChange: (p) => {
- const v = f.value, {
- value: g
- } = p.target;
- "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Bt(() => {
- d.value = !1;
- });
- },
- value: f,
- disabled: V(() => t.disabled),
- name: V(() => t.name),
- optionType: V(() => t.optionType)
- }), () => {
- var p;
- const {
- options: v,
- buttonStyle: g,
- id: m = a.id.value
- } = t, y = `${o.value}-group`, _ = Re(y, `${y}-${g}`, {
- [`${y}-${l.value}`]: l.value,
- [`${y}-rtl`]: s.value === "rtl"
- }, i.class, c.value);
- let O = null;
- return v && v.length > 0 ? O = v.map((S) => {
- if (typeof S == "string" || typeof S == "number")
- return D(Ta, {
- key: S,
- prefixCls: o.value,
- disabled: t.disabled,
- value: S,
- checked: f.value === S
- }, {
- default: () => [S]
- });
- const {
- value: x,
- disabled: C,
- label: P
- } = S;
- return D(Ta, {
- key: `radio-group-value-options-${x}`,
- prefixCls: o.value,
- disabled: C || t.disabled,
- value: x,
- checked: f.value === x
- }, {
- default: () => [P]
- });
- }) : O = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(D("div", te(te({}, i), {}, {
- class: _,
- id: m
- }), [O]));
- };
- }
- }), _l = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ARadioButton",
- inheritAttrs: !1,
- props: Gie(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i
- } = hn("radio", t);
- return sBe("button"), () => {
- var a;
- return D(Ta, te(te(te({}, r), t), {}, {
- prefixCls: i.value
- }), {
- default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
- });
- };
- }
- });
- Ta.Group = Fh;
- Ta.Button = _l;
- Ta.install = function(t) {
- return t.component(Ta.name, Ta), t.component(Ta.Group.name, Ta.Group), t.component(Ta.Button.name, Ta.Button), t;
- };
- const jie = (t) => ({
- // Firefox
- "&::-moz-placeholder": {
- opacity: 1
- },
- "&::placeholder": {
- color: t,
- userSelect: "none"
- // https://github.com/ant-design/ant-design/pull/32639
- },
- "&:placeholder-shown": {
- textOverflow: "ellipsis"
- }
- }), X_ = (t) => ({
- borderColor: t.inputBorderHoverColor,
- borderInlineEndWidth: t.lineWidth
- }), cC = (t) => ({
- borderColor: t.inputBorderHoverColor,
- boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
- borderInlineEndWidth: t.lineWidth,
- outline: 0
- }), Zie = (t) => ({
- color: t.colorTextDisabled,
- backgroundColor: t.colorBgContainerDisabled,
- borderColor: t.colorBorder,
- boxShadow: "none",
- cursor: "not-allowed",
- opacity: 1,
- "&:hover": k({}, X_(bn(t, {
- inputBorderHoverColor: t.colorBorder
- })))
- }), Uie = (t) => {
- const {
- inputPaddingVerticalLG: e,
- fontSizeLG: n,
- lineHeightLG: r,
- borderRadiusLG: i,
- inputPaddingHorizontalLG: a
- } = t;
- return {
- padding: `${e}px ${a}px`,
- fontSize: n,
- lineHeight: r,
- borderRadius: i
- };
- }, Xie = (t) => ({
- padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
- borderRadius: t.borderRadiusSM
- }), H2 = (t, e) => {
- const {
- componentCls: n,
- colorError: r,
- colorWarning: i,
- colorErrorOutline: a,
- colorWarningOutline: o,
- colorErrorBorderHover: s,
- colorWarningBorderHover: l
- } = t;
- return {
- [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
- borderColor: r,
- "&:hover": {
- borderColor: s
- },
- "&:focus, &-focused": k({}, cC(bn(t, {
- inputBorderActiveColor: r,
- inputBorderHoverColor: r,
- controlOutline: a
- }))),
- [`${n}-prefix`]: {
- color: r
- }
- },
- [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
- borderColor: i,
- "&:hover": {
- borderColor: l
- },
- "&:focus, &-focused": k({}, cC(bn(t, {
- inputBorderActiveColor: i,
- inputBorderHoverColor: i,
- controlOutline: o
- }))),
- [`${n}-prefix`]: {
- color: i
- }
- }
- };
- }, G2 = (t) => k(k({
- position: "relative",
- display: "inline-block",
- width: "100%",
- minWidth: 0,
- padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
- color: t.colorText,
- fontSize: t.fontSize,
- lineHeight: t.lineHeight,
- backgroundColor: t.colorBgContainer,
- backgroundImage: "none",
- borderWidth: t.lineWidth,
- borderStyle: t.lineType,
- borderColor: t.colorBorder,
- borderRadius: t.borderRadius,
- transition: `all ${t.motionDurationMid}`
- }, jie(t.colorTextPlaceholder)), {
- "&:hover": k({}, X_(t)),
- "&:focus, &-focused": k({}, cC(t)),
- "&-disabled, &[disabled]": k({}, Zie(t)),
- "&-borderless": {
- "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
- backgroundColor: "transparent",
- border: "none",
- boxShadow: "none"
- }
- },
- // Reset height for `textarea`s
- "textarea&": {
- maxWidth: "100%",
- height: "auto",
- minHeight: t.controlHeight,
- lineHeight: t.lineHeight,
- verticalAlign: "bottom",
- transition: `all ${t.motionDurationSlow}, height 0s`,
- resize: "vertical"
- },
- // Size
- "&-lg": k({}, Uie(t)),
- "&-sm": k({}, Xie(t)),
- // RTL
- "&-rtl": {
- direction: "rtl"
- },
- "&-textarea-rtl": {
- direction: "rtl"
- }
- }), Yie = (t) => {
- const {
- componentCls: e,
- antCls: n
- } = t;
- return {
- position: "relative",
- display: "table",
- width: "100%",
- borderCollapse: "separate",
- borderSpacing: 0,
- // Undo padding and float of grid classes
- "&[class*='col-']": {
- paddingInlineEnd: t.paddingXS,
- "&:last-child": {
- paddingInlineEnd: 0
- }
- },
- // Sizing options
- [`&-lg ${e}, &-lg > ${e}-group-addon`]: k({}, Uie(t)),
- [`&-sm ${e}, &-sm > ${e}-group-addon`]: k({}, Xie(t)),
- [`> ${e}`]: {
- display: "table-cell",
- "&:not(:first-child):not(:last-child)": {
- borderRadius: 0
- }
- },
- [`${e}-group`]: {
- "&-addon, &-wrap": {
- display: "table-cell",
- width: 1,
- whiteSpace: "nowrap",
- verticalAlign: "middle",
- "&:not(:first-child):not(:last-child)": {
- borderRadius: 0
- }
- },
- "&-wrap > *": {
- display: "block !important"
- },
- "&-addon": {
- position: "relative",
- padding: `0 ${t.inputPaddingHorizontal}px`,
- color: t.colorText,
- fontWeight: "normal",
- fontSize: t.fontSize,
- textAlign: "center",
- backgroundColor: t.colorFillAlter,
- border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
- borderRadius: t.borderRadius,
- transition: `all ${t.motionDurationSlow}`,
- lineHeight: 1,
- // Reset Select's style in addon
- [`${n}-select`]: {
- margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
- [`&${n}-select-single:not(${n}-select-customize-input)`]: {
- [`${n}-select-selector`]: {
- backgroundColor: "inherit",
- border: `${t.lineWidth}px ${t.lineType} transparent`,
- boxShadow: "none"
- }
- },
- "&-open, &-focused": {
- [`${n}-select-selector`]: {
- color: t.colorPrimary
- }
- }
- },
- // https://github.com/ant-design/ant-design/issues/31333
- [`${n}-cascader-picker`]: {
- margin: `-9px -${t.inputPaddingHorizontal}px`,
- backgroundColor: "transparent",
- [`${n}-cascader-input`]: {
- textAlign: "start",
- border: 0,
- boxShadow: "none"
- }
- }
- },
- "&-addon:first-child": {
- borderInlineEnd: 0
- },
- "&-addon:last-child": {
- borderInlineStart: 0
- }
- },
- [`${e}`]: {
- float: "inline-start",
- width: "100%",
- marginBottom: 0,
- textAlign: "inherit",
- "&:focus": {
- zIndex: 1,
- borderInlineEndWidth: 1
- },
- "&:hover": {
- zIndex: 1,
- borderInlineEndWidth: 1,
- [`${e}-search-with-button &`]: {
- zIndex: 0
- }
- }
- },
- // Reset rounded corners
- [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- // Reset Select's style in addon
- [`${n}-select ${n}-select-selector`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- [`> ${e}-affix-wrapper`]: {
- [`&:not(:first-child) ${e}`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- },
- [`&:not(:last-child) ${e}`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0,
- // Reset Select's style in addon
- [`${n}-select ${n}-select-selector`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`${e}-affix-wrapper`]: {
- "&:not(:last-child)": {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- [`${e}-search &`]: {
- borderStartStartRadius: t.borderRadius,
- borderEndStartRadius: t.borderRadius
- }
- },
- [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`&${e}-group-compact`]: k(k({
- display: "block"
- }, Kw()), {
- [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
- "&:not(:first-child):not(:last-child)": {
- borderInlineEndWidth: t.lineWidth,
- "&:hover": {
- zIndex: 1
- },
- "&:focus": {
- zIndex: 1
- }
- }
- },
- "& > *": {
- display: "inline-block",
- float: "none",
- verticalAlign: "top",
- borderRadius: 0
- },
- [`& > ${e}-affix-wrapper`]: {
- display: "inline-flex"
- },
- [`& > ${n}-picker-range`]: {
- display: "inline-flex"
- },
- "& > *:not(:last-child)": {
- marginInlineEnd: -t.lineWidth,
- borderInlineEndWidth: t.lineWidth
- },
- // Undo float for .ant-input-group .ant-input
- [`${e}`]: {
- float: "none"
- },
- // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
- [`& > ${n}-select > ${n}-select-selector,
- & > ${n}-select-auto-complete ${e},
- & > ${n}-cascader-picker ${e},
- & > ${e}-group-wrapper ${e}`]: {
- borderInlineEndWidth: t.lineWidth,
- borderRadius: 0,
- "&:hover": {
- zIndex: 1
- },
- "&:focus": {
- zIndex: 1
- }
- },
- [`& > ${n}-select-focused`]: {
- zIndex: 1
- },
- // update z-index for arrow icon
- [`& > ${n}-select > ${n}-select-arrow`]: {
- zIndex: 1
- // https://github.com/ant-design/ant-design/issues/20371
- },
- [`& > *:first-child,
- & > ${n}-select:first-child > ${n}-select-selector,
- & > ${n}-select-auto-complete:first-child ${e},
- & > ${n}-cascader-picker:first-child ${e}`]: {
- borderStartStartRadius: t.borderRadius,
- borderEndStartRadius: t.borderRadius
- },
- [`& > *:last-child,
- & > ${n}-select:last-child > ${n}-select-selector,
- & > ${n}-cascader-picker:last-child ${e},
- & > ${n}-cascader-picker-focused:last-child ${e}`]: {
- borderInlineEndWidth: t.lineWidth,
- borderStartEndRadius: t.borderRadius,
- borderEndEndRadius: t.borderRadius
- },
- // https://github.com/ant-design/ant-design/issues/12493
- [`& > ${n}-select-auto-complete ${e}`]: {
- verticalAlign: "top"
- },
- [`${e}-group-wrapper + ${e}-group-wrapper`]: {
- marginInlineStart: -t.lineWidth,
- [`${e}-affix-wrapper`]: {
- borderRadius: 0
- }
- },
- [`${e}-group-wrapper:not(:last-child)`]: {
- [`&${e}-search > ${e}-group`]: {
- [`& > ${e}-group-addon > ${e}-search-button`]: {
- borderRadius: 0
- },
- [`& > ${e}`]: {
- borderStartStartRadius: t.borderRadius,
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- borderEndStartRadius: t.borderRadius
- }
- }
- }
- }),
- [`&&-sm ${n}-btn`]: {
- fontSize: t.fontSizeSM,
- height: t.controlHeightSM,
- lineHeight: "normal"
- },
- [`&&-lg ${n}-btn`]: {
- fontSize: t.fontSizeLG,
- height: t.controlHeightLG,
- lineHeight: "normal"
- },
- // Fix https://github.com/ant-design/ant-design/issues/5754
- [`&&-lg ${n}-select-single ${n}-select-selector`]: {
- height: `${t.controlHeightLG}px`,
- [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
- // -2 is for the border size & override default
- lineHeight: `${t.controlHeightLG - 2}px`
- },
- [`${n}-select-selection-search-input`]: {
- height: `${t.controlHeightLG}px`
- }
- },
- [`&&-sm ${n}-select-single ${n}-select-selector`]: {
- height: `${t.controlHeightSM}px`,
- [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
- // -2 is for the border size & override default
- lineHeight: `${t.controlHeightSM - 2}px`
- },
- [`${n}-select-selection-search-input`]: {
- height: `${t.controlHeightSM}px`
- }
- }
- };
- }, vBe = (t) => {
- const {
- componentCls: e,
- controlHeightSM: n,
- lineWidth: r
- } = t, a = (n - r * 2 - 16) / 2;
- return {
- [e]: k(k(k(k({}, Gn(t)), G2(t)), H2(t, e)), {
- '&[type="color"]': {
- height: t.controlHeight,
- [`&${e}-lg`]: {
- height: t.controlHeightLG
- },
- [`&${e}-sm`]: {
- height: n,
- paddingTop: a,
- paddingBottom: a
- }
- }
- })
- };
- }, gBe = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- // ========================= Input =========================
- [`${e}-clear-icon`]: {
- margin: 0,
- color: t.colorTextQuaternary,
- fontSize: t.fontSizeIcon,
- verticalAlign: -1,
- // https://github.com/ant-design/ant-design/pull/18151
- // https://codesandbox.io/s/wizardly-sun-u10br
- cursor: "pointer",
- transition: `color ${t.motionDurationSlow}`,
- "&:hover": {
- color: t.colorTextTertiary
- },
- "&:active": {
- color: t.colorText
- },
- "&-hidden": {
- visibility: "hidden"
- },
- "&-has-suffix": {
- margin: `0 ${t.inputAffixPadding}px`
- }
- },
- // ======================= TextArea ========================
- "&-textarea-with-clear-btn": {
- padding: "0 !important",
- border: "0 !important",
- [`${e}-clear-icon`]: {
- position: "absolute",
- insetBlockStart: t.paddingXS,
- insetInlineEnd: t.paddingXS,
- zIndex: 1
- }
- }
- };
- }, mBe = (t) => {
- const {
- componentCls: e,
- inputAffixPadding: n,
- colorTextDescription: r,
- motionDurationSlow: i,
- colorIcon: a,
- colorIconHover: o,
- iconCls: s
- } = t;
- return {
- [`${e}-affix-wrapper`]: k(k(k(k(k({}, G2(t)), {
- display: "inline-flex",
- [`&:not(${e}-affix-wrapper-disabled):hover`]: k(k({}, X_(t)), {
- zIndex: 1,
- [`${e}-search-with-button &`]: {
- zIndex: 0
- }
- }),
- "&-focused, &:focus": {
- zIndex: 1
- },
- "&-disabled": {
- [`${e}[disabled]`]: {
- background: "transparent"
- }
- },
- [`> input${e}`]: {
- padding: 0,
- fontSize: "inherit",
- border: "none",
- borderRadius: 0,
- outline: "none",
- "&:focus": {
- boxShadow: "none !important"
- }
- },
- "&::before": {
- width: 0,
- visibility: "hidden",
- content: '"\\a0"'
- },
- [`${e}`]: {
- "&-prefix, &-suffix": {
- display: "flex",
- flex: "none",
- alignItems: "center",
- "> *:not(:last-child)": {
- marginInlineEnd: t.paddingXS
- }
- },
- "&-show-count-suffix": {
- color: r
- },
- "&-show-count-has-suffix": {
- marginInlineEnd: t.paddingXXS
- },
- "&-prefix": {
- marginInlineEnd: n
- },
- "&-suffix": {
- marginInlineStart: n
- }
- }
- }), gBe(t)), {
- // password
- [`${s}${e}-password-icon`]: {
- color: a,
- cursor: "pointer",
- transition: `all ${i}`,
- "&:hover": {
- color: o
- }
- }
- }), H2(t, `${e}-affix-wrapper`))
- };
- }, yBe = (t) => {
- const {
- componentCls: e,
- colorError: n,
- colorSuccess: r,
- borderRadiusLG: i,
- borderRadiusSM: a
- } = t;
- return {
- [`${e}-group`]: k(k(k({}, Gn(t)), Yie(t)), {
- "&-rtl": {
- direction: "rtl"
- },
- "&-wrapper": {
- display: "inline-block",
- width: "100%",
- textAlign: "start",
- verticalAlign: "top",
- "&-rtl": {
- direction: "rtl"
- },
- // Size
- "&-lg": {
- [`${e}-group-addon`]: {
- borderRadius: i
- }
- },
- "&-sm": {
- [`${e}-group-addon`]: {
- borderRadius: a
- }
- },
- // Status
- "&-status-error": {
- [`${e}-group-addon`]: {
- color: n,
- borderColor: n
- }
- },
- "&-status-warning": {
- [`${e}-group-addon:last-child`]: {
- color: r,
- borderColor: r
- }
- }
- }
- })
- };
- }, bBe = (t) => {
- const {
- componentCls: e,
- antCls: n
- } = t, r = `${e}-search`;
- return {
- [r]: {
- [`${e}`]: {
- "&:hover, &:focus": {
- borderColor: t.colorPrimaryHover,
- [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
- borderInlineStartColor: t.colorPrimaryHover
- }
- }
- },
- [`${e}-affix-wrapper`]: {
- borderRadius: 0
- },
- // fix slight height diff in Firefox:
- // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
- [`${e}-lg`]: {
- lineHeight: t.lineHeightLG - 2e-4
- },
- [`> ${e}-group`]: {
- [`> ${e}-group-addon:last-child`]: {
- insetInlineStart: -1,
- padding: 0,
- border: 0,
- [`${r}-button`]: {
- paddingTop: 0,
- paddingBottom: 0,
- borderStartStartRadius: 0,
- borderStartEndRadius: t.borderRadius,
- borderEndEndRadius: t.borderRadius,
- borderEndStartRadius: 0
- },
- [`${r}-button:not(${n}-btn-primary)`]: {
- color: t.colorTextDescription,
- "&:hover": {
- color: t.colorPrimaryHover
- },
- "&:active": {
- color: t.colorPrimaryActive
- },
- [`&${n}-btn-loading::before`]: {
- insetInlineStart: 0,
- insetInlineEnd: 0,
- insetBlockStart: 0,
- insetBlockEnd: 0
- }
- }
- }
- },
- [`${r}-button`]: {
- height: t.controlHeight,
- "&:hover, &:focus": {
- zIndex: 1
- }
- },
- [`&-large ${r}-button`]: {
- height: t.controlHeightLG
- },
- [`&-small ${r}-button`]: {
- height: t.controlHeightSM
- },
- "&-rtl": {
- direction: "rtl"
- },
- // ===================== Compact Item Customized Styles =====================
- [`&${e}-compact-item`]: {
- [`&:not(${e}-compact-last-item)`]: {
- [`${e}-group-addon`]: {
- [`${e}-search-button`]: {
- marginInlineEnd: -t.lineWidth,
- borderRadius: 0
- }
- }
- },
- [`&:not(${e}-compact-first-item)`]: {
- [`${e},${e}-affix-wrapper`]: {
- borderRadius: 0
- }
- },
- [`> ${e}-group-addon ${e}-search-button,
- > ${e},
- ${e}-affix-wrapper`]: {
- "&:hover,&:focus,&:active": {
- zIndex: 2
- }
- },
- [`> ${e}-affix-wrapper-focused`]: {
- zIndex: 2
- }
- }
- }
- };
- };
- function qie(t) {
- return bn(t, {
- inputAffixPadding: t.paddingXXS,
- inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
- inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
- inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
- inputPaddingHorizontal: t.paddingSM - t.lineWidth,
- inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
- inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
- inputBorderHoverColor: t.colorPrimaryHover,
- inputBorderActiveColor: t.colorPrimaryHover
- });
- }
- const _Be = (t) => {
- const {
- componentCls: e,
- inputPaddingHorizontal: n,
- paddingLG: r
- } = t, i = `${e}-textarea`;
- return {
- [i]: {
- position: "relative",
- [`${i}-suffix`]: {
- position: "absolute",
- top: 0,
- insetInlineEnd: n,
- bottom: 0,
- zIndex: 1,
- display: "inline-flex",
- alignItems: "center",
- margin: "auto"
- },
- "&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating": {
- [`&${i}-has-feedback`]: {
- [`${e}`]: {
- paddingInlineEnd: r
- }
- }
- },
- "&-show-count": {
- // https://github.com/ant-design/ant-design/issues/33049
- [`> ${e}`]: {
- height: "100%"
- },
- "&::after": {
- color: t.colorTextDescription,
- whiteSpace: "nowrap",
- content: "attr(data-count)",
- pointerEvents: "none",
- float: "right"
- }
- },
- "&-rtl": {
- "&::after": {
- float: "left"
- }
- }
- }
- };
- }, C8 = pr("Input", (t) => {
- const e = qie(t);
- return [
- vBe(e),
- _Be(e),
- mBe(e),
- yBe(e),
- bBe(e),
- // =====================================================
- // == Space Compact ==
- // =====================================================
- z2(e)
- ];
- });
- function OBe(t) {
- const e = ve(), n = ve(!1);
- function r() {
- for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
- a[o] = arguments[o];
- n.value || (en.cancel(e.value), e.value = en(() => {
- t(...a);
- }));
- }
- return Qt(() => {
- n.value = !0, en.cancel(e.value);
- }), r;
- }
- function SBe(t) {
- const e = ve([]), n = ve(typeof t == "function" ? t() : t), r = OBe(() => {
- let a = n.value;
- e.value.forEach((o) => {
- a = o(a);
- }), e.value = [], n.value = a;
- });
- function i(a) {
- e.value.push(a), r();
- }
- return [n, i];
- }
- const xBe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "TabNode",
- props: {
- id: {
- type: String
- },
- prefixCls: {
- type: String
- },
- tab: {
- type: Object
- },
- active: {
- type: Boolean
- },
- closable: {
- type: Boolean
- },
- editable: {
- type: Object
- },
- onClick: {
- type: Function
- },
- onResize: {
- type: Function
- },
- renderWrapper: {
- type: Function
- },
- removeAriaLabel: {
- type: String
- },
- // onRemove: { type: Function as PropType<() => void> },
- onFocus: {
- type: Function
- }
- },
- emits: ["click", "resize", "remove", "focus"],
- setup(t, e) {
- let {
- expose: n,
- attrs: r
- } = e;
- const i = ee();
- function a(l) {
- var u;
- !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
- }
- n({
- domRef: i
- });
- function o(l) {
- var u;
- l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
- key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
- event: l
- });
- }
- const s = V(() => {
- var l;
- return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
- });
- return () => {
- var l;
- const {
- prefixCls: u,
- id: c,
- active: f,
- tab: {
- key: d,
- tab: h,
- disabled: p,
- closeIcon: v
- },
- renderWrapper: g,
- removeAriaLabel: m,
- editable: y,
- onFocus: _
- } = t, O = `${u}-tab`, S = D("div", {
- key: d,
- ref: i,
- class: Re(O, {
- [`${O}-with-remove`]: s.value,
- [`${O}-active`]: f,
- [`${O}-disabled`]: p
- }),
- style: r.style,
- onClick: a
- }, [D("div", {
- role: "tab",
- "aria-selected": f,
- id: c && `${c}-tab-${d}`,
- class: `${O}-btn`,
- "aria-controls": c && `${c}-panel-${d}`,
- "aria-disabled": p,
- tabindex: p ? null : 0,
- onClick: (x) => {
- x.stopPropagation(), a(x);
- },
- onKeydown: (x) => {
- [Me.SPACE, Me.ENTER].includes(x.which) && (x.preventDefault(), a(x));
- },
- onFocus: _
- }, [typeof h == "function" ? h() : h]), s.value && D("button", {
- type: "button",
- "aria-label": m || "remove",
- tabindex: 0,
- class: `${O}-remove`,
- onClick: (x) => {
- x.stopPropagation(), o(x);
- }
- }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
- return g ? g(S) : S;
- };
- }
- }), NQ = {
- width: 0,
- height: 0,
- left: 0,
- top: 0
- };
- function wBe(t, e) {
- const n = ee(/* @__PURE__ */ new Map());
- return Vt(() => {
- var r, i;
- const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || NQ, l = s.left + s.width;
- for (let u = 0; u < o.length; u += 1) {
- const {
- key: c
- } = o[u];
- let f = e.value.get(c);
- f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || NQ);
- const d = a.get(c) || k({}, f);
- d.right = l - d.left - d.width, a.set(c, d);
- }
- n.value = new Map(a);
- }), n;
- }
- const Kie = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AddButton",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- editable: {
- type: Object
- },
- locale: {
- type: Object,
- default: void 0
- }
- },
- setup(t, e) {
- let {
- expose: n,
- attrs: r
- } = e;
- const i = ee();
- return n({
- domRef: i
- }), () => {
- const {
- prefixCls: a,
- editable: o,
- locale: s
- } = t;
- return !o || o.showAdd === !1 ? null : D("button", {
- ref: i,
- type: "button",
- class: `${a}-nav-add`,
- style: r.style,
- "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
- onClick: (l) => {
- o.onEdit("add", {
- event: l
- });
- }
- }, [o.addIcon ? o.addIcon() : "+"]);
- };
- }
- }), CBe = {
- prefixCls: {
- type: String
- },
- id: {
- type: String
- },
- tabs: {
- type: Object
- },
- rtl: {
- type: Boolean
- },
- tabBarGutter: {
- type: Number
- },
- activeKey: {
- type: [String, Number]
- },
- mobile: {
- type: Boolean
- },
- moreIcon: oe.any,
- moreTransitionName: {
- type: String
- },
- editable: {
- type: Object
- },
- locale: {
- type: Object,
- default: void 0
- },
- removeAriaLabel: String,
- onTabClick: {
- type: Function
- },
- popupClassName: String,
- getPopupContainer: Ct()
- }, TBe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "OperationNode",
- inheritAttrs: !1,
- props: CBe,
- emits: ["tabClick"],
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const [i, a] = tr(!1), [o, s] = tr(null), l = (h) => {
- const p = t.tabs.filter((m) => !m.disabled);
- let v = p.findIndex((m) => m.key === o.value) || 0;
- const g = p.length;
- for (let m = 0; m < g; m += 1) {
- v = (v + h + g) % g;
- const y = p[v];
- if (!y.disabled) {
- s(y.key);
- return;
- }
- }
- }, u = (h) => {
- const {
- which: p
- } = h;
- if (!i.value) {
- [Me.DOWN, Me.SPACE, Me.ENTER].includes(p) && (a(!0), h.preventDefault());
- return;
- }
- switch (p) {
- case Me.UP:
- l(-1), h.preventDefault();
- break;
- case Me.DOWN:
- l(1), h.preventDefault();
- break;
- case Me.ESC:
- a(!1);
- break;
- case Me.SPACE:
- case Me.ENTER:
- o.value !== null && t.onTabClick(o.value, h);
- break;
- }
- }, c = V(() => `${t.id}-more-popup`), f = V(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
- h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
- key: p,
- event: h
- });
- };
- return _t(() => {
- me(o, () => {
- const h = document.getElementById(f.value);
- h && h.scrollIntoView && h.scrollIntoView(!1);
- }, {
- flush: "post",
- immediate: !0
- });
- }), me(i, () => {
- i.value || s(null);
- }), I6e({}), () => {
- var h;
- const {
- prefixCls: p,
- id: v,
- tabs: g,
- locale: m,
- mobile: y,
- moreIcon: _ = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || D(W2, null, null),
- moreTransitionName: O,
- editable: S,
- tabBarGutter: x,
- rtl: C,
- onTabClick: P,
- popupClassName: $
- } = t;
- if (!g.length) return null;
- const T = `${p}-dropdown`, E = m == null ? void 0 : m.dropdownAriaLabel, M = {
- [C ? "marginRight" : "marginLeft"]: x
- };
- g.length || (M.visibility = "hidden", M.order = 1);
- const R = Re({
- [`${T}-rtl`]: C,
- [`${$}`]: !0
- }), N = y ? null : D(K3e, {
- prefixCls: T,
- trigger: ["hover"],
- visible: i.value,
- transitionName: O,
- onVisibleChange: a,
- overlayClassName: R,
- mouseEnterDelay: 0.1,
- mouseLeaveDelay: 0.1,
- getPopupContainer: t.getPopupContainer
- }, {
- overlay: () => D(ef, {
- onClick: (I) => {
- let {
- key: B,
- domEvent: Q
- } = I;
- P(B, Q), a(!1);
- },
- id: c.value,
- tabindex: -1,
- role: "listbox",
- "aria-activedescendant": f.value,
- selectedKeys: [o.value],
- "aria-label": E !== void 0 ? E : "expanded dropdown"
- }, {
- default: () => [g.map((I) => {
- var B, Q;
- const W = S && I.closable !== !1 && !I.disabled;
- return D(Lg, {
- key: I.key,
- id: `${c.value}-${I.key}`,
- role: "option",
- "aria-controls": v && `${v}-panel-${I.key}`,
- disabled: I.disabled
- }, {
- default: () => [D("span", null, [typeof I.tab == "function" ? I.tab() : I.tab]), W && D("button", {
- type: "button",
- "aria-label": t.removeAriaLabel || "remove",
- tabindex: 0,
- class: `${T}-menu-item-remove`,
- onClick: (H) => {
- H.stopPropagation(), d(H, I.key);
- }
- }, [((B = I.closeIcon) === null || B === void 0 ? void 0 : B.call(I)) || ((Q = S.removeIcon) === null || Q === void 0 ? void 0 : Q.call(S)) || "×"])]
- });
- })]
- }),
- default: () => D("button", {
- type: "button",
- class: `${p}-nav-more`,
- style: M,
- tabindex: -1,
- "aria-hidden": "true",
- "aria-haspopup": "listbox",
- "aria-controls": c.value,
- id: `${v}-more`,
- "aria-expanded": i.value,
- onKeydown: u
- }, [_])
- });
- return D("div", {
- class: Re(`${p}-nav-operations`, n.class),
- style: n.style
- }, [N, D(Kie, {
- prefixCls: p,
- locale: m,
- editable: S
- }, null)]);
- };
- }
- }), Jie = Symbol("tabsContextKey"), eae = (t) => {
- Et(Jie, t);
- }, tae = () => et(Jie, {
- tabs: ee([]),
- prefixCls: ee()
- });
- ae({
- compatConfig: {
- MODE: 3
- },
- name: "TabsContextProvider",
- inheritAttrs: !1,
- props: {
- tabs: {
- type: Object,
- default: void 0
- },
- prefixCls: {
- type: String,
- default: void 0
- }
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- return eae(k_(t)), () => {
- var r;
- return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
- };
- }
- });
- const PBe = 0.1, BQ = 0.01, Kx = 20, zQ = Math.pow(0.995, Kx);
- function $Be(t, e) {
- const [n, r] = tr(), [i, a] = tr(0), [o, s] = tr(0), [l, u] = tr(), c = ee();
- function f(S) {
- const {
- screenX: x,
- screenY: C
- } = S.touches[0];
- r({
- x,
- y: C
- }), clearInterval(c.value);
- }
- function d(S) {
- if (!n.value) return;
- S.preventDefault();
- const {
- screenX: x,
- screenY: C
- } = S.touches[0], P = x - n.value.x, $ = C - n.value.y;
- e(P, $), r({
- x,
- y: C
- });
- const T = Date.now();
- s(T - i.value), a(T), u({
- x: P,
- y: $
- });
- }
- function h() {
- if (!n.value) return;
- const S = l.value;
- if (r(null), u(null), S) {
- const x = S.x / o.value, C = S.y / o.value, P = Math.abs(x), $ = Math.abs(C);
- if (Math.max(P, $) < PBe) return;
- let T = x, E = C;
- c.value = setInterval(() => {
- if (Math.abs(T) < BQ && Math.abs(E) < BQ) {
- clearInterval(c.value);
- return;
- }
- T *= zQ, E *= zQ, e(T * Kx, E * Kx);
- }, Kx);
- }
- }
- const p = ee();
- function v(S) {
- const {
- deltaX: x,
- deltaY: C
- } = S;
- let P = 0;
- const $ = Math.abs(x), T = Math.abs(C);
- $ === T ? P = p.value === "x" ? x : C : $ > T ? (P = x, p.value = "x") : (P = C, p.value = "y"), e(-P, -P) && S.preventDefault();
- }
- const g = ee({
- onTouchStart: f,
- onTouchMove: d,
- onTouchEnd: h,
- onWheel: v
- });
- function m(S) {
- g.value.onTouchStart(S);
- }
- function y(S) {
- g.value.onTouchMove(S);
- }
- function _(S) {
- g.value.onTouchEnd(S);
- }
- function O(S) {
- g.value.onWheel(S);
- }
- _t(() => {
- var S, x;
- document.addEventListener("touchmove", y, {
- passive: !1
- }), document.addEventListener("touchend", _, {
- passive: !1
- }), (S = t.value) === null || S === void 0 || S.addEventListener("touchstart", m, {
- passive: !1
- }), (x = t.value) === null || x === void 0 || x.addEventListener("wheel", O, {
- passive: !1
- });
- }), Qt(() => {
- document.removeEventListener("touchmove", y), document.removeEventListener("touchend", _);
- });
- }
- function VQ(t, e) {
- const n = ee(t);
- function r(i) {
- const a = typeof i == "function" ? i(n.value) : i;
- a !== n.value && e(a, n.value), n.value = a;
- }
- return [n, r];
- }
- const ABe = () => {
- const t = ee(/* @__PURE__ */ new Map()), e = (n) => (r) => {
- t.value.set(n, r);
- };
- return Mee(() => {
- t.value = /* @__PURE__ */ new Map();
- }), [e, t];
- }, FQ = {
- width: 0,
- height: 0,
- left: 0,
- top: 0,
- right: 0
- }, EBe = () => ({
- id: {
- type: String
- },
- tabPosition: {
- type: String
- },
- activeKey: {
- type: [String, Number]
- },
- rtl: {
- type: Boolean
- },
- animated: sn(),
- editable: sn(),
- moreIcon: oe.any,
- moreTransitionName: {
- type: String
- },
- mobile: {
- type: Boolean
- },
- tabBarGutter: {
- type: Number
- },
- renderTabBar: {
- type: Function
- },
- locale: sn(),
- popupClassName: String,
- getPopupContainer: Ct(),
- onTabClick: {
- type: Function
- },
- onTabScroll: {
- type: Function
- }
- }), MBe = (t, e) => {
- const {
- offsetWidth: n,
- offsetHeight: r,
- offsetTop: i,
- offsetLeft: a
- } = t, {
- width: o,
- height: s,
- x: l,
- y: u
- } = t.getBoundingClientRect();
- return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
- }, WQ = ae({
- compatConfig: {
- MODE: 3
- },
- name: "TabNavList",
- inheritAttrs: !1,
- props: EBe(),
- slots: Object,
- emits: ["tabClick", "tabScroll"],
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const {
- tabs: i,
- prefixCls: a
- } = tae(), o = ve(), s = ve(), l = ve(), u = ve(), [c, f] = ABe(), d = V(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = VQ(0, (Le, Pe) => {
- d.value && t.onTabScroll && t.onTabScroll({
- direction: Le > Pe ? "left" : "right"
- });
- }), [v, g] = VQ(0, (Le, Pe) => {
- !d.value && t.onTabScroll && t.onTabScroll({
- direction: Le > Pe ? "top" : "bottom"
- });
- }), [m, y] = tr(0), [_, O] = tr(0), [S, x] = tr(null), [C, P] = tr(null), [$, T] = tr(0), [E, M] = tr(0), [R, N] = SBe(/* @__PURE__ */ new Map()), I = wBe(i, R), B = V(() => `${a.value}-nav-operations-hidden`), Q = ve(0), W = ve(0);
- Vt(() => {
- d.value ? t.rtl ? (Q.value = 0, W.value = Math.max(0, m.value - S.value)) : (Q.value = Math.min(0, S.value - m.value), W.value = 0) : (Q.value = Math.min(0, C.value - _.value), W.value = 0);
- });
- const H = (Le) => Le < Q.value ? Q.value : Le > W.value ? W.value : Le, U = ve(), [j, Y] = tr(), ne = () => {
- Y(Date.now());
- }, fe = () => {
- clearTimeout(U.value);
- }, ue = (Le, Pe) => {
- Le((Fe) => H(Fe + Pe));
- };
- $Be(o, (Le, Pe) => {
- if (d.value) {
- if (S.value >= m.value)
- return !1;
- ue(p, Le);
- } else {
- if (C.value >= _.value)
- return !1;
- ue(g, Pe);
- }
- return fe(), ne(), !0;
- }), me(j, () => {
- fe(), j.value && (U.value = setTimeout(() => {
- Y(0);
- }, 100));
- });
- const ye = function() {
- let Le = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
- const Pe = I.value.get(Le) || {
- width: 0,
- height: 0,
- left: 0,
- right: 0,
- top: 0
- };
- if (d.value) {
- let Fe = h.value;
- t.rtl ? Pe.right < h.value ? Fe = Pe.right : Pe.right + Pe.width > h.value + S.value && (Fe = Pe.right + Pe.width - S.value) : Pe.left < -h.value ? Fe = -Pe.left : Pe.left + Pe.width > -h.value + S.value && (Fe = -(Pe.left + Pe.width - S.value)), g(0), p(H(Fe));
- } else {
- let Fe = v.value;
- Pe.top < -v.value ? Fe = -Pe.top : Pe.top + Pe.height > -v.value + C.value && (Fe = -(Pe.top + Pe.height - C.value)), p(0), g(H(Fe));
- }
- }, se = ve(0), he = ve(0);
- Vt(() => {
- let Le, Pe, Fe, Ye, xt, It;
- const an = I.value;
- ["top", "bottom"].includes(t.tabPosition) ? (Le = "width", Ye = S.value, xt = m.value, It = $.value, Pe = t.rtl ? "right" : "left", Fe = Math.abs(h.value)) : (Le = "height", Ye = C.value, xt = m.value, It = E.value, Pe = "top", Fe = -v.value);
- let Ae = Ye;
- xt + It > Ye && xt < Ye && (Ae = Ye - It);
- const gt = i.value;
- if (!gt.length)
- return [se.value, he.value] = [0, 0];
- const Xt = gt.length;
- let Bn = Xt;
- for (let Dr = 0; Dr < Xt; Dr += 1) {
- const ji = an.get(gt[Dr].key) || FQ;
- if (ji[Pe] + ji[Le] > Fe + Ae) {
- Bn = Dr - 1;
- break;
- }
- }
- let Dn = 0;
- for (let Dr = Xt - 1; Dr >= 0; Dr -= 1)
- if ((an.get(gt[Dr].key) || FQ)[Pe] < Fe) {
- Dn = Dr + 1;
- break;
- }
- return [se.value, he.value] = [Dn, Bn];
- });
- const re = () => {
- N(() => {
- var Le;
- const Pe = /* @__PURE__ */ new Map(), Fe = (Le = s.value) === null || Le === void 0 ? void 0 : Le.getBoundingClientRect();
- return i.value.forEach((Ye) => {
- let {
- key: xt
- } = Ye;
- const It = f.value.get(xt), an = (It == null ? void 0 : It.$el) || It;
- if (an) {
- const [Ae, gt, Xt, Bn] = MBe(an, Fe);
- Pe.set(xt, {
- width: Ae,
- height: gt,
- left: Xt,
- top: Bn
- });
- }
- }), Pe;
- });
- };
- me(() => i.value.map((Le) => Le.key).join("%%"), () => {
- re();
- }, {
- flush: "post"
- });
- const q = () => {
- var Le, Pe, Fe, Ye, xt;
- const It = ((Le = o.value) === null || Le === void 0 ? void 0 : Le.offsetWidth) || 0, an = ((Pe = o.value) === null || Pe === void 0 ? void 0 : Pe.offsetHeight) || 0, Ae = ((Fe = u.value) === null || Fe === void 0 ? void 0 : Fe.$el) || {}, gt = Ae.offsetWidth || 0, Xt = Ae.offsetHeight || 0;
- x(It), P(an), T(gt), M(Xt);
- const Bn = (((Ye = s.value) === null || Ye === void 0 ? void 0 : Ye.offsetWidth) || 0) - gt, Dn = (((xt = s.value) === null || xt === void 0 ? void 0 : xt.offsetHeight) || 0) - Xt;
- y(Bn), O(Dn), re();
- }, K = V(() => [...i.value.slice(0, se.value), ...i.value.slice(he.value + 1)]), [de, xe] = tr(), we = V(() => I.value.get(t.activeKey)), He = ve(), je = () => {
- en.cancel(He.value);
- };
- me([we, d, () => t.rtl], () => {
- const Le = {};
- we.value && (d.value ? (t.rtl ? Le.right = m0(we.value.right) : Le.left = m0(we.value.left), Le.width = m0(we.value.width)) : (Le.top = m0(we.value.top), Le.height = m0(we.value.height))), je(), He.value = en(() => {
- xe(Le);
- });
- }), me([() => t.activeKey, we, I, d], () => {
- ye();
- }, {
- flush: "post"
- }), me([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
- q();
- }, {
- flush: "post"
- });
- const Be = (Le) => {
- let {
- position: Pe,
- prefixCls: Fe,
- extra: Ye
- } = Le;
- if (!Ye) return null;
- const xt = Ye == null ? void 0 : Ye({
- position: Pe
- });
- return xt ? D("div", {
- class: `${Fe}-extra-content`
- }, [xt]) : null;
- };
- return Qt(() => {
- fe(), je();
- }), () => {
- const {
- id: Le,
- animated: Pe,
- activeKey: Fe,
- rtl: Ye,
- editable: xt,
- locale: It,
- tabPosition: an,
- tabBarGutter: Ae,
- onTabClick: gt
- } = t, {
- class: Xt,
- style: Bn
- } = n, Dn = a.value, Dr = !!K.value.length, ji = `${Dn}-nav-wrap`;
- let tu, nu, oc, Qf;
- d.value ? Ye ? (nu = h.value > 0, tu = h.value + S.value < m.value) : (tu = h.value < 0, nu = -h.value + S.value < m.value) : (oc = v.value < 0, Qf = -v.value + C.value < _.value);
- const rl = {};
- an === "top" || an === "bottom" ? rl[Ye ? "marginRight" : "marginLeft"] = typeof Ae == "number" ? `${Ae}px` : Ae : rl.marginTop = typeof Ae == "number" ? `${Ae}px` : Ae;
- const Hf = i.value.map((Gf, Gm) => {
- const {
- key: sc
- } = Gf;
- return D(xBe, {
- id: Le,
- prefixCls: Dn,
- key: sc,
- tab: Gf,
- style: Gm === 0 ? void 0 : rl,
- closable: Gf.closable,
- editable: xt,
- active: sc === Fe,
- removeAriaLabel: It == null ? void 0 : It.removeAriaLabel,
- ref: c(sc),
- onClick: (jm) => {
- gt(sc, jm);
- },
- onFocus: () => {
- ye(sc), ne(), o.value && (Ye || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
- }
- }, r);
- });
- return D("div", {
- role: "tablist",
- class: Re(`${Dn}-nav`, Xt),
- style: Bn,
- onKeydown: () => {
- ne();
- }
- }, [D(Be, {
- position: "left",
- prefixCls: Dn,
- extra: r.leftExtra
- }, null), D($g, {
- onResize: q
- }, {
- default: () => [D("div", {
- class: Re(ji, {
- [`${ji}-ping-left`]: tu,
- [`${ji}-ping-right`]: nu,
- [`${ji}-ping-top`]: oc,
- [`${ji}-ping-bottom`]: Qf
- }),
- ref: o
- }, [D($g, {
- onResize: q
- }, {
- default: () => [D("div", {
- ref: s,
- class: `${Dn}-nav-list`,
- style: {
- transform: `translate(${h.value}px, ${v.value}px)`,
- transition: j.value ? "none" : void 0
- }
- }, [Hf, D(Kie, {
- ref: u,
- prefixCls: Dn,
- locale: It,
- editable: xt,
- style: k(k({}, Hf.length === 0 ? void 0 : rl), {
- visibility: Dr ? "hidden" : null
- })
- }, null), D("div", {
- class: Re(`${Dn}-ink-bar`, {
- [`${Dn}-ink-bar-animated`]: Pe.inkBar
- }),
- style: de.value
- }, null)])]
- })])]
- }), D(TBe, te(te({}, t), {}, {
- removeAriaLabel: It == null ? void 0 : It.removeAriaLabel,
- ref: l,
- prefixCls: Dn,
- tabs: K.value,
- class: !Dr && B.value
- }), mg(r, ["moreIcon"])), D(Be, {
- position: "right",
- prefixCls: Dn,
- extra: r.rightExtra
- }, null), D(Be, {
- position: "right",
- prefixCls: Dn,
- extra: r.tabBarExtraContent
- }, null)]);
- };
- }
- }), IBe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "TabPanelList",
- inheritAttrs: !1,
- props: {
- activeKey: {
- type: [String, Number]
- },
- id: {
- type: String
- },
- rtl: {
- type: Boolean
- },
- animated: {
- type: Object,
- default: void 0
- },
- tabPosition: {
- type: String
- },
- destroyInactiveTabPane: {
- type: Boolean
- }
- },
- setup(t) {
- const {
- tabs: e,
- prefixCls: n
- } = tae();
- return () => {
- const {
- id: r,
- activeKey: i,
- animated: a,
- tabPosition: o,
- rtl: s,
- destroyInactiveTabPane: l
- } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
- return D("div", {
- class: `${c}-content-holder`
- }, [D("div", {
- class: [`${c}-content`, `${c}-content-${o}`, {
- [`${c}-content-animated`]: u
- }],
- style: f && u ? {
- [s ? "marginRight" : "marginLeft"]: `-${f}00%`
- } : null
- }, [e.value.map((d) => xr(d.node, {
- key: d.key,
- prefixCls: c,
- tabKey: d.key,
- id: r,
- animated: u,
- active: d.key === i,
- destroyInactiveTabPane: l
- }))])]);
- };
- }
- });
- var DBe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
- function QQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- RBe(t, i, n[i]);
- });
- }
- return t;
- }
- function RBe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var j2 = function(e, n) {
- var r = QQ({}, e, n.attrs);
- return D(Rt, QQ({}, r, {
- icon: DBe
- }), null);
- };
- j2.displayName = "PlusOutlined";
- j2.inheritAttrs = !1;
- const kBe = (t) => {
- const {
- componentCls: e,
- motionDurationSlow: n
- } = t;
- return [
- {
- [e]: {
- [`${e}-switch`]: {
- "&-appear, &-enter": {
- transition: "none",
- "&-start": {
- opacity: 0
- },
- "&-active": {
- opacity: 1,
- transition: `opacity ${n}`
- }
- },
- "&-leave": {
- position: "absolute",
- transition: "none",
- inset: 0,
- "&-start": {
- opacity: 1
- },
- "&-active": {
- opacity: 0,
- transition: `opacity ${n}`
- }
- }
- }
- }
- },
- // Follow code may reuse in other components
- [kg(t, "slide-up"), kg(t, "slide-down")]
- ];
- }, LBe = (t) => {
- const {
- componentCls: e,
- tabsCardHorizontalPadding: n,
- tabsCardHeadBackground: r,
- tabsCardGutter: i,
- colorSplit: a
- } = t;
- return {
- [`${e}-card`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab`]: {
- margin: 0,
- padding: n,
- background: r,
- border: `${t.lineWidth}px ${t.lineType} ${a}`,
- transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
- },
- [`${e}-tab-active`]: {
- color: t.colorPrimary,
- background: t.colorBgContainer
- },
- [`${e}-ink-bar`]: {
- visibility: "hidden"
- }
- },
- // ========================== Top & Bottom ==========================
- [`&${e}-top, &${e}-bottom`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab + ${e}-tab`]: {
- marginLeft: {
- _skip_check_: !0,
- value: `${i}px`
- }
- }
- }
- },
- [`&${e}-top`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab`]: {
- borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
- },
- [`${e}-tab-active`]: {
- borderBottomColor: t.colorBgContainer
- }
- }
- },
- [`&${e}-bottom`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab`]: {
- borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
- },
- [`${e}-tab-active`]: {
- borderTopColor: t.colorBgContainer
- }
- }
- },
- // ========================== Left & Right ==========================
- [`&${e}-left, &${e}-right`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab + ${e}-tab`]: {
- marginTop: `${i}px`
- }
- }
- },
- [`&${e}-left`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab`]: {
- borderRadius: {
- _skip_check_: !0,
- value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
- }
- },
- [`${e}-tab-active`]: {
- borderRightColor: {
- _skip_check_: !0,
- value: t.colorBgContainer
- }
- }
- }
- },
- [`&${e}-right`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab`]: {
- borderRadius: {
- _skip_check_: !0,
- value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
- }
- },
- [`${e}-tab-active`]: {
- borderLeftColor: {
- _skip_check_: !0,
- value: t.colorBgContainer
- }
- }
- }
- }
- }
- };
- }, NBe = (t) => {
- const {
- componentCls: e,
- tabsHoverColor: n,
- dropdownEdgeChildVerticalPadding: r
- } = t;
- return {
- [`${e}-dropdown`]: k(k({}, Gn(t)), {
- position: "absolute",
- top: -9999,
- left: {
- _skip_check_: !0,
- value: -9999
- },
- zIndex: t.zIndexPopup,
- display: "block",
- "&-hidden": {
- display: "none"
- },
- [`${e}-dropdown-menu`]: {
- maxHeight: t.tabsDropdownHeight,
- margin: 0,
- padding: `${r}px 0`,
- overflowX: "hidden",
- overflowY: "auto",
- textAlign: {
- _skip_check_: !0,
- value: "left"
- },
- listStyleType: "none",
- backgroundColor: t.colorBgContainer,
- backgroundClip: "padding-box",
- borderRadius: t.borderRadiusLG,
- outline: "none",
- boxShadow: t.boxShadowSecondary,
- "&-item": k(k({}, Mg), {
- display: "flex",
- alignItems: "center",
- minWidth: t.tabsDropdownWidth,
- margin: 0,
- padding: `${t.paddingXXS}px ${t.paddingSM}px`,
- color: t.colorText,
- fontWeight: "normal",
- fontSize: t.fontSize,
- lineHeight: t.lineHeight,
- cursor: "pointer",
- transition: `all ${t.motionDurationSlow}`,
- "> span": {
- flex: 1,
- whiteSpace: "nowrap"
- },
- "&-remove": {
- flex: "none",
- marginLeft: {
- _skip_check_: !0,
- value: t.marginSM
- },
- color: t.colorTextDescription,
- fontSize: t.fontSizeSM,
- background: "transparent",
- border: 0,
- cursor: "pointer",
- "&:hover": {
- color: n
- }
- },
- "&:hover": {
- background: t.controlItemBgHover
- },
- "&-disabled": {
- "&, &:hover": {
- color: t.colorTextDisabled,
- background: "transparent",
- cursor: "not-allowed"
- }
- }
- })
- }
- })
- };
- }, BBe = (t) => {
- const {
- componentCls: e,
- margin: n,
- colorSplit: r
- } = t;
- return {
- // ========================== Top & Bottom ==========================
- [`${e}-top, ${e}-bottom`]: {
- flexDirection: "column",
- [`> ${e}-nav, > div > ${e}-nav`]: {
- margin: `0 0 ${n}px 0`,
- "&::before": {
- position: "absolute",
- right: {
- _skip_check_: !0,
- value: 0
- },
- left: {
- _skip_check_: !0,
- value: 0
- },
- borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
- content: "''"
- },
- [`${e}-ink-bar`]: {
- height: t.lineWidthBold,
- "&-animated": {
- transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
- right ${t.motionDurationSlow}`
- }
- },
- [`${e}-nav-wrap`]: {
- "&::before, &::after": {
- top: 0,
- bottom: 0,
- width: t.controlHeight
- },
- "&::before": {
- left: {
- _skip_check_: !0,
- value: 0
- },
- boxShadow: t.boxShadowTabsOverflowLeft
- },
- "&::after": {
- right: {
- _skip_check_: !0,
- value: 0
- },
- boxShadow: t.boxShadowTabsOverflowRight
- },
- [`&${e}-nav-wrap-ping-left::before`]: {
- opacity: 1
- },
- [`&${e}-nav-wrap-ping-right::after`]: {
- opacity: 1
- }
- }
- }
- },
- [`${e}-top`]: {
- [`> ${e}-nav,
- > div > ${e}-nav`]: {
- "&::before": {
- bottom: 0
- },
- [`${e}-ink-bar`]: {
- bottom: 0
- }
- }
- },
- [`${e}-bottom`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- order: 1,
- marginTop: `${n}px`,
- marginBottom: 0,
- "&::before": {
- top: 0
- },
- [`${e}-ink-bar`]: {
- top: 0
- }
- },
- [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
- order: 0
- }
- },
- // ========================== Left & Right ==========================
- [`${e}-left, ${e}-right`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- flexDirection: "column",
- minWidth: t.controlHeight * 1.25,
- // >>>>>>>>>>> Tab
- [`${e}-tab`]: {
- padding: `${t.paddingXS}px ${t.paddingLG}px`,
- textAlign: "center"
- },
- [`${e}-tab + ${e}-tab`]: {
- margin: `${t.margin}px 0 0 0`
- },
- // >>>>>>>>>>> Nav
- [`${e}-nav-wrap`]: {
- flexDirection: "column",
- "&::before, &::after": {
- right: {
- _skip_check_: !0,
- value: 0
- },
- left: {
- _skip_check_: !0,
- value: 0
- },
- height: t.controlHeight
- },
- "&::before": {
- top: 0,
- boxShadow: t.boxShadowTabsOverflowTop
- },
- "&::after": {
- bottom: 0,
- boxShadow: t.boxShadowTabsOverflowBottom
- },
- [`&${e}-nav-wrap-ping-top::before`]: {
- opacity: 1
- },
- [`&${e}-nav-wrap-ping-bottom::after`]: {
- opacity: 1
- }
- },
- // >>>>>>>>>>> Ink Bar
- [`${e}-ink-bar`]: {
- width: t.lineWidthBold,
- "&-animated": {
- transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
- }
- },
- [`${e}-nav-list, ${e}-nav-operations`]: {
- flex: "1 0 auto",
- flexDirection: "column"
- }
- }
- },
- [`${e}-left`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-ink-bar`]: {
- right: {
- _skip_check_: !0,
- value: 0
- }
- }
- },
- [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
- marginLeft: {
- _skip_check_: !0,
- value: `-${t.lineWidth}px`
- },
- borderLeft: {
- _skip_check_: !0,
- value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
- },
- [`> ${e}-content > ${e}-tabpane`]: {
- paddingLeft: {
- _skip_check_: !0,
- value: t.paddingLG
- }
- }
- }
- },
- [`${e}-right`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- order: 1,
- [`${e}-ink-bar`]: {
- left: {
- _skip_check_: !0,
- value: 0
- }
- }
- },
- [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
- order: 0,
- marginRight: {
- _skip_check_: !0,
- value: -t.lineWidth
- },
- borderRight: {
- _skip_check_: !0,
- value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
- },
- [`> ${e}-content > ${e}-tabpane`]: {
- paddingRight: {
- _skip_check_: !0,
- value: t.paddingLG
- }
- }
- }
- }
- };
- }, zBe = (t) => {
- const {
- componentCls: e,
- padding: n
- } = t;
- return {
- [e]: {
- "&-small": {
- [`> ${e}-nav`]: {
- [`${e}-tab`]: {
- padding: `${t.paddingXS}px 0`,
- fontSize: t.fontSize
- }
- }
- },
- "&-large": {
- [`> ${e}-nav`]: {
- [`${e}-tab`]: {
- padding: `${n}px 0`,
- fontSize: t.fontSizeLG
- }
- }
- }
- },
- [`${e}-card`]: {
- [`&${e}-small`]: {
- [`> ${e}-nav`]: {
- [`${e}-tab`]: {
- padding: `${t.paddingXXS * 1.5}px ${n}px`
- }
- },
- [`&${e}-bottom`]: {
- [`> ${e}-nav ${e}-tab`]: {
- borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
- }
- },
- [`&${e}-top`]: {
- [`> ${e}-nav ${e}-tab`]: {
- borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
- }
- },
- [`&${e}-right`]: {
- [`> ${e}-nav ${e}-tab`]: {
- borderRadius: {
- _skip_check_: !0,
- value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
- }
- }
- },
- [`&${e}-left`]: {
- [`> ${e}-nav ${e}-tab`]: {
- borderRadius: {
- _skip_check_: !0,
- value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
- }
- }
- }
- },
- [`&${e}-large`]: {
- [`> ${e}-nav`]: {
- [`${e}-tab`]: {
- padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
- }
- }
- }
- }
- };
- }, VBe = (t) => {
- const {
- componentCls: e,
- tabsActiveColor: n,
- tabsHoverColor: r,
- iconCls: i,
- tabsHorizontalGutter: a
- } = t, o = `${e}-tab`;
- return {
- [o]: {
- position: "relative",
- display: "inline-flex",
- alignItems: "center",
- padding: `${t.paddingSM}px 0`,
- fontSize: `${t.fontSize}px`,
- background: "transparent",
- border: 0,
- outline: "none",
- cursor: "pointer",
- "&-btn, &-remove": k({
- "&:focus:not(:focus-visible), &:active": {
- color: n
- }
- }, T2(t)),
- "&-btn": {
- outline: "none",
- transition: "all 0.3s"
- },
- "&-remove": {
- flex: "none",
- marginRight: {
- _skip_check_: !0,
- value: -t.marginXXS
- },
- marginLeft: {
- _skip_check_: !0,
- value: t.marginXS
- },
- color: t.colorTextDescription,
- fontSize: t.fontSizeSM,
- background: "transparent",
- border: "none",
- outline: "none",
- cursor: "pointer",
- transition: `all ${t.motionDurationSlow}`,
- "&:hover": {
- color: t.colorTextHeading
- }
- },
- "&:hover": {
- color: r
- },
- [`&${o}-active ${o}-btn`]: {
- color: t.colorPrimary,
- textShadow: t.tabsActiveTextShadow
- },
- [`&${o}-disabled`]: {
- color: t.colorTextDisabled,
- cursor: "not-allowed"
- },
- [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
- "&:focus, &:active": {
- color: t.colorTextDisabled
- }
- },
- [`& ${o}-remove ${i}`]: {
- margin: 0
- },
- [i]: {
- marginRight: {
- _skip_check_: !0,
- value: t.marginSM
- }
- }
- },
- [`${o} + ${o}`]: {
- margin: {
- _skip_check_: !0,
- value: `0 0 0 ${a}px`
- }
- }
- };
- }, FBe = (t) => {
- const {
- componentCls: e,
- tabsHorizontalGutter: n,
- iconCls: r,
- tabsCardGutter: i
- } = t;
- return {
- [`${e}-rtl`]: {
- direction: "rtl",
- [`${e}-nav`]: {
- [`${e}-tab`]: {
- margin: {
- _skip_check_: !0,
- value: `0 0 0 ${n}px`
- },
- [`${e}-tab:last-of-type`]: {
- marginLeft: {
- _skip_check_: !0,
- value: 0
- }
- },
- [r]: {
- marginRight: {
- _skip_check_: !0,
- value: 0
- },
- marginLeft: {
- _skip_check_: !0,
- value: `${t.marginSM}px`
- }
- },
- [`${e}-tab-remove`]: {
- marginRight: {
- _skip_check_: !0,
- value: `${t.marginXS}px`
- },
- marginLeft: {
- _skip_check_: !0,
- value: `-${t.marginXXS}px`
- },
- [r]: {
- margin: 0
- }
- }
- }
- },
- [`&${e}-left`]: {
- [`> ${e}-nav`]: {
- order: 1
- },
- [`> ${e}-content-holder`]: {
- order: 0
- }
- },
- [`&${e}-right`]: {
- [`> ${e}-nav`]: {
- order: 0
- },
- [`> ${e}-content-holder`]: {
- order: 1
- }
- },
- // ====================== Card ======================
- [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-tab + ${e}-tab`]: {
- marginRight: {
- _skip_check_: !0,
- value: `${i}px`
- },
- marginLeft: {
- _skip_check_: !0,
- value: 0
- }
- }
- }
- }
- },
- [`${e}-dropdown-rtl`]: {
- direction: "rtl"
- },
- [`${e}-menu-item`]: {
- [`${e}-dropdown-rtl`]: {
- textAlign: {
- _skip_check_: !0,
- value: "right"
- }
- }
- }
- };
- }, WBe = (t) => {
- const {
- componentCls: e,
- tabsCardHorizontalPadding: n,
- tabsCardHeight: r,
- tabsCardGutter: i,
- tabsHoverColor: a,
- tabsActiveColor: o,
- colorSplit: s
- } = t;
- return {
- [e]: k(k(k(k({}, Gn(t)), {
- display: "flex",
- // ========================== Navigation ==========================
- [`> ${e}-nav, > div > ${e}-nav`]: {
- position: "relative",
- display: "flex",
- flex: "none",
- alignItems: "center",
- [`${e}-nav-wrap`]: {
- position: "relative",
- display: "flex",
- flex: "auto",
- alignSelf: "stretch",
- overflow: "hidden",
- whiteSpace: "nowrap",
- transform: "translate(0)",
- // >>>>> Ping shadow
- "&::before, &::after": {
- position: "absolute",
- zIndex: 1,
- opacity: 0,
- transition: `opacity ${t.motionDurationSlow}`,
- content: "''",
- pointerEvents: "none"
- }
- },
- [`${e}-nav-list`]: {
- position: "relative",
- display: "flex",
- transition: `opacity ${t.motionDurationSlow}`
- },
- // >>>>>>>> Operations
- [`${e}-nav-operations`]: {
- display: "flex",
- alignSelf: "stretch"
- },
- [`${e}-nav-operations-hidden`]: {
- position: "absolute",
- visibility: "hidden",
- pointerEvents: "none"
- },
- [`${e}-nav-more`]: {
- position: "relative",
- padding: n,
- background: "transparent",
- border: 0,
- "&::after": {
- position: "absolute",
- right: {
- _skip_check_: !0,
- value: 0
- },
- bottom: 0,
- left: {
- _skip_check_: !0,
- value: 0
- },
- height: t.controlHeightLG / 8,
- transform: "translateY(100%)",
- content: "''"
- }
- },
- [`${e}-nav-add`]: k({
- minWidth: `${r}px`,
- marginLeft: {
- _skip_check_: !0,
- value: `${i}px`
- },
- padding: `0 ${t.paddingXS}px`,
- background: "transparent",
- border: `${t.lineWidth}px ${t.lineType} ${s}`,
- borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
- outline: "none",
- cursor: "pointer",
- color: t.colorText,
- transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
- "&:hover": {
- color: a
- },
- "&:active, &:focus:not(:focus-visible)": {
- color: o
- }
- }, T2(t))
- },
- [`${e}-extra-content`]: {
- flex: "none"
- },
- // ============================ InkBar ============================
- [`${e}-ink-bar`]: {
- position: "absolute",
- background: t.colorPrimary,
- pointerEvents: "none"
- }
- }), VBe(t)), {
- // =========================== TabPanes ===========================
- [`${e}-content`]: {
- position: "relative",
- display: "flex",
- width: "100%",
- "&-animated": {
- transition: "margin 0.3s"
- }
- },
- [`${e}-content-holder`]: {
- flex: "auto",
- minWidth: 0,
- minHeight: 0
- },
- [`${e}-tabpane`]: {
- outline: "none",
- flex: "none",
- width: "100%"
- }
- }),
- [`${e}-centered`]: {
- [`> ${e}-nav, > div > ${e}-nav`]: {
- [`${e}-nav-wrap`]: {
- [`&:not([class*='${e}-nav-wrap-ping'])`]: {
- justifyContent: "center"
- }
- }
- }
- }
- };
- }, QBe = pr("Tabs", (t) => {
- const e = t.controlHeightLG, n = bn(t, {
- tabsHoverColor: t.colorPrimaryHover,
- tabsActiveColor: t.colorPrimaryActive,
- tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
- tabsCardHeight: e,
- tabsCardGutter: t.marginXXS / 2,
- tabsHorizontalGutter: 32,
- tabsCardHeadBackground: t.colorFillAlter,
- dropdownEdgeChildVerticalPadding: t.paddingXXS,
- tabsActiveTextShadow: "0 0 0.25px currentcolor",
- tabsDropdownHeight: 200,
- tabsDropdownWidth: 120
- });
- return [zBe(n), FBe(n), BBe(n), NBe(n), LBe(n), WBe(n), kBe(n)];
- }, (t) => ({
- zIndexPopup: t.zIndexPopupBase + 50
- }));
- let HQ = 0;
- const nae = () => ({
- prefixCls: {
- type: String
- },
- id: {
- type: String
- },
- popupClassName: String,
- getPopupContainer: Ct(),
- activeKey: {
- type: [String, Number]
- },
- defaultActiveKey: {
- type: [String, Number]
- },
- direction: rr(),
- animated: or([Boolean, Object]),
- renderTabBar: Ct(),
- tabBarGutter: {
- type: Number
- },
- tabBarStyle: sn(),
- tabPosition: rr(),
- destroyInactiveTabPane: Tt(),
- hideAdd: Boolean,
- type: rr(),
- size: rr(),
- centered: Boolean,
- onEdit: Ct(),
- onChange: Ct(),
- onTabClick: Ct(),
- onTabScroll: Ct(),
- "onUpdate:activeKey": Ct(),
- // Accessibility
- locale: sn(),
- onPrevClick: Ct(),
- onNextClick: Ct(),
- tabBarExtraContent: oe.any
- });
- function HBe(t) {
- return t.map((e) => {
- if (po(e)) {
- const n = k({}, e.props || {});
- for (const [d, h] of Object.entries(n))
- delete n[d], n[kN(d)] = h;
- const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
- tab: a = r.tab,
- disabled: o,
- forceRender: s,
- closable: l,
- animated: u,
- active: c,
- destroyInactiveTabPane: f
- } = n;
- return k(k({
- key: i
- }, n), {
- node: e,
- closeIcon: r.closeIcon,
- tab: a,
- disabled: o === "" || o,
- forceRender: s === "" || s,
- closable: l === "" || l,
- animated: u === "" || u,
- active: c === "" || c,
- destroyInactiveTabPane: f === "" || f
- });
- }
- return null;
- }).filter((e) => e);
- }
- const GBe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "InternalTabs",
- inheritAttrs: !1,
- props: k(k({}, li(nae(), {
- tabPosition: "top",
- animated: {
- inkBar: !0,
- tabPane: !1
- }
- })), {
- tabs: Lh()
- }),
- slots: Object,
- // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- lo(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), lo(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), lo(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
- const {
- prefixCls: i,
- direction: a,
- size: o,
- rootPrefixCls: s,
- getPopupContainer: l
- } = hn("tabs", t), [u, c] = QBe(i), f = V(() => a.value === "rtl"), d = V(() => {
- const {
- animated: C,
- tabPosition: P
- } = t;
- return C === !1 || ["left", "right"].includes(P) ? {
- inkBar: !1,
- tabPane: !1
- } : C === !0 ? {
- inkBar: !0,
- tabPane: !0
- } : k({
- inkBar: !0,
- tabPane: !1
- }, typeof C == "object" ? C : {});
- }), [h, p] = tr(!1);
- _t(() => {
- p(i8());
- });
- const [v, g] = Rg(() => {
- var C;
- return (C = t.tabs[0]) === null || C === void 0 ? void 0 : C.key;
- }, {
- value: V(() => t.activeKey),
- defaultValue: t.defaultActiveKey
- }), [m, y] = tr(() => t.tabs.findIndex((C) => C.key === v.value));
- Vt(() => {
- var C;
- let P = t.tabs.findIndex(($) => $.key === v.value);
- P === -1 && (P = Math.max(0, Math.min(m.value, t.tabs.length - 1)), g((C = t.tabs[P]) === null || C === void 0 ? void 0 : C.key)), y(P);
- });
- const [_, O] = Rg(null, {
- value: V(() => t.id)
- }), S = V(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
- _t(() => {
- t.id || (O(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : HQ}`), HQ += 1);
- });
- const x = (C, P) => {
- var $, T;
- ($ = t.onTabClick) === null || $ === void 0 || $.call(t, C, P);
- const E = C !== v.value;
- g(C), E && ((T = t.onChange) === null || T === void 0 || T.call(t, C));
- };
- return eae({
- tabs: V(() => t.tabs),
- prefixCls: i
- }), () => {
- const {
- id: C,
- type: P,
- tabBarGutter: $,
- tabBarStyle: T,
- locale: E,
- destroyInactiveTabPane: M,
- renderTabBar: R = r.renderTabBar,
- onTabScroll: N,
- hideAdd: I,
- centered: B
- } = t, Q = {
- id: _.value,
- activeKey: v.value,
- animated: d.value,
- tabPosition: S.value,
- rtl: f.value,
- mobile: h.value
- };
- let W;
- P === "editable-card" && (W = {
- onEdit: (Y, ne) => {
- let {
- key: fe,
- event: ue
- } = ne;
- var ye;
- (ye = t.onEdit) === null || ye === void 0 || ye.call(t, Y === "add" ? ue : fe, Y);
- },
- removeIcon: () => D(tc, null, null),
- addIcon: r.addIcon ? r.addIcon : () => D(j2, null, null),
- showAdd: I !== !0
- });
- let H;
- const U = k(k({}, Q), {
- moreTransitionName: `${s.value}-slide-up`,
- editable: W,
- locale: E,
- tabBarGutter: $,
- onTabClick: x,
- onTabScroll: N,
- style: T,
- getPopupContainer: l.value,
- popupClassName: Re(t.popupClassName, c.value)
- });
- R ? H = R(k(k({}, U), {
- DefaultTabBar: WQ
- })) : H = D(WQ, U, mg(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
- const j = i.value;
- return u(D("div", te(te({}, n), {}, {
- id: C,
- class: Re(j, `${j}-${S.value}`, {
- [c.value]: !0,
- [`${j}-${o.value}`]: o.value,
- [`${j}-card`]: ["card", "editable-card"].includes(P),
- [`${j}-editable-card`]: P === "editable-card",
- [`${j}-centered`]: B,
- [`${j}-mobile`]: h.value,
- [`${j}-editable`]: P === "editable-card",
- [`${j}-rtl`]: f.value
- }, n.class)
- }), [H, D(IBe, te(te({
- destroyInactiveTabPane: M
- }, Q), {}, {
- animated: d.value
- }), null)]));
- };
- }
- }), _h = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ATabs",
- inheritAttrs: !1,
- props: li(nae(), {
- tabPosition: "top",
- animated: {
- inkBar: !0,
- tabPane: !1
- }
- }),
- slots: Object,
- // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- emit: i
- } = e;
- const a = (o) => {
- i("update:activeKey", o), i("change", o);
- };
- return () => {
- var o;
- const s = HBe(qr((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
- return D(GBe, te(te(te({}, si(t, ["onUpdate:activeKey"])), n), {}, {
- onChange: a,
- tabs: s
- }), r);
- };
- }
- }), jBe = () => ({
- tab: oe.any,
- disabled: {
- type: Boolean
- },
- forceRender: {
- type: Boolean
- },
- closable: {
- type: Boolean
- },
- animated: {
- type: Boolean
- },
- active: {
- type: Boolean
- },
- destroyInactiveTabPane: {
- type: Boolean
- },
- // Pass by TabPaneList
- prefixCls: {
- type: String
- },
- tabKey: {
- type: [String, Number]
- },
- id: {
- type: String
- }
- // closeIcon: PropTypes.any,
- }), zu = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ATabPane",
- inheritAttrs: !1,
- __ANT_TAB_PANE: !0,
- props: jBe(),
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const i = ee(t.forceRender);
- me([() => t.active, () => t.destroyInactiveTabPane], () => {
- t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
- }, {
- immediate: !0
- });
- const a = V(() => t.active ? {} : t.animated ? {
- visibility: "hidden",
- height: 0,
- overflowY: "hidden"
- } : {
- display: "none"
- });
- return () => {
- var o;
- const {
- prefixCls: s,
- forceRender: l,
- id: u,
- active: c,
- tabKey: f
- } = t;
- return D("div", {
- id: u && `${u}-panel-${f}`,
- role: "tabpanel",
- tabindex: c ? 0 : -1,
- "aria-labelledby": u && `${u}-tab-${f}`,
- "aria-hidden": !c,
- style: [a.value, n.style],
- class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
- }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
- };
- }
- });
- _h.TabPane = zu;
- _h.install = function(t) {
- return t.component(_h.name, _h), t.component(zu.name, zu), t;
- };
- const ZBe = () => ({
- prefixCls: String,
- activeKey: or([Array, Number, String]),
- defaultActiveKey: or([Array, Number, String]),
- accordion: Tt(),
- destroyInactivePanel: Tt(),
- bordered: Tt(),
- expandIcon: Ct(),
- openAnimation: oe.object,
- expandIconPosition: rr(),
- collapsible: rr(),
- ghost: Tt(),
- onChange: Ct(),
- "onUpdate:activeKey": Ct()
- }), rae = () => ({
- openAnimation: oe.object,
- prefixCls: String,
- header: oe.any,
- headerClass: String,
- showArrow: Tt(),
- isActive: Tt(),
- destroyInactivePanel: Tt(),
- /** @deprecated Use `collapsible="disabled"` instead */
- disabled: Tt(),
- accordion: Tt(),
- forceRender: Tt(),
- expandIcon: Ct(),
- extra: oe.any,
- panelKey: or(),
- collapsible: rr(),
- role: String,
- onItemClick: Ct()
- }), UBe = (t) => {
- const {
- componentCls: e,
- collapseContentBg: n,
- padding: r,
- collapseContentPaddingHorizontal: i,
- collapseHeaderBg: a,
- collapseHeaderPadding: o,
- collapsePanelBorderRadius: s,
- lineWidth: l,
- lineType: u,
- colorBorder: c,
- colorText: f,
- colorTextHeading: d,
- colorTextDisabled: h,
- fontSize: p,
- lineHeight: v,
- marginSM: g,
- paddingSM: m,
- motionDurationSlow: y,
- fontSizeIcon: _
- } = t, O = `${l}px ${u} ${c}`;
- return {
- [e]: k(k({}, Gn(t)), {
- backgroundColor: a,
- border: O,
- borderBottom: 0,
- borderRadius: `${s}px`,
- "&-rtl": {
- direction: "rtl"
- },
- [`& > ${e}-item`]: {
- borderBottom: O,
- "&:last-child": {
- [`
- &,
- & > ${e}-header`]: {
- borderRadius: `0 0 ${s}px ${s}px`
- }
- },
- [`> ${e}-header`]: {
- position: "relative",
- display: "flex",
- flexWrap: "nowrap",
- alignItems: "flex-start",
- padding: o,
- color: d,
- lineHeight: v,
- cursor: "pointer",
- transition: `all ${y}, visibility 0s`,
- [`> ${e}-header-text`]: {
- flex: "auto"
- },
- "&:focus": {
- outline: "none"
- },
- // >>>>> Arrow
- [`${e}-expand-icon`]: {
- height: p * v,
- display: "flex",
- alignItems: "center",
- paddingInlineEnd: g
- },
- [`${e}-arrow`]: k(k({}, hm()), {
- fontSize: _,
- svg: {
- transition: `transform ${y}`
- }
- }),
- // >>>>> Text
- [`${e}-header-text`]: {
- marginInlineEnd: "auto"
- }
- },
- [`${e}-header-collapsible-only`]: {
- cursor: "default",
- [`${e}-header-text`]: {
- flex: "none",
- cursor: "pointer"
- },
- [`${e}-expand-icon`]: {
- cursor: "pointer"
- }
- },
- [`${e}-icon-collapsible-only`]: {
- cursor: "default",
- [`${e}-expand-icon`]: {
- cursor: "pointer"
- }
- },
- [`&${e}-no-arrow`]: {
- [`> ${e}-header`]: {
- paddingInlineStart: m
- }
- }
- },
- [`${e}-content`]: {
- color: f,
- backgroundColor: n,
- borderTop: O,
- [`& > ${e}-content-box`]: {
- padding: `${r}px ${i}px`
- },
- "&-hidden": {
- display: "none"
- }
- },
- [`${e}-item:last-child`]: {
- [`> ${e}-content`]: {
- borderRadius: `0 0 ${s}px ${s}px`
- }
- },
- [`& ${e}-item-disabled > ${e}-header`]: {
- "\n &,\n & > .arrow\n ": {
- color: h,
- cursor: "not-allowed"
- }
- },
- // ========================== Icon Position ==========================
- [`&${e}-icon-position-end`]: {
- [`& > ${e}-item`]: {
- [`> ${e}-header`]: {
- [`${e}-expand-icon`]: {
- order: 1,
- paddingInlineEnd: 0,
- paddingInlineStart: g
- }
- }
- }
- }
- })
- };
- }, XBe = (t) => {
- const {
- componentCls: e
- } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
- return {
- [`${e}-rtl`]: {
- [n]: {
- transform: "rotate(180deg)"
- }
- }
- };
- }, YBe = (t) => {
- const {
- componentCls: e,
- collapseHeaderBg: n,
- paddingXXS: r,
- colorBorder: i
- } = t;
- return {
- [`${e}-borderless`]: {
- backgroundColor: n,
- border: 0,
- [`> ${e}-item`]: {
- borderBottom: `1px solid ${i}`
- },
- [`
- > ${e}-item:last-child,
- > ${e}-item:last-child ${e}-header
- `]: {
- borderRadius: 0
- },
- [`> ${e}-item:last-child`]: {
- borderBottom: 0
- },
- [`> ${e}-item > ${e}-content`]: {
- backgroundColor: "transparent",
- borderTop: 0
- },
- [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
- paddingTop: r
- }
- }
- };
- }, qBe = (t) => {
- const {
- componentCls: e,
- paddingSM: n
- } = t;
- return {
- [`${e}-ghost`]: {
- backgroundColor: "transparent",
- border: 0,
- [`> ${e}-item`]: {
- borderBottom: 0,
- [`> ${e}-content`]: {
- backgroundColor: "transparent",
- border: 0,
- [`> ${e}-content-box`]: {
- paddingBlock: n
- }
- }
- }
- }
- };
- }, KBe = pr("Collapse", (t) => {
- const e = bn(t, {
- collapseContentBg: t.colorBgContainer,
- collapseHeaderBg: t.colorFillAlter,
- collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
- collapsePanelBorderRadius: t.borderRadiusLG,
- collapseContentPaddingHorizontal: 16
- // Fixed value
- });
- return [UBe(e), YBe(e), qBe(e), XBe(e), v8(e)];
- });
- function GQ(t) {
- let e = t;
- if (!Array.isArray(e)) {
- const n = typeof e;
- e = n === "number" || n === "string" ? [e] : [];
- }
- return e.map((n) => String(n));
- }
- const Wy = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ACollapse",
- inheritAttrs: !1,
- props: li(ZBe(), {
- accordion: !1,
- destroyInactivePanel: !1,
- bordered: !0,
- expandIconPosition: "start"
- }),
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- emit: i
- } = e;
- const a = ee(GQ(Sie([t.activeKey, t.defaultActiveKey])));
- me(() => t.activeKey, () => {
- a.value = GQ(t.activeKey);
- }, {
- deep: !0
- });
- const {
- prefixCls: o,
- direction: s,
- rootPrefixCls: l
- } = hn("collapse", t), [u, c] = KBe(o), f = V(() => {
- const {
- expandIconPosition: m
- } = t;
- return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
- }), d = (m) => {
- const {
- expandIcon: y = r.expandIcon
- } = t, _ = y ? y(m) : D(Q2, {
- rotate: m.isActive ? 90 : void 0
- }, null);
- return D("div", {
- class: [`${o.value}-expand-icon`, c.value],
- onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
- }, [po(Array.isArray(y) ? _[0] : _) ? xr(_, {
- class: `${o.value}-arrow`
- }, !1) : _]);
- }, h = (m) => {
- t.activeKey === void 0 && (a.value = m);
- const y = t.accordion ? m[0] : m;
- i("update:activeKey", y), i("change", y);
- }, p = (m) => {
- let y = a.value;
- if (t.accordion)
- y = y[0] === m ? [] : [m];
- else {
- y = [...y];
- const _ = y.indexOf(m);
- _ > -1 ? y.splice(_, 1) : y.push(m);
- }
- h(y);
- }, v = (m, y) => {
- var _, O, S;
- if (LN(m)) return;
- const x = a.value, {
- accordion: C,
- destroyInactivePanel: P,
- collapsible: $,
- openAnimation: T
- } = t, E = T || w8(`${l.value}-motion-collapse`), M = String((_ = m.key) !== null && _ !== void 0 ? _ : y), {
- header: R = (S = (O = m.children) === null || O === void 0 ? void 0 : O.header) === null || S === void 0 ? void 0 : S.call(O),
- headerClass: N,
- collapsible: I,
- disabled: B
- } = m.props || {};
- let Q = !1;
- C ? Q = x[0] === M : Q = x.indexOf(M) > -1;
- let W = I ?? $;
- (B || B === "") && (W = "disabled");
- const H = {
- key: M,
- panelKey: M,
- header: R,
- headerClass: N,
- isActive: Q,
- prefixCls: o.value,
- destroyInactivePanel: P,
- openAnimation: E,
- accordion: C,
- onItemClick: W === "disabled" ? null : p,
- expandIcon: d,
- collapsible: W
- };
- return xr(m, H);
- }, g = () => {
- var m;
- return qr((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
- };
- return () => {
- const {
- accordion: m,
- bordered: y,
- ghost: _
- } = t, O = Re(o.value, {
- [`${o.value}-borderless`]: !y,
- [`${o.value}-icon-position-${f.value}`]: !0,
- [`${o.value}-rtl`]: s.value === "rtl",
- [`${o.value}-ghost`]: !!_,
- [n.class]: !!n.class
- }, c.value);
- return u(D("div", te(te({
- class: O
- }, zRe(n)), {}, {
- style: n.style,
- role: m ? "tablist" : null
- }), [g()]));
- };
- }
- }), JBe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "PanelContent",
- props: rae(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = ve(!1);
- return Vt(() => {
- (t.isActive || t.forceRender) && (r.value = !0);
- }), () => {
- var i;
- if (!r.value) return null;
- const {
- prefixCls: a,
- isActive: o,
- role: s
- } = t;
- return D("div", {
- class: Re(`${a}-content`, {
- [`${a}-content-active`]: o,
- [`${a}-content-inactive`]: !o
- }),
- role: s
- }, [D("div", {
- class: `${a}-content-box`
- }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
- };
- }
- }), fC = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ACollapsePanel",
- inheritAttrs: !1,
- props: li(rae(), {
- showArrow: !0,
- isActive: !1,
- onItemClick() {
- },
- headerClass: "",
- forceRender: !1
- }),
- slots: Object,
- // emits: ['itemClick'],
- setup(t, e) {
- let {
- slots: n,
- emit: r,
- attrs: i
- } = e;
- lo(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
- const {
- prefixCls: a
- } = hn("collapse", t), o = () => {
- r("itemClick", t.panelKey);
- }, s = (l) => {
- (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
- };
- return () => {
- var l, u;
- const {
- header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
- headerClass: f,
- isActive: d,
- showArrow: h,
- destroyInactivePanel: p,
- accordion: v,
- forceRender: g,
- openAnimation: m,
- expandIcon: y = n.expandIcon,
- extra: _ = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
- collapsible: O
- } = t, S = O === "disabled", x = a.value, C = Re(`${x}-header`, {
- [f]: f,
- [`${x}-header-collapsible-only`]: O === "header",
- [`${x}-icon-collapsible-only`]: O === "icon"
- }), P = Re({
- [`${x}-item`]: !0,
- [`${x}-item-active`]: d,
- [`${x}-item-disabled`]: S,
- [`${x}-no-arrow`]: !h,
- [`${i.class}`]: !!i.class
- });
- let $ = D("i", {
- class: "arrow"
- }, null);
- h && typeof y == "function" && ($ = y(t));
- const T = Sr(D(JBe, {
- prefixCls: x,
- isActive: d,
- forceRender: g,
- role: v ? "tabpanel" : null
- }, {
- default: n.default
- }), [[ho, d]]), E = k({
- appear: !1,
- css: !1
- }, m);
- return D("div", te(te({}, i), {}, {
- class: P
- }), [D("div", {
- class: C,
- onClick: () => !["header", "icon"].includes(O) && o(),
- role: v ? "tab" : "button",
- tabindex: S ? -1 : 0,
- "aria-expanded": d,
- onKeypress: s
- }, [h && $, D("span", {
- onClick: () => O === "header" && o(),
- class: `${x}-header-text`
- }, [c]), _ && D("div", {
- class: `${x}-extra`
- }, [_])]), D(mo, E, {
- default: () => [!p || d ? T : null]
- })]);
- };
- }
- });
- Wy.Panel = fC;
- Wy.install = function(t) {
- return t.component(Wy.name, Wy), t.component(fC.name, fC), t;
- };
- var eze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
- function jQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- tze(t, i, n[i]);
- });
- }
- return t;
- }
- function tze(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var T8 = function(e, n) {
- var r = jQ({}, e, n.attrs);
- return D(Rt, jQ({}, r, {
- icon: eze
- }), null);
- };
- T8.displayName = "LeftOutlined";
- T8.inheritAttrs = !1;
- const iae = () => is() && window.document.documentElement;
- let tS;
- const nze = () => {
- if (!iae())
- return !1;
- if (tS !== void 0)
- return tS;
- const t = document.createElement("div");
- return t.style.display = "flex", t.style.flexDirection = "column", t.style.rowGap = "1px", t.appendChild(document.createElement("div")), t.appendChild(document.createElement("div")), document.body.appendChild(t), tS = t.scrollHeight === 1, document.body.removeChild(t), tS;
- }, rze = () => {
- const t = ve(!1);
- return _t(() => {
- t.value = nze();
- }), t;
- }, aae = Symbol("rowContextKey"), ize = (t) => {
- Et(aae, t);
- }, aze = () => et(aae, {
- gutter: V(() => {
- }),
- wrap: V(() => {
- }),
- supportFlexGap: V(() => {
- })
- }), oze = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- // Grid system
- [e]: {
- display: "flex",
- flexFlow: "row wrap",
- minWidth: 0,
- "&::before, &::after": {
- display: "flex"
- },
- "&-no-wrap": {
- flexWrap: "nowrap"
- },
- // The origin of the X-axis
- "&-start": {
- justifyContent: "flex-start"
- },
- // The center of the X-axis
- "&-center": {
- justifyContent: "center"
- },
- // The opposite of the X-axis
- "&-end": {
- justifyContent: "flex-end"
- },
- "&-space-between": {
- justifyContent: "space-between"
- },
- "&-space-around ": {
- justifyContent: "space-around"
- },
- "&-space-evenly ": {
- justifyContent: "space-evenly"
- },
- // Align at the top
- "&-top": {
- alignItems: "flex-start"
- },
- // Align at the center
- "&-middle": {
- alignItems: "center"
- },
- "&-bottom": {
- alignItems: "flex-end"
- }
- }
- };
- }, sze = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- // Grid system
- [e]: {
- position: "relative",
- maxWidth: "100%",
- // Prevent columns from collapsing when empty
- minHeight: 1
- }
- };
- }, lze = (t, e) => {
- const {
- componentCls: n,
- gridColumns: r
- } = t, i = {};
- for (let a = r; a >= 0; a--)
- a === 0 ? (i[`${n}${e}-${a}`] = {
- display: "none"
- }, i[`${n}-push-${a}`] = {
- insetInlineStart: "auto"
- }, i[`${n}-pull-${a}`] = {
- insetInlineEnd: "auto"
- }, i[`${n}${e}-push-${a}`] = {
- insetInlineStart: "auto"
- }, i[`${n}${e}-pull-${a}`] = {
- insetInlineEnd: "auto"
- }, i[`${n}${e}-offset-${a}`] = {
- marginInlineEnd: 0
- }, i[`${n}${e}-order-${a}`] = {
- order: 0
- }) : (i[`${n}${e}-${a}`] = {
- display: "block",
- flex: `0 0 ${a / r * 100}%`,
- maxWidth: `${a / r * 100}%`
- }, i[`${n}${e}-push-${a}`] = {
- insetInlineStart: `${a / r * 100}%`
- }, i[`${n}${e}-pull-${a}`] = {
- insetInlineEnd: `${a / r * 100}%`
- }, i[`${n}${e}-offset-${a}`] = {
- marginInlineStart: `${a / r * 100}%`
- }, i[`${n}${e}-order-${a}`] = {
- order: a
- });
- return i;
- }, kR = (t, e) => lze(t, e), uze = (t, e, n) => ({
- [`@media (min-width: ${e}px)`]: k({}, kR(t, n))
- }), cze = pr("Grid", (t) => [oze(t)]), fze = pr("Grid", (t) => {
- const e = bn(t, {
- gridColumns: 24
- // Row is divided into 24 parts in Grid
- }), n = {
- "-sm": e.screenSMMin,
- "-md": e.screenMDMin,
- "-lg": e.screenLGMin,
- "-xl": e.screenXLMin,
- "-xxl": e.screenXXLMin
- };
- return [sze(e), kR(e, ""), kR(e, "-xs"), Object.keys(n).map((r) => uze(e, n[r], r)).reduce((r, i) => k(k({}, r), i), {})];
- }), dze = () => ({
- align: or([String, Object]),
- justify: or([String, Object]),
- prefixCls: String,
- gutter: or([Number, Array, Object], 0),
- wrap: {
- type: Boolean,
- default: void 0
- }
- }), hze = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ARow",
- inheritAttrs: !1,
- props: dze(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i,
- direction: a
- } = hn("row", t), [o, s] = cze(i);
- let l;
- const u = I3e(), c = ee({
- xs: !0,
- sm: !0,
- md: !0,
- lg: !0,
- xl: !0,
- xxl: !0
- }), f = ee({
- xs: !1,
- sm: !1,
- md: !1,
- lg: !1,
- xl: !1,
- xxl: !1
- }), d = (_) => V(() => {
- if (typeof t[_] == "string")
- return t[_];
- if (typeof t[_] != "object")
- return "";
- for (let O = 0; O < qO.length; O++) {
- const S = qO[O];
- if (!f.value[S]) continue;
- const x = t[_][S];
- if (x !== void 0)
- return x;
- }
- return "";
- }), h = d("align"), p = d("justify"), v = rze();
- _t(() => {
- l = u.value.subscribe((_) => {
- f.value = _;
- const O = t.gutter || 0;
- (!Array.isArray(O) && typeof O == "object" || Array.isArray(O) && (typeof O[0] == "object" || typeof O[1] == "object")) && (c.value = _);
- });
- }), Qt(() => {
- u.value.unsubscribe(l);
- });
- const g = V(() => {
- const _ = [void 0, void 0], {
- gutter: O = 0
- } = t;
- return (Array.isArray(O) ? O : [O, void 0]).forEach((x, C) => {
- if (typeof x == "object")
- for (let P = 0; P < qO.length; P++) {
- const $ = qO[P];
- if (c.value[$] && x[$] !== void 0) {
- _[C] = x[$];
- break;
- }
- }
- else
- _[C] = x;
- }), _;
- });
- ize({
- gutter: g,
- supportFlexGap: v,
- wrap: V(() => t.wrap)
- });
- const m = V(() => Re(i.value, {
- [`${i.value}-no-wrap`]: t.wrap === !1,
- [`${i.value}-${p.value}`]: p.value,
- [`${i.value}-${h.value}`]: h.value,
- [`${i.value}-rtl`]: a.value === "rtl"
- }, r.class, s.value)), y = V(() => {
- const _ = g.value, O = {}, S = _[0] != null && _[0] > 0 ? `${_[0] / -2}px` : void 0, x = _[1] != null && _[1] > 0 ? `${_[1] / -2}px` : void 0;
- return S && (O.marginLeft = S, O.marginRight = S), v.value ? O.rowGap = `${_[1]}px` : x && (O.marginTop = x, O.marginBottom = x), O;
- });
- return () => {
- var _;
- return o(D("div", te(te({}, r), {}, {
- class: m.value,
- style: k(k({}, y.value), r.style)
- }), [(_ = n.default) === null || _ === void 0 ? void 0 : _.call(n)]));
- };
- }
- });
- function tf(t) {
- return t == null ? [] : Array.isArray(t) ? t : [t];
- }
- function oae(t, e) {
- let n = t;
- for (let r = 0; r < e.length; r += 1) {
- if (n == null)
- return;
- n = n[e[r]];
- }
- return n;
- }
- function sae(t, e, n, r) {
- if (!e.length)
- return n;
- const [i, ...a] = e;
- let o;
- return !t && typeof i == "number" ? o = [] : Array.isArray(t) ? o = [...t] : o = k({}, t), r && n === void 0 && a.length === 1 ? delete o[i][a[0]] : o[i] = sae(o[i], a, n, r), o;
- }
- function pze(t, e, n) {
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
- return e.length && r && n === void 0 && !oae(t, e.slice(0, -1)) ? t : sae(t, e, n, r);
- }
- function LR(t) {
- return tf(t);
- }
- function vze(t, e) {
- return oae(t, e);
- }
- function gze(t, e, n) {
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
- return pze(t, e, n, r);
- }
- function mze(t, e) {
- return t && t.some((n) => bze(n, e));
- }
- function ZQ(t) {
- return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
- }
- function lae(t, e) {
- const n = Array.isArray(t) ? [...t] : k({}, t);
- return e && Object.keys(e).forEach((r) => {
- const i = n[r], a = e[r], o = ZQ(i) && ZQ(a);
- n[r] = o ? lae(i, a || {}) : a;
- }), n;
- }
- function yze(t) {
- for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
- n[r - 1] = arguments[r];
- return n.reduce((i, a) => lae(i, a), t);
- }
- function UQ(t, e) {
- let n = {};
- return e.forEach((r) => {
- const i = vze(t, r);
- n = gze(n, r, i);
- }), n;
- }
- function bze(t, e) {
- return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
- }
- const Ua = "'${name}' is not a valid ${type}", Z2 = {
- default: "Validation error on field '${name}'",
- required: "'${name}' is required",
- enum: "'${name}' must be one of [${enum}]",
- whitespace: "'${name}' cannot be empty",
- date: {
- format: "'${name}' is invalid for format date",
- parse: "'${name}' could not be parsed as date",
- invalid: "'${name}' is invalid date"
- },
- types: {
- string: Ua,
- method: Ua,
- array: Ua,
- object: Ua,
- number: Ua,
- date: Ua,
- boolean: Ua,
- integer: Ua,
- float: Ua,
- regexp: Ua,
- email: Ua,
- url: Ua,
- hex: Ua
- },
- string: {
- len: "'${name}' must be exactly ${len} characters",
- min: "'${name}' must be at least ${min} characters",
- max: "'${name}' cannot be longer than ${max} characters",
- range: "'${name}' must be between ${min} and ${max} characters"
- },
- number: {
- len: "'${name}' must equal ${len}",
- min: "'${name}' cannot be less than ${min}",
- max: "'${name}' cannot be greater than ${max}",
- range: "'${name}' must be between ${min} and ${max}"
- },
- array: {
- len: "'${name}' must be exactly ${len} in length",
- min: "'${name}' cannot be less than ${min} in length",
- max: "'${name}' cannot be greater than ${max} in length",
- range: "'${name}' must be between ${min} and ${max} in length"
- },
- pattern: {
- mismatch: "'${name}' does not match pattern ${pattern}"
- }
- };
- var U2 = function(t, e, n, r) {
- function i(a) {
- return a instanceof n ? a : new n(function(o) {
- o(a);
- });
- }
- return new (n || (n = Promise))(function(a, o) {
- function s(c) {
- try {
- u(r.next(c));
- } catch (f) {
- o(f);
- }
- }
- function l(c) {
- try {
- u(r.throw(c));
- } catch (f) {
- o(f);
- }
- }
- function u(c) {
- c.done ? a(c.value) : i(c.value).then(s, l);
- }
- u((r = r.apply(t, e || [])).next());
- });
- };
- const _ze = H_;
- function Oze(t, e) {
- return t.replace(/\$\{\w+\}/g, (n) => {
- const r = n.slice(2, -1);
- return e[r];
- });
- }
- function NR(t, e, n, r, i) {
- return U2(this, void 0, void 0, function* () {
- const a = k({}, n);
- delete a.ruleIndex, delete a.trigger;
- let o = null;
- a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
- const s = new _ze({
- [t]: [a]
- }), l = yze({}, Z2, r.validateMessages);
- s.messages(l);
- let u = [];
- try {
- yield Promise.resolve(s.validate({
- [t]: e
- }, k({}, r)));
- } catch (d) {
- d.errors ? u = d.errors.map((h, p) => {
- let {
- message: v
- } = h;
- return (
- // Wrap VueNode with `key`
- po(v) ? ku(v, {
- key: `error_${p}`
- }) : v
- );
- }) : (console.error(d), u = [l.default()]);
- }
- if (!u.length && o)
- return (yield Promise.all(e.map((h, p) => NR(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
- const c = k(k(k({}, n), {
- name: t,
- enum: (n.enum || []).join(", ")
- }), i);
- return u.map((d) => typeof d == "string" ? Oze(d, c) : d);
- });
- }
- function uae(t, e, n, r, i, a) {
- const o = t.join("."), s = n.map((u, c) => {
- const f = u.validator, d = k(k({}, u), {
- ruleIndex: c
- });
- return f && (d.validator = (h, p, v) => {
- let g = !1;
- const y = f(h, p, function() {
- for (var _ = arguments.length, O = new Array(_), S = 0; S < _; S++)
- O[S] = arguments[S];
- Promise.resolve().then(() => {
- Nh(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(...O);
- });
- });
- g = y && typeof y.then == "function" && typeof y.catch == "function", Nh(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
- v();
- }).catch((_) => {
- v(_ || " ");
- });
- }), d;
- }).sort((u, c) => {
- let {
- warningOnly: f,
- ruleIndex: d
- } = u, {
- warningOnly: h,
- ruleIndex: p
- } = c;
- return !!f == !!h ? d - p : f ? 1 : -1;
- });
- let l;
- if (i === !0)
- l = new Promise((u, c) => U2(this, void 0, void 0, function* () {
- for (let f = 0; f < s.length; f += 1) {
- const d = s[f], h = yield NR(o, e, d, r, a);
- if (h.length) {
- c([{
- errors: h,
- rule: d
- }]);
- return;
- }
- }
- u([]);
- }));
- else {
- const u = s.map((c) => NR(o, e, c, r, a).then((f) => ({
- errors: f,
- rule: c
- })));
- l = (i ? xze(u) : Sze(u)).then((c) => Promise.reject(c));
- }
- return l.catch((u) => u), l;
- }
- function Sze(t) {
- return U2(this, void 0, void 0, function* () {
- return Promise.all(t).then((e) => [].concat(...e));
- });
- }
- function xze(t) {
- return U2(this, void 0, void 0, function* () {
- let e = 0;
- return new Promise((n) => {
- t.forEach((r) => {
- r.then((i) => {
- i.errors.length && n([i]), e += 1, e === t.length && n([]);
- });
- });
- });
- });
- }
- const cae = Symbol("formContextKey"), fae = (t) => {
- Et(cae, t);
- }, P8 = () => et(cae, {
- name: V(() => {
- }),
- labelAlign: V(() => "right"),
- vertical: V(() => !1),
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- addField: (t, e) => {
- },
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- removeField: (t) => {
- },
- model: V(() => {
- }),
- rules: V(() => {
- }),
- colon: V(() => {
- }),
- labelWrap: V(() => {
- }),
- labelCol: V(() => {
- }),
- requiredMark: V(() => !1),
- validateTrigger: V(() => {
- }),
- onValidate: () => {
- },
- validateMessages: V(() => Z2)
- }), dae = Symbol("formItemPrefixContextKey"), wze = (t) => {
- Et(dae, t);
- }, Cze = () => et(dae, {
- prefixCls: V(() => "")
- });
- function Tze(t) {
- return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
- }
- const Pze = () => ({
- span: [String, Number],
- order: [String, Number],
- offset: [String, Number],
- push: [String, Number],
- pull: [String, Number],
- xs: {
- type: [String, Number, Object],
- default: void 0
- },
- sm: {
- type: [String, Number, Object],
- default: void 0
- },
- md: {
- type: [String, Number, Object],
- default: void 0
- },
- lg: {
- type: [String, Number, Object],
- default: void 0
- },
- xl: {
- type: [String, Number, Object],
- default: void 0
- },
- xxl: {
- type: [String, Number, Object],
- default: void 0
- },
- prefixCls: String,
- flex: [String, Number]
- }), $ze = ["xs", "sm", "md", "lg", "xl", "xxl"], hae = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ACol",
- inheritAttrs: !1,
- props: Pze(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- gutter: i,
- supportFlexGap: a,
- wrap: o
- } = aze(), {
- prefixCls: s,
- direction: l
- } = hn("col", t), [u, c] = fze(s), f = V(() => {
- const {
- span: h,
- order: p,
- offset: v,
- push: g,
- pull: m
- } = t, y = s.value;
- let _ = {};
- return $ze.forEach((O) => {
- let S = {};
- const x = t[O];
- typeof x == "number" ? S.span = x : typeof x == "object" && (S = x || {}), _ = k(k({}, _), {
- [`${y}-${O}-${S.span}`]: S.span !== void 0,
- [`${y}-${O}-order-${S.order}`]: S.order || S.order === 0,
- [`${y}-${O}-offset-${S.offset}`]: S.offset || S.offset === 0,
- [`${y}-${O}-push-${S.push}`]: S.push || S.push === 0,
- [`${y}-${O}-pull-${S.pull}`]: S.pull || S.pull === 0,
- [`${y}-rtl`]: l.value === "rtl"
- });
- }), Re(y, {
- [`${y}-${h}`]: h !== void 0,
- [`${y}-order-${p}`]: p,
- [`${y}-offset-${v}`]: v,
- [`${y}-push-${g}`]: g,
- [`${y}-pull-${m}`]: m
- }, _, r.class, c.value);
- }), d = V(() => {
- const {
- flex: h
- } = t, p = i.value, v = {};
- if (p && p[0] > 0) {
- const g = `${p[0] / 2}px`;
- v.paddingLeft = g, v.paddingRight = g;
- }
- if (p && p[1] > 0 && !a.value) {
- const g = `${p[1] / 2}px`;
- v.paddingTop = g, v.paddingBottom = g;
- }
- return h && (v.flex = Tze(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
- });
- return () => {
- var h;
- return u(D("div", te(te({}, r), {}, {
- class: f.value,
- style: [d.value, r.style]
- }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
- };
- }
- });
- var Aze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
- function XQ(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- Eze(t, i, n[i]);
- });
- }
- return t;
- }
- function Eze(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var $8 = function(e, n) {
- var r = XQ({}, e, n.attrs);
- return D(Rt, XQ({}, r, {
- icon: Aze
- }), null);
- };
- $8.displayName = "QuestionCircleOutlined";
- $8.inheritAttrs = !1;
- const A8 = (t, e) => {
- let {
- slots: n,
- emit: r,
- attrs: i
- } = e;
- var a, o, s, l, u;
- const {
- prefixCls: c,
- htmlFor: f,
- labelCol: d,
- labelAlign: h,
- colon: p,
- required: v,
- requiredMark: g
- } = k(k({}, t), i), [m] = _2("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
- if (!y) return null;
- const {
- vertical: _,
- labelAlign: O,
- labelCol: S,
- labelWrap: x,
- colon: C
- } = P8(), P = d || (S == null ? void 0 : S.value) || {}, $ = h || (O == null ? void 0 : O.value), T = `${c}-item-label`, E = Re(T, $ === "left" && `${T}-left`, P.class, {
- [`${T}-wrap`]: !!x.value
- });
- let M = y;
- const R = p === !0 || (C == null ? void 0 : C.value) !== !1 && p !== !1;
- if (R && !_.value && typeof y == "string" && y.trim() !== "" && (M = y.replace(/[:|:]\s*$/, "")), t.tooltip || n.tooltip) {
- const B = D("span", {
- class: `${c}-item-tooltip`
- }, [D(F2, {
- title: t.tooltip
- }, {
- default: () => [D($8, null, null)]
- })]);
- M = D(Wt, null, [M, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
- class: `${c}-item-tooltip`
- }) : B]);
- }
- g === "optional" && !v && (M = D(Wt, null, [M, D("span", {
- class: `${c}-item-optional`
- }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = Nu.Form) === null || u === void 0 ? void 0 : u.optional)])]));
- const I = Re({
- [`${c}-item-required`]: v,
- [`${c}-item-required-mark-optional`]: g === "optional",
- [`${c}-item-no-colon`]: !R
- });
- return D(hae, te(te({}, P), {}, {
- class: E
- }), {
- default: () => [D("label", {
- for: f,
- class: I,
- title: typeof y == "string" ? y : "",
- onClick: (B) => r("click", B)
- }, [M])]
- });
- };
- A8.displayName = "FormItemLabel";
- A8.inheritAttrs = !1;
- const Mze = (t) => {
- const {
- componentCls: e
- } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
- return {
- [n]: {
- // Explain holder
- transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
- "&-appear, &-enter": {
- opacity: 0,
- "&-active": {
- opacity: 1
- }
- },
- "&-leave": {
- opacity: 1,
- "&-active": {
- opacity: 0
- }
- },
- // Explain
- [r]: {
- overflow: "hidden",
- transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
- opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
- transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
- [`&${r}-appear, &${r}-enter`]: {
- transform: "translateY(-5px)",
- opacity: 0,
- "&-active": {
- transform: "translateY(0)",
- opacity: 1
- }
- },
- [`&${r}-leave-active`]: {
- transform: "translateY(-5px)"
- }
- }
- }
- };
- }, Ize = (t) => ({
- legend: {
- display: "block",
- width: "100%",
- marginBottom: t.marginLG,
- padding: 0,
- color: t.colorTextDescription,
- fontSize: t.fontSizeLG,
- lineHeight: "inherit",
- border: 0,
- borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
- },
- label: {
- fontSize: t.fontSize
- },
- 'input[type="search"]': {
- boxSizing: "border-box"
- },
- // Position radios and checkboxes better
- 'input[type="radio"], input[type="checkbox"]': {
- lineHeight: "normal"
- },
- 'input[type="file"]': {
- display: "block"
- },
- // Make range inputs behave like textual form controls
- 'input[type="range"]': {
- display: "block",
- width: "100%"
- },
- // Make multiple select elements height not fixed
- "select[multiple], select[size]": {
- height: "auto"
- },
- // Focus for file, radio, and checkbox
- "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
- outline: 0,
- boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
- },
- // Adjust output element
- output: {
- display: "block",
- paddingTop: 15,
- color: t.colorText,
- fontSize: t.fontSize,
- lineHeight: t.lineHeight
- }
- }), YQ = (t, e) => {
- const {
- formItemCls: n
- } = t;
- return {
- [n]: {
- [`${n}-label > label`]: {
- height: e
- },
- [`${n}-control-input`]: {
- minHeight: e
- }
- }
- };
- }, Dze = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [t.componentCls]: k(k(k({}, Gn(t)), Ize(t)), {
- [`${e}-text`]: {
- display: "inline-block",
- paddingInlineEnd: t.paddingSM
- },
- // ================================================================
- // = Size =
- // ================================================================
- "&-small": k({}, YQ(t, t.controlHeightSM)),
- "&-large": k({}, YQ(t, t.controlHeightLG))
- })
- };
- }, Rze = (t) => {
- const {
- formItemCls: e,
- iconCls: n,
- componentCls: r,
- rootPrefixCls: i
- } = t;
- return {
- [e]: k(k({}, Gn(t)), {
- marginBottom: t.marginLG,
- verticalAlign: "top",
- "&-with-help": {
- transition: "none"
- },
- [`&-hidden,
- &-hidden.${i}-row`]: {
- // https://github.com/ant-design/ant-design/issues/26141
- display: "none"
- },
- "&-has-warning": {
- [`${e}-split`]: {
- color: t.colorError
- }
- },
- "&-has-error": {
- [`${e}-split`]: {
- color: t.colorWarning
- }
- },
- // ==============================================================
- // = Label =
- // ==============================================================
- [`${e}-label`]: {
- display: "inline-block",
- flexGrow: 0,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textAlign: "end",
- verticalAlign: "middle",
- "&-left": {
- textAlign: "start"
- },
- "&-wrap": {
- overflow: "unset",
- lineHeight: `${t.lineHeight} - 0.25em`,
- whiteSpace: "unset"
- },
- "> label": {
- position: "relative",
- display: "inline-flex",
- alignItems: "center",
- maxWidth: "100%",
- height: t.controlHeight,
- color: t.colorTextHeading,
- fontSize: t.fontSize,
- [`> ${n}`]: {
- fontSize: t.fontSize,
- verticalAlign: "top"
- },
- // Required mark
- [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
- display: "inline-block",
- marginInlineEnd: t.marginXXS,
- color: t.colorError,
- fontSize: t.fontSize,
- fontFamily: "SimSun, sans-serif",
- lineHeight: 1,
- content: '"*"',
- [`${r}-hide-required-mark &`]: {
- display: "none"
- }
- },
- // Optional mark
- [`${e}-optional`]: {
- display: "inline-block",
- marginInlineStart: t.marginXXS,
- color: t.colorTextDescription,
- [`${r}-hide-required-mark &`]: {
- display: "none"
- }
- },
- // Optional mark
- [`${e}-tooltip`]: {
- color: t.colorTextDescription,
- cursor: "help",
- writingMode: "horizontal-tb",
- marginInlineStart: t.marginXXS
- },
- "&::after": {
- content: '":"',
- position: "relative",
- marginBlock: 0,
- marginInlineStart: t.marginXXS / 2,
- marginInlineEnd: t.marginXS
- },
- [`&${e}-no-colon::after`]: {
- content: '" "'
- }
- }
- },
- // ==============================================================
- // = Input =
- // ==============================================================
- [`${e}-control`]: {
- display: "flex",
- flexDirection: "column",
- flexGrow: 1,
- [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
- width: "100%"
- },
- "&-input": {
- position: "relative",
- display: "flex",
- alignItems: "center",
- minHeight: t.controlHeight,
- "&-content": {
- flex: "auto",
- maxWidth: "100%"
- }
- }
- },
- // ==============================================================
- // = Explain =
- // ==============================================================
- [e]: {
- "&-explain, &-extra": {
- clear: "both",
- color: t.colorTextDescription,
- fontSize: t.fontSize,
- lineHeight: t.lineHeight
- },
- "&-explain-connected": {
- width: "100%"
- },
- "&-extra": {
- minHeight: t.controlHeightSM,
- transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
- // sync input color transition
- },
- "&-explain": {
- "&-error": {
- color: t.colorError
- },
- "&-warning": {
- color: t.colorWarning
- }
- }
- },
- [`&-with-help ${e}-explain`]: {
- height: "auto",
- opacity: 1
- },
- // ==============================================================
- // = Feedback Icon =
- // ==============================================================
- [`${e}-feedback-icon`]: {
- fontSize: t.fontSize,
- textAlign: "center",
- visibility: "visible",
- animationName: p8,
- animationDuration: t.motionDurationMid,
- animationTimingFunction: t.motionEaseOutBack,
- pointerEvents: "none",
- "&-success": {
- color: t.colorSuccess
- },
- "&-error": {
- color: t.colorError
- },
- "&-warning": {
- color: t.colorWarning
- },
- "&-validating": {
- color: t.colorPrimary
- }
- }
- })
- };
- }, kze = (t) => {
- const {
- componentCls: e,
- formItemCls: n,
- rootPrefixCls: r
- } = t;
- return {
- [`${e}-horizontal`]: {
- [`${n}-label`]: {
- flexGrow: 0
- },
- [`${n}-control`]: {
- flex: "1 1 0",
- // https://github.com/ant-design/ant-design/issues/32777
- // https://github.com/ant-design/ant-design/issues/33773
- minWidth: 0
- },
- // https://github.com/ant-design/ant-design/issues/32980
- [`${n}-label.${r}-col-24 + ${n}-control`]: {
- minWidth: "unset"
- }
- }
- };
- }, Lze = (t) => {
- const {
- componentCls: e,
- formItemCls: n
- } = t;
- return {
- [`${e}-inline`]: {
- display: "flex",
- flexWrap: "wrap",
- [n]: {
- flex: "none",
- flexWrap: "nowrap",
- marginInlineEnd: t.margin,
- marginBottom: 0,
- "&-with-help": {
- marginBottom: t.marginLG
- },
- [`> ${n}-label,
- > ${n}-control`]: {
- display: "inline-block",
- verticalAlign: "top"
- },
- [`> ${n}-label`]: {
- flex: "none"
- },
- [`${e}-text`]: {
- display: "inline-block"
- },
- [`${n}-has-feedback`]: {
- display: "inline-block"
- }
- }
- }
- };
- }, bv = (t) => ({
- margin: 0,
- padding: `0 0 ${t.paddingXS}px`,
- whiteSpace: "initial",
- textAlign: "start",
- "> label": {
- margin: 0,
- "&::after": {
- display: "none"
- }
- }
- }), Nze = (t) => {
- const {
- componentCls: e,
- formItemCls: n
- } = t;
- return {
- [`${n} ${n}-label`]: bv(t),
- [e]: {
- [n]: {
- flexWrap: "wrap",
- [`${n}-label,
- ${n}-control`]: {
- flex: "0 0 100%",
- maxWidth: "100%"
- }
- }
- }
- };
- }, Bze = (t) => {
- const {
- componentCls: e,
- formItemCls: n,
- rootPrefixCls: r
- } = t;
- return {
- [`${e}-vertical`]: {
- [n]: {
- "&-row": {
- flexDirection: "column"
- },
- "&-label > label": {
- height: "auto"
- },
- [`${e}-item-control`]: {
- width: "100%"
- }
- }
- },
- [`${e}-vertical ${n}-label,
- .${r}-col-24${n}-label,
- .${r}-col-xl-24${n}-label`]: bv(t),
- [`@media (max-width: ${t.screenXSMax}px)`]: [Nze(t), {
- [e]: {
- [`.${r}-col-xs-24${n}-label`]: bv(t)
- }
- }],
- [`@media (max-width: ${t.screenSMMax}px)`]: {
- [e]: {
- [`.${r}-col-sm-24${n}-label`]: bv(t)
- }
- },
- [`@media (max-width: ${t.screenMDMax}px)`]: {
- [e]: {
- [`.${r}-col-md-24${n}-label`]: bv(t)
- }
- },
- [`@media (max-width: ${t.screenLGMax}px)`]: {
- [e]: {
- [`.${r}-col-lg-24${n}-label`]: bv(t)
- }
- }
- };
- }, E8 = pr("Form", (t, e) => {
- let {
- rootPrefixCls: n
- } = e;
- const r = bn(t, {
- formItemCls: `${t.componentCls}-item`,
- rootPrefixCls: n
- });
- return [Dze(r), Rze(r), Mze(r), kze(r), Lze(r), Bze(r), v8(r), p8];
- }), zze = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ErrorList",
- inheritAttrs: !1,
- props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
- setup(t, e) {
- let {
- attrs: n
- } = e;
- const {
- prefixCls: r,
- status: i
- } = Cze(), a = V(() => `${r.value}-item-explain`), o = V(() => !!(t.errors && t.errors.length)), s = ee(i.value), [, l] = E8(r);
- return me([o, i], () => {
- o.value && (s.value = i.value);
- }), () => {
- var u, c;
- const f = w8(`${r.value}-show-help-item`), d = JN(`${r.value}-show-help-item`, f);
- return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], D(mo, te(te({}, Z_(`${r.value}-show-help`)), {}, {
- onAfterEnter: () => t.onErrorVisibleChanged(!0),
- onAfterLeave: () => t.onErrorVisibleChanged(!1)
- }), {
- default: () => [Sr(D(X4, te(te({}, d), {}, {
- tag: "div"
- }), {
- default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => D("div", {
- key: p,
- class: s.value ? `${a.value}-${s.value}` : ""
- }, [h]))]
- }), [[ho, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
- });
- };
- }
- }), Vze = ae({
- compatConfig: {
- MODE: 3
- },
- slots: Object,
- inheritAttrs: !1,
- props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = P8(), {
- wrapperCol: i
- } = r, a = k({}, r);
- return delete a.labelCol, delete a.wrapperCol, fae(a), wze({
- prefixCls: V(() => t.prefixCls),
- status: V(() => t.status)
- }), () => {
- var o, s, l;
- const {
- prefixCls: u,
- wrapperCol: c,
- marginBottom: f,
- onErrorVisibleChanged: d,
- help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
- errors: p = Zl((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
- // hasFeedback,
- // status,
- extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
- } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = Re(`${g}-control`, m.class);
- return D(hae, te(te({}, m), {}, {
- class: y
- }), {
- default: () => {
- var _;
- return D(Wt, null, [D("div", {
- class: `${g}-control-input`
- }, [D("div", {
- class: `${g}-control-input-content`
- }, [(_ = n.default) === null || _ === void 0 ? void 0 : _.call(n)])]), f !== null || p.length ? D("div", {
- style: {
- display: "flex",
- flexWrap: "nowrap"
- }
- }, [D(zze, {
- errors: p,
- help: h,
- class: `${g}-explain-connected`,
- onErrorVisibleChanged: d
- }, null), !!f && D("div", {
- style: {
- width: 0,
- height: `${f}px`
- }
- }, null)]) : null, v ? D("div", {
- class: `${g}-extra`
- }, [v]) : null]);
- }
- });
- };
- }
- });
- function Fze(t) {
- const e = ve(t.value.slice());
- let n = null;
- return Vt(() => {
- clearTimeout(n), n = setTimeout(() => {
- e.value = t.value;
- }, t.value.length ? 0 : 10);
- }), e;
- }
- pf("success", "warning", "error", "validating", "");
- const Wze = {
- success: Df,
- warning: Rf,
- error: cs,
- validating: Ql
- };
- function hE(t, e, n) {
- let r = t;
- const i = e;
- let a = 0;
- try {
- for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
- const s = i[a];
- if (s in r)
- r = r[s];
- else {
- if (n)
- throw Error("please transfer a valid name path to form item!");
- break;
- }
- }
- if (n && !r)
- throw Error("please transfer a valid name path to form item!");
- } catch {
- console.error("please transfer a valid name path to form item!");
- }
- return {
- o: r,
- k: i[a],
- v: r ? r[i[a]] : void 0
- };
- }
- const Qze = () => ({
- htmlFor: String,
- prefixCls: String,
- label: oe.any,
- help: oe.any,
- extra: oe.any,
- labelCol: {
- type: Object
- },
- wrapperCol: {
- type: Object
- },
- hasFeedback: {
- type: Boolean,
- default: !1
- },
- colon: {
- type: Boolean,
- default: void 0
- },
- labelAlign: String,
- prop: {
- type: [String, Number, Array]
- },
- name: {
- type: [String, Number, Array]
- },
- rules: [Array, Object],
- autoLink: {
- type: Boolean,
- default: !0
- },
- required: {
- type: Boolean,
- default: void 0
- },
- validateFirst: {
- type: Boolean,
- default: void 0
- },
- validateStatus: oe.oneOf(pf("", "success", "warning", "error", "validating")),
- validateTrigger: {
- type: [String, Array]
- },
- messageVariables: {
- type: Object
- },
- hidden: Boolean,
- noStyle: Boolean,
- tooltip: String
- });
- let Hze = 0;
- const Gze = "form_item", pae = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AFormItem",
- inheritAttrs: !1,
- __ANT_NEW_FORM_ITEM: !0,
- props: Qze(),
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i
- } = e;
- Nh(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
- const a = `form-item-${++Hze}`, {
- prefixCls: o
- } = hn("form", t), [s, l] = E8(o), u = ve(), c = P8(), f = V(() => t.name || t.prop), d = ve([]), h = ve(!1), p = ve(), v = V(() => {
- const ue = f.value;
- return LR(ue);
- }), g = V(() => {
- if (v.value.length) {
- const ue = c.name.value, ye = v.value.join("_");
- return ue ? `${ue}_${ye}` : `${Gze}_${ye}`;
- } else
- return;
- }), m = () => {
- const ue = c.model.value;
- if (!(!ue || !f.value))
- return hE(ue, v.value, !0).v;
- }, y = V(() => m()), _ = ve(ph(y.value)), O = V(() => {
- let ue = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
- return ue = ue === void 0 ? "change" : ue, tf(ue);
- }), S = V(() => {
- let ue = c.rules.value;
- const ye = t.rules, se = t.required !== void 0 ? {
- required: !!t.required,
- trigger: O.value
- } : [], he = hE(ue, v.value);
- ue = ue ? he.o[he.k] || he.v : [];
- const re = [].concat(ye || ue || []);
- return QPe(re, (q) => q.required) ? re : re.concat(se);
- }), x = V(() => {
- const ue = S.value;
- let ye = !1;
- return ue && ue.length && ue.every((se) => se.required ? (ye = !0, !1) : !0), ye || t.required;
- }), C = ve();
- Vt(() => {
- C.value = t.validateStatus;
- });
- const P = V(() => {
- let ue = {};
- return typeof t.label == "string" ? ue.label = t.label : t.name && (ue.label = String(t.name)), t.messageVariables && (ue = k(k({}, ue), t.messageVariables)), ue;
- }), $ = (ue) => {
- if (v.value.length === 0)
- return;
- const {
- validateFirst: ye = !1
- } = t, {
- triggerName: se
- } = ue || {};
- let he = S.value;
- if (se && (he = he.filter((q) => {
- const {
- trigger: K
- } = q;
- return !K && !O.value.length ? !0 : tf(K || O.value).includes(se);
- })), !he.length)
- return Promise.resolve();
- const re = uae(v.value, y.value, he, k({
- validateMessages: c.validateMessages.value
- }, ue), ye, P.value);
- return C.value = "validating", d.value = [], re.catch((q) => q).then(function() {
- let q = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- if (C.value === "validating") {
- const K = q.filter((de) => de && de.errors.length);
- C.value = K.length ? "error" : "success", d.value = K.map((de) => de.errors), c.onValidate(f.value, !d.value.length, d.value.length ? es(d.value[0]) : null);
- }
- }), re;
- }, T = () => {
- $({
- triggerName: "blur"
- });
- }, E = () => {
- if (h.value) {
- h.value = !1;
- return;
- }
- $({
- triggerName: "change"
- });
- }, M = () => {
- C.value = t.validateStatus, h.value = !1, d.value = [];
- }, R = () => {
- var ue;
- C.value = t.validateStatus, h.value = !0, d.value = [];
- const ye = c.model.value || {}, se = y.value, he = hE(ye, v.value, !0);
- Array.isArray(se) ? he.o[he.k] = [].concat((ue = _.value) !== null && ue !== void 0 ? ue : []) : he.o[he.k] = _.value, Bt(() => {
- h.value = !1;
- });
- }, N = V(() => t.htmlFor === void 0 ? g.value : t.htmlFor), I = () => {
- const ue = N.value;
- if (!ue || !p.value)
- return;
- const ye = p.value.$el.querySelector(`[id="${ue}"]`);
- ye && ye.focus && ye.focus();
- };
- i({
- onFieldBlur: T,
- onFieldChange: E,
- clearValidate: M,
- resetField: R
- }), C5e({
- id: g,
- onFieldBlur: () => {
- t.autoLink && T();
- },
- onFieldChange: () => {
- t.autoLink && E();
- },
- clearValidate: M
- }, V(() => !!(t.autoLink && c.model.value && f.value)));
- let B = !1;
- me(f, (ue) => {
- ue ? B || (B = !0, c.addField(a, {
- fieldValue: y,
- fieldId: g,
- fieldName: f,
- resetField: R,
- clearValidate: M,
- namePath: v,
- validateRules: $,
- rules: S
- })) : (B = !1, c.removeField(a));
- }, {
- immediate: !0
- }), Qt(() => {
- c.removeField(a);
- });
- const Q = Fze(d), W = V(() => t.validateStatus !== void 0 ? t.validateStatus : Q.value.length ? "error" : C.value), H = V(() => ({
- [`${o.value}-item`]: !0,
- [l.value]: !0,
- // Status
- [`${o.value}-item-has-feedback`]: W.value && t.hasFeedback,
- [`${o.value}-item-has-success`]: W.value === "success",
- [`${o.value}-item-has-warning`]: W.value === "warning",
- [`${o.value}-item-has-error`]: W.value === "error",
- [`${o.value}-item-is-validating`]: W.value === "validating",
- [`${o.value}-item-hidden`]: t.hidden
- })), U = zn({});
- Qs.useProvide(U), Vt(() => {
- let ue;
- if (t.hasFeedback) {
- const ye = W.value && Wze[W.value];
- ue = ye ? D("span", {
- class: Re(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${W.value}`)
- }, [D(ye, null, null)]) : null;
- }
- k(U, {
- status: W.value,
- hasFeedback: t.hasFeedback,
- feedbackIcon: ue,
- isFormItemInput: !0
- });
- });
- const j = ve(null), Y = ve(!1), ne = () => {
- if (u.value) {
- const ue = getComputedStyle(u.value);
- j.value = parseInt(ue.marginBottom, 10);
- }
- };
- _t(() => {
- me(Y, () => {
- Y.value && ne();
- }, {
- flush: "post",
- immediate: !0
- });
- });
- const fe = (ue) => {
- ue || (j.value = null);
- };
- return () => {
- var ue, ye;
- if (t.noStyle) return (ue = n.default) === null || ue === void 0 ? void 0 : ue.call(n);
- const se = (ye = t.help) !== null && ye !== void 0 ? ye : n.help ? Zl(n.help()) : null, he = !!(se != null && Array.isArray(se) && se.length || Q.value.length);
- return Y.value = he, s(D("div", {
- class: [H.value, he ? `${o.value}-item-with-help` : "", r.class],
- ref: u
- }, [D(hze, te(te({}, r), {}, {
- class: `${o.value}-item-row`,
- key: "row"
- }), {
- default: () => {
- var re, q;
- return D(Wt, null, [D(A8, te(te({}, t), {}, {
- htmlFor: N.value,
- required: x.value,
- requiredMark: c.requiredMark.value,
- prefixCls: o.value,
- onClick: I,
- label: t.label
- }), {
- label: n.label,
- tooltip: n.tooltip
- }), D(Vze, te(te({}, t), {}, {
- errors: se != null ? tf(se) : Q.value,
- marginBottom: j.value,
- prefixCls: o.value,
- status: W.value,
- ref: p,
- help: se,
- extra: (re = t.extra) !== null && re !== void 0 ? re : (q = n.extra) === null || q === void 0 ? void 0 : q.call(n),
- onErrorVisibleChanged: fe
- }), {
- default: n.default
- })]);
- }
- }), !!j.value && D("div", {
- class: `${o.value}-margin-offset`,
- style: {
- marginBottom: `-${j.value}px`
- }
- }, null)]));
- };
- }
- });
- function vae(t) {
- let e = !1, n = t.length;
- const r = [];
- return t.length ? new Promise((i, a) => {
- t.forEach((o, s) => {
- o.catch((l) => (e = !0, l)).then((l) => {
- n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
- });
- });
- }) : Promise.resolve([]);
- }
- function qQ(t) {
- let e = !1;
- return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
- }
- function KQ(t) {
- return t == null ? [] : Array.isArray(t) ? t : [t];
- }
- function pE(t, e, n) {
- let r = t;
- e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
- const i = e.split(".");
- let a = 0;
- for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
- const s = i[a];
- if (s in r)
- r = r[s];
- else {
- if (n)
- throw new Error("please transfer a valid name path to validate!");
- break;
- }
- }
- return {
- o: r,
- k: i[a],
- v: r ? r[i[a]] : null,
- isValid: r && i[a] in r
- };
- }
- function jze(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ee({}), n = arguments.length > 2 ? arguments[2] : void 0;
- const r = ph(z(t)), i = zn({}), a = ve([]), o = (_) => {
- k(z(t), k(k({}, ph(r)), _)), Bt(() => {
- Object.keys(i).forEach((O) => {
- i[O] = {
- autoLink: !1,
- required: qQ(z(e)[O])
- };
- });
- });
- }, s = function() {
- let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], O = arguments.length > 1 ? arguments[1] : void 0;
- return O.length ? _.filter((S) => {
- const x = KQ(S.trigger || "change");
- return ZPe(x, O).length;
- }) : _;
- };
- let l = null;
- const u = function(_) {
- let O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = arguments.length > 2 ? arguments[2] : void 0;
- const x = [], C = {};
- for (let T = 0; T < _.length; T++) {
- const E = _[T], M = pE(z(t), E, S);
- if (!M.isValid) continue;
- C[E] = M.v;
- const R = s(z(e)[E], KQ(O && O.trigger));
- R.length && x.push(c(E, M.v, R, O || {}).then(() => ({
- name: E,
- errors: [],
- warnings: []
- })).catch((N) => {
- const I = [], B = [];
- return N.forEach((Q) => {
- let {
- rule: {
- warningOnly: W
- },
- errors: H
- } = Q;
- W ? B.push(...H) : I.push(...H);
- }), I.length ? Promise.reject({
- name: E,
- errors: I,
- warnings: B
- }) : {
- name: E,
- errors: I,
- warnings: B
- };
- }));
- }
- const P = vae(x);
- l = P;
- const $ = P.then(() => l === P ? Promise.resolve(C) : Promise.reject([])).catch((T) => {
- const E = T.filter((M) => M && M.errors.length);
- return E.length ? Promise.reject({
- values: C,
- errorFields: E,
- outOfDate: l !== P
- }) : Promise.resolve(C);
- });
- return $.catch((T) => T), $;
- }, c = function(_, O, S) {
- let x = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
- const C = uae([_], O, S, k({
- validateMessages: Z2
- }, x), !!x.validateFirst);
- return i[_] ? (i[_].validateStatus = "validating", C.catch((P) => P).then(function() {
- let P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- var $;
- if (i[_].validateStatus === "validating") {
- const T = P.filter((E) => E && E.errors.length);
- i[_].validateStatus = T.length ? "error" : "success", i[_].help = T.length ? T.map((E) => E.errors) : null, ($ = n == null ? void 0 : n.onValidate) === null || $ === void 0 || $.call(n, _, !T.length, T.length ? es(i[_].help[0]) : null);
- }
- }), C) : C.catch((P) => P);
- }, f = (_, O) => {
- let S = [], x = !0;
- _ ? Array.isArray(_) ? S = _ : S = [_] : (x = !1, S = a.value);
- const C = u(S, O || {}, x);
- return C.catch((P) => P), C;
- }, d = (_) => {
- let O = [];
- _ ? Array.isArray(_) ? O = _ : O = [_] : O = a.value, O.forEach((S) => {
- i[S] && k(i[S], {
- validateStatus: "",
- help: null
- });
- });
- }, h = (_) => {
- const O = {
- autoLink: !1
- }, S = [], x = Array.isArray(_) ? _ : [_];
- for (let C = 0; C < x.length; C++) {
- const P = x[C];
- (P == null ? void 0 : P.validateStatus) === "error" && (O.validateStatus = "error", P.help && S.push(P.help)), O.required = O.required || (P == null ? void 0 : P.required);
- }
- return O.help = S, O;
- };
- let p = r, v = !0;
- const g = (_) => {
- const O = [];
- a.value.forEach((S) => {
- const x = pE(_, S, !1), C = pE(p, S, !1);
- (v && (n == null ? void 0 : n.immediate) && x.isValid || !z_(x.v, C.v)) && O.push(S);
- }), f(O, {
- trigger: "change"
- }), v = !1, p = ph(es(_));
- }, m = n == null ? void 0 : n.debounce;
- let y = !0;
- return me(e, () => {
- a.value = e ? Object.keys(z(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
- }, {
- deep: !0,
- immediate: !0
- }), me(a, () => {
- const _ = {};
- a.value.forEach((O) => {
- _[O] = k({}, i[O], {
- autoLink: !1,
- required: qQ(z(e)[O])
- }), delete i[O];
- });
- for (const O in i)
- Object.prototype.hasOwnProperty.call(i, O) && delete i[O];
- k(i, _);
- }, {
- immediate: !0
- }), me(t, m && m.wait ? hN(g, m.wait, mte(m, ["wait"])) : g, {
- immediate: n && !!n.immediate,
- deep: !0
- }), {
- modelRef: t,
- rulesRef: e,
- initialModel: r,
- validateInfos: i,
- resetFields: o,
- validate: f,
- validateField: c,
- mergeValidateInfo: h,
- clearValidate: d
- };
- }
- const Zze = () => ({
- layout: oe.oneOf(pf("horizontal", "inline", "vertical")),
- labelCol: sn(),
- wrapperCol: sn(),
- colon: Tt(),
- labelAlign: rr(),
- labelWrap: Tt(),
- prefixCls: String,
- requiredMark: or([String, Boolean]),
- /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
- hideRequiredMark: Tt(),
- model: oe.object,
- rules: sn(),
- validateMessages: sn(),
- validateOnRuleChange: Tt(),
- // 提交失败自动滚动到第一个错误字段
- scrollToFirstError: Fo(),
- onSubmit: Ct(),
- name: String,
- validateTrigger: or([String, Array]),
- size: rr(),
- disabled: Tt(),
- onValuesChange: Ct(),
- onFieldsChange: Ct(),
- onFinish: Ct(),
- onFinishFailed: Ct(),
- onValidate: Ct()
- });
- function Uze(t, e) {
- return z_(tf(t), tf(e));
- }
- const Gr = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AForm",
- inheritAttrs: !1,
- props: li(Zze(), {
- layout: "horizontal",
- hideRequiredMark: !1,
- colon: !0
- }),
- Item: pae,
- useForm: jze,
- // emits: ['finishFailed', 'submit', 'finish', 'validate'],
- setup(t, e) {
- let {
- emit: n,
- slots: r,
- expose: i,
- attrs: a
- } = e;
- const {
- prefixCls: o,
- direction: s,
- form: l,
- size: u,
- disabled: c
- } = hn("form", t), f = V(() => t.requiredMark === "" || t.requiredMark), d = V(() => {
- var Q;
- return f.value !== void 0 ? f.value : l && ((Q = l.value) === null || Q === void 0 ? void 0 : Q.requiredMark) !== void 0 ? l.value.requiredMark : !t.hideRequiredMark;
- });
- Sre(u), zne(c);
- const h = V(() => {
- var Q, W;
- return (Q = t.colon) !== null && Q !== void 0 ? Q : (W = l.value) === null || W === void 0 ? void 0 : W.colon;
- }), {
- validateMessages: p
- } = fke(), v = V(() => k(k(k({}, Z2), p.value), t.validateMessages)), [g, m] = E8(o), y = V(() => Re(o.value, {
- [`${o.value}-${t.layout}`]: !0,
- [`${o.value}-hide-required-mark`]: d.value === !1,
- [`${o.value}-rtl`]: s.value === "rtl",
- [`${o.value}-${u.value}`]: u.value
- }, m.value)), _ = ee(), O = {}, S = (Q, W) => {
- O[Q] = W;
- }, x = (Q) => {
- delete O[Q];
- }, C = (Q) => {
- const W = !!Q, H = W ? tf(Q).map(LR) : [];
- return W ? Object.values(O).filter((U) => H.findIndex((j) => Uze(j, U.fieldName.value)) > -1) : Object.values(O);
- }, P = (Q) => {
- if (!t.model) {
- aa(!1, "Form", "model is required for resetFields to work.");
- return;
- }
- C(Q).forEach((W) => {
- W.resetField();
- });
- }, $ = (Q) => {
- C(Q).forEach((W) => {
- W.clearValidate();
- });
- }, T = (Q) => {
- const {
- scrollToFirstError: W
- } = t;
- if (n("finishFailed", Q), W && Q.errorFields.length) {
- let H = {};
- typeof W == "object" && (H = W), M(Q.errorFields[0].name, H);
- }
- }, E = function() {
- return I(...arguments);
- }, M = function(Q) {
- let W = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- const H = C(Q ? [Q] : void 0);
- if (H.length) {
- const U = H[0].fieldId.value, j = U ? document.getElementById(U) : null;
- j && YLe(j, k({
- scrollMode: "if-needed",
- block: "nearest"
- }, W));
- }
- }, R = function() {
- let Q = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
- if (Q === !0) {
- const W = [];
- return Object.values(O).forEach((H) => {
- let {
- namePath: U
- } = H;
- W.push(U.value);
- }), UQ(t.model, W);
- } else
- return UQ(t.model, Q);
- }, N = (Q, W) => {
- if (aa(!(Q instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
- return aa(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
- const H = !!Q, U = H ? tf(Q).map(LR) : [], j = [];
- Object.values(O).forEach((fe) => {
- var ue;
- if (H || U.push(fe.namePath.value), !(!((ue = fe.rules) === null || ue === void 0) && ue.value.length))
- return;
- const ye = fe.namePath.value;
- if (!H || mze(U, ye)) {
- const se = fe.validateRules(k({
- validateMessages: v.value
- }, W));
- j.push(se.then(() => ({
- name: ye,
- errors: [],
- warnings: []
- })).catch((he) => {
- const re = [], q = [];
- return he.forEach((K) => {
- let {
- rule: {
- warningOnly: de
- },
- errors: xe
- } = K;
- de ? q.push(...xe) : re.push(...xe);
- }), re.length ? Promise.reject({
- name: ye,
- errors: re,
- warnings: q
- }) : {
- name: ye,
- errors: re,
- warnings: q
- };
- }));
- }
- });
- const Y = vae(j);
- _.value = Y;
- const ne = Y.then(() => _.value === Y ? Promise.resolve(R(U)) : Promise.reject([])).catch((fe) => {
- const ue = fe.filter((ye) => ye && ye.errors.length);
- return Promise.reject({
- values: R(U),
- errorFields: ue,
- outOfDate: _.value !== Y
- });
- });
- return ne.catch((fe) => fe), ne;
- }, I = function() {
- return N(...arguments);
- }, B = (Q) => {
- Q.preventDefault(), Q.stopPropagation(), n("submit", Q), t.model && N().then((H) => {
- n("finish", H);
- }).catch((H) => {
- T(H);
- });
- };
- return i({
- resetFields: P,
- clearValidate: $,
- validateFields: N,
- getFieldsValue: R,
- validate: E,
- scrollToField: M
- }), fae({
- model: V(() => t.model),
- name: V(() => t.name),
- labelAlign: V(() => t.labelAlign),
- labelCol: V(() => t.labelCol),
- labelWrap: V(() => t.labelWrap),
- wrapperCol: V(() => t.wrapperCol),
- vertical: V(() => t.layout === "vertical"),
- colon: h,
- requiredMark: d,
- validateTrigger: V(() => t.validateTrigger),
- rules: V(() => t.rules),
- addField: S,
- removeField: x,
- onValidate: (Q, W, H) => {
- n("validate", Q, W, H);
- },
- validateMessages: v
- }), me(() => t.rules, () => {
- t.validateOnRuleChange && N();
- }), () => {
- var Q;
- return g(D("form", te(te({}, a), {}, {
- onSubmit: B,
- class: [y.value, a.class]
- }), [(Q = r.default) === null || Q === void 0 ? void 0 : Q.call(r)]));
- };
- }
- });
- Gr.useInjectFormItemContext = Ul;
- Gr.ItemRest = Lb;
- Gr.install = function(t) {
- return t.component(Gr.name, Gr), t.component(Gr.Item.name, Gr.Item), t.component(Lb.name, Lb), t;
- };
- const Xze = new qt("antCheckboxEffect", {
- "0%": {
- transform: "scale(1)",
- opacity: 0.5
- },
- "100%": {
- transform: "scale(1.6)",
- opacity: 0
- }
- }), Yze = (t) => {
- const {
- checkboxCls: e
- } = t, n = `${e}-wrapper`;
- return [
- // ===================== Basic =====================
- {
- // Group
- [`${e}-group`]: k(k({}, Gn(t)), {
- display: "inline-flex",
- flexWrap: "wrap",
- columnGap: t.marginXS,
- // Group > Grid
- [`> ${t.antCls}-row`]: {
- flex: 1
- }
- }),
- // Wrapper
- [n]: k(k({}, Gn(t)), {
- display: "inline-flex",
- alignItems: "baseline",
- cursor: "pointer",
- // Fix checkbox & radio in flex align #30260
- "&:after": {
- display: "inline-block",
- width: 0,
- overflow: "hidden",
- content: "'\\a0'"
- },
- // Checkbox near checkbox
- [`& + ${n}`]: {
- marginInlineStart: 0
- },
- [`&${n}-in-form-item`]: {
- 'input[type="checkbox"]': {
- width: 14,
- height: 14
- // FIXME: magic
- }
- }
- }),
- // Wrapper > Checkbox
- [e]: k(k({}, Gn(t)), {
- position: "relative",
- whiteSpace: "nowrap",
- lineHeight: 1,
- cursor: "pointer",
- // To make alignment right when `controlHeight` is changed
- // Ref: https://github.com/ant-design/ant-design/issues/41564
- alignSelf: "center",
- // Wrapper > Checkbox > input
- [`${e}-input`]: {
- position: "absolute",
- // Since baseline align will get additional space offset,
- // we need to move input to top to make it align with text.
- // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
- inset: 0,
- zIndex: 1,
- cursor: "pointer",
- opacity: 0,
- margin: 0,
- [`&:focus-visible + ${e}-inner`]: k({}, G_(t))
- },
- // Wrapper > Checkbox > inner
- [`${e}-inner`]: {
- boxSizing: "border-box",
- position: "relative",
- top: 0,
- insetInlineStart: 0,
- display: "block",
- width: t.checkboxSize,
- height: t.checkboxSize,
- direction: "ltr",
- backgroundColor: t.colorBgContainer,
- border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
- borderRadius: t.borderRadiusSM,
- borderCollapse: "separate",
- transition: `all ${t.motionDurationSlow}`,
- "&:after": {
- boxSizing: "border-box",
- position: "absolute",
- top: "50%",
- insetInlineStart: "21.5%",
- display: "table",
- width: t.checkboxSize / 14 * 5,
- height: t.checkboxSize / 14 * 8,
- border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
- borderTop: 0,
- borderInlineStart: 0,
- transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
- opacity: 0,
- content: '""',
- transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
- }
- },
- // Wrapper > Checkbox + Text
- "& + span": {
- paddingInlineStart: t.paddingXS,
- paddingInlineEnd: t.paddingXS
- }
- })
- },
- // ================= Indeterminate =================
- {
- [e]: {
- "&-indeterminate": {
- // Wrapper > Checkbox > inner
- [`${e}-inner`]: {
- "&:after": {
- top: "50%",
- insetInlineStart: "50%",
- width: t.fontSizeLG / 2,
- height: t.fontSizeLG / 2,
- backgroundColor: t.colorPrimary,
- border: 0,
- transform: "translate(-50%, -50%) scale(1)",
- opacity: 1,
- content: '""'
- }
- }
- }
- }
- },
- // ===================== Hover =====================
- {
- // Wrapper
- [`${n}:hover ${e}:after`]: {
- visibility: "visible"
- },
- // Wrapper & Wrapper > Checkbox
- [`
- ${n}:not(${n}-disabled),
- ${e}:not(${e}-disabled)
- `]: {
- [`&:hover ${e}-inner`]: {
- borderColor: t.colorPrimary
- }
- },
- [`${n}:not(${n}-disabled)`]: {
- [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
- backgroundColor: t.colorPrimaryHover,
- borderColor: "transparent"
- },
- [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
- borderColor: t.colorPrimaryHover
- }
- }
- },
- // ==================== Checked ====================
- {
- // Wrapper > Checkbox
- [`${e}-checked`]: {
- [`${e}-inner`]: {
- backgroundColor: t.colorPrimary,
- borderColor: t.colorPrimary,
- "&:after": {
- opacity: 1,
- transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
- transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
- }
- },
- // Checked Effect
- "&:after": {
- position: "absolute",
- top: 0,
- insetInlineStart: 0,
- width: "100%",
- height: "100%",
- borderRadius: t.borderRadiusSM,
- visibility: "hidden",
- border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
- animationName: Xze,
- animationDuration: t.motionDurationSlow,
- animationTimingFunction: "ease-in-out",
- animationFillMode: "backwards",
- content: '""',
- transition: `all ${t.motionDurationSlow}`
- }
- },
- [`
- ${n}-checked:not(${n}-disabled),
- ${e}-checked:not(${e}-disabled)
- `]: {
- [`&:hover ${e}-inner`]: {
- backgroundColor: t.colorPrimaryHover,
- borderColor: "transparent"
- },
- [`&:hover ${e}:after`]: {
- borderColor: t.colorPrimaryHover
- }
- }
- },
- // ==================== Disable ====================
- {
- // Wrapper
- [`${n}-disabled`]: {
- cursor: "not-allowed"
- },
- // Wrapper > Checkbox
- [`${e}-disabled`]: {
- // Wrapper > Checkbox > input
- [`&, ${e}-input`]: {
- cursor: "not-allowed",
- // Disabled for native input to enable Tooltip event handler
- // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
- pointerEvents: "none"
- },
- // Wrapper > Checkbox > inner
- [`${e}-inner`]: {
- background: t.colorBgContainerDisabled,
- borderColor: t.colorBorder,
- "&:after": {
- borderColor: t.colorTextDisabled
- }
- },
- "&:after": {
- display: "none"
- },
- "& + span": {
- color: t.colorTextDisabled
- },
- [`&${e}-indeterminate ${e}-inner::after`]: {
- background: t.colorTextDisabled
- }
- }
- }
- ];
- };
- function qze(t, e) {
- const n = bn(e, {
- checkboxCls: `.${t}`,
- checkboxSize: e.controlInteractiveSize
- });
- return [Yze(n)];
- }
- const gae = pr("Checkbox", (t, e) => {
- let {
- prefixCls: n
- } = e;
- return [qze(n, t)];
- }), Kze = () => ({
- name: String,
- prefixCls: String,
- options: Lh([]),
- disabled: Boolean,
- id: String
- }), Jze = () => k(k({}, Kze()), {
- defaultValue: Lh(),
- value: Lh(),
- onChange: Ct(),
- "onUpdate:value": Ct()
- }), eVe = () => ({
- prefixCls: String,
- defaultChecked: Tt(),
- checked: Tt(),
- disabled: Tt(),
- isGroup: Tt(),
- value: oe.any,
- name: String,
- id: String,
- indeterminate: Tt(),
- type: rr("checkbox"),
- autofocus: Tt(),
- onChange: Ct(),
- "onUpdate:checked": Ct(),
- onClick: Ct(),
- skipGroup: Tt(!1)
- }), tVe = () => k(k({}, eVe()), {
- indeterminate: Tt(!1)
- }), mae = Symbol("CheckboxGroupContext");
- var JQ = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const Qy = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ACheckbox",
- inheritAttrs: !1,
- __ANT_CHECKBOX: !0,
- props: tVe(),
- // emits: ['change', 'update:checked'],
- setup(t, e) {
- let {
- emit: n,
- attrs: r,
- slots: i,
- expose: a
- } = e;
- const o = Ul(), s = Qs.useInject(), {
- prefixCls: l,
- direction: u,
- disabled: c
- } = hn("checkbox", t), f = Vl(), [d, h] = gae(l), p = et(mae, void 0), v = Symbol("checkboxUniId"), g = V(() => (p == null ? void 0 : p.disabled.value) || c.value);
- Vt(() => {
- !t.skipGroup && p && p.registerValue(v, t.value);
- }), Qt(() => {
- p && p.cancelValue(v);
- }), _t(() => {
- aa(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
- });
- const m = (S) => {
- const x = S.target.checked;
- n("update:checked", x), n("change", S), o.onFieldChange();
- }, y = ee();
- return a({
- focus: () => {
- var S;
- (S = y.value) === null || S === void 0 || S.focus();
- },
- blur: () => {
- var S;
- (S = y.value) === null || S === void 0 || S.blur();
- }
- }), () => {
- var S;
- const x = qr((S = i.default) === null || S === void 0 ? void 0 : S.call(i)), {
- indeterminate: C,
- skipGroup: P,
- id: $ = o.id.value
- } = t, T = JQ(t, ["indeterminate", "skipGroup", "id"]), {
- onMouseenter: E,
- onMouseleave: M,
- onInput: R,
- class: N,
- style: I
- } = r, B = JQ(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), Q = k(k(k(k({}, T), {
- id: $,
- prefixCls: l.value
- }), B), {
- disabled: g.value
- });
- p && !P ? (Q.onChange = function() {
- for (var j = arguments.length, Y = new Array(j), ne = 0; ne < j; ne++)
- Y[ne] = arguments[ne];
- n("change", ...Y), p.toggleOption({
- label: x,
- value: t.value
- });
- }, Q.name = p.name.value, Q.checked = p.mergedValue.value.includes(t.value), Q.disabled = g.value || f.value, Q.indeterminate = C) : Q.onChange = m;
- const W = Re({
- [`${l.value}-wrapper`]: !0,
- [`${l.value}-rtl`]: u.value === "rtl",
- [`${l.value}-wrapper-checked`]: Q.checked,
- [`${l.value}-wrapper-disabled`]: Q.disabled,
- [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
- }, N, h.value), H = Re({
- [`${l.value}-indeterminate`]: C
- }, h.value);
- return d(D("label", {
- class: W,
- style: I,
- onMouseenter: E,
- onMouseleave: M
- }, [D(Fie, te(te({
- "aria-checked": C ? "mixed" : void 0
- }, Q), {}, {
- class: H,
- ref: y
- }), null), x.length ? D("span", null, [x]) : null]));
- };
- }
- }), dC = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ACheckboxGroup",
- inheritAttrs: !1,
- props: Jze(),
- // emits: ['change', 'update:value'],
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- emit: i,
- expose: a
- } = e;
- const o = Ul(), {
- prefixCls: s,
- direction: l
- } = hn("checkbox", t), u = V(() => `${s.value}-group`), [c, f] = gae(u), d = ee((t.value === void 0 ? t.defaultValue : t.value) || []);
- me(() => t.value, () => {
- d.value = t.value || [];
- });
- const h = V(() => t.options.map((O) => typeof O == "string" || typeof O == "number" ? {
- label: O,
- value: O
- } : O)), p = ee(Symbol()), v = ee(/* @__PURE__ */ new Map()), g = (O) => {
- v.value.delete(O), p.value = Symbol();
- }, m = (O, S) => {
- v.value.set(O, S), p.value = Symbol();
- }, y = ee(/* @__PURE__ */ new Map());
- return me(p, () => {
- const O = /* @__PURE__ */ new Map();
- for (const S of v.value.values())
- O.set(S, !0);
- y.value = O;
- }), Et(mae, {
- cancelValue: g,
- registerValue: m,
- toggleOption: (O) => {
- const S = d.value.indexOf(O.value), x = [...d.value];
- S === -1 ? x.push(O.value) : x.splice(S, 1), t.value === void 0 && (d.value = x);
- const C = x.filter((P) => y.value.has(P)).sort((P, $) => {
- const T = h.value.findIndex((M) => M.value === P), E = h.value.findIndex((M) => M.value === $);
- return T - E;
- });
- i("update:value", C), i("change", C), o.onFieldChange();
- },
- mergedValue: d,
- name: V(() => t.name),
- disabled: V(() => t.disabled)
- }), a({
- mergedValue: d
- }), () => {
- var O;
- const {
- id: S = o.id.value
- } = t;
- let x = null;
- return h.value && h.value.length > 0 && (x = h.value.map((C) => {
- var P;
- return D(Qy, {
- prefixCls: s.value,
- key: C.value.toString(),
- disabled: "disabled" in C ? C.disabled : t.disabled,
- indeterminate: C.indeterminate,
- value: C.value,
- checked: d.value.indexOf(C.value) !== -1,
- onChange: C.onChange,
- class: `${u.value}-item`
- }, {
- default: () => [n.label !== void 0 ? (P = n.label) === null || P === void 0 ? void 0 : P.call(n, C) : C.label]
- });
- })), c(D("div", te(te({}, r), {}, {
- class: [u.value, {
- [`${u.value}-rtl`]: l.value === "rtl"
- }, r.class, f.value],
- id: S
- }), [x || ((O = n.default) === null || O === void 0 ? void 0 : O.call(n))]));
- };
- }
- });
- Qy.Group = dC;
- Qy.install = function(t) {
- return t.component(Qy.name, Qy), t.component(dC.name, dC), t;
- };
- let Jx = k({}, Nu.Modal);
- function nVe(t) {
- t ? Jx = k(k({}, Jx), t) : Jx = k({}, Nu.Modal);
- }
- function rVe() {
- return Jx;
- }
- const BR = "internalMark", ew = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ALocaleProvider",
- props: {
- locale: {
- type: Object
- },
- ANT_MARK__: String
- },
- setup(t, e) {
- let {
- slots: n
- } = e;
- aa(t.ANT_MARK__ === BR, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
- const r = zn({
- antLocale: k(k({}, t.locale), {
- exist: !0
- }),
- ANT_MARK__: BR
- });
- return Et("localeData", r), me(() => t.locale, (i) => {
- nVe(i && i.Modal), r.antLocale = k(k({}, i), {
- exist: !0
- });
- }, {
- immediate: !0
- }), () => {
- var i;
- return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
- };
- }
- });
- ew.install = function(t) {
- return t.component(ew.name, ew), t;
- };
- const iVe = fm(ew), X2 = ae({
- name: "Notice",
- inheritAttrs: !1,
- props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e, i, a = !1;
- const o = V(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
- o.value && !a && (i = setTimeout(() => {
- u();
- }, o.value * 1e3));
- }, l = () => {
- i && (clearTimeout(i), i = null);
- }, u = (f) => {
- f && f.stopPropagation(), l();
- const {
- onClose: d,
- noticeKey: h
- } = t;
- d && d(h);
- }, c = () => {
- l(), s();
- };
- return _t(() => {
- s();
- }), qu(() => {
- a = !0, l();
- }), me([o, () => t.updateMark, () => t.visible], (f, d) => {
- let [h, p, v] = f, [g, m, y] = d;
- (h !== g || p !== m || v !== y && y) && c();
- }, {
- flush: "post"
- }), () => {
- var f, d;
- const {
- prefixCls: h,
- closable: p,
- closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
- onClick: g,
- holder: m
- } = t, {
- class: y,
- style: _
- } = n, O = `${h}-notice`, S = Object.keys(n).reduce((C, P) => ((P.startsWith("data-") || P.startsWith("aria-") || P === "role") && (C[P] = n[P]), C), {}), x = D("div", te({
- class: Re(O, y, {
- [`${O}-closable`]: p
- }),
- style: _,
- onMouseenter: l,
- onMouseleave: s,
- onClick: g
- }, S), [D("div", {
- class: `${O}-content`
- }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? D("a", {
- tabindex: 0,
- onClick: u,
- class: `${O}-close`
- }, [v || D("span", {
- class: `${O}-close-x`
- }, null)]) : null]);
- return m ? D(R_, {
- to: m
- }, {
- default: () => x
- }) : x;
- };
- }
- });
- var aVe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- let e9 = 0;
- const oVe = Date.now();
- function t9() {
- const t = e9;
- return e9 += 1, `rcNotification_${oVe}_${t}`;
- }
- const hC = ae({
- name: "Notification",
- inheritAttrs: !1,
- props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
- setup(t, e) {
- let {
- attrs: n,
- expose: r,
- slots: i
- } = e;
- const a = /* @__PURE__ */ new Map(), o = ee([]), s = V(() => {
- const {
- prefixCls: c,
- animation: f = "fade"
- } = t;
- let d = t.transitionName;
- return !d && f && (d = `${c}-${f}`), JN(d);
- }), l = (c, f) => {
- const d = c.key || t9(), h = k(k({}, c), {
- key: d
- }), {
- maxCount: p
- } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
- v !== -1 ? g.splice(v, 1, {
- notice: h,
- holderCallback: f
- }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = t9(), h.userPassKey = d, g.shift()), g.push({
- notice: h,
- holderCallback: f
- })), o.value = g;
- }, u = (c) => {
- o.value = o.value.filter((f) => {
- let {
- notice: {
- key: d,
- userPassKey: h
- }
- } = f;
- return (h || d) !== c;
- });
- };
- return r({
- add: l,
- remove: u,
- notices: o
- }), () => {
- var c;
- const {
- prefixCls: f,
- closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
- prefixCls: f
- })
- } = t, h = o.value.map((v, g) => {
- let {
- notice: m,
- holderCallback: y
- } = v;
- const _ = g === o.value.length - 1 ? m.updateMark : void 0, {
- key: O,
- userPassKey: S
- } = m, {
- content: x
- } = m, C = k(k(k({
- prefixCls: f,
- closeIcon: typeof d == "function" ? d({
- prefixCls: f
- }) : d
- }, m), m.props), {
- key: O,
- noticeKey: S || O,
- updateMark: _,
- onClose: (P) => {
- var $;
- u(P), ($ = m.onClose) === null || $ === void 0 || $.call(m);
- },
- onClick: m.onClick
- });
- return y ? D("div", {
- key: O,
- class: `${f}-hook-holder`,
- ref: (P) => {
- typeof O > "u" || (P ? (a.set(O, P), y(P, C)) : a.delete(O));
- }
- }, null) : D(X2, te(te({}, C), {}, {
- class: Re(C.class, t.hashId)
- }), {
- default: () => [typeof x == "function" ? x({
- prefixCls: f
- }) : x]
- });
- }), p = {
- [f]: 1,
- [n.class]: !!n.class,
- [t.hashId]: !0
- };
- return D("div", {
- class: p,
- style: n.style || {
- top: "65px",
- left: "50%"
- }
- }, [D(X4, te({
- tag: "div"
- }, s.value), {
- default: () => [h]
- })]);
- };
- }
- });
- hC.newInstance = function(e, n) {
- const r = e || {}, {
- name: i = "notification",
- getContainer: a,
- appContext: o,
- prefixCls: s,
- rootPrefixCls: l,
- transitionName: u,
- hasTransitionName: c,
- useStyle: f
- } = r, d = aVe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
- a ? a().appendChild(h) : document.body.appendChild(h);
- const p = ae({
- compatConfig: {
- MODE: 3
- },
- name: "NotificationWrapper",
- setup(g, m) {
- let {
- attrs: y
- } = m;
- const _ = ve(), O = V(() => gi.getPrefixCls(i, s)), [, S] = f(O);
- return _t(() => {
- n({
- notice(x) {
- var C;
- (C = _.value) === null || C === void 0 || C.add(x);
- },
- removeNotice(x) {
- var C;
- (C = _.value) === null || C === void 0 || C.remove(x);
- },
- destroy() {
- Ih(null, h), h.parentNode && h.parentNode.removeChild(h);
- },
- component: _
- });
- }), () => {
- const x = gi, C = x.getRootPrefixCls(l, O.value), P = c ? u : `${O.value}-${u}`;
- return D(Gv, te(te({}, x), {}, {
- prefixCls: C
- }), {
- default: () => [D(hC, te(te({
- ref: _
- }, y), {}, {
- prefixCls: O.value,
- transitionName: P,
- hashId: S.value
- }), null)]
- });
- };
- }
- }), v = D(p, d);
- v.appContext = o || v.appContext, Ih(v, h);
- };
- let n9 = 0;
- const sVe = Date.now();
- function r9() {
- const t = n9;
- return n9 += 1, `rcNotification_${sVe}_${t}`;
- }
- const lVe = ae({
- name: "HookNotification",
- inheritAttrs: !1,
- props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const i = /* @__PURE__ */ new Map(), a = V(() => t.notices), o = V(() => {
- let c = t.transitionName;
- if (!c && t.animation)
- switch (typeof t.animation) {
- case "string":
- c = t.animation;
- break;
- case "function":
- c = t.animation().name;
- break;
- case "object":
- c = t.animation.name;
- break;
- default:
- c = `${t.prefixCls}-fade`;
- break;
- }
- return JN(c);
- }), s = (c) => t.remove(c), l = ee({});
- me(a, () => {
- const c = {};
- Object.keys(l.value).forEach((f) => {
- c[f] = [];
- }), t.notices.forEach((f) => {
- const {
- placement: d = "topRight"
- } = f.notice;
- d && (c[d] = c[d] || [], c[d].push(f));
- }), l.value = c;
- });
- const u = V(() => Object.keys(l.value));
- return () => {
- var c;
- const {
- prefixCls: f,
- closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
- prefixCls: f
- })
- } = t, h = u.value.map((p) => {
- var v, g;
- const m = l.value[p], y = (v = t.getClassName) === null || v === void 0 ? void 0 : v.call(t, p), _ = (g = t.getStyles) === null || g === void 0 ? void 0 : g.call(t, p), O = m.map((C, P) => {
- let {
- notice: $,
- holderCallback: T
- } = C;
- const E = P === a.value.length - 1 ? $.updateMark : void 0, {
- key: M,
- userPassKey: R
- } = $, {
- content: N
- } = $, I = k(k(k({
- prefixCls: f,
- closeIcon: typeof d == "function" ? d({
- prefixCls: f
- }) : d
- }, $), $.props), {
- key: M,
- noticeKey: R || M,
- updateMark: E,
- onClose: (B) => {
- var Q;
- s(B), (Q = $.onClose) === null || Q === void 0 || Q.call($);
- },
- onClick: $.onClick
- });
- return T ? D("div", {
- key: M,
- class: `${f}-hook-holder`,
- ref: (B) => {
- typeof M > "u" || (B ? (i.set(M, B), T(B, I)) : i.delete(M));
- }
- }, null) : D(X2, te(te({}, I), {}, {
- class: Re(I.class, t.hashId)
- }), {
- default: () => [typeof N == "function" ? N({
- prefixCls: f
- }) : N]
- });
- }), S = {
- [f]: 1,
- [`${f}-${p}`]: 1,
- [n.class]: !!n.class,
- [t.hashId]: !0,
- [y]: !!y
- };
- function x() {
- var C;
- m.length > 0 || (Reflect.deleteProperty(l.value, p), (C = t.onAllRemoved) === null || C === void 0 || C.call(t));
- }
- return D("div", {
- key: p,
- class: S,
- style: n.style || _ || {
- top: "65px",
- left: "50%"
- }
- }, [D(X4, te(te({
- tag: "div"
- }, o.value), {}, {
- onAfterLeave: x
- }), {
- default: () => [O]
- })]);
- });
- return D(jre, {
- getContainer: t.getContainer
- }, {
- default: () => [h]
- });
- };
- }
- }), uVe = lVe;
- var cVe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const fVe = () => document.body;
- let i9 = 0;
- function dVe() {
- const t = {};
- for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
- n[r] = arguments[r];
- return n.forEach((i) => {
- i && Object.keys(i).forEach((a) => {
- const o = i[a];
- o !== void 0 && (t[a] = o);
- });
- }), t;
- }
- function yae() {
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
- const {
- getContainer: e = fVe,
- motion: n,
- prefixCls: r,
- maxCount: i,
- getClassName: a,
- getStyles: o,
- onAllRemoved: s
- } = t, l = cVe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ve([]), c = ve(), f = (m, y) => {
- const _ = m.key || r9(), O = k(k({}, m), {
- key: _
- }), S = u.value.map((C) => C.notice.key).indexOf(_), x = u.value.concat();
- S !== -1 ? x.splice(S, 1, {
- notice: O,
- holderCallback: y
- }) : (i && u.value.length >= i && (O.key = x[0].notice.key, O.updateMark = r9(), O.userPassKey = _, x.shift()), x.push({
- notice: O,
- holderCallback: y
- })), u.value = x;
- }, d = (m) => {
- u.value = u.value.filter((y) => {
- let {
- notice: {
- key: _,
- userPassKey: O
- }
- } = y;
- return (O || _) !== m;
- });
- }, h = () => {
- u.value = [];
- }, p = () => D(uVe, {
- ref: c,
- prefixCls: r,
- maxCount: i,
- notices: u.value,
- remove: d,
- getClassName: a,
- getStyles: o,
- animation: n,
- hashId: t.hashId,
- onAllRemoved: s,
- getContainer: e
- }, null), v = ve([]), g = {
- open: (m) => {
- const y = dVe(l, m);
- (y.key === null || y.key === void 0) && (y.key = `vc-notification-${i9}`, i9 += 1), v.value = [...v.value, {
- type: "open",
- config: y
- }];
- },
- close: (m) => {
- v.value = [...v.value, {
- type: "close",
- key: m
- }];
- },
- destroy: () => {
- v.value = [...v.value, {
- type: "destroy"
- }];
- }
- };
- return me(v, () => {
- v.value.length && (v.value.forEach((m) => {
- switch (m.type) {
- case "open":
- f(m.config);
- break;
- case "close":
- d(m.key);
- break;
- case "destroy":
- h();
- break;
- }
- }), v.value = []);
- }), [g, p];
- }
- const hVe = (t) => {
- const {
- componentCls: e,
- iconCls: n,
- boxShadowSecondary: r,
- colorBgElevated: i,
- colorSuccess: a,
- colorError: o,
- colorWarning: s,
- colorInfo: l,
- fontSizeLG: u,
- motionEaseInOutCirc: c,
- motionDurationSlow: f,
- marginXS: d,
- paddingXS: h,
- borderRadiusLG: p,
- zIndexPopup: v,
- // Custom token
- messageNoticeContentPadding: g
- } = t, m = new qt("MessageMoveIn", {
- "0%": {
- padding: 0,
- transform: "translateY(-100%)",
- opacity: 0
- },
- "100%": {
- padding: h,
- transform: "translateY(0)",
- opacity: 1
- }
- }), y = new qt("MessageMoveOut", {
- "0%": {
- maxHeight: t.height,
- padding: h,
- opacity: 1
- },
- "100%": {
- maxHeight: 0,
- padding: 0,
- opacity: 0
- }
- });
- return [
- // ============================ Holder ============================
- {
- [e]: k(k({}, Gn(t)), {
- position: "fixed",
- top: d,
- left: "50%",
- transform: "translateX(-50%)",
- width: "100%",
- pointerEvents: "none",
- zIndex: v,
- [`${e}-move-up`]: {
- animationFillMode: "forwards"
- },
- [`
- ${e}-move-up-appear,
- ${e}-move-up-enter
- `]: {
- animationName: m,
- animationDuration: f,
- animationPlayState: "paused",
- animationTimingFunction: c
- },
- [`
- ${e}-move-up-appear${e}-move-up-appear-active,
- ${e}-move-up-enter${e}-move-up-enter-active
- `]: {
- animationPlayState: "running"
- },
- [`${e}-move-up-leave`]: {
- animationName: y,
- animationDuration: f,
- animationPlayState: "paused",
- animationTimingFunction: c
- },
- [`${e}-move-up-leave${e}-move-up-leave-active`]: {
- animationPlayState: "running"
- },
- "&-rtl": {
- direction: "rtl",
- span: {
- direction: "rtl"
- }
- }
- })
- },
- // ============================ Notice ============================
- {
- [`${e}-notice`]: {
- padding: h,
- textAlign: "center",
- [n]: {
- verticalAlign: "text-bottom",
- marginInlineEnd: d,
- fontSize: u
- },
- [`${e}-notice-content`]: {
- display: "inline-block",
- padding: g,
- background: i,
- borderRadius: p,
- boxShadow: r,
- pointerEvents: "all"
- },
- [`${e}-success ${n}`]: {
- color: a
- },
- [`${e}-error ${n}`]: {
- color: o
- },
- [`${e}-warning ${n}`]: {
- color: s
- },
- [`
- ${e}-info ${n},
- ${e}-loading ${n}`]: {
- color: l
- }
- }
- },
- // ============================= Pure =============================
- {
- [`${e}-notice-pure-panel`]: {
- padding: 0,
- textAlign: "start"
- }
- }
- ];
- }, M8 = pr("Message", (t) => {
- const e = bn(t, {
- messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
- });
- return [hVe(e)];
- }, (t) => ({
- height: 150,
- zIndexPopup: t.zIndexPopupBase + 10
- })), pVe = {
- info: D(cp, null, null),
- success: D(Df, null, null),
- error: D(cs, null, null),
- warning: D(Rf, null, null),
- loading: D(Ql, null, null)
- }, bae = ae({
- name: "PureContent",
- inheritAttrs: !1,
- props: ["prefixCls", "type", "icon"],
- setup(t, e) {
- let {
- slots: n
- } = e;
- return () => {
- var r;
- return D("div", {
- class: Re(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
- }, [t.icon || pVe[t.type], D("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
- };
- }
- });
- ae({
- name: "PurePanel",
- inheritAttrs: !1,
- props: ["prefixCls", "class", "type", "icon", "content"],
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- var i;
- const {
- getPrefixCls: a
- } = b2(), o = V(() => t.prefixCls || a("message")), [, s] = M8(o);
- return D(X2, te(te({}, r), {}, {
- prefixCls: o.value,
- class: Re(s.value, `${o.value}-notice-pure-panel`),
- noticeKey: "pure",
- duration: null
- }), {
- default: () => [D(bae, {
- prefixCls: o.value,
- type: t.type,
- icon: t.icon
- }, {
- default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
- })]
- });
- }
- });
- var vVe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const gVe = 8, mVe = 3, yVe = ae({
- name: "Holder",
- inheritAttrs: !1,
- props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
- setup(t, e) {
- let {
- expose: n
- } = e;
- var r, i;
- const {
- getPrefixCls: a,
- getPopupContainer: o
- } = hn("message", t), s = V(() => a("message", t.prefixCls)), [, l] = M8(s), u = () => {
- var v;
- const g = (v = t.top) !== null && v !== void 0 ? v : gVe;
- return {
- left: "50%",
- transform: "translateX(-50%)",
- top: typeof g == "number" ? `${g}px` : g
- };
- }, c = () => Re(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
- var v;
- return ZN({
- prefixCls: s.value,
- animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
- transitionName: t.transitionName
- });
- }, d = D("span", {
- class: `${s.value}-close-x`
- }, [D(tc, {
- class: `${s.value}-close-icon`
- }, null)]), [h, p] = yae({
- //@ts-ignore
- getStyles: u,
- prefixCls: s.value,
- getClassName: c,
- motion: f,
- closable: !1,
- closeIcon: d,
- duration: (r = t.duration) !== null && r !== void 0 ? r : mVe,
- getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
- maxCount: t.maxCount,
- onAllRemoved: t.onAllRemoved
- });
- return n(k(k({}, h), {
- prefixCls: s,
- hashId: l
- })), p;
- }
- });
- let a9 = 0;
- function bVe(t) {
- const e = ve(null), n = Symbol("messageHolderKey"), r = (l) => {
- var u;
- (u = e.value) === null || u === void 0 || u.close(l);
- }, i = (l) => {
- if (!e.value) {
- const S = () => {
- };
- return S.then = () => {
- }, S;
- }
- const {
- open: u,
- prefixCls: c,
- hashId: f
- } = e.value, d = `${c}-notice`, {
- content: h,
- icon: p,
- type: v,
- key: g,
- class: m,
- onClose: y
- } = l, _ = vVe(l, ["content", "icon", "type", "key", "class", "onClose"]);
- let O = g;
- return O == null && (a9 += 1, O = `antd-message-${a9}`), VRe((S) => (u(k(k({}, _), {
- key: O,
- content: () => D(bae, {
- prefixCls: c,
- type: v,
- icon: typeof p == "function" ? p() : p
- }, {
- default: () => [typeof h == "function" ? h() : h]
- }),
- placement: "top",
- // @ts-ignore
- class: Re(v && `${d}-${v}`, f, m),
- onClose: () => {
- y == null || y(), S();
- }
- })), () => {
- r(O);
- }));
- }, o = {
- open: i,
- destroy: (l) => {
- var u;
- l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
- }
- };
- return ["info", "success", "warning", "error", "loading"].forEach((l) => {
- const u = (c, f, d) => {
- let h;
- c && typeof c == "object" && "content" in c ? h = c : h = {
- content: c
- };
- let p, v;
- typeof f == "function" ? v = f : (p = f, v = d);
- const g = k(k({
- onClose: v,
- duration: p
- }, h), {
- type: l
- });
- return i(g);
- };
- o[l] = u;
- }), [o, () => D(yVe, te(te({
- key: n
- }, t), {}, {
- ref: e
- }), null)];
- }
- function _Ve(t) {
- return bVe(t);
- }
- let _ae = 3, Oae, ra, OVe = 1, Sae = "", xae = "move-up", wae = !1, Cae = () => document.body, Tae, Pae = !1;
- function SVe() {
- return OVe++;
- }
- function xVe(t) {
- t.top !== void 0 && (Oae = t.top, ra = null), t.duration !== void 0 && (_ae = t.duration), t.prefixCls !== void 0 && (Sae = t.prefixCls), t.getContainer !== void 0 && (Cae = t.getContainer, ra = null), t.transitionName !== void 0 && (xae = t.transitionName, ra = null, wae = !0), t.maxCount !== void 0 && (Tae = t.maxCount, ra = null), t.rtl !== void 0 && (Pae = t.rtl);
- }
- function wVe(t, e) {
- if (ra) {
- e(ra);
- return;
- }
- hC.newInstance({
- appContext: t.appContext,
- prefixCls: t.prefixCls || Sae,
- rootPrefixCls: t.rootPrefixCls,
- transitionName: xae,
- hasTransitionName: wae,
- style: {
- top: Oae
- },
- getContainer: Cae || t.getPopupContainer,
- maxCount: Tae,
- name: "message",
- useStyle: M8
- }, (n) => {
- if (ra) {
- e(ra);
- return;
- }
- ra = n, e(n);
- });
- }
- const $ae = {
- info: cp,
- success: Df,
- error: cs,
- warning: Rf,
- loading: Ql
- }, CVe = Object.keys($ae);
- function TVe(t) {
- const e = t.duration !== void 0 ? t.duration : _ae, n = t.key || SVe(), r = new Promise((a) => {
- const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
- wVe(t, (s) => {
- s.notice({
- key: n,
- duration: e,
- style: t.style || {},
- class: t.class,
- content: (l) => {
- let {
- prefixCls: u
- } = l;
- const c = $ae[t.type], f = c ? D(c, null, null) : "", d = Re(`${u}-custom-content`, {
- [`${u}-${t.type}`]: t.type,
- [`${u}-rtl`]: Pae === !0
- });
- return D("div", {
- class: d
- }, [typeof t.icon == "function" ? t.icon() : t.icon || f, D("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
- },
- onClose: o,
- onClick: t.onClick
- });
- });
- }), i = () => {
- ra && ra.removeNotice(n);
- };
- return i.then = (a, o) => r.then(a, o), i.promise = r, i;
- }
- function PVe(t) {
- return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
- }
- const Wh = {
- open: TVe,
- config: xVe,
- destroy(t) {
- if (ra)
- if (t) {
- const {
- removeNotice: e
- } = ra;
- e(t);
- } else {
- const {
- destroy: e
- } = ra;
- e(), ra = null;
- }
- }
- };
- function $Ve(t, e) {
- t[e] = (n, r, i) => PVe(n) ? t.open(k(k({}, n), {
- type: e
- })) : (typeof r == "function" && (i = r, r = void 0), t.open({
- content: n,
- duration: r,
- type: e,
- onClose: i
- }));
- }
- CVe.forEach((t) => $Ve(Wh, t));
- Wh.warn = Wh.warning;
- Wh.useMessage = _Ve;
- const AVe = (t) => {
- const {
- componentCls: e,
- width: n,
- notificationMarginEdge: r
- } = t, i = new qt("antNotificationTopFadeIn", {
- "0%": {
- marginTop: "-100%",
- opacity: 0
- },
- "100%": {
- marginTop: 0,
- opacity: 1
- }
- }), a = new qt("antNotificationBottomFadeIn", {
- "0%": {
- marginBottom: "-100%",
- opacity: 0
- },
- "100%": {
- marginBottom: 0,
- opacity: 1
- }
- }), o = new qt("antNotificationLeftFadeIn", {
- "0%": {
- right: {
- _skip_check_: !0,
- value: n
- },
- opacity: 0
- },
- "100%": {
- right: {
- _skip_check_: !0,
- value: 0
- },
- opacity: 1
- }
- });
- return {
- [`&${e}-top, &${e}-bottom`]: {
- marginInline: 0
- },
- [`&${e}-top`]: {
- [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
- animationName: i
- }
- },
- [`&${e}-bottom`]: {
- [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
- animationName: a
- }
- },
- [`&${e}-topLeft, &${e}-bottomLeft`]: {
- marginInlineEnd: 0,
- marginInlineStart: r,
- [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
- animationName: o
- }
- }
- };
- }, EVe = (t) => {
- const {
- iconCls: e,
- componentCls: n,
- // .ant-notification
- boxShadowSecondary: r,
- fontSizeLG: i,
- notificationMarginBottom: a,
- borderRadiusLG: o,
- colorSuccess: s,
- colorInfo: l,
- colorWarning: u,
- colorError: c,
- colorTextHeading: f,
- notificationBg: d,
- notificationPadding: h,
- notificationMarginEdge: p,
- motionDurationMid: v,
- motionEaseInOut: g,
- fontSize: m,
- lineHeight: y,
- width: _,
- notificationIconSize: O
- } = t, S = `${n}-notice`, x = new qt("antNotificationFadeIn", {
- "0%": {
- left: {
- _skip_check_: !0,
- value: _
- },
- opacity: 0
- },
- "100%": {
- left: {
- _skip_check_: !0,
- value: 0
- },
- opacity: 1
- }
- }), C = new qt("antNotificationFadeOut", {
- "0%": {
- maxHeight: t.animationMaxHeight,
- marginBottom: a,
- opacity: 1
- },
- "100%": {
- maxHeight: 0,
- marginBottom: 0,
- paddingTop: 0,
- paddingBottom: 0,
- opacity: 0
- }
- });
- return [
- // ============================ Holder ============================
- {
- [n]: k(k(k(k({}, Gn(t)), {
- position: "fixed",
- zIndex: t.zIndexPopup,
- marginInlineEnd: p,
- [`${n}-hook-holder`]: {
- position: "relative"
- },
- [`&${n}-top, &${n}-bottom`]: {
- [`${n}-notice`]: {
- marginInline: "auto auto"
- }
- },
- [`&${n}-topLeft, &${n}-bottomLeft`]: {
- [`${n}-notice`]: {
- marginInlineEnd: "auto",
- marginInlineStart: 0
- }
- },
- // animation
- [`${n}-fade-enter, ${n}-fade-appear`]: {
- animationDuration: t.motionDurationMid,
- animationTimingFunction: g,
- animationFillMode: "both",
- opacity: 0,
- animationPlayState: "paused"
- },
- [`${n}-fade-leave`]: {
- animationTimingFunction: g,
- animationFillMode: "both",
- animationDuration: v,
- animationPlayState: "paused"
- },
- [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
- animationName: x,
- animationPlayState: "running"
- },
- [`${n}-fade-leave${n}-fade-leave-active`]: {
- animationName: C,
- animationPlayState: "running"
- }
- }), AVe(t)), {
- // RTL
- "&-rtl": {
- direction: "rtl",
- [`${n}-notice-btn`]: {
- float: "left"
- }
- }
- })
- },
- // ============================ Notice ============================
- {
- [S]: {
- position: "relative",
- width: _,
- maxWidth: `calc(100vw - ${p * 2}px)`,
- marginBottom: a,
- marginInlineStart: "auto",
- padding: h,
- overflow: "hidden",
- lineHeight: y,
- wordWrap: "break-word",
- background: d,
- borderRadius: o,
- boxShadow: r,
- [`${n}-close-icon`]: {
- fontSize: m,
- cursor: "pointer"
- },
- [`${S}-message`]: {
- marginBottom: t.marginXS,
- color: f,
- fontSize: i,
- lineHeight: t.lineHeightLG
- },
- [`${S}-description`]: {
- fontSize: m
- },
- [`&${S}-closable ${S}-message`]: {
- paddingInlineEnd: t.paddingLG
- },
- [`${S}-with-icon ${S}-message`]: {
- marginBottom: t.marginXS,
- marginInlineStart: t.marginSM + O,
- fontSize: i
- },
- [`${S}-with-icon ${S}-description`]: {
- marginInlineStart: t.marginSM + O,
- fontSize: m
- },
- // Icon & color style in different selector level
- // https://github.com/ant-design/ant-design/issues/16503
- // https://github.com/ant-design/ant-design/issues/15512
- [`${S}-icon`]: {
- position: "absolute",
- fontSize: O,
- lineHeight: 0,
- // icon-font
- [`&-success${e}`]: {
- color: s
- },
- [`&-info${e}`]: {
- color: l
- },
- [`&-warning${e}`]: {
- color: u
- },
- [`&-error${e}`]: {
- color: c
- }
- },
- [`${S}-close`]: {
- position: "absolute",
- top: t.notificationPaddingVertical,
- insetInlineEnd: t.notificationPaddingHorizontal,
- color: t.colorIcon,
- outline: "none",
- width: t.notificationCloseButtonSize,
- height: t.notificationCloseButtonSize,
- borderRadius: t.borderRadiusSM,
- transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- "&:hover": {
- color: t.colorIconHover,
- backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
- }
- },
- [`${S}-btn`]: {
- float: "right",
- marginTop: t.marginSM
- }
- }
- },
- // ============================= Pure =============================
- {
- [`${S}-pure-panel`]: {
- margin: 0
- }
- }
- ];
- }, I8 = pr("Notification", (t) => {
- const e = t.paddingMD, n = t.paddingLG, r = bn(t, {
- // default.less variables
- notificationBg: t.colorBgElevated,
- notificationPaddingVertical: e,
- notificationPaddingHorizontal: n,
- // index.less variables
- notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
- notificationMarginBottom: t.margin,
- notificationMarginEdge: t.marginLG,
- animationMaxHeight: 150,
- notificationIconSize: t.fontSizeLG * t.lineHeightLG,
- notificationCloseButtonSize: t.controlHeightLG * 0.55
- });
- return [EVe(r)];
- }, (t) => ({
- zIndexPopup: t.zIndexPopupBase + 50,
- width: 384
- }));
- function Aae(t, e) {
- return e || D("span", {
- class: `${t}-close-x`
- }, [D(tc, {
- class: `${t}-close-icon`
- }, null)]);
- }
- D(cp, null, null), D(Df, null, null), D(cs, null, null), D(Rf, null, null), D(Ql, null, null);
- const MVe = {
- success: Df,
- info: cp,
- error: cs,
- warning: Rf
- };
- function Eae(t) {
- let {
- prefixCls: e,
- icon: n,
- type: r,
- message: i,
- description: a,
- btn: o
- } = t, s = null;
- if (n)
- s = D("span", {
- class: `${e}-icon`
- }, [$v(n)]);
- else if (r) {
- const l = MVe[r];
- s = D(l, {
- class: `${e}-icon ${e}-icon-${r}`
- }, null);
- }
- return D("div", {
- class: Re({
- [`${e}-with-icon`]: s
- }),
- role: "alert"
- }, [s, D("div", {
- class: `${e}-message`
- }, [i]), D("div", {
- class: `${e}-description`
- }, [a]), o && D("div", {
- class: `${e}-btn`
- }, [o])]);
- }
- ae({
- name: "PurePanel",
- inheritAttrs: !1,
- props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
- setup(t) {
- const {
- getPrefixCls: e
- } = hn("notification", t), n = V(() => t.prefixCls || e("notification")), r = V(() => `${n.value}-notice`), [, i] = I8(n);
- return () => D(X2, te(te({}, t), {}, {
- prefixCls: n.value,
- class: Re(i.value, `${r.value}-pure-panel`),
- noticeKey: "pure",
- duration: null,
- closable: t.closable,
- closeIcon: Aae(n.value, t.closeIcon)
- }), {
- default: () => [D(Eae, {
- prefixCls: r.value,
- icon: t.icon,
- type: t.type,
- message: t.message,
- description: t.description,
- btn: t.btn
- }, null)]
- });
- }
- });
- function Mae(t, e, n) {
- let r;
- switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
- case "top":
- r = {
- left: "50%",
- transform: "translateX(-50%)",
- right: "auto",
- top: e,
- bottom: "auto"
- };
- break;
- case "topLeft":
- r = {
- left: 0,
- top: e,
- bottom: "auto"
- };
- break;
- case "topRight":
- r = {
- right: 0,
- top: e,
- bottom: "auto"
- };
- break;
- case "bottom":
- r = {
- left: "50%",
- transform: "translateX(-50%)",
- right: "auto",
- top: "auto",
- bottom: n
- };
- break;
- case "bottomLeft":
- r = {
- left: 0,
- top: "auto",
- bottom: n
- };
- break;
- default:
- r = {
- right: 0,
- top: "auto",
- bottom: n
- };
- break;
- }
- return r;
- }
- function IVe(t) {
- return {
- name: `${t}-fade`
- };
- }
- var DVe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const o9 = 24, RVe = 4.5, kVe = ae({
- name: "Holder",
- inheritAttrs: !1,
- props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
- setup(t, e) {
- let {
- expose: n
- } = e;
- const {
- getPrefixCls: r,
- getPopupContainer: i
- } = hn("notification", t), a = V(() => t.prefixCls || r("notification")), o = (d) => {
- var h, p;
- return Mae(d, (h = t.top) !== null && h !== void 0 ? h : o9, (p = t.bottom) !== null && p !== void 0 ? p : o9);
- }, [, s] = I8(a), l = () => Re(s.value, {
- [`${a.value}-rtl`]: t.rtl
- }), u = () => IVe(a.value), [c, f] = yae({
- prefixCls: a.value,
- getStyles: o,
- getClassName: l,
- motion: u,
- closable: !0,
- closeIcon: Aae(a.value),
- duration: RVe,
- getContainer: () => {
- var d, h;
- return ((d = t.getPopupContainer) === null || d === void 0 ? void 0 : d.call(t)) || ((h = i.value) === null || h === void 0 ? void 0 : h.call(i)) || document.body;
- },
- maxCount: t.maxCount,
- hashId: s.value,
- onAllRemoved: t.onAllRemoved
- });
- return n(k(k({}, c), {
- prefixCls: a.value,
- hashId: s
- })), f;
- }
- });
- function LVe(t) {
- const e = ve(null), n = Symbol("notificationHolderKey"), r = (s) => {
- if (!e.value)
- return;
- const {
- open: l,
- prefixCls: u,
- hashId: c
- } = e.value, f = `${u}-notice`, {
- message: d,
- description: h,
- icon: p,
- type: v,
- btn: g,
- class: m
- } = s, y = DVe(s, ["message", "description", "icon", "type", "btn", "class"]);
- return l(k(k({
- placement: "topRight"
- }, y), {
- content: () => D(Eae, {
- prefixCls: f,
- icon: typeof p == "function" ? p() : p,
- type: v,
- message: typeof d == "function" ? d() : d,
- description: typeof h == "function" ? h() : h,
- btn: typeof g == "function" ? g() : g
- }, null),
- // @ts-ignore
- class: Re(v && `${f}-${v}`, c, m)
- }));
- }, a = {
- open: r,
- destroy: (s) => {
- var l, u;
- s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
- }
- };
- return ["success", "info", "warning", "error"].forEach((s) => {
- a[s] = (l) => r(k(k({}, l), {
- type: s
- }));
- }), [a, () => D(kVe, te(te({
- key: n
- }, t), {}, {
- ref: e
- }), null)];
- }
- function NVe(t) {
- return LVe(t);
- }
- const Qd = {};
- let Iae = 4.5, Dae = "24px", Rae = "24px", zR = "", kae = "topRight", Lae = () => document.body, Nae = null, VR = !1, Bae;
- function BVe(t) {
- const {
- duration: e,
- placement: n,
- bottom: r,
- top: i,
- getContainer: a,
- closeIcon: o,
- prefixCls: s
- } = t;
- s !== void 0 && (zR = s), e !== void 0 && (Iae = e), n !== void 0 && (kae = n), r !== void 0 && (Rae = typeof r == "number" ? `${r}px` : r), i !== void 0 && (Dae = typeof i == "number" ? `${i}px` : i), a !== void 0 && (Lae = a), o !== void 0 && (Nae = o), t.rtl !== void 0 && (VR = t.rtl), t.maxCount !== void 0 && (Bae = t.maxCount);
- }
- function zVe(t, e) {
- let {
- prefixCls: n,
- placement: r = kae,
- getContainer: i = Lae,
- top: a,
- bottom: o,
- closeIcon: s = Nae,
- appContext: l
- } = t;
- const {
- getPrefixCls: u
- } = qVe(), c = u("notification", n || zR), f = `${c}-${r}-${VR}`, d = Qd[f];
- if (d) {
- Promise.resolve(d).then((p) => {
- e(p);
- });
- return;
- }
- const h = Re(`${c}-${r}`, {
- [`${c}-rtl`]: VR === !0
- });
- hC.newInstance({
- name: "notification",
- prefixCls: n || zR,
- useStyle: I8,
- class: h,
- style: Mae(r, a ?? Dae, o ?? Rae),
- appContext: l,
- getContainer: i,
- closeIcon: (p) => {
- let {
- prefixCls: v
- } = p;
- return D("span", {
- class: `${v}-close-x`
- }, [$v(s, {}, D(tc, {
- class: `${v}-close-icon`
- }, null))]);
- },
- maxCount: Bae,
- hasTransitionName: !0
- }, (p) => {
- Qd[f] = p, e(p);
- });
- }
- const VVe = {
- success: g8,
- info: V2,
- error: y8,
- warning: m8
- };
- function FVe(t) {
- const {
- icon: e,
- type: n,
- description: r,
- message: i,
- btn: a
- } = t, o = t.duration === void 0 ? Iae : t.duration;
- zVe(t, (s) => {
- s.notice({
- content: (l) => {
- let {
- prefixCls: u
- } = l;
- const c = `${u}-notice`;
- let f = null;
- if (e)
- f = () => D("span", {
- class: `${c}-icon`
- }, [$v(e)]);
- else if (n) {
- const d = VVe[n];
- f = () => D(d, {
- class: `${c}-icon ${c}-icon-${n}`
- }, null);
- }
- return D("div", {
- class: f ? `${c}-with-icon` : ""
- }, [f && f(), D("div", {
- class: `${c}-message`
- }, [!r && f ? D("span", {
- class: `${c}-message-single-line-auto-margin`
- }, null) : null, $v(i)]), D("div", {
- class: `${c}-description`
- }, [$v(r)]), a ? D("span", {
- class: `${c}-btn`
- }, [$v(a)]) : null]);
- },
- duration: o,
- closable: !0,
- onClose: t.onClose,
- onClick: t.onClick,
- key: t.key,
- style: t.style || {},
- class: t.class
- });
- });
- }
- const Bg = {
- open: FVe,
- close(t) {
- Object.keys(Qd).forEach((e) => Promise.resolve(Qd[e]).then((n) => {
- n.removeNotice(t);
- }));
- },
- config: BVe,
- destroy() {
- Object.keys(Qd).forEach((t) => {
- Promise.resolve(Qd[t]).then((e) => {
- e.destroy();
- }), delete Qd[t];
- });
- }
- }, WVe = ["success", "info", "warning", "error"];
- WVe.forEach((t) => {
- Bg[t] = (e) => Bg.open(k(k({}, e), {
- type: t
- }));
- });
- Bg.warn = Bg.warning;
- Bg.useNotification = NVe;
- const QVe = `-ant-${Date.now()}-${Math.random()}`;
- function HVe(t, e) {
- const n = {}, r = (o, s) => {
- let l = o.clone();
- return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
- }, i = (o, s) => {
- const l = new Hn(o), u = Bh(l.toRgbString());
- n[`${s}-color`] = r(l), n[`${s}-color-disabled`] = u[1], n[`${s}-color-hover`] = u[4], n[`${s}-color-active`] = u[6], n[`${s}-color-outline`] = l.clone().setAlpha(0.2).toRgbString(), n[`${s}-color-deprecated-bg`] = u[0], n[`${s}-color-deprecated-border`] = u[2];
- };
- if (e.primaryColor) {
- i(e.primaryColor, "primary");
- const o = new Hn(e.primaryColor), s = Bh(o.toRgbString());
- s.forEach((u, c) => {
- n[`primary-${c + 1}`] = u;
- }), n["primary-color-deprecated-l-35"] = r(o, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = r(o, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = r(o, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = r(o, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = r(o, (u) => u.setAlpha(u.getAlpha() * 0.12));
- const l = new Hn(s[0]);
- n["primary-color-active-deprecated-f-30"] = r(l, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = r(l, (u) => u.darken(2));
- }
- return e.successColor && i(e.successColor, "success"), e.warningColor && i(e.warningColor, "warning"), e.errorColor && i(e.errorColor, "error"), e.infoColor && i(e.infoColor, "info"), `
- :root {
- ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
- `)}
- }
- `.trim();
- }
- function GVe(t, e) {
- const n = HVe(t, e);
- is() ? Eb(n, `${QVe}-dynamic-theme`) : aa(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
- }
- const jVe = (t) => {
- const [e, n] = pm();
- return bR(V(() => ({
- theme: e.value,
- token: n.value,
- hashId: "",
- path: ["ant-design-icons", t.value]
- })), () => [{
- [`.${t.value}`]: k(k({}, hm()), {
- [`.${t.value} .${t.value}-icon`]: {
- display: "block"
- }
- })
- }]);
- };
- function ZVe(t, e) {
- const n = V(() => (t == null ? void 0 : t.value) || {}), r = V(() => n.value.inherit === !1 || !(e != null && e.value) ? pre : e.value);
- return V(() => {
- if (!(t != null && t.value))
- return e == null ? void 0 : e.value;
- const a = k({}, r.value.components);
- return Object.keys(t.value.components || {}).forEach((o) => {
- a[o] = k(k({}, a[o]), t.value.components[o]);
- }), k(k(k({}, r.value), n.value), {
- token: k(k({}, r.value.token), n.value.token),
- components: a
- });
- });
- }
- var UVe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const XVe = "ant";
- function Hv() {
- return gi.prefixCls || XVe;
- }
- function zae() {
- return gi.iconPrefixCls || BN;
- }
- const D8 = zn({}), gi = zn({});
- Vt(() => {
- k(gi, D8), gi.prefixCls = Hv(), gi.iconPrefixCls = zae(), gi.getPrefixCls = (t, e) => e || (t ? `${gi.prefixCls}-${t}` : gi.prefixCls), gi.getRootPrefixCls = () => gi.prefixCls ? gi.prefixCls : Hv();
- });
- let vE;
- const YVe = (t) => {
- vE && vE(), vE = Vt(() => {
- k(D8, zn(t)), k(gi, zn(t));
- }), t.theme && GVe(Hv(), t.theme);
- }, qVe = () => ({
- getPrefixCls: (t, e) => e || (t ? `${Hv()}-${t}` : Hv()),
- getIconPrefixCls: zae,
- getRootPrefixCls: () => gi.prefixCls ? gi.prefixCls : Hv()
- }), Gv = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AConfigProvider",
- inheritAttrs: !1,
- props: dke(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = b2(), i = (I, B) => {
- const {
- prefixCls: Q = "ant"
- } = t;
- if (B) return B;
- const W = Q || r.getPrefixCls("");
- return I ? `${W}-${I}` : W;
- }, a = V(() => t.iconPrefixCls || r.iconPrefixCls.value || BN), o = V(() => a.value !== r.iconPrefixCls.value), s = V(() => {
- var I;
- return t.csp || ((I = r.csp) === null || I === void 0 ? void 0 : I.value);
- }), l = jVe(a), u = ZVe(V(() => t.theme), V(() => {
- var I;
- return (I = r.theme) === null || I === void 0 ? void 0 : I.value;
- })), c = (I) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || ZLe)(I), f = V(() => {
- var I, B;
- return (I = t.autoInsertSpaceInButton) !== null && I !== void 0 ? I : (B = r.autoInsertSpaceInButton) === null || B === void 0 ? void 0 : B.value;
- }), d = V(() => {
- var I;
- return t.locale || ((I = r.locale) === null || I === void 0 ? void 0 : I.value);
- });
- me(d, () => {
- D8.locale = d.value;
- }, {
- immediate: !0
- });
- const h = V(() => {
- var I;
- return t.direction || ((I = r.direction) === null || I === void 0 ? void 0 : I.value);
- }), p = V(() => {
- var I, B;
- return (I = t.space) !== null && I !== void 0 ? I : (B = r.space) === null || B === void 0 ? void 0 : B.value;
- }), v = V(() => {
- var I, B;
- return (I = t.virtual) !== null && I !== void 0 ? I : (B = r.virtual) === null || B === void 0 ? void 0 : B.value;
- }), g = V(() => {
- var I, B;
- return (I = t.dropdownMatchSelectWidth) !== null && I !== void 0 ? I : (B = r.dropdownMatchSelectWidth) === null || B === void 0 ? void 0 : B.value;
- }), m = V(() => {
- var I;
- return t.getTargetContainer !== void 0 ? t.getTargetContainer : (I = r.getTargetContainer) === null || I === void 0 ? void 0 : I.value;
- }), y = V(() => {
- var I;
- return t.getPopupContainer !== void 0 ? t.getPopupContainer : (I = r.getPopupContainer) === null || I === void 0 ? void 0 : I.value;
- }), _ = V(() => {
- var I;
- return t.pageHeader !== void 0 ? t.pageHeader : (I = r.pageHeader) === null || I === void 0 ? void 0 : I.value;
- }), O = V(() => {
- var I;
- return t.input !== void 0 ? t.input : (I = r.input) === null || I === void 0 ? void 0 : I.value;
- }), S = V(() => {
- var I;
- return t.pagination !== void 0 ? t.pagination : (I = r.pagination) === null || I === void 0 ? void 0 : I.value;
- }), x = V(() => {
- var I;
- return t.form !== void 0 ? t.form : (I = r.form) === null || I === void 0 ? void 0 : I.value;
- }), C = V(() => {
- var I;
- return t.select !== void 0 ? t.select : (I = r.select) === null || I === void 0 ? void 0 : I.value;
- }), P = V(() => t.componentSize), $ = V(() => t.componentDisabled), T = V(() => {
- var I, B;
- return (I = t.wave) !== null && I !== void 0 ? I : (B = r.wave) === null || B === void 0 ? void 0 : B.value;
- }), E = {
- csp: s,
- autoInsertSpaceInButton: f,
- locale: d,
- direction: h,
- space: p,
- virtual: v,
- dropdownMatchSelectWidth: g,
- getPrefixCls: i,
- iconPrefixCls: a,
- theme: V(() => {
- var I, B;
- return (I = u.value) !== null && I !== void 0 ? I : (B = r.theme) === null || B === void 0 ? void 0 : B.value;
- }),
- renderEmpty: c,
- getTargetContainer: m,
- getPopupContainer: y,
- pageHeader: _,
- input: O,
- pagination: S,
- form: x,
- select: C,
- componentSize: P,
- componentDisabled: $,
- transformCellText: V(() => t.transformCellText),
- wave: T
- }, M = V(() => {
- const I = u.value || {}, {
- algorithm: B,
- token: Q
- } = I, W = UVe(I, ["algorithm", "token"]), H = B && (!Array.isArray(B) || B.length > 0) ? Kne(B) : void 0;
- return k(k({}, W), {
- theme: H,
- token: k(k({}, C2), Q)
- });
- }), R = V(() => {
- var I, B;
- let Q = {};
- return d.value && (Q = ((I = d.value.Form) === null || I === void 0 ? void 0 : I.defaultValidateMessages) || ((B = Nu.Form) === null || B === void 0 ? void 0 : B.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (Q = k(k({}, Q), t.form.validateMessages)), Q;
- });
- hke(E), cke({
- validateMessages: R
- }), Sre(P), zne($);
- const N = (I) => {
- var B, Q;
- let W = o.value ? l((B = n.default) === null || B === void 0 ? void 0 : B.call(n)) : (Q = n.default) === null || Q === void 0 ? void 0 : Q.call(n);
- if (t.theme) {
- const H = /* @__PURE__ */ function() {
- return W;
- }();
- W = D(WLe, {
- value: M.value
- }, {
- default: () => [H]
- });
- }
- return D(iVe, {
- locale: d.value || I,
- ANT_MARK__: BR
- }, {
- default: () => [W]
- });
- };
- return Vt(() => {
- h.value && (Wh.config({
- rtl: h.value === "rtl"
- }), Bg.config({
- rtl: h.value === "rtl"
- }));
- }), () => D(Fne, {
- children: (I, B, Q) => N(Q)
- }, null);
- }
- });
- Gv.config = YVe;
- Gv.install = function(t) {
- t.component(Gv.name, Gv);
- };
- const KVe = (t) => {
- const {
- componentCls: e,
- sizePaddingEdgeHorizontal: n,
- colorSplit: r,
- lineWidth: i
- } = t;
- return {
- [e]: k(k({}, Gn(t)), {
- borderBlockStart: `${i}px solid ${r}`,
- // vertical
- "&-vertical": {
- position: "relative",
- top: "-0.06em",
- display: "inline-block",
- height: "0.9em",
- margin: `0 ${t.dividerVerticalGutterMargin}px`,
- verticalAlign: "middle",
- borderTop: 0,
- borderInlineStart: `${i}px solid ${r}`
- },
- "&-horizontal": {
- display: "flex",
- clear: "both",
- width: "100%",
- minWidth: "100%",
- margin: `${t.dividerHorizontalGutterMargin}px 0`
- },
- [`&-horizontal${e}-with-text`]: {
- display: "flex",
- alignItems: "center",
- margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
- color: t.colorTextHeading,
- fontWeight: 500,
- fontSize: t.fontSizeLG,
- whiteSpace: "nowrap",
- textAlign: "center",
- borderBlockStart: `0 ${r}`,
- "&::before, &::after": {
- position: "relative",
- width: "50%",
- borderBlockStart: `${i}px solid transparent`,
- // Chrome not accept `inherit` in `border-top`
- borderBlockStartColor: "inherit",
- borderBlockEnd: 0,
- transform: "translateY(50%)",
- content: "''"
- }
- },
- [`&-horizontal${e}-with-text-left`]: {
- "&::before": {
- width: "5%"
- },
- "&::after": {
- width: "95%"
- }
- },
- [`&-horizontal${e}-with-text-right`]: {
- "&::before": {
- width: "95%"
- },
- "&::after": {
- width: "5%"
- }
- },
- [`${e}-inner-text`]: {
- display: "inline-block",
- padding: "0 1em"
- },
- "&-dashed": {
- background: "none",
- borderColor: r,
- borderStyle: "dashed",
- borderWidth: `${i}px 0 0`
- },
- [`&-horizontal${e}-with-text${e}-dashed`]: {
- "&::before, &::after": {
- borderStyle: "dashed none none"
- }
- },
- [`&-vertical${e}-dashed`]: {
- borderInlineStartWidth: i,
- borderInlineEnd: 0,
- borderBlockStart: 0,
- borderBlockEnd: 0
- },
- [`&-plain${e}-with-text`]: {
- color: t.colorText,
- fontWeight: "normal",
- fontSize: t.fontSize
- },
- [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
- "&::before": {
- width: 0
- },
- "&::after": {
- width: "100%"
- },
- [`${e}-inner-text`]: {
- paddingInlineStart: n
- }
- },
- [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
- "&::before": {
- width: "100%"
- },
- "&::after": {
- width: 0
- },
- [`${e}-inner-text`]: {
- paddingInlineEnd: n
- }
- }
- })
- };
- }, JVe = pr("Divider", (t) => {
- const e = bn(t, {
- dividerVerticalGutterMargin: t.marginXS,
- dividerHorizontalWithTextGutterMargin: t.margin,
- dividerHorizontalGutterMargin: t.marginLG
- });
- return [KVe(e)];
- }, {
- sizePaddingEdgeHorizontal: 0
- }), eFe = () => ({
- prefixCls: String,
- type: {
- type: String,
- default: "horizontal"
- },
- dashed: {
- type: Boolean,
- default: !1
- },
- orientation: {
- type: String,
- default: "center"
- },
- plain: {
- type: Boolean,
- default: !1
- },
- orientationMargin: [String, Number]
- }), tFe = ae({
- name: "ADivider",
- inheritAttrs: !1,
- compatConfig: {
- MODE: 3
- },
- props: eFe(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i,
- direction: a
- } = hn("divider", t), [o, s] = JVe(i), l = V(() => t.orientation === "left" && t.orientationMargin != null), u = V(() => t.orientation === "right" && t.orientationMargin != null), c = V(() => {
- const {
- type: h,
- dashed: p,
- plain: v
- } = t, g = i.value;
- return {
- [g]: !0,
- [s.value]: !!s.value,
- [`${g}-${h}`]: !0,
- [`${g}-dashed`]: !!p,
- [`${g}-plain`]: !!v,
- [`${g}-rtl`]: a.value === "rtl",
- [`${g}-no-default-orientation-margin-left`]: l.value,
- [`${g}-no-default-orientation-margin-right`]: u.value
- };
- }), f = V(() => {
- const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
- return k(k({}, l.value && {
- marginLeft: h
- }), u.value && {
- marginRight: h
- });
- }), d = V(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
- return () => {
- var h;
- const p = qr((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
- return o(D("div", te(te({}, r), {}, {
- class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
- role: "separator"
- }), [p.length ? D("span", {
- class: `${i.value}-inner-text`,
- style: f.value
- }, [p]) : null]));
- };
- }
- }), nFe = fm(tFe), Hy = (t) => t != null && (Array.isArray(t) ? Zl(t).length : !0);
- function R8(t) {
- return Hy(t.prefix) || Hy(t.suffix) || Hy(t.allowClear);
- }
- function tw(t) {
- return Hy(t.addonBefore) || Hy(t.addonAfter);
- }
- function FR(t) {
- return typeof t > "u" || t === null ? "" : String(t);
- }
- function Gy(t, e, n, r) {
- if (!n)
- return;
- const i = e;
- if (e.type === "click") {
- Object.defineProperty(i, "target", {
- writable: !0
- }), Object.defineProperty(i, "currentTarget", {
- writable: !0
- });
- const a = t.cloneNode(!0);
- i.target = a, i.currentTarget = a, a.value = "", n(i);
- return;
- }
- if (r !== void 0) {
- Object.defineProperty(i, "target", {
- writable: !0
- }), Object.defineProperty(i, "currentTarget", {
- writable: !0
- }), i.target = t, i.currentTarget = t, t.value = r, n(i);
- return;
- }
- n(i);
- }
- function Vae(t, e) {
- if (!t) return;
- t.focus(e);
- const {
- cursor: n
- } = e || {};
- if (n) {
- const r = t.value.length;
- switch (n) {
- case "start":
- t.setSelectionRange(0, 0);
- break;
- case "end":
- t.setSelectionRange(r, r);
- break;
- default:
- t.setSelectionRange(0, r);
- }
- }
- }
- const rFe = () => ({
- addonBefore: oe.any,
- addonAfter: oe.any,
- prefix: oe.any,
- suffix: oe.any,
- clearIcon: oe.any,
- affixWrapperClassName: String,
- groupClassName: String,
- wrapperClassName: String,
- inputClassName: String,
- allowClear: {
- type: Boolean,
- default: void 0
- }
- }), Fae = () => k(k({}, rFe()), {
- value: {
- type: [String, Number, Symbol],
- default: void 0
- },
- defaultValue: {
- type: [String, Number, Symbol],
- default: void 0
- },
- inputElement: oe.any,
- prefixCls: String,
- disabled: {
- type: Boolean,
- default: void 0
- },
- focused: {
- type: Boolean,
- default: void 0
- },
- triggerFocus: Function,
- readonly: {
- type: Boolean,
- default: void 0
- },
- handleReset: Function,
- hidden: {
- type: Boolean,
- default: void 0
- }
- }), Wae = () => k(k({}, Fae()), {
- id: String,
- placeholder: {
- type: [String, Number]
- },
- autocomplete: String,
- type: rr("text"),
- name: String,
- size: {
- type: String
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- lazy: {
- type: Boolean,
- default: !0
- },
- maxlength: Number,
- loading: {
- type: Boolean,
- default: void 0
- },
- bordered: {
- type: Boolean,
- default: void 0
- },
- showCount: {
- type: [Boolean, Object]
- },
- htmlSize: Number,
- onPressEnter: Function,
- onKeydown: Function,
- onKeyup: Function,
- onFocus: Function,
- onBlur: Function,
- onChange: Function,
- onInput: Function,
- "onUpdate:value": Function,
- onCompositionstart: Function,
- onCompositionend: Function,
- valueModifiers: Object,
- hidden: {
- type: Boolean,
- default: void 0
- },
- status: String
- }), iFe = ae({
- name: "BaseInput",
- inheritAttrs: !1,
- props: Fae(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const i = ee(), a = (s) => {
- var l;
- if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
- const {
- triggerFocus: u
- } = t;
- u == null || u();
- }
- }, o = () => {
- var s;
- const {
- allowClear: l,
- value: u,
- disabled: c,
- readonly: f,
- handleReset: d,
- suffix: h = n.suffix,
- prefixCls: p
- } = t;
- if (!l)
- return null;
- const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
- return D("span", {
- onClick: d,
- onMousedown: (y) => y.preventDefault(),
- class: Re({
- [`${g}-hidden`]: !v,
- [`${g}-has-suffix`]: !!h
- }, g),
- role: "button",
- tabindex: -1
- }, [m]);
- };
- return () => {
- var s, l;
- const {
- focused: u,
- value: c,
- disabled: f,
- allowClear: d,
- readonly: h,
- hidden: p,
- prefixCls: v,
- prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
- suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
- addonAfter: y = n.addonAfter,
- addonBefore: _ = n.addonBefore,
- inputElement: O,
- affixWrapperClassName: S,
- wrapperClassName: x,
- groupClassName: C
- } = t;
- let P = xr(O, {
- value: c,
- hidden: p
- });
- if (R8({
- prefix: g,
- suffix: m,
- allowClear: d
- })) {
- const $ = `${v}-affix-wrapper`, T = Re($, {
- [`${$}-disabled`]: f,
- [`${$}-focused`]: u,
- [`${$}-readonly`]: h,
- [`${$}-input-with-clear-btn`]: m && d && c
- }, !tw({
- addonAfter: y,
- addonBefore: _
- }) && r.class, S), E = (m || d) && D("span", {
- class: `${v}-suffix`
- }, [o(), m]);
- P = D("span", {
- class: T,
- style: r.style,
- hidden: !tw({
- addonAfter: y,
- addonBefore: _
- }) && p,
- onMousedown: a,
- ref: i
- }, [g && D("span", {
- class: `${v}-prefix`
- }, [g]), xr(O, {
- style: null,
- value: c,
- hidden: null
- }), E]);
- }
- if (tw({
- addonAfter: y,
- addonBefore: _
- })) {
- const $ = `${v}-group`, T = `${$}-addon`, E = Re(`${v}-wrapper`, $, x), M = Re(`${v}-group-wrapper`, r.class, C);
- return D("span", {
- class: M,
- style: r.style,
- hidden: p
- }, [D("span", {
- class: E
- }, [_ && D("span", {
- class: T
- }, [_]), xr(P, {
- style: null,
- hidden: null
- }), y && D("span", {
- class: T
- }, [y])])]);
- }
- return P;
- };
- }
- });
- var aFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const oFe = ae({
- name: "VCInput",
- inheritAttrs: !1,
- props: Wae(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i,
- emit: a
- } = e;
- const o = ve(t.value === void 0 ? t.defaultValue : t.value), s = ve(!1), l = ve(), u = ve();
- me(() => t.value, () => {
- o.value = t.value;
- }), me(() => t.disabled, () => {
- t.disabled && (s.value = !1);
- });
- const c = (C) => {
- l.value && Vae(l.value.input, C);
- }, f = () => {
- var C;
- (C = l.value.input) === null || C === void 0 || C.blur();
- }, d = (C, P, $) => {
- var T;
- (T = l.value.input) === null || T === void 0 || T.setSelectionRange(C, P, $);
- }, h = () => {
- var C;
- (C = l.value.input) === null || C === void 0 || C.select();
- };
- i({
- focus: c,
- blur: f,
- input: V(() => {
- var C;
- return (C = l.value.input) === null || C === void 0 ? void 0 : C.input;
- }),
- stateValue: o,
- setSelectionRange: d,
- select: h
- });
- const p = (C) => {
- a("change", C);
- }, v = (C, P) => {
- o.value !== C && (t.value === void 0 ? o.value = C : Bt(() => {
- var $;
- l.value.input.value !== o.value && (($ = u.value) === null || $ === void 0 || $.$forceUpdate());
- }), Bt(() => {
- P && P();
- }));
- }, g = (C) => {
- const {
- value: P
- } = C.target;
- if (o.value === P) return;
- const $ = C.target.value;
- Gy(l.value.input, C, p), v($);
- }, m = (C) => {
- C.keyCode === 13 && a("pressEnter", C), a("keydown", C);
- }, y = (C) => {
- s.value = !0, a("focus", C);
- }, _ = (C) => {
- s.value = !1, a("blur", C);
- }, O = (C) => {
- Gy(l.value.input, C, p), v("", () => {
- c();
- });
- }, S = () => {
- var C, P;
- const {
- addonBefore: $ = n.addonBefore,
- addonAfter: T = n.addonAfter,
- disabled: E,
- valueModifiers: M = {},
- htmlSize: R,
- autocomplete: N,
- prefixCls: I,
- inputClassName: B,
- prefix: Q = (C = n.prefix) === null || C === void 0 ? void 0 : C.call(n),
- suffix: W = (P = n.suffix) === null || P === void 0 ? void 0 : P.call(n),
- allowClear: H,
- type: U = "text"
- } = t, j = si(t, [
- "prefixCls",
- "onPressEnter",
- "addonBefore",
- "addonAfter",
- "prefix",
- "suffix",
- "allowClear",
- // Input elements must be either controlled or uncontrolled,
- // specify either the value prop, or the defaultValue prop, but not both.
- "defaultValue",
- "size",
- "bordered",
- "htmlSize",
- "lazy",
- "showCount",
- "valueModifiers",
- "showCount",
- "affixWrapperClassName",
- "groupClassName",
- "inputClassName",
- "wrapperClassName"
- ]), Y = k(k(k({}, j), r), {
- autocomplete: N,
- onChange: g,
- onInput: g,
- onFocus: y,
- onBlur: _,
- onKeydown: m,
- class: Re(I, {
- [`${I}-disabled`]: E
- }, B, !tw({
- addonAfter: T,
- addonBefore: $
- }) && !R8({
- prefix: Q,
- suffix: W,
- allowClear: H
- }) && r.class),
- ref: l,
- key: "ant-input",
- size: R,
- type: U,
- lazy: t.lazy
- });
- return M.lazy && delete Y.onInput, Y.autofocus || delete Y.autofocus, D(t8, si(Y, ["size"]), null);
- }, x = () => {
- var C;
- const {
- maxlength: P,
- suffix: $ = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
- showCount: T,
- prefixCls: E
- } = t, M = Number(P) > 0;
- if ($ || T) {
- const R = [...FR(o.value)].length, N = typeof T == "object" ? T.formatter({
- count: R,
- maxlength: P
- }) : `${R}${M ? ` / ${P}` : ""}`;
- return D(Wt, null, [!!T && D("span", {
- class: Re(`${E}-show-count-suffix`, {
- [`${E}-show-count-has-suffix`]: !!$
- })
- }, [N]), $]);
- }
- return null;
- };
- return _t(() => {
- process.env.NODE_ENV === "test" && t.autofocus && c();
- }), () => {
- const {
- prefixCls: C,
- disabled: P
- } = t, $ = aFe(t, ["prefixCls", "disabled"]);
- return D(iFe, te(te(te({}, $), r), {}, {
- ref: u,
- prefixCls: C,
- inputElement: S(),
- handleReset: O,
- value: FR(o.value),
- focused: s.value,
- triggerFocus: c,
- suffix: x(),
- disabled: P
- }), n);
- };
- }
- }), Y2 = () => si(Wae(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), Qae = () => k(k({}, si(Y2(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
- rows: Number,
- autosize: {
- type: [Boolean, Object],
- default: void 0
- },
- autoSize: {
- type: [Boolean, Object],
- default: void 0
- },
- onResize: {
- type: Function
- },
- onCompositionstart: Uw(),
- onCompositionend: Uw(),
- valueModifiers: Object
- });
- var sFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const mr = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AInput",
- inheritAttrs: !1,
- props: Y2(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i,
- emit: a
- } = e;
- const o = ee(), s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), {
- direction: c,
- prefixCls: f,
- size: d,
- autocomplete: h
- } = hn("input", t), {
- compactSize: p,
- compactItemClassnames: v
- } = L2(f, c), g = V(() => p.value || d.value), [m, y] = C8(f), _ = Vl();
- i({
- focus: (R) => {
- var N;
- (N = o.value) === null || N === void 0 || N.focus(R);
- },
- blur: () => {
- var R;
- (R = o.value) === null || R === void 0 || R.blur();
- },
- input: o,
- setSelectionRange: (R, N, I) => {
- var B;
- (B = o.value) === null || B === void 0 || B.setSelectionRange(R, N, I);
- },
- select: () => {
- var R;
- (R = o.value) === null || R === void 0 || R.select();
- }
- });
- const P = ee([]), $ = () => {
- P.value.push(setTimeout(() => {
- var R, N, I, B;
- !((R = o.value) === null || R === void 0) && R.input && ((N = o.value) === null || N === void 0 ? void 0 : N.input.getAttribute("type")) === "password" && (!((I = o.value) === null || I === void 0) && I.input.hasAttribute("value")) && ((B = o.value) === null || B === void 0 || B.input.removeAttribute("value"));
- }));
- };
- _t(() => {
- $();
- }), Mee(() => {
- P.value.forEach((R) => clearTimeout(R));
- }), Qt(() => {
- P.value.forEach((R) => clearTimeout(R));
- });
- const T = (R) => {
- $(), a("blur", R), s.onFieldBlur();
- }, E = (R) => {
- $(), a("focus", R);
- }, M = (R) => {
- a("update:value", R.target.value), a("change", R), a("input", R), s.onFieldChange();
- };
- return () => {
- var R, N, I, B, Q, W;
- const {
- hasFeedback: H,
- feedbackIcon: U
- } = l, {
- allowClear: j,
- bordered: Y = !0,
- prefix: ne = (R = n.prefix) === null || R === void 0 ? void 0 : R.call(n),
- suffix: fe = (N = n.suffix) === null || N === void 0 ? void 0 : N.call(n),
- addonAfter: ue = (I = n.addonAfter) === null || I === void 0 ? void 0 : I.call(n),
- addonBefore: ye = (B = n.addonBefore) === null || B === void 0 ? void 0 : B.call(n),
- id: se = (Q = s.id) === null || Q === void 0 ? void 0 : Q.value
- } = t, he = sFe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), re = (H || fe) && D(Wt, null, [fe, H && U]), q = f.value, K = R8({
- prefix: ne,
- suffix: fe
- }) || !!H, de = n.clearIcon || (() => D(cs, null, null));
- return m(D(oFe, te(te(te({}, r), si(he, ["onUpdate:value", "onChange", "onInput"])), {}, {
- onChange: M,
- id: se,
- disabled: (W = t.disabled) !== null && W !== void 0 ? W : _.value,
- ref: o,
- prefixCls: q,
- autocomplete: h.value,
- onBlur: T,
- onFocus: E,
- prefix: ne,
- suffix: re,
- allowClear: j,
- addonAfter: ue && D(iC, null, {
- default: () => [D(rC, null, {
- default: () => [ue]
- })]
- }),
- addonBefore: ye && D(iC, null, {
- default: () => [D(rC, null, {
- default: () => [ye]
- })]
- }),
- class: [r.class, v.value],
- inputClassName: Re({
- [`${q}-sm`]: g.value === "small",
- [`${q}-lg`]: g.value === "large",
- [`${q}-rtl`]: c.value === "rtl",
- [`${q}-borderless`]: !Y
- }, !K && Eu(q, u.value), y.value),
- affixWrapperClassName: Re({
- [`${q}-affix-wrapper-sm`]: g.value === "small",
- [`${q}-affix-wrapper-lg`]: g.value === "large",
- [`${q}-affix-wrapper-rtl`]: c.value === "rtl",
- [`${q}-affix-wrapper-borderless`]: !Y
- }, Eu(`${q}-affix-wrapper`, u.value, H), y.value),
- wrapperClassName: Re({
- [`${q}-group-rtl`]: c.value === "rtl"
- }, y.value),
- groupClassName: Re({
- [`${q}-group-wrapper-sm`]: g.value === "small",
- [`${q}-group-wrapper-lg`]: g.value === "large",
- [`${q}-group-wrapper-rtl`]: c.value === "rtl"
- }, Eu(`${q}-group-wrapper`, u.value, H), y.value)
- }), k(k({}, n), {
- clearIcon: de
- })));
- };
- }
- }), lFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AInputGroup",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- size: {
- type: String
- },
- compact: {
- type: Boolean,
- default: void 0
- }
- },
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i,
- direction: a,
- getPrefixCls: o
- } = hn("input-group", t), s = Qs.useInject();
- Qs.useProvide(s, {
- isFormItemInput: !1
- });
- const l = V(() => o("input")), [u, c] = C8(l), f = V(() => {
- const d = i.value;
- return {
- [`${d}`]: !0,
- [c.value]: !0,
- [`${d}-lg`]: t.size === "large",
- [`${d}-sm`]: t.size === "small",
- [`${d}-compact`]: t.compact,
- [`${d}-rtl`]: a.value === "rtl"
- };
- });
- return () => {
- var d;
- return u(D("span", te(te({}, r), {}, {
- class: Re(f.value, r.class)
- }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
- };
- }
- });
- var uFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const cFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AInputSearch",
- inheritAttrs: !1,
- props: k(k({}, Y2()), {
- inputPrefixCls: String,
- // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
- enterButton: oe.any,
- onSearch: {
- type: Function
- }
- }),
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i,
- emit: a
- } = e;
- const o = ve(), s = ve(!1);
- i({
- focus: () => {
- var S;
- (S = o.value) === null || S === void 0 || S.focus();
- },
- blur: () => {
- var S;
- (S = o.value) === null || S === void 0 || S.blur();
- }
- });
- const c = (S) => {
- a("update:value", S.target.value), S && S.target && S.type === "click" && a("search", S.target.value, S), a("change", S);
- }, f = (S) => {
- var x;
- document.activeElement === ((x = o.value) === null || x === void 0 ? void 0 : x.input) && S.preventDefault();
- }, d = (S) => {
- var x, C;
- a("search", (C = (x = o.value) === null || x === void 0 ? void 0 : x.input) === null || C === void 0 ? void 0 : C.stateValue, S);
- }, h = (S) => {
- s.value || t.loading || d(S);
- }, p = (S) => {
- s.value = !0, a("compositionstart", S);
- }, v = (S) => {
- s.value = !1, a("compositionend", S);
- }, {
- prefixCls: g,
- getPrefixCls: m,
- direction: y,
- size: _
- } = hn("input-search", t), O = V(() => m("input", t.inputPrefixCls));
- return () => {
- var S, x, C, P;
- const {
- disabled: $,
- loading: T,
- addonAfter: E = (S = n.addonAfter) === null || S === void 0 ? void 0 : S.call(n),
- suffix: M = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n)
- } = t, R = uFe(t, ["disabled", "loading", "addonAfter", "suffix"]);
- let {
- enterButton: N = (P = (C = n.enterButton) === null || C === void 0 ? void 0 : C.call(n)) !== null && P !== void 0 ? P : !1
- } = t;
- N = N || N === "";
- const I = typeof N == "boolean" ? D(R2, null, null) : null, B = `${g.value}-button`, Q = Array.isArray(N) ? N[0] : N;
- let W;
- const H = Q.type && uN(Q.type) && Q.type.__ANT_BUTTON;
- if (H || Q.tagName === "button")
- W = xr(Q, k({
- onMousedown: f,
- onClick: d,
- key: "enterButton"
- }, H ? {
- class: B,
- size: _.value
- } : {}), !1);
- else {
- const j = I && !N;
- W = D(Vi, {
- class: B,
- type: N ? "primary" : void 0,
- size: _.value,
- disabled: $,
- key: "enterButton",
- onMousedown: f,
- onClick: d,
- loading: T,
- icon: j ? I : null
- }, {
- default: () => [j ? null : I || N]
- });
- }
- E && (W = [W, E]);
- const U = Re(g.value, {
- [`${g.value}-rtl`]: y.value === "rtl",
- [`${g.value}-${_.value}`]: !!_.value,
- [`${g.value}-with-button`]: !!N
- }, r.class);
- return D(mr, te(te(te({
- ref: o
- }, si(R, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
- onPressEnter: h,
- onCompositionstart: p,
- onCompositionend: v,
- size: _.value,
- prefixCls: O.value,
- addonAfter: W,
- suffix: M,
- onChange: c,
- class: U,
- disabled: $
- }), n);
- };
- }
- }), s9 = (t) => t != null && (Array.isArray(t) ? Zl(t).length : !0);
- function fFe(t) {
- return s9(t.addonBefore) || s9(t.addonAfter);
- }
- const dFe = ["text", "input"], hFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ClearableLabeledInput",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- inputType: oe.oneOf(pf("text", "input")),
- value: Fo(),
- defaultValue: Fo(),
- allowClear: {
- type: Boolean,
- default: void 0
- },
- element: Fo(),
- handleReset: Function,
- disabled: {
- type: Boolean,
- default: void 0
- },
- direction: {
- type: String
- },
- size: {
- type: String
- },
- suffix: Fo(),
- prefix: Fo(),
- addonBefore: Fo(),
- addonAfter: Fo(),
- readonly: {
- type: Boolean,
- default: void 0
- },
- focused: {
- type: Boolean,
- default: void 0
- },
- bordered: {
- type: Boolean,
- default: !0
- },
- triggerFocus: {
- type: Function
- },
- hidden: Boolean,
- status: String,
- hashId: String
- },
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const i = Qs.useInject(), a = (s) => {
- const {
- value: l,
- disabled: u,
- readonly: c,
- handleReset: f,
- suffix: d = n.suffix
- } = t, h = !u && !c && l, p = `${s}-clear-icon`;
- return D(cs, {
- onClick: f,
- onMousedown: (v) => v.preventDefault(),
- class: Re({
- [`${p}-hidden`]: !h,
- [`${p}-has-suffix`]: !!d
- }, p),
- role: "button"
- }, null);
- }, o = (s, l) => {
- const {
- value: u,
- allowClear: c,
- direction: f,
- bordered: d,
- hidden: h,
- status: p,
- addonAfter: v = n.addonAfter,
- addonBefore: g = n.addonBefore,
- hashId: m
- } = t, {
- status: y,
- hasFeedback: _
- } = i;
- if (!c)
- return xr(l, {
- value: u,
- disabled: t.disabled
- });
- const O = Re(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Eu(`${s}-affix-wrapper`, U_(y, p), _), {
- [`${s}-affix-wrapper-rtl`]: f === "rtl",
- [`${s}-affix-wrapper-borderless`]: !d,
- // className will go to addon wrapper
- [`${r.class}`]: !fFe({
- addonAfter: v,
- addonBefore: g
- }) && r.class
- }, m);
- return D("span", {
- class: O,
- style: r.style,
- hidden: h
- }, [xr(l, {
- style: null,
- value: u,
- disabled: t.disabled
- }), a(s)]);
- };
- return () => {
- var s;
- const {
- prefixCls: l,
- inputType: u,
- element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
- } = t;
- return u === dFe[0] ? o(l, c) : null;
- };
- }
- }), pFe = `
- min-height:0 !important;
- max-height:none !important;
- height:0 !important;
- visibility:hidden !important;
- overflow:hidden !important;
- position:absolute !important;
- z-index:-1000 !important;
- top:0 !important;
- right:0 !important;
- pointer-events: none !important;
- `, vFe = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], gE = {};
- let Ao;
- function gFe(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
- if (e && gE[n])
- return gE[n];
- const r = window.getComputedStyle(t), i = r.getPropertyValue("box-sizing") || r.getPropertyValue("-moz-box-sizing") || r.getPropertyValue("-webkit-box-sizing"), a = parseFloat(r.getPropertyValue("padding-bottom")) + parseFloat(r.getPropertyValue("padding-top")), o = parseFloat(r.getPropertyValue("border-bottom-width")) + parseFloat(r.getPropertyValue("border-top-width")), l = {
- sizingStyle: vFe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
- paddingSize: a,
- borderSize: o,
- boxSizing: i
- };
- return e && n && (gE[n] = l), l;
- }
- function mFe(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
- Ao || (Ao = document.createElement("textarea"), Ao.setAttribute("tab-index", "-1"), Ao.setAttribute("aria-hidden", "true"), document.body.appendChild(Ao)), t.getAttribute("wrap") ? Ao.setAttribute("wrap", t.getAttribute("wrap")) : Ao.removeAttribute("wrap");
- const {
- paddingSize: i,
- borderSize: a,
- boxSizing: o,
- sizingStyle: s
- } = gFe(t, e);
- Ao.setAttribute("style", `${s};${pFe}`), Ao.value = t.value || t.placeholder || "";
- let l, u, c, f = Ao.scrollHeight;
- if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
- Ao.value = " ";
- const h = Ao.scrollHeight - i;
- n !== null && (l = h * n, o === "border-box" && (l = l + i + a), f = Math.max(l, f)), r !== null && (u = h * r, o === "border-box" && (u = u + i + a), c = f > u ? "" : "hidden", f = Math.min(u, f));
- }
- const d = {
- height: `${f}px`,
- overflowY: c,
- resize: "none"
- };
- return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
- }
- const mE = 0, yE = 1, bE = 2, yFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ResizableTextArea",
- inheritAttrs: !1,
- props: Qae(),
- setup(t, e) {
- let {
- attrs: n,
- emit: r,
- expose: i
- } = e, a, o;
- const s = ee(), l = ee({}), u = ee(bE);
- Qt(() => {
- en.cancel(a), en.cancel(o);
- });
- const c = () => {
- try {
- if (s.value && document.activeElement === s.value.input) {
- const x = s.value.getSelectionStart(), C = s.value.getSelectionEnd(), P = s.value.getScrollTop();
- s.value.setSelectionRange(x, C), s.value.setScrollTop(P);
- }
- } catch {
- }
- }, f = ee(), d = ee();
- Vt(() => {
- const x = t.autoSize || t.autosize;
- x ? (f.value = x.minRows, d.value = x.maxRows) : (f.value = void 0, d.value = void 0);
- });
- const h = V(() => !!(t.autoSize || t.autosize)), p = () => {
- u.value = mE;
- };
- me([() => t.value, f, d, h], () => {
- h.value && p();
- }, {
- immediate: !0
- });
- const v = ee();
- me([u, s], () => {
- if (s.value)
- if (u.value === mE)
- u.value = yE;
- else if (u.value === yE) {
- const x = mFe(s.value.input, !1, f.value, d.value);
- u.value = bE, v.value = x;
- } else
- c();
- }, {
- immediate: !0,
- flush: "post"
- });
- const g = In(), m = ee(), y = () => {
- en.cancel(m.value);
- }, _ = (x) => {
- u.value === bE && (r("resize", x), h.value && (y(), m.value = en(() => {
- p();
- })));
- };
- Qt(() => {
- y();
- }), i({
- resizeTextarea: () => {
- p();
- },
- textArea: V(() => {
- var x;
- return (x = s.value) === null || x === void 0 ? void 0 : x.input;
- }),
- instance: g
- }), aa(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
- const S = () => {
- const {
- prefixCls: x,
- disabled: C
- } = t, P = si(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), $ = Re(x, n.class, {
- [`${x}-disabled`]: C
- }), T = h.value ? v.value : null, E = [n.style, l.value, T], M = k(k(k({}, P), n), {
- style: E,
- class: $
- });
- return (u.value === mE || u.value === yE) && E.push({
- overflowX: "hidden",
- overflowY: "hidden"
- }), M.autofocus || delete M.autofocus, M.rows === 0 && delete M.rows, D($g, {
- onResize: _,
- disabled: !h.value
- }, {
- default: () => [D(t8, te(te({}, M), {}, {
- ref: s,
- tag: "textarea"
- }), null)]
- });
- };
- return () => S();
- }
- });
- function Hae(t, e) {
- return [...t || ""].slice(0, e).join("");
- }
- function l9(t, e, n, r) {
- let i = n;
- return t ? i = Hae(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
- }
- const bFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ATextarea",
- inheritAttrs: !1,
- props: Qae(),
- setup(t, e) {
- let {
- attrs: n,
- expose: r,
- emit: i
- } = e;
- var a;
- const o = Ul(), s = Qs.useInject(), l = V(() => U_(s.status, t.status)), u = ve((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ve(), f = ve(""), {
- prefixCls: d,
- size: h,
- direction: p
- } = hn("input", t), [v, g] = C8(d), m = Vl(), y = V(() => t.showCount === "" || t.showCount || !1), _ = V(() => Number(t.maxlength) > 0), O = ve(!1), S = ve(), x = ve(0), C = (H) => {
- O.value = !0, S.value = f.value, x.value = H.currentTarget.selectionStart, i("compositionstart", H);
- }, P = (H) => {
- var U;
- O.value = !1;
- let j = H.currentTarget.value;
- if (_.value) {
- const Y = x.value >= t.maxlength + 1 || x.value === ((U = S.value) === null || U === void 0 ? void 0 : U.length);
- j = l9(Y, S.value, j, t.maxlength);
- }
- j !== f.value && (M(j), Gy(H.currentTarget, H, I, j)), i("compositionend", H);
- }, $ = In();
- me(() => t.value, () => {
- var H;
- "value" in $.vnode.props, u.value = (H = t.value) !== null && H !== void 0 ? H : "";
- });
- const T = (H) => {
- var U;
- Vae((U = c.value) === null || U === void 0 ? void 0 : U.textArea, H);
- }, E = () => {
- var H, U;
- (U = (H = c.value) === null || H === void 0 ? void 0 : H.textArea) === null || U === void 0 || U.blur();
- }, M = (H, U) => {
- u.value !== H && (t.value === void 0 ? u.value = H : Bt(() => {
- var j, Y, ne;
- c.value.textArea.value !== f.value && ((ne = (j = c.value) === null || j === void 0 ? void 0 : (Y = j.instance).update) === null || ne === void 0 || ne.call(Y));
- }), Bt(() => {
- U && U();
- }));
- }, R = (H) => {
- H.keyCode === 13 && i("pressEnter", H), i("keydown", H);
- }, N = (H) => {
- const {
- onBlur: U
- } = t;
- U == null || U(H), o.onFieldBlur();
- }, I = (H) => {
- i("update:value", H.target.value), i("change", H), i("input", H), o.onFieldChange();
- }, B = (H) => {
- Gy(c.value.textArea, H, I), M("", () => {
- T();
- });
- }, Q = (H) => {
- let U = H.target.value;
- if (u.value !== U) {
- if (_.value) {
- const j = H.target, Y = j.selectionStart >= t.maxlength + 1 || j.selectionStart === U.length || !j.selectionStart;
- U = l9(Y, f.value, U, t.maxlength);
- }
- Gy(H.currentTarget, H, I, U), M(U);
- }
- }, W = () => {
- var H, U;
- const {
- class: j
- } = n, {
- bordered: Y = !0
- } = t, ne = k(k(k({}, si(t, ["allowClear"])), n), {
- class: [{
- [`${d.value}-borderless`]: !Y,
- [`${j}`]: j && !y.value,
- [`${d.value}-sm`]: h.value === "small",
- [`${d.value}-lg`]: h.value === "large"
- }, Eu(d.value, l.value), g.value],
- disabled: m.value,
- showCount: null,
- prefixCls: d.value,
- onInput: Q,
- onChange: Q,
- onBlur: N,
- onKeydown: R,
- onCompositionstart: C,
- onCompositionend: P
- });
- return !((H = t.valueModifiers) === null || H === void 0) && H.lazy && delete ne.onInput, D(yFe, te(te({}, ne), {}, {
- id: (U = ne == null ? void 0 : ne.id) !== null && U !== void 0 ? U : o.id.value,
- ref: c,
- maxlength: t.maxlength,
- lazy: t.lazy
- }), null);
- };
- return r({
- focus: T,
- blur: E,
- resizableTextArea: c
- }), Vt(() => {
- let H = FR(u.value);
- !O.value && _.value && (t.value === null || t.value === void 0) && (H = Hae(H, t.maxlength)), f.value = H;
- }), () => {
- var H;
- const {
- maxlength: U,
- bordered: j = !0,
- hidden: Y
- } = t, {
- style: ne,
- class: fe
- } = n, ue = k(k(k({}, t), n), {
- prefixCls: d.value,
- inputType: "text",
- handleReset: B,
- direction: p.value,
- bordered: j,
- style: y.value ? void 0 : ne,
- hashId: g.value,
- disabled: (H = t.disabled) !== null && H !== void 0 ? H : m.value
- });
- let ye = D(hFe, te(te({}, ue), {}, {
- value: f.value,
- status: t.status
- }), {
- element: W
- });
- if (y.value || s.hasFeedback) {
- const se = [...f.value].length;
- let he = "";
- typeof y.value == "object" ? he = y.value.formatter({
- value: f.value,
- count: se,
- maxlength: U
- }) : he = `${se}${_.value ? ` / ${U}` : ""}`, ye = D("div", {
- hidden: Y,
- class: Re(`${d.value}-textarea`, {
- [`${d.value}-textarea-rtl`]: p.value === "rtl",
- [`${d.value}-textarea-show-count`]: y.value,
- [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
- }, `${d.value}-textarea-show-count`, fe, g.value),
- style: ne,
- "data-count": typeof he != "object" ? he : void 0
- }, [ye, s.hasFeedback && D("span", {
- class: `${d.value}-textarea-suffix`
- }, [s.feedbackIcon])]);
- }
- return v(ye);
- };
- }
- });
- var _Fe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
- function u9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- OFe(t, i, n[i]);
- });
- }
- return t;
- }
- function OFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var q2 = function(e, n) {
- var r = u9({}, e, n.attrs);
- return D(Rt, u9({}, r, {
- icon: _Fe
- }), null);
- };
- q2.displayName = "EyeOutlined";
- q2.inheritAttrs = !1;
- var SFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
- function c9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- xFe(t, i, n[i]);
- });
- }
- return t;
- }
- function xFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var k8 = function(e, n) {
- var r = c9({}, e, n.attrs);
- return D(Rt, c9({}, r, {
- icon: SFe
- }), null);
- };
- k8.displayName = "EyeInvisibleOutlined";
- k8.inheritAttrs = !1;
- var wFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const CFe = {
- click: "onClick",
- hover: "onMouseover"
- }, TFe = (t) => t ? D(q2, null, null) : D(k8, null, null), PFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AInputPassword",
- inheritAttrs: !1,
- props: k(k({}, Y2()), {
- prefixCls: String,
- inputPrefixCls: String,
- action: {
- type: String,
- default: "click"
- },
- visibilityToggle: {
- type: Boolean,
- default: !0
- },
- visible: {
- type: Boolean,
- default: void 0
- },
- "onUpdate:visible": Function,
- iconRender: Function
- }),
- setup(t, e) {
- let {
- slots: n,
- attrs: r,
- expose: i,
- emit: a
- } = e;
- const o = ve(!1), s = () => {
- const {
- disabled: g
- } = t;
- g || (o.value = !o.value, a("update:visible", o.value));
- };
- Vt(() => {
- t.visible !== void 0 && (o.value = !!t.visible);
- });
- const l = ve();
- i({
- focus: () => {
- var g;
- (g = l.value) === null || g === void 0 || g.focus();
- },
- blur: () => {
- var g;
- (g = l.value) === null || g === void 0 || g.blur();
- }
- });
- const f = (g) => {
- const {
- action: m,
- iconRender: y = n.iconRender || TFe
- } = t, _ = CFe[m] || "", O = y(o.value), S = {
- [_]: s,
- class: `${g}-icon`,
- key: "passwordIcon",
- onMousedown: (x) => {
- x.preventDefault();
- },
- onMouseup: (x) => {
- x.preventDefault();
- }
- };
- return xr(po(O) ? O : D("span", null, [O]), S);
- }, {
- prefixCls: d,
- getPrefixCls: h
- } = hn("input-password", t), p = V(() => h("input", t.inputPrefixCls)), v = () => {
- const {
- size: g,
- visibilityToggle: m
- } = t, y = wFe(t, ["size", "visibilityToggle"]), _ = m && f(d.value), O = Re(d.value, r.class, {
- [`${d.value}-${g}`]: !!g
- }), S = k(k(k({}, si(y, ["suffix", "iconRender", "action"])), r), {
- type: o.value ? "text" : "password",
- class: O,
- prefixCls: p.value,
- suffix: _
- });
- return g && (S.size = g), D(mr, te({
- ref: l
- }, S), n);
- };
- return () => v();
- }
- });
- mr.Group = lFe;
- mr.Search = cFe;
- mr.TextArea = bFe;
- mr.Password = PFe;
- mr.install = function(t) {
- return t.component(mr.name, mr), t.component(mr.Group.name, mr.Group), t.component(mr.Search.name, mr.Search), t.component(mr.TextArea.name, mr.TextArea), t.component(mr.Password.name, mr.Password), t;
- };
- function K2() {
- return {
- keyboard: {
- type: Boolean,
- default: void 0
- },
- mask: {
- type: Boolean,
- default: void 0
- },
- afterClose: Function,
- closable: {
- type: Boolean,
- default: void 0
- },
- maskClosable: {
- type: Boolean,
- default: void 0
- },
- visible: {
- type: Boolean,
- default: void 0
- },
- destroyOnClose: {
- type: Boolean,
- default: void 0
- },
- mousePosition: oe.shape({
- x: Number,
- y: Number
- }).loose,
- title: oe.any,
- footer: oe.any,
- transitionName: String,
- maskTransitionName: String,
- animation: oe.any,
- maskAnimation: oe.any,
- wrapStyle: {
- type: Object,
- default: void 0
- },
- bodyStyle: {
- type: Object,
- default: void 0
- },
- maskStyle: {
- type: Object,
- default: void 0
- },
- prefixCls: String,
- wrapClassName: String,
- rootClassName: String,
- width: [String, Number],
- height: [String, Number],
- zIndex: Number,
- bodyProps: oe.any,
- maskProps: oe.any,
- wrapProps: oe.any,
- getContainer: oe.any,
- dialogStyle: {
- type: Object,
- default: void 0
- },
- dialogClass: String,
- closeIcon: oe.any,
- forceRender: {
- type: Boolean,
- default: void 0
- },
- getOpenCount: Function,
- // https://github.com/ant-design/ant-design/issues/19771
- // https://github.com/react-component/dialog/issues/95
- focusTriggerAfterClose: {
- type: Boolean,
- default: void 0
- },
- onClose: Function,
- modalRender: Function
- };
- }
- function f9(t, e, n) {
- let r = e;
- return !r && n && (r = `${t}-${n}`), r;
- }
- let d9 = -1;
- function $Fe() {
- return d9 += 1, d9;
- }
- function h9(t, e) {
- let n = t[`page${e ? "Y" : "X"}Offset`];
- const r = `scroll${e ? "Top" : "Left"}`;
- if (typeof n != "number") {
- const i = t.document;
- n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
- }
- return n;
- }
- function AFe(t) {
- const e = t.getBoundingClientRect(), n = {
- left: e.left,
- top: e.top
- }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
- return n.left += h9(i), n.top += h9(i, !0), n;
- }
- const p9 = {
- width: 0,
- height: 0,
- overflow: "hidden",
- outline: "none"
- }, EFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "DialogContent",
- inheritAttrs: !1,
- props: k(k({}, K2()), {
- motionName: String,
- ariaId: String,
- onVisibleChanged: Function,
- onMousedown: Function,
- onMouseup: Function
- }),
- setup(t, e) {
- let {
- expose: n,
- slots: r,
- attrs: i
- } = e;
- const a = ee(), o = ee(), s = ee();
- n({
- focus: () => {
- var d;
- (d = a.value) === null || d === void 0 || d.focus();
- },
- changeActive: (d) => {
- const {
- activeElement: h
- } = document;
- d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
- }
- });
- const l = ee(), u = V(() => {
- const {
- width: d,
- height: h
- } = t, p = {};
- return d !== void 0 && (p.width = typeof d == "number" ? `${d}px` : d), h !== void 0 && (p.height = typeof h == "number" ? `${h}px` : h), l.value && (p.transformOrigin = l.value), p;
- }), c = () => {
- Bt(() => {
- if (s.value) {
- const d = AFe(s.value);
- l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
- }
- });
- }, f = (d) => {
- t.onVisibleChanged(d);
- };
- return () => {
- var d, h, p, v;
- const {
- prefixCls: g,
- footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
- title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
- ariaId: _,
- closable: O,
- closeIcon: S = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
- onClose: x,
- bodyStyle: C,
- bodyProps: P,
- onMousedown: $,
- onMouseup: T,
- visible: E,
- modalRender: M = r.modalRender,
- destroyOnClose: R,
- motionName: N
- } = t;
- let I;
- m && (I = D("div", {
- class: `${g}-footer`
- }, [m]));
- let B;
- y && (B = D("div", {
- class: `${g}-header`
- }, [D("div", {
- class: `${g}-title`,
- id: _
- }, [y])]));
- let Q;
- O && (Q = D("button", {
- type: "button",
- onClick: x,
- "aria-label": "Close",
- class: `${g}-close`
- }, [S || D("span", {
- class: `${g}-close-x`
- }, null)]));
- const W = D("div", {
- class: `${g}-content`
- }, [Q, B, D("div", te({
- class: `${g}-body`,
- style: C
- }, P), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), I]), H = Z_(N);
- return D(mo, te(te({}, H), {}, {
- onBeforeEnter: c,
- onAfterEnter: () => f(!0),
- onAfterLeave: () => f(!1)
- }), {
- default: () => [E || !R ? Sr(D("div", te(te({}, i), {}, {
- ref: s,
- key: "dialog-element",
- role: "document",
- style: [u.value, i.style],
- class: [g, i.class],
- onMousedown: $,
- onMouseup: T
- }), [D("div", {
- tabindex: 0,
- ref: a,
- style: p9,
- "aria-hidden": "true"
- }, null), M ? M({
- originVNode: W
- }) : W, D("div", {
- tabindex: 0,
- ref: o,
- style: p9,
- "aria-hidden": "true"
- }, null)]), [[ho, E]]) : null]
- });
- };
- }
- }), MFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "DialogMask",
- props: {
- prefixCls: String,
- visible: Boolean,
- motionName: String,
- maskProps: Object
- },
- setup(t, e) {
- return () => {
- const {
- prefixCls: n,
- visible: r,
- maskProps: i,
- motionName: a
- } = t, o = Z_(a);
- return D(mo, o, {
- default: () => [Sr(D("div", te({
- class: `${n}-mask`
- }, i), null), [[ho, r]])]
- });
- };
- }
- }), v9 = ae({
- compatConfig: {
- MODE: 3
- },
- name: "VcDialog",
- inheritAttrs: !1,
- props: li(k(k({}, K2()), {
- getOpenCount: Function,
- scrollLocker: Object
- }), {
- mask: !0,
- visible: !1,
- keyboard: !0,
- closable: !0,
- maskClosable: !0,
- destroyOnClose: !1,
- prefixCls: "rc-dialog",
- getOpenCount: () => null,
- focusTriggerAfterClose: !0
- }),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const i = ve(), a = ve(), o = ve(), s = ve(t.visible), l = ve(`vcDialogTitle${$Fe()}`), u = (m) => {
- var y, _;
- if (m)
- kc(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
- else {
- const O = s.value;
- if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
- try {
- i.value.focus({
- preventScroll: !0
- });
- } catch {
- }
- i.value = null;
- }
- O && ((_ = t.afterClose) === null || _ === void 0 || _.call(t));
- }
- }, c = (m) => {
- var y;
- (y = t.onClose) === null || y === void 0 || y.call(t, m);
- }, f = ve(!1), d = ve(), h = () => {
- clearTimeout(d.value), f.value = !0;
- }, p = () => {
- d.value = setTimeout(() => {
- f.value = !1;
- });
- }, v = (m) => {
- if (!t.maskClosable) return null;
- f.value ? f.value = !1 : a.value === m.target && c(m);
- }, g = (m) => {
- if (t.keyboard && m.keyCode === Me.ESC) {
- m.stopPropagation(), c(m);
- return;
- }
- t.visible && m.keyCode === Me.TAB && o.value.changeActive(!m.shiftKey);
- };
- return me(() => t.visible, () => {
- t.visible && (s.value = !0);
- }, {
- flush: "post"
- }), Qt(() => {
- var m;
- clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
- }), Vt(() => {
- var m, y;
- (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
- }), () => {
- const {
- prefixCls: m,
- mask: y,
- visible: _,
- maskTransitionName: O,
- maskAnimation: S,
- zIndex: x,
- wrapClassName: C,
- rootClassName: P,
- wrapStyle: $,
- closable: T,
- maskProps: E,
- maskStyle: M,
- transitionName: R,
- animation: N,
- wrapProps: I,
- title: B = r.title
- } = t, {
- style: Q,
- class: W
- } = n;
- return D("div", te({
- class: [`${m}-root`, P]
- }, M2(t, {
- data: !0
- })), [D(MFe, {
- prefixCls: m,
- visible: y && _,
- motionName: f9(m, O, S),
- style: k({
- zIndex: x
- }, M),
- maskProps: E
- }, null), D("div", te({
- tabIndex: -1,
- onKeydown: g,
- class: Re(`${m}-wrap`, C),
- ref: a,
- onClick: v,
- role: "dialog",
- "aria-labelledby": B ? l.value : null,
- style: k(k({
- zIndex: x
- }, $), {
- display: s.value ? null : "none"
- })
- }, I), [D(EFe, te(te({}, si(t, ["scrollLocker"])), {}, {
- style: Q,
- class: W,
- onMousedown: h,
- onMouseup: p,
- ref: o,
- closable: T,
- ariaId: l.value,
- prefixCls: m,
- visible: _,
- onClose: c,
- onVisibleChanged: u,
- motionName: f9(m, R, N)
- }), r)])]);
- };
- }
- }), IFe = K2(), Gae = ae({
- compatConfig: {
- MODE: 3
- },
- name: "DialogWrap",
- inheritAttrs: !1,
- props: li(IFe, {
- visible: !1
- }),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const i = ee(t.visible);
- return e8({}, {
- inTriggerContext: !1
- }), me(() => t.visible, () => {
- t.visible && (i.value = !0);
- }, {
- flush: "post"
- }), () => {
- const {
- visible: a,
- getContainer: o,
- forceRender: s,
- destroyOnClose: l = !1,
- afterClose: u
- } = t;
- let c = k(k(k({}, t), n), {
- ref: "_component",
- key: "dialog"
- });
- return o === !1 ? D(v9, te(te({}, c), {}, {
- getOpenCount: () => 2
- }), r) : !s && l && !i.value ? null : D(Zre, {
- autoLock: !0,
- visible: a,
- forceRender: s,
- getContainer: o
- }, {
- default: (f) => (c = k(k(k({}, c), f), {
- afterClose: () => {
- u == null || u(), i.value = !1;
- }
- }), D(v9, c, r))
- });
- };
- }
- });
- function DFe(t) {
- const e = ee(null), n = zn(k({}, t)), r = ee([]), i = (a) => {
- e.value === null && (r.value = [], e.value = en(() => {
- let o;
- r.value.forEach((s) => {
- o = k(k({}, o), s);
- }), k(n, o), e.value = null;
- })), r.value.push(a);
- };
- return _t(() => {
- e.value && en.cancel(e.value);
- }), [n, i];
- }
- function g9(t, e, n, r) {
- const i = e + n, a = (n - r) / 2;
- if (n > r) {
- if (e > 0)
- return {
- [t]: a
- };
- if (e < 0 && i < r)
- return {
- [t]: -a
- };
- } else if (e < 0 || i > r)
- return {
- [t]: e < 0 ? a : -a
- };
- return {};
- }
- function RFe(t, e, n, r) {
- const {
- width: i,
- height: a
- } = wNe();
- let o = null;
- return t <= i && e <= a ? o = {
- x: 0,
- y: 0
- } : (t > i || e > a) && (o = k(k({}, g9("x", n, t, i)), g9("y", r, e, a))), o;
- }
- var kFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const m9 = Symbol("previewGroupContext"), L8 = {
- provide: (t) => {
- Et(m9, t);
- },
- inject: () => et(m9, {
- isPreviewGroup: ve(!1),
- previewUrls: V(() => /* @__PURE__ */ new Map()),
- setPreviewUrls: () => {
- },
- current: ee(null),
- setCurrent: () => {
- },
- setShowPreview: () => {
- },
- setMousePosition: () => {
- },
- registerImage: null,
- rootClassName: ""
- })
- }, LFe = () => ({
- previewPrefixCls: String,
- preview: {
- type: [Boolean, Object],
- default: !0
- },
- icons: {
- type: Object,
- default: () => ({})
- }
- }), NFe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "PreviewGroup",
- inheritAttrs: !1,
- props: LFe(),
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = V(() => {
- const S = {
- visible: void 0,
- onVisibleChange: () => {
- },
- getContainer: void 0,
- current: 0
- };
- return typeof t.preview == "object" ? Xae(t.preview, S) : S;
- }), i = zn(/* @__PURE__ */ new Map()), a = ee(), o = V(() => r.value.visible), s = V(() => r.value.getContainer), l = (S, x) => {
- var C, P;
- (P = (C = r.value).onVisibleChange) === null || P === void 0 || P.call(C, S, x);
- }, [u, c] = Rg(!!o.value, {
- value: o,
- onChange: l
- }), f = ee(null), d = V(() => o.value !== void 0), h = V(() => Array.from(i.keys())), p = V(() => h.value[r.value.current]), v = V(() => new Map(Array.from(i).filter((S) => {
- let [, {
- canPreview: x
- }] = S;
- return !!x;
- }).map((S) => {
- let [x, {
- url: C
- }] = S;
- return [x, C];
- }))), g = function(S, x) {
- let C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
- i.set(S, {
- url: x,
- canPreview: C
- });
- }, m = (S) => {
- a.value = S;
- }, y = (S) => {
- f.value = S;
- }, _ = function(S, x) {
- let C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
- const P = () => {
- i.delete(S);
- };
- return i.set(S, {
- url: x,
- canPreview: C
- }), P;
- }, O = (S) => {
- S == null || S.stopPropagation(), c(!1), y(null);
- };
- return me(p, (S) => {
- m(S);
- }, {
- immediate: !0,
- flush: "post"
- }), Vt(() => {
- u.value && d.value && m(p.value);
- }, {
- flush: "post"
- }), L8.provide({
- isPreviewGroup: ve(!0),
- previewUrls: v,
- setPreviewUrls: g,
- current: a,
- setCurrent: m,
- setShowPreview: c,
- setMousePosition: y,
- registerImage: _
- }), () => {
- const S = kFe(r.value, []);
- return D(Wt, null, [n.default && n.default(), D(Zae, te(te({}, S), {}, {
- "ria-hidden": !u.value,
- visible: u.value,
- prefixCls: t.previewPrefixCls,
- onClose: O,
- mousePosition: f.value,
- src: v.value.get(a.value),
- icons: t.icons,
- getContainer: s.value
- }), null)]);
- };
- }
- }), jae = NFe, od = {
- x: 0,
- y: 0
- }, BFe = k(k({}, K2()), {
- src: String,
- alt: String,
- rootClassName: String,
- icons: {
- type: Object,
- default: () => ({})
- }
- }), Zae = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Preview",
- inheritAttrs: !1,
- props: BFe,
- emits: ["close", "afterClose"],
- setup(t, e) {
- let {
- emit: n,
- attrs: r
- } = e;
- const {
- rotateLeft: i,
- rotateRight: a,
- zoomIn: o,
- zoomOut: s,
- close: l,
- left: u,
- right: c,
- flipX: f,
- flipY: d
- } = zn(t.icons), h = ve(1), p = ve(0), v = zn({
- x: 1,
- y: 1
- }), [g, m] = DFe(od), y = () => n("close"), _ = ve(), O = zn({
- originX: 0,
- originY: 0,
- deltaX: 0,
- deltaY: 0
- }), S = ve(!1), x = L8.inject(), {
- previewUrls: C,
- current: P,
- isPreviewGroup: $,
- setCurrent: T
- } = x, E = V(() => C.value.size), M = V(() => Array.from(C.value.keys())), R = V(() => M.value.indexOf(P.value)), N = V(() => $.value ? C.value.get(P.value) : t.src), I = V(() => $.value && E.value > 1), B = ve({
- wheelDirection: 0
- }), Q = () => {
- h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(od), n("afterClose");
- }, W = (Be) => {
- Be ? h.value += 0.5 : h.value++, m(od);
- }, H = (Be) => {
- h.value > 1 && (Be ? h.value -= 0.5 : h.value--), m(od);
- }, U = () => {
- p.value += 90;
- }, j = () => {
- p.value -= 90;
- }, Y = () => {
- v.x = -v.x;
- }, ne = () => {
- v.y = -v.y;
- }, fe = (Be) => {
- Be.preventDefault(), Be.stopPropagation(), R.value > 0 && T(M.value[R.value - 1]);
- }, ue = (Be) => {
- Be.preventDefault(), Be.stopPropagation(), R.value < E.value - 1 && T(M.value[R.value + 1]);
- }, ye = Re({
- [`${t.prefixCls}-moving`]: S.value
- }), se = `${t.prefixCls}-operations-operation`, he = `${t.prefixCls}-operations-icon`, re = [{
- icon: l,
- onClick: y,
- type: "close"
- }, {
- icon: o,
- onClick: () => W(),
- type: "zoomIn"
- }, {
- icon: s,
- onClick: () => H(),
- type: "zoomOut",
- disabled: V(() => h.value === 1)
- }, {
- icon: a,
- onClick: U,
- type: "rotateRight"
- }, {
- icon: i,
- onClick: j,
- type: "rotateLeft"
- }, {
- icon: f,
- onClick: Y,
- type: "flipX"
- }, {
- icon: d,
- onClick: ne,
- type: "flipY"
- }], q = () => {
- if (t.visible && S.value) {
- const Be = _.value.offsetWidth * h.value, Le = _.value.offsetHeight * h.value, {
- left: Pe,
- top: Fe
- } = Ure(_.value), Ye = p.value % 180 !== 0;
- S.value = !1;
- const xt = RFe(Ye ? Le : Be, Ye ? Be : Le, Pe, Fe);
- xt && m(k({}, xt));
- }
- }, K = (Be) => {
- Be.button === 0 && (Be.preventDefault(), Be.stopPropagation(), O.deltaX = Be.pageX - g.x, O.deltaY = Be.pageY - g.y, O.originX = g.x, O.originY = g.y, S.value = !0);
- }, de = (Be) => {
- t.visible && S.value && m({
- x: Be.pageX - O.deltaX,
- y: Be.pageY - O.deltaY
- });
- }, xe = (Be) => {
- if (!t.visible) return;
- Be.preventDefault();
- const Le = Be.deltaY;
- B.value = {
- wheelDirection: Le
- };
- }, we = (Be) => {
- !t.visible || !I.value || (Be.preventDefault(), Be.keyCode === Me.LEFT ? R.value > 0 && T(M.value[R.value - 1]) : Be.keyCode === Me.RIGHT && R.value < E.value - 1 && T(M.value[R.value + 1]));
- }, He = () => {
- t.visible && (h.value !== 1 && (h.value = 1), (g.x !== od.x || g.y !== od.y) && m(od));
- };
- let je = () => {
- };
- return _t(() => {
- me([() => t.visible, S], () => {
- je();
- let Be, Le;
- const Pe = yi(window, "mouseup", q, !1), Fe = yi(window, "mousemove", de, !1), Ye = yi(window, "wheel", xe, {
- passive: !1
- }), xt = yi(window, "keydown", we, !1);
- try {
- window.top !== window.self && (Be = yi(window.top, "mouseup", q, !1), Le = yi(window.top, "mousemove", de, !1));
- } catch (It) {
- Nh(!1, `[vc-image] ${It}`);
- }
- je = () => {
- Pe.remove(), Fe.remove(), Ye.remove(), xt.remove(), Be && Be.remove(), Le && Le.remove();
- };
- }, {
- flush: "post",
- immediate: !0
- }), me([B], () => {
- const {
- wheelDirection: Be
- } = B.value;
- Be > 0 ? H(!0) : Be < 0 && W(!0);
- });
- }), qu(() => {
- je();
- }), () => {
- const {
- visible: Be,
- prefixCls: Le,
- rootClassName: Pe
- } = t;
- return D(Gae, te(te({}, r), {}, {
- transitionName: t.transitionName,
- maskTransitionName: t.maskTransitionName,
- closable: !1,
- keyboard: !0,
- prefixCls: Le,
- onClose: y,
- afterClose: Q,
- visible: Be,
- wrapClassName: ye,
- rootClassName: Pe,
- getContainer: t.getContainer
- }), {
- default: () => [D("div", {
- class: [`${t.prefixCls}-operations-wrapper`, Pe]
- }, [D("ul", {
- class: `${t.prefixCls}-operations`
- }, [re.map((Fe) => {
- let {
- icon: Ye,
- onClick: xt,
- type: It,
- disabled: an
- } = Fe;
- return D("li", {
- class: Re(se, {
- [`${t.prefixCls}-operations-operation-disabled`]: an && (an == null ? void 0 : an.value)
- }),
- onClick: xt,
- key: It
- }, [ku(Ye, {
- class: he
- })]);
- })])]), D("div", {
- class: `${t.prefixCls}-img-wrapper`,
- style: {
- transform: `translate3d(${g.x}px, ${g.y}px, 0)`
- }
- }, [D("img", {
- onMousedown: K,
- onDblclick: He,
- ref: _,
- class: `${t.prefixCls}-img`,
- src: N.value,
- alt: t.alt,
- style: {
- transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
- }
- }, null)]), I.value && D("div", {
- class: Re(`${t.prefixCls}-switch-left`, {
- [`${t.prefixCls}-switch-left-disabled`]: R.value <= 0
- }),
- onClick: fe
- }, [u]), I.value && D("div", {
- class: Re(`${t.prefixCls}-switch-right`, {
- [`${t.prefixCls}-switch-right-disabled`]: R.value >= E.value - 1
- }),
- onClick: ue
- }, [c])]
- });
- };
- }
- });
- var zFe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const Uae = () => ({
- src: String,
- wrapperClassName: String,
- wrapperStyle: {
- type: Object,
- default: void 0
- },
- rootClassName: String,
- prefixCls: String,
- previewPrefixCls: String,
- previewMask: {
- type: [Boolean, Function],
- default: void 0
- },
- placeholder: oe.any,
- fallback: String,
- preview: {
- type: [Boolean, Object],
- default: !0
- },
- onClick: {
- type: Function
- },
- onError: {
- type: Function
- }
- }), Xae = (t, e) => {
- const n = k({}, t);
- return Object.keys(e).forEach((r) => {
- t[r] === void 0 && (n[r] = e[r]);
- }), n;
- };
- let VFe = 0;
- const Yae = ae({
- compatConfig: {
- MODE: 3
- },
- name: "VcImage",
- inheritAttrs: !1,
- props: Uae(),
- emits: ["click", "error"],
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- emit: i
- } = e;
- const a = V(() => t.prefixCls), o = V(() => `${a.value}-preview`), s = V(() => {
- const W = {
- visible: void 0,
- onVisibleChange: () => {
- },
- getContainer: void 0
- };
- return typeof t.preview == "object" ? Xae(t.preview, W) : W;
- }), l = V(() => {
- var W;
- return (W = s.value.src) !== null && W !== void 0 ? W : t.src;
- }), u = V(() => t.placeholder && t.placeholder !== !0 || r.placeholder), c = V(() => s.value.visible), f = V(() => s.value.getContainer), d = V(() => c.value !== void 0), h = (W, H) => {
- var U, j;
- (j = (U = s.value).onVisibleChange) === null || j === void 0 || j.call(U, W, H);
- }, [p, v] = Rg(!!c.value, {
- value: c,
- onChange: h
- }), g = ee(u.value ? "loading" : "normal");
- me(() => t.src, () => {
- g.value = u.value ? "loading" : "normal";
- });
- const m = ee(null), y = V(() => g.value === "error"), _ = L8.inject(), {
- isPreviewGroup: O,
- setCurrent: S,
- setShowPreview: x,
- setMousePosition: C,
- registerImage: P
- } = _, $ = ee(VFe++), T = V(() => t.preview && !y.value), E = () => {
- g.value = "normal";
- }, M = (W) => {
- g.value = "error", i("error", W);
- }, R = (W) => {
- if (!d.value) {
- const {
- left: H,
- top: U
- } = Ure(W.target);
- O.value ? (S($.value), C({
- x: H,
- y: U
- })) : m.value = {
- x: H,
- y: U
- };
- }
- O.value ? x(!0) : v(!0), i("click", W);
- }, N = () => {
- v(!1), d.value || (m.value = null);
- }, I = ee(null);
- me(() => I, () => {
- g.value === "loading" && I.value.complete && (I.value.naturalWidth || I.value.naturalHeight) && E();
- });
- let B = () => {
- };
- _t(() => {
- me([l, T], () => {
- if (B(), !O.value)
- return () => {
- };
- B = P($.value, l.value, T.value), T.value || B();
- }, {
- flush: "post",
- immediate: !0
- });
- }), qu(() => {
- B();
- });
- const Q = (W) => e$e(W) ? W + "px" : W;
- return () => {
- const {
- prefixCls: W,
- wrapperClassName: H,
- fallback: U,
- src: j,
- placeholder: Y,
- wrapperStyle: ne,
- rootClassName: fe
- } = t, {
- width: ue,
- height: ye,
- crossorigin: se,
- decoding: he,
- alt: re,
- sizes: q,
- srcset: K,
- usemap: de,
- class: xe,
- style: we
- } = n, He = s.value, {
- icons: je,
- maskClassName: Be
- } = He, Le = zFe(He, ["icons", "maskClassName"]), Pe = Re(W, H, fe, {
- [`${W}-error`]: y.value
- }), Fe = y.value && U ? U : l.value, Ye = {
- crossorigin: se,
- decoding: he,
- alt: re,
- sizes: q,
- srcset: K,
- usemap: de,
- width: ue,
- height: ye,
- class: Re(`${W}-img`, {
- [`${W}-img-placeholder`]: Y === !0
- }, xe),
- style: k({
- height: Q(ye)
- }, we)
- };
- return D(Wt, null, [D("div", {
- class: Pe,
- onClick: T.value ? R : (xt) => {
- i("click", xt);
- },
- style: k({
- width: Q(ue),
- height: Q(ye)
- }, ne)
- }, [D("img", te(te(te({}, Ye), y.value && U ? {
- src: U
- } : {
- onLoad: E,
- onError: M,
- src: j
- }), {}, {
- ref: I
- }), null), g.value === "loading" && D("div", {
- "aria-hidden": "true",
- class: `${W}-placeholder`
- }, [Y || r.placeholder && r.placeholder()]), r.previewMask && T.value && D("div", {
- class: [`${W}-mask`, Be]
- }, [r.previewMask()])]), !O.value && T.value && D(Zae, te(te({}, Le), {}, {
- "aria-hidden": !p.value,
- visible: p.value,
- prefixCls: o.value,
- onClose: N,
- mousePosition: m.value,
- src: Fe,
- alt: re,
- getContainer: f.value,
- icons: je,
- rootClassName: fe
- }), null)]);
- };
- }
- });
- Yae.PreviewGroup = jae;
- const FFe = Yae;
- var WFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { tag: "path", attrs: { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, name: "rotate-left", theme: "outlined" };
- function y9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- QFe(t, i, n[i]);
- });
- }
- return t;
- }
- function QFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var N8 = function(e, n) {
- var r = y9({}, e, n.attrs);
- return D(Rt, y9({}, r, {
- icon: WFe
- }), null);
- };
- N8.displayName = "RotateLeftOutlined";
- N8.inheritAttrs = !1;
- var HFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { tag: "path", attrs: { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, name: "rotate-right", theme: "outlined" };
- function b9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- GFe(t, i, n[i]);
- });
- }
- return t;
- }
- function GFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var B8 = function(e, n) {
- var r = b9({}, e, n.attrs);
- return D(Rt, b9({}, r, {
- icon: HFe
- }), null);
- };
- B8.displayName = "RotateRightOutlined";
- B8.inheritAttrs = !1;
- var jFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-in", theme: "outlined" };
- function _9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- ZFe(t, i, n[i]);
- });
- }
- return t;
- }
- function ZFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var z8 = function(e, n) {
- var r = _9({}, e, n.attrs);
- return D(Rt, _9({}, r, {
- icon: jFe
- }), null);
- };
- z8.displayName = "ZoomInOutlined";
- z8.inheritAttrs = !1;
- var UFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-out", theme: "outlined" };
- function O9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- XFe(t, i, n[i]);
- });
- }
- return t;
- }
- function XFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var V8 = function(e, n) {
- var r = O9({}, e, n.attrs);
- return D(Rt, O9({}, r, {
- icon: UFe
- }), null);
- };
- V8.displayName = "ZoomOutOutlined";
- V8.inheritAttrs = !1;
- var YFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "swap", theme: "outlined" };
- function S9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- qFe(t, i, n[i]);
- });
- }
- return t;
- }
- function qFe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var pC = function(e, n) {
- var r = S9({}, e, n.attrs);
- return D(Rt, S9({}, r, {
- icon: YFe
- }), null);
- };
- pC.displayName = "SwapOutlined";
- pC.inheritAttrs = !1;
- function x9(t) {
- return {
- position: t,
- top: 0,
- insetInlineEnd: 0,
- bottom: 0,
- insetInlineStart: 0
- };
- }
- const qae = (t) => {
- const {
- componentCls: e
- } = t;
- return [{
- [`${e}-root`]: {
- [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
- // reset scale avoid mousePosition bug
- transform: "none",
- opacity: 0,
- animationDuration: t.motionDurationSlow,
- // https://github.com/ant-design/ant-design/issues/11777
- userSelect: "none"
- },
- [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
- pointerEvents: "none"
- },
- [`${e}-mask`]: k(k({}, x9("fixed")), {
- zIndex: t.zIndexPopupBase,
- height: "100%",
- backgroundColor: t.colorBgMask,
- [`${e}-hidden`]: {
- display: "none"
- }
- }),
- [`${e}-wrap`]: k(k({}, x9("fixed")), {
- overflow: "auto",
- outline: 0,
- WebkitOverflowScrolling: "touch"
- })
- }
- }, {
- [`${e}-root`]: vie(t)
- }];
- }, KFe = (t) => {
- const {
- componentCls: e
- } = t;
- return [
- // ======================== Root =========================
- {
- [`${e}-root`]: {
- [`${e}-wrap`]: {
- zIndex: t.zIndexPopupBase,
- position: "fixed",
- inset: 0,
- overflow: "auto",
- outline: 0,
- WebkitOverflowScrolling: "touch"
- },
- [`${e}-wrap-rtl`]: {
- direction: "rtl"
- },
- [`${e}-centered`]: {
- textAlign: "center",
- "&::before": {
- display: "inline-block",
- width: 0,
- height: "100%",
- verticalAlign: "middle",
- content: '""'
- },
- [e]: {
- top: 0,
- display: "inline-block",
- paddingBottom: 0,
- textAlign: "start",
- verticalAlign: "middle"
- }
- },
- [`@media (max-width: ${t.screenSMMax})`]: {
- [e]: {
- maxWidth: "calc(100vw - 16px)",
- margin: `${t.marginXS} auto`
- },
- [`${e}-centered`]: {
- [e]: {
- flex: 1
- }
- }
- }
- }
- },
- // ======================== Modal ========================
- {
- [e]: k(k({}, Gn(t)), {
- pointerEvents: "none",
- position: "relative",
- top: 100,
- width: "auto",
- maxWidth: `calc(100vw - ${t.margin * 2}px)`,
- margin: "0 auto",
- paddingBottom: t.paddingLG,
- [`${e}-title`]: {
- margin: 0,
- color: t.modalHeadingColor,
- fontWeight: t.fontWeightStrong,
- fontSize: t.modalHeaderTitleFontSize,
- lineHeight: t.modalHeaderTitleLineHeight,
- wordWrap: "break-word"
- },
- [`${e}-content`]: {
- position: "relative",
- backgroundColor: t.modalContentBg,
- backgroundClip: "padding-box",
- border: 0,
- borderRadius: t.borderRadiusLG,
- boxShadow: t.boxShadowSecondary,
- pointerEvents: "auto",
- padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
- },
- [`${e}-close`]: k({
- position: "absolute",
- top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
- insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
- zIndex: t.zIndexPopupBase + 10,
- padding: 0,
- color: t.modalCloseColor,
- fontWeight: t.fontWeightStrong,
- lineHeight: 1,
- textDecoration: "none",
- background: "transparent",
- borderRadius: t.borderRadiusSM,
- width: t.modalConfirmIconSize,
- height: t.modalConfirmIconSize,
- border: 0,
- outline: 0,
- cursor: "pointer",
- transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
- "&-x": {
- display: "block",
- fontSize: t.fontSizeLG,
- fontStyle: "normal",
- lineHeight: `${t.modalCloseBtnSize}px`,
- textAlign: "center",
- textTransform: "none",
- textRendering: "auto"
- },
- "&:hover": {
- color: t.modalIconHoverColor,
- backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
- textDecoration: "none"
- },
- "&:active": {
- backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
- }
- }, T2(t)),
- [`${e}-header`]: {
- color: t.colorText,
- background: t.modalHeaderBg,
- borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
- marginBottom: t.marginXS
- },
- [`${e}-body`]: {
- fontSize: t.fontSize,
- lineHeight: t.lineHeight,
- wordWrap: "break-word"
- },
- [`${e}-footer`]: {
- textAlign: "end",
- background: t.modalFooterBg,
- marginTop: t.marginSM,
- [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
- marginBottom: 0,
- marginInlineStart: t.marginXS
- }
- },
- [`${e}-open`]: {
- overflow: "hidden"
- }
- })
- },
- // ======================== Pure =========================
- {
- [`${e}-pure-panel`]: {
- top: "auto",
- padding: 0,
- display: "flex",
- flexDirection: "column",
- [`${e}-content,
- ${e}-body,
- ${e}-confirm-body-wrapper`]: {
- display: "flex",
- flexDirection: "column",
- flex: "auto"
- },
- [`${e}-confirm-body`]: {
- marginBottom: "auto"
- }
- }
- }
- ];
- }, JFe = (t) => {
- const {
- componentCls: e
- } = t, n = `${e}-confirm`;
- return {
- [n]: {
- "&-rtl": {
- direction: "rtl"
- },
- [`${t.antCls}-modal-header`]: {
- display: "none"
- },
- [`${n}-body-wrapper`]: k({}, Kw()),
- [`${n}-body`]: {
- display: "flex",
- flexWrap: "wrap",
- alignItems: "center",
- [`${n}-title`]: {
- flex: "0 0 100%",
- display: "block",
- // create BFC to avoid
- // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
- overflow: "hidden",
- color: t.colorTextHeading,
- fontWeight: t.fontWeightStrong,
- fontSize: t.modalHeaderTitleFontSize,
- lineHeight: t.modalHeaderTitleLineHeight,
- [`+ ${n}-content`]: {
- marginBlockStart: t.marginXS,
- flexBasis: "100%",
- maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
- }
- },
- [`${n}-content`]: {
- color: t.colorText,
- fontSize: t.fontSize
- },
- [`> ${t.iconCls}`]: {
- flex: "none",
- marginInlineEnd: t.marginSM,
- fontSize: t.modalConfirmIconSize,
- [`+ ${n}-title`]: {
- flex: 1
- },
- // `content` after `icon` should set marginLeft
- [`+ ${n}-title + ${n}-content`]: {
- marginInlineStart: t.modalConfirmIconSize + t.marginSM
- }
- }
- },
- [`${n}-btns`]: {
- textAlign: "end",
- marginTop: t.marginSM,
- [`${t.antCls}-btn + ${t.antCls}-btn`]: {
- marginBottom: 0,
- marginInlineStart: t.marginXS
- }
- }
- },
- [`${n}-error ${n}-body > ${t.iconCls}`]: {
- color: t.colorError
- },
- [`${n}-warning ${n}-body > ${t.iconCls},
- ${n}-confirm ${n}-body > ${t.iconCls}`]: {
- color: t.colorWarning
- },
- [`${n}-info ${n}-body > ${t.iconCls}`]: {
- color: t.colorInfo
- },
- [`${n}-success ${n}-body > ${t.iconCls}`]: {
- color: t.colorSuccess
- },
- // https://github.com/ant-design/ant-design/issues/37329
- [`${e}-zoom-leave ${e}-btns`]: {
- pointerEvents: "none"
- }
- };
- }, eWe = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [`${e}-root`]: {
- [`${e}-wrap-rtl`]: {
- direction: "rtl",
- [`${e}-confirm-body`]: {
- direction: "rtl"
- }
- }
- }
- };
- }, tWe = (t) => {
- const {
- componentCls: e,
- antCls: n
- } = t, r = `${e}-confirm`;
- return {
- [e]: {
- [`${e}-content`]: {
- padding: 0
- },
- [`${e}-header`]: {
- padding: t.modalHeaderPadding,
- borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
- marginBottom: 0
- },
- [`${e}-body`]: {
- padding: t.modalBodyPadding
- },
- [`${e}-footer`]: {
- padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
- borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
- borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
- marginTop: 0
- }
- },
- [r]: {
- [`${n}-modal-body`]: {
- padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
- },
- [`${r}-body`]: {
- [`> ${t.iconCls}`]: {
- marginInlineEnd: t.margin,
- // `content` after `icon` should set marginLeft
- [`+ ${r}-title + ${r}-content`]: {
- marginInlineStart: t.modalConfirmIconSize + t.margin
- }
- }
- },
- [`${r}-btns`]: {
- marginTop: t.marginLG
- }
- }
- };
- }, nWe = pr("Modal", (t) => {
- const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = bn(t, {
- modalBodyPadding: t.paddingLG,
- modalHeaderBg: t.colorBgElevated,
- modalHeaderPadding: `${e}px ${t.paddingLG}px`,
- modalHeaderBorderWidth: t.lineWidth,
- modalHeaderBorderStyle: t.lineType,
- modalHeaderTitleLineHeight: r,
- modalHeaderTitleFontSize: n,
- modalHeaderBorderColorSplit: t.colorSplit,
- modalHeaderCloseSize: r * n + e * 2,
- modalContentBg: t.colorBgElevated,
- modalHeadingColor: t.colorTextHeading,
- modalCloseColor: t.colorTextDescription,
- modalFooterBg: "transparent",
- modalFooterBorderColorSplit: t.colorSplit,
- modalFooterBorderStyle: t.lineType,
- modalFooterPaddingVertical: t.paddingXS,
- modalFooterPaddingHorizontal: t.padding,
- modalFooterBorderWidth: t.lineWidth,
- modalConfirmTitleFontSize: t.fontSizeLG,
- modalIconHoverColor: t.colorIconHover,
- modalConfirmIconSize: t.fontSize * t.lineHeight,
- modalCloseBtnSize: t.controlHeightLG * 0.55
- });
- return [KFe(i), JFe(i), eWe(i), qae(i), t.wireframe && tWe(i), B2(i, "zoom")];
- }), WR = (t) => ({
- position: t || "absolute",
- inset: 0
- }), rWe = (t) => {
- const {
- iconCls: e,
- motionDurationSlow: n,
- paddingXXS: r,
- marginXXS: i,
- prefixCls: a
- } = t;
- return {
- position: "absolute",
- inset: 0,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- color: "#fff",
- background: new Hn("#000").setAlpha(0.5).toRgbString(),
- cursor: "pointer",
- opacity: 0,
- transition: `opacity ${n}`,
- [`.${a}-mask-info`]: k(k({}, Mg), {
- padding: `0 ${r}px`,
- [e]: {
- marginInlineEnd: i,
- svg: {
- verticalAlign: "baseline"
- }
- }
- })
- };
- }, iWe = (t) => {
- const {
- previewCls: e,
- modalMaskBg: n,
- paddingSM: r,
- previewOperationColorDisabled: i,
- motionDurationSlow: a
- } = t, o = new Hn(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
- return {
- [`${e}-operations`]: k(k({}, Gn(t)), {
- display: "flex",
- flexDirection: "row-reverse",
- alignItems: "center",
- color: t.previewOperationColor,
- listStyle: "none",
- background: o.toRgbString(),
- pointerEvents: "auto",
- "&-operation": {
- marginInlineStart: r,
- padding: r,
- cursor: "pointer",
- transition: `all ${a}`,
- userSelect: "none",
- "&:hover": {
- background: s.toRgbString()
- },
- "&-disabled": {
- color: i,
- pointerEvents: "none"
- },
- "&:last-of-type": {
- marginInlineStart: 0
- }
- },
- "&-progress": {
- position: "absolute",
- left: {
- _skip_check_: !0,
- value: "50%"
- },
- transform: "translateX(-50%)"
- },
- "&-icon": {
- fontSize: t.previewOperationSize
- }
- })
- };
- }, aWe = (t) => {
- const {
- modalMaskBg: e,
- iconCls: n,
- previewOperationColorDisabled: r,
- previewCls: i,
- zIndexPopup: a,
- motionDurationSlow: o
- } = t, s = new Hn(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
- return {
- [`${i}-switch-left, ${i}-switch-right`]: {
- position: "fixed",
- insetBlockStart: "50%",
- zIndex: a + 1,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- width: t.imagePreviewSwitchSize,
- height: t.imagePreviewSwitchSize,
- marginTop: -t.imagePreviewSwitchSize / 2,
- color: t.previewOperationColor,
- background: s.toRgbString(),
- borderRadius: "50%",
- transform: "translateY(-50%)",
- cursor: "pointer",
- transition: `all ${o}`,
- pointerEvents: "auto",
- userSelect: "none",
- "&:hover": {
- background: l.toRgbString()
- },
- "&-disabled": {
- "&, &:hover": {
- color: r,
- background: "transparent",
- cursor: "not-allowed",
- [`> ${n}`]: {
- cursor: "not-allowed"
- }
- }
- },
- [`> ${n}`]: {
- fontSize: t.previewOperationSize
- }
- },
- [`${i}-switch-left`]: {
- insetInlineStart: t.marginSM
- },
- [`${i}-switch-right`]: {
- insetInlineEnd: t.marginSM
- }
- };
- }, oWe = (t) => {
- const {
- motionEaseOut: e,
- previewCls: n,
- motionDurationSlow: r,
- componentCls: i
- } = t;
- return [
- {
- [`${i}-preview-root`]: {
- [n]: {
- height: "100%",
- textAlign: "center",
- pointerEvents: "none"
- },
- [`${n}-body`]: k(k({}, WR()), {
- overflow: "hidden"
- }),
- [`${n}-img`]: {
- maxWidth: "100%",
- maxHeight: "100%",
- verticalAlign: "middle",
- transform: "scale3d(1, 1, 1)",
- cursor: "grab",
- transition: `transform ${r} ${e} 0s`,
- userSelect: "none",
- pointerEvents: "auto",
- "&-wrapper": k(k({}, WR()), {
- transition: `transform ${r} ${e} 0s`,
- // https://github.com/ant-design/ant-design/issues/39913
- // TailwindCSS will reset img default style.
- // Let's set back.
- display: "flex",
- justifyContent: "center",
- alignItems: "center",
- "&::before": {
- display: "inline-block",
- width: 1,
- height: "50%",
- marginInlineEnd: -1,
- content: '""'
- }
- })
- },
- [`${n}-moving`]: {
- [`${n}-preview-img`]: {
- cursor: "grabbing",
- "&-wrapper": {
- transitionDuration: "0s"
- }
- }
- }
- }
- },
- // Override
- {
- [`${i}-preview-root`]: {
- [`${n}-wrap`]: {
- zIndex: t.zIndexPopup
- }
- }
- },
- // Preview operations & switch
- {
- [`${i}-preview-operations-wrapper`]: {
- position: "fixed",
- insetBlockStart: 0,
- insetInlineEnd: 0,
- zIndex: t.zIndexPopup + 1,
- width: "100%"
- },
- "&": [iWe(t), aWe(t)]
- }
- ];
- }, sWe = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- // ============================== image ==============================
- [e]: {
- position: "relative",
- display: "inline-block",
- [`${e}-img`]: {
- width: "100%",
- height: "auto",
- verticalAlign: "middle"
- },
- [`${e}-img-placeholder`]: {
- backgroundColor: t.colorBgContainerDisabled,
- backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
- backgroundRepeat: "no-repeat",
- backgroundPosition: "center center",
- backgroundSize: "30%"
- },
- [`${e}-mask`]: k({}, rWe(t)),
- [`${e}-mask:hover`]: {
- opacity: 1
- },
- [`${e}-placeholder`]: k({}, WR())
- }
- };
- }, lWe = (t) => {
- const {
- previewCls: e
- } = t;
- return {
- [`${e}-root`]: B2(t, "zoom"),
- "&": vie(t, !0)
- };
- }, Kae = pr("Image", (t) => {
- const e = `${t.componentCls}-preview`, n = bn(t, {
- previewCls: e,
- modalMaskBg: new Hn("#000").setAlpha(0.45).toRgbString(),
- imagePreviewSwitchSize: t.controlHeightLG
- });
- return [sWe(n), oWe(n), qae(bn(n, {
- componentCls: e
- })), lWe(n)];
- }, (t) => ({
- zIndexPopup: t.zIndexPopupBase + 80,
- previewOperationColor: new Hn(t.colorTextLightSolid).toRgbString(),
- previewOperationColorDisabled: new Hn(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
- previewOperationSize: t.fontSizeIcon * 1.5
- // FIXME: fontSizeIconLG
- })), Jae = {
- rotateLeft: D(N8, null, null),
- rotateRight: D(B8, null, null),
- zoomIn: D(z8, null, null),
- zoomOut: D(V8, null, null),
- close: D(tc, null, null),
- left: D(T8, null, null),
- right: D(Q2, null, null),
- flipX: D(pC, null, null),
- flipY: D(pC, {
- rotate: 90
- }, null)
- }, uWe = () => ({
- previewPrefixCls: String,
- preview: Fo()
- }), cWe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AImagePreviewGroup",
- inheritAttrs: !1,
- props: uWe(),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const {
- prefixCls: i,
- rootPrefixCls: a
- } = hn("image", t), o = V(() => `${i.value}-preview`), [s, l] = Kae(i), u = V(() => {
- const {
- preview: c
- } = t;
- if (c === !1)
- return c;
- const f = typeof c == "object" ? c : {};
- return k(k({}, f), {
- rootClassName: l.value,
- transitionName: Wl(a.value, "zoom", f.transitionName),
- maskTransitionName: Wl(a.value, "fade", f.maskTransitionName)
- });
- });
- return () => s(D(jae, te(te({}, k(k({}, n), t)), {}, {
- preview: u.value,
- icons: Jae,
- previewPrefixCls: o.value
- }), r));
- }
- }), fWe = cWe, Lc = ae({
- name: "AImage",
- inheritAttrs: !1,
- props: Uae(),
- setup(t, e) {
- let {
- slots: n,
- attrs: r
- } = e;
- const {
- prefixCls: i,
- rootPrefixCls: a,
- configProvider: o
- } = hn("image", t), [s, l] = Kae(i), u = V(() => {
- const {
- preview: c
- } = t;
- if (c === !1)
- return c;
- const f = typeof c == "object" ? c : {};
- return k(k({
- icons: Jae
- }, f), {
- transitionName: Wl(a.value, "zoom", f.transitionName),
- maskTransitionName: Wl(a.value, "fade", f.maskTransitionName)
- });
- });
- return () => {
- var c, f;
- const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || Nu.Image, h = () => D("div", {
- class: `${i.value}-mask-info`
- }, [D(q2, null, null), d == null ? void 0 : d.preview]), {
- previewMask: p = n.previewMask || h
- } = t;
- return s(D(FFe, te(te({}, k(k(k({}, r), t), {
- prefixCls: i.value
- })), {}, {
- preview: u.value,
- rootClassName: Re(t.rootClassName, l.value)
- }), k(k({}, n), {
- previewMask: typeof p == "function" ? p : null
- })));
- };
- }
- });
- Lc.PreviewGroup = fWe;
- Lc.install = function(t) {
- return t.component(Lc.name, Lc), t.component(Lc.PreviewGroup.name, Lc.PreviewGroup), t;
- };
- var dWe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
- function w9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- hWe(t, i, n[i]);
- });
- }
- return t;
- }
- function hWe(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var F8 = function(e, n) {
- var r = w9({}, e, n.attrs);
- return D(Rt, w9({}, r, {
- icon: dWe
- }), null);
- };
- F8.displayName = "UpOutlined";
- F8.inheritAttrs = !1;
- function QR() {
- return typeof BigInt == "function";
- }
- function jy(t) {
- let e = t.trim(), n = e.startsWith("-");
- n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
- const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
- a === "0" && o === "0" && (n = !1);
- const s = n ? "-" : "";
- return {
- negative: n,
- negativeStr: s,
- trimStr: r,
- integerStr: a,
- decimalStr: o,
- fullStr: `${s}${r}`
- };
- }
- function W8(t) {
- const e = String(t);
- return !Number.isNaN(Number(e)) && e.includes("e");
- }
- function Nb(t) {
- const e = String(t);
- if (W8(t)) {
- let n = Number(e.slice(e.indexOf("e-") + 2));
- const r = e.match(/\.(\d+)/);
- return r != null && r[1] && (n += r[1].length), n;
- }
- return e.includes(".") && H8(e) ? e.length - e.indexOf(".") - 1 : 0;
- }
- function Q8(t) {
- let e = String(t);
- if (W8(t)) {
- if (t > Number.MAX_SAFE_INTEGER)
- return String(QR() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
- if (t < Number.MIN_SAFE_INTEGER)
- return String(QR() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
- e = t.toFixed(Nb(e));
- }
- return jy(e).fullStr;
- }
- function H8(t) {
- return typeof t == "number" ? !Number.isNaN(t) : t ? (
- // Normal type: 11.28
- /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
- /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
- /^\s*-?\.\d+\s*$/.test(t)
- ) : !1;
- }
- function eoe(t) {
- return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
- }
- class Hd {
- constructor(e) {
- if (this.origin = "", eoe(e)) {
- this.empty = !0;
- return;
- }
- this.origin = String(e), this.number = Number(e);
- }
- negate() {
- return new Hd(-this.toNumber());
- }
- add(e) {
- if (this.isInvalidate())
- return new Hd(e);
- const n = Number(e);
- if (Number.isNaN(n))
- return this;
- const r = this.number + n;
- if (r > Number.MAX_SAFE_INTEGER)
- return new Hd(Number.MAX_SAFE_INTEGER);
- if (r < Number.MIN_SAFE_INTEGER)
- return new Hd(Number.MIN_SAFE_INTEGER);
- const i = Math.max(Nb(this.number), Nb(n));
- return new Hd(r.toFixed(i));
- }
- isEmpty() {
- return this.empty;
- }
- isNaN() {
- return Number.isNaN(this.number);
- }
- isInvalidate() {
- return this.isEmpty() || this.isNaN();
- }
- equals(e) {
- return this.toNumber() === (e == null ? void 0 : e.toNumber());
- }
- lessEquals(e) {
- return this.add(e.negate().toString()).toNumber() <= 0;
- }
- toNumber() {
- return this.number;
- }
- toString() {
- return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Q8(this.number) : this.origin;
- }
- }
- class Mv {
- constructor(e) {
- if (this.origin = "", eoe(e)) {
- this.empty = !0;
- return;
- }
- if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
- this.nan = !0;
- return;
- }
- let n = e;
- if (W8(n) && (n = Number(n)), n = typeof n == "string" ? n : Q8(n), H8(n)) {
- const r = jy(n);
- this.negative = r.negative;
- const i = r.trimStr.split(".");
- this.integer = BigInt(i[0]);
- const a = i[1] || "0";
- this.decimal = BigInt(a), this.decimalLen = a.length;
- } else
- this.nan = !0;
- }
- getMark() {
- return this.negative ? "-" : "";
- }
- getIntegerStr() {
- return this.integer.toString();
- }
- getDecimalStr() {
- return this.decimal.toString().padStart(this.decimalLen, "0");
- }
- /**
- * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
- * This is used for add function only.
- */
- alignDecimal(e) {
- const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
- return BigInt(n);
- }
- negate() {
- const e = new Mv(this.toString());
- return e.negative = !e.negative, e;
- }
- add(e) {
- if (this.isInvalidate())
- return new Mv(e);
- const n = new Mv(e);
- if (n.isInvalidate())
- return this;
- const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
- negativeStr: s,
- trimStr: l
- } = jy(o), u = `${s}${l.padStart(r + 1, "0")}`;
- return new Mv(`${u.slice(0, -r)}.${u.slice(-r)}`);
- }
- isEmpty() {
- return this.empty;
- }
- isNaN() {
- return this.nan;
- }
- isInvalidate() {
- return this.isEmpty() || this.isNaN();
- }
- equals(e) {
- return this.toString() === (e == null ? void 0 : e.toString());
- }
- lessEquals(e) {
- return this.add(e.negate().toString()).toNumber() <= 0;
- }
- toNumber() {
- return this.isNaN() ? NaN : Number(this.toString());
- }
- toString() {
- return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : jy(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
- }
- }
- function bl(t) {
- return QR() ? new Mv(t) : new Hd(t);
- }
- function HR(t, e, n) {
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
- if (t === "")
- return "";
- const {
- negativeStr: i,
- integerStr: a,
- decimalStr: o
- } = jy(t), s = `${e}${o}`, l = `${i}${a}`;
- if (n >= 0) {
- const u = Number(o[n]);
- if (u >= 5 && !r) {
- const c = bl(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
- return HR(c.toString(), e, n, r);
- }
- return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
- }
- return s === ".0" ? l : `${l}${s}`;
- }
- const pWe = 200, vWe = 600, gWe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "StepHandler",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- upDisabled: Boolean,
- downDisabled: Boolean,
- onStep: Ct()
- },
- slots: Object,
- setup(t, e) {
- let {
- slots: n,
- emit: r
- } = e;
- const i = ee(), a = (s, l) => {
- s.preventDefault(), r("step", l);
- function u() {
- r("step", l), i.value = setTimeout(u, pWe);
- }
- i.value = setTimeout(u, vWe);
- }, o = () => {
- clearTimeout(i.value);
- };
- return Qt(() => {
- o();
- }), () => {
- if (i8())
- return null;
- const {
- prefixCls: s,
- upDisabled: l,
- downDisabled: u
- } = t, c = `${s}-handler`, f = Re(c, `${c}-up`, {
- [`${c}-up-disabled`]: l
- }), d = Re(c, `${c}-down`, {
- [`${c}-down-disabled`]: u
- }), h = {
- unselectable: "on",
- role: "button",
- onMouseup: o,
- onMouseleave: o
- }, {
- upNode: p,
- downNode: v
- } = n;
- return D("div", {
- class: `${c}-wrap`
- }, [D("span", te(te({}, h), {}, {
- onMousedown: (g) => {
- a(g, !0);
- },
- "aria-label": "Increase Value",
- "aria-disabled": l,
- class: f
- }), [(p == null ? void 0 : p()) || D("span", {
- unselectable: "on",
- class: `${s}-handler-up-inner`
- }, null)]), D("span", te(te({}, h), {}, {
- onMousedown: (g) => {
- a(g, !1);
- },
- "aria-label": "Decrease Value",
- "aria-disabled": u,
- class: d
- }), [(v == null ? void 0 : v()) || D("span", {
- unselectable: "on",
- class: `${s}-handler-down-inner`
- }, null)])]);
- };
- }
- });
- function mWe(t, e) {
- const n = ee(null);
- function r() {
- try {
- const {
- selectionStart: a,
- selectionEnd: o,
- value: s
- } = t.value, l = s.substring(0, a), u = s.substring(o);
- n.value = {
- start: a,
- end: o,
- value: s,
- beforeTxt: l,
- afterTxt: u
- };
- } catch {
- }
- }
- function i() {
- if (t.value && n.value && e.value)
- try {
- const {
- value: a
- } = t.value, {
- beforeTxt: o,
- afterTxt: s,
- start: l
- } = n.value;
- let u = a.length;
- if (a.endsWith(s))
- u = a.length - n.value.afterTxt.length;
- else if (a.startsWith(o))
- u = o.length;
- else {
- const c = o[l - 1], f = a.indexOf(c, l - 1);
- f !== -1 && (u = f + 1);
- }
- t.value.setSelectionRange(u, u);
- } catch (a) {
- Nh(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
- }
- }
- return [r, i];
- }
- const yWe = () => {
- const t = ve(0), e = () => {
- en.cancel(t.value);
- };
- return Qt(() => {
- e();
- }), (n) => {
- e(), t.value = en(() => {
- n();
- });
- };
- };
- var bWe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const C9 = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), T9 = (t) => {
- const e = bl(t);
- return e.isInvalidate() ? null : e;
- }, toe = () => ({
- /** value will show as string */
- stringMode: Tt(),
- defaultValue: or([String, Number]),
- value: or([String, Number]),
- prefixCls: rr(),
- min: or([String, Number]),
- max: or([String, Number]),
- step: or([String, Number], 1),
- tabindex: Number,
- controls: Tt(!0),
- readonly: Tt(),
- disabled: Tt(),
- autofocus: Tt(),
- keyboard: Tt(!0),
- /** Parse display value to validate number */
- parser: Ct(),
- /** Transform `value` to display value show in input */
- formatter: Ct(),
- /** Syntactic sugar of `formatter`. Config precision of display. */
- precision: Number,
- /** Syntactic sugar of `formatter`. Config decimal separator of display. */
- decimalSeparator: String,
- onInput: Ct(),
- onChange: Ct(),
- onPressEnter: Ct(),
- onStep: Ct(),
- onBlur: Ct(),
- onFocus: Ct()
- }), _We = ae({
- compatConfig: {
- MODE: 3
- },
- name: "InnerInputNumber",
- inheritAttrs: !1,
- props: k(k({}, toe()), {
- lazy: Boolean
- }),
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- emit: i,
- expose: a
- } = e;
- const o = ve(), s = ve(!1), l = ve(!1), u = ve(!1), c = ve(bl(t.value));
- function f(j) {
- t.value === void 0 && (c.value = j);
- }
- const d = (j, Y) => {
- if (!Y)
- return t.precision >= 0 ? t.precision : Math.max(Nb(j), Nb(t.step));
- }, h = (j) => {
- const Y = String(j);
- if (t.parser)
- return t.parser(Y);
- let ne = Y;
- return t.decimalSeparator && (ne = ne.replace(t.decimalSeparator, ".")), ne.replace(/[^\w.-]+/g, "");
- }, p = ve(""), v = (j, Y) => {
- if (t.formatter)
- return t.formatter(j, {
- userTyping: Y,
- input: String(p.value)
- });
- let ne = typeof j == "number" ? Q8(j) : j;
- if (!Y) {
- const fe = d(ne, Y);
- if (H8(ne) && (t.decimalSeparator || fe >= 0)) {
- const ue = t.decimalSeparator || ".";
- ne = HR(ne, ue, fe);
- }
- }
- return ne;
- }, g = (() => {
- const j = t.value;
- return c.value.isInvalidate() && ["string", "number"].includes(typeof j) ? Number.isNaN(j) ? "" : j : v(c.value.toString(), !1);
- })();
- p.value = g;
- function m(j, Y) {
- p.value = v(
- // Invalidate number is sometime passed by external control, we should let it go
- // Otherwise is controlled by internal interactive logic which check by userTyping
- // You can ref 'show limited value when input is not focused' test for more info.
- j.isInvalidate() ? j.toString(!1) : j.toString(!Y),
- Y
- );
- }
- const y = V(() => T9(t.max)), _ = V(() => T9(t.min)), O = V(() => !y.value || !c.value || c.value.isInvalidate() ? !1 : y.value.lessEquals(c.value)), S = V(() => !_.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(_.value)), [x, C] = mWe(o, s), P = (j) => y.value && !j.lessEquals(y.value) ? y.value : _.value && !_.value.lessEquals(j) ? _.value : null, $ = (j) => !P(j), T = (j, Y) => {
- var ne;
- let fe = j, ue = $(fe) || fe.isEmpty();
- if (!fe.isEmpty() && !Y && (fe = P(fe) || fe, ue = !0), !t.readonly && !t.disabled && ue) {
- const ye = fe.toString(), se = d(ye, Y);
- return se >= 0 && (fe = bl(HR(ye, ".", se))), fe.equals(c.value) || (f(fe), (ne = t.onChange) === null || ne === void 0 || ne.call(t, fe.isEmpty() ? null : C9(t.stringMode, fe)), t.value === void 0 && m(fe, Y)), fe;
- }
- return c.value;
- }, E = yWe(), M = (j) => {
- var Y;
- if (x(), p.value = j, !u.value) {
- const ne = h(j), fe = bl(ne);
- fe.isNaN() || T(fe, !0);
- }
- (Y = t.onInput) === null || Y === void 0 || Y.call(t, j), E(() => {
- let ne = j;
- t.parser || (ne = j.replace(/。/g, ".")), ne !== j && M(ne);
- });
- }, R = () => {
- u.value = !0;
- }, N = () => {
- u.value = !1, M(o.value.value);
- }, I = (j) => {
- M(j.target.value);
- }, B = (j) => {
- var Y, ne;
- if (j && O.value || !j && S.value)
- return;
- l.value = !1;
- let fe = bl(t.step);
- j || (fe = fe.negate());
- const ue = (c.value || bl(0)).add(fe.toString()), ye = T(ue, !1);
- (Y = t.onStep) === null || Y === void 0 || Y.call(t, C9(t.stringMode, ye), {
- offset: t.step,
- type: j ? "up" : "down"
- }), (ne = o.value) === null || ne === void 0 || ne.focus();
- }, Q = (j) => {
- const Y = bl(h(p.value));
- let ne = Y;
- Y.isNaN() ? ne = c.value : ne = T(Y, j), t.value !== void 0 ? m(c.value, !1) : ne.isNaN() || m(ne, !1);
- }, W = (j) => {
- var Y;
- const {
- which: ne
- } = j;
- l.value = !0, ne === Me.ENTER && (u.value || (l.value = !1), Q(!1), (Y = t.onPressEnter) === null || Y === void 0 || Y.call(t, j)), t.keyboard !== !1 && !u.value && [Me.UP, Me.DOWN].includes(ne) && (B(Me.UP === ne), j.preventDefault());
- }, H = () => {
- l.value = !1;
- }, U = (j) => {
- Q(!1), s.value = !1, l.value = !1, i("blur", j);
- };
- return me(() => t.precision, () => {
- c.value.isInvalidate() || m(c.value, !1);
- }, {
- flush: "post"
- }), me(() => t.value, () => {
- const j = bl(t.value);
- c.value = j;
- const Y = bl(h(p.value));
- (!j.equals(Y) || !l.value || t.formatter) && m(j, l.value);
- }, {
- flush: "post"
- }), me(p, () => {
- t.formatter && C();
- }, {
- flush: "post"
- }), me(() => t.disabled, (j) => {
- j && (s.value = !1);
- }), a({
- focus: () => {
- var j;
- (j = o.value) === null || j === void 0 || j.focus();
- },
- blur: () => {
- var j;
- (j = o.value) === null || j === void 0 || j.blur();
- }
- }), () => {
- const j = k(k({}, n), t), {
- prefixCls: Y = "rc-input-number",
- min: ne,
- max: fe,
- step: ue = 1,
- defaultValue: ye,
- value: se,
- disabled: he,
- readonly: re,
- keyboard: q,
- controls: K = !0,
- autofocus: de,
- stringMode: xe,
- parser: we,
- formatter: He,
- precision: je,
- decimalSeparator: Be,
- onChange: Le,
- onInput: Pe,
- onPressEnter: Fe,
- onStep: Ye,
- lazy: xt,
- class: It,
- style: an
- } = j, Ae = bWe(j, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
- upHandler: gt,
- downHandler: Xt
- } = r, Bn = `${Y}-input`, Dn = {};
- return xt ? Dn.onChange = I : Dn.onInput = I, D("div", {
- class: Re(Y, It, {
- [`${Y}-focused`]: s.value,
- [`${Y}-disabled`]: he,
- [`${Y}-readonly`]: re,
- [`${Y}-not-a-number`]: c.value.isNaN(),
- [`${Y}-out-of-range`]: !c.value.isInvalidate() && !$(c.value)
- }),
- style: an,
- onKeydown: W,
- onKeyup: H
- }, [K && D(gWe, {
- prefixCls: Y,
- upDisabled: O.value,
- downDisabled: S.value,
- onStep: B
- }, {
- upNode: gt,
- downNode: Xt
- }), D("div", {
- class: `${Bn}-wrap`
- }, [D("input", te(te(te({
- autofocus: de,
- autocomplete: "off",
- role: "spinbutton",
- "aria-valuemin": ne,
- "aria-valuemax": fe,
- "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
- step: ue
- }, Ae), {}, {
- ref: o,
- class: Bn,
- value: p.value,
- disabled: he,
- readonly: re,
- onFocus: (Dr) => {
- s.value = !0, i("focus", Dr);
- }
- }, Dn), {}, {
- onBlur: U,
- onCompositionstart: R,
- onCompositionend: N
- }), null)])]);
- };
- }
- });
- function _E(t) {
- return t != null;
- }
- const OWe = (t) => {
- const {
- componentCls: e,
- lineWidth: n,
- lineType: r,
- colorBorder: i,
- borderRadius: a,
- fontSizeLG: o,
- controlHeightLG: s,
- controlHeightSM: l,
- colorError: u,
- inputPaddingHorizontalSM: c,
- colorTextDescription: f,
- motionDurationMid: d,
- colorPrimary: h,
- controlHeight: p,
- inputPaddingHorizontal: v,
- colorBgContainer: g,
- colorTextDisabled: m,
- borderRadiusSM: y,
- borderRadiusLG: _,
- controlWidth: O,
- handleVisible: S
- } = t;
- return [
- {
- [e]: k(k(k(k({}, Gn(t)), G2(t)), H2(t, e)), {
- display: "inline-block",
- width: O,
- margin: 0,
- padding: 0,
- border: `${n}px ${r} ${i}`,
- borderRadius: a,
- "&-rtl": {
- direction: "rtl",
- [`${e}-input`]: {
- direction: "rtl"
- }
- },
- "&-lg": {
- padding: 0,
- fontSize: o,
- borderRadius: _,
- [`input${e}-input`]: {
- height: s - 2 * n
- }
- },
- "&-sm": {
- padding: 0,
- borderRadius: y,
- [`input${e}-input`]: {
- height: l - 2 * n,
- padding: `0 ${c}px`
- }
- },
- "&:hover": k({}, X_(t)),
- "&-focused": k({}, cC(t)),
- "&-disabled": k(k({}, Zie(t)), {
- [`${e}-input`]: {
- cursor: "not-allowed"
- }
- }),
- // ===================== Out Of Range =====================
- "&-out-of-range": {
- input: {
- color: u
- }
- },
- // Style for input-group: input with label, with button or dropdown...
- "&-group": k(k(k({}, Gn(t)), Yie(t)), {
- "&-wrapper": {
- display: "inline-block",
- textAlign: "start",
- verticalAlign: "top",
- [`${e}-affix-wrapper`]: {
- width: "100%"
- },
- // Size
- "&-lg": {
- [`${e}-group-addon`]: {
- borderRadius: _
- }
- },
- "&-sm": {
- [`${e}-group-addon`]: {
- borderRadius: y
- }
- }
- }
- }),
- [e]: {
- "&-input": k(k({
- width: "100%",
- height: p - 2 * n,
- padding: `0 ${v}px`,
- textAlign: "start",
- backgroundColor: "transparent",
- border: 0,
- borderRadius: a,
- outline: 0,
- transition: `all ${d} linear`,
- appearance: "textfield",
- color: t.colorText,
- fontSize: "inherit",
- verticalAlign: "top"
- }, jie(t.colorTextPlaceholder)), {
- '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
- margin: 0,
- /* stylelint-disable-next-line property-no-vendor-prefix */
- webkitAppearance: "none",
- appearance: "none"
- }
- })
- }
- })
- },
- // Handler
- {
- [e]: {
- [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
- opacity: 1
- },
- [`${e}-handler-wrap`]: {
- position: "absolute",
- insetBlockStart: 0,
- insetInlineEnd: 0,
- width: t.handleWidth,
- height: "100%",
- background: g,
- borderStartStartRadius: 0,
- borderStartEndRadius: a,
- borderEndEndRadius: a,
- borderEndStartRadius: 0,
- opacity: S === !0 ? 1 : 0,
- display: "flex",
- flexDirection: "column",
- alignItems: "stretch",
- transition: `opacity ${d} linear ${d}`,
- // Fix input number inside Menu makes icon too large
- // We arise the selector priority by nest selector here
- // https://github.com/ant-design/ant-design/issues/14367
- [`${e}-handler`]: {
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- flex: "auto",
- height: "40%",
- [`
- ${e}-handler-up-inner,
- ${e}-handler-down-inner
- `]: {
- marginInlineEnd: 0,
- fontSize: t.handleFontSize
- }
- }
- },
- [`${e}-handler`]: {
- height: "50%",
- overflow: "hidden",
- color: f,
- fontWeight: "bold",
- lineHeight: 0,
- textAlign: "center",
- cursor: "pointer",
- borderInlineStart: `${n}px ${r} ${i}`,
- transition: `all ${d} linear`,
- "&:active": {
- background: t.colorFillAlter
- },
- // Hover
- "&:hover": {
- height: "60%",
- [`
- ${e}-handler-up-inner,
- ${e}-handler-down-inner
- `]: {
- color: h
- }
- },
- "&-up-inner, &-down-inner": k(k({}, hm()), {
- color: f,
- transition: `all ${d} linear`,
- userSelect: "none"
- })
- },
- [`${e}-handler-up`]: {
- borderStartEndRadius: a
- },
- [`${e}-handler-down`]: {
- borderBlockStart: `${n}px ${r} ${i}`,
- borderEndEndRadius: a
- },
- // Disabled
- "&-disabled, &-readonly": {
- [`${e}-handler-wrap`]: {
- display: "none"
- }
- },
- [`
- ${e}-handler-up-disabled,
- ${e}-handler-down-disabled
- `]: {
- cursor: "not-allowed"
- },
- [`
- ${e}-handler-up-disabled:hover &-handler-up-inner,
- ${e}-handler-down-disabled:hover &-handler-down-inner
- `]: {
- color: m
- }
- }
- },
- // Border-less
- {
- [`${e}-borderless`]: {
- borderColor: "transparent",
- boxShadow: "none",
- [`${e}-handler-down`]: {
- borderBlockStartWidth: 0
- }
- }
- }
- ];
- }, SWe = (t) => {
- const {
- componentCls: e,
- inputPaddingHorizontal: n,
- inputAffixPadding: r,
- controlWidth: i,
- borderRadiusLG: a,
- borderRadiusSM: o
- } = t;
- return {
- [`${e}-affix-wrapper`]: k(k(k({}, G2(t)), H2(t, `${e}-affix-wrapper`)), {
- // or number handler will cover form status
- position: "relative",
- display: "inline-flex",
- width: i,
- padding: 0,
- paddingInlineStart: n,
- "&-lg": {
- borderRadius: a
- },
- "&-sm": {
- borderRadius: o
- },
- [`&:not(${e}-affix-wrapper-disabled):hover`]: k(k({}, X_(t)), {
- zIndex: 1
- }),
- "&-focused, &:focus": {
- zIndex: 1
- },
- "&-disabled": {
- [`${e}[disabled]`]: {
- background: "transparent"
- }
- },
- [`> div${e}`]: {
- width: "100%",
- border: "none",
- outline: "none",
- [`&${e}-focused`]: {
- boxShadow: "none !important"
- }
- },
- [`input${e}-input`]: {
- padding: 0
- },
- "&::before": {
- width: 0,
- visibility: "hidden",
- content: '"\\a0"'
- },
- [`${e}-handler-wrap`]: {
- zIndex: 2
- },
- [e]: {
- "&-prefix, &-suffix": {
- display: "flex",
- flex: "none",
- alignItems: "center",
- pointerEvents: "none"
- },
- "&-prefix": {
- marginInlineEnd: r
- },
- "&-suffix": {
- position: "absolute",
- insetBlockStart: 0,
- insetInlineEnd: 0,
- zIndex: 1,
- height: "100%",
- marginInlineEnd: n,
- marginInlineStart: r
- }
- }
- })
- };
- }, xWe = pr("InputNumber", (t) => {
- const e = qie(t);
- return [
- OWe(e),
- SWe(e),
- // =====================================================
- // == Space Compact ==
- // =====================================================
- z2(e)
- ];
- }, (t) => ({
- controlWidth: 90,
- handleWidth: t.controlHeightSM - t.lineWidth * 2,
- handleFontSize: t.fontSize / 2,
- handleVisible: "auto"
- }));
- var wWe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const P9 = toe(), CWe = () => k(k({}, P9), {
- size: rr(),
- bordered: Tt(!0),
- placeholder: String,
- name: String,
- id: String,
- type: String,
- addonBefore: oe.any,
- addonAfter: oe.any,
- prefix: oe.any,
- "onUpdate:value": P9.onChange,
- valueModifiers: Object,
- status: rr()
- }), OE = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AInputNumber",
- inheritAttrs: !1,
- props: CWe(),
- // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
- slots: Object,
- setup(t, e) {
- let {
- emit: n,
- expose: r,
- attrs: i,
- slots: a
- } = e;
- var o;
- const s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), {
- prefixCls: c,
- size: f,
- direction: d,
- disabled: h
- } = hn("input-number", t), {
- compactSize: p,
- compactItemClassnames: v
- } = L2(c, d), g = Vl(), m = V(() => {
- var R;
- return (R = h.value) !== null && R !== void 0 ? R : g.value;
- }), [y, _] = xWe(c), O = V(() => p.value || f.value), S = ve((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), x = ve(!1);
- me(() => t.value, () => {
- S.value = t.value;
- });
- const C = ve(null), P = () => {
- var R;
- (R = C.value) === null || R === void 0 || R.focus();
- };
- r({
- focus: P,
- blur: () => {
- var R;
- (R = C.value) === null || R === void 0 || R.blur();
- }
- });
- const T = (R) => {
- t.value === void 0 && (S.value = R), n("update:value", R), n("change", R), s.onFieldChange();
- }, E = (R) => {
- x.value = !1, n("blur", R), s.onFieldBlur();
- }, M = (R) => {
- x.value = !0, n("focus", R);
- };
- return () => {
- var R, N, I, B;
- const {
- hasFeedback: Q,
- isFormItemInput: W,
- feedbackIcon: H
- } = l, U = (R = t.id) !== null && R !== void 0 ? R : s.id.value, j = k(k(k({}, i), t), {
- id: U,
- disabled: m.value
- }), {
- class: Y,
- bordered: ne,
- readonly: fe,
- style: ue,
- addonBefore: ye = (N = a.addonBefore) === null || N === void 0 ? void 0 : N.call(a),
- addonAfter: se = (I = a.addonAfter) === null || I === void 0 ? void 0 : I.call(a),
- prefix: he = (B = a.prefix) === null || B === void 0 ? void 0 : B.call(a),
- valueModifiers: re = {}
- } = j, q = wWe(j, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), K = c.value, de = Re({
- [`${K}-lg`]: O.value === "large",
- [`${K}-sm`]: O.value === "small",
- [`${K}-rtl`]: d.value === "rtl",
- [`${K}-readonly`]: fe,
- [`${K}-borderless`]: !ne,
- [`${K}-in-form-item`]: W
- }, Eu(K, u.value), Y, v.value, _.value);
- let xe = D(_We, te(te({}, si(q, ["size", "defaultValue"])), {}, {
- ref: C,
- lazy: !!re.lazy,
- value: S.value,
- class: de,
- prefixCls: K,
- readonly: fe,
- onChange: T,
- onBlur: E,
- onFocus: M
- }), {
- upHandler: a.upIcon ? () => D("span", {
- class: `${K}-handler-up-inner`
- }, [a.upIcon()]) : () => D(F8, {
- class: `${K}-handler-up-inner`
- }, null),
- downHandler: a.downIcon ? () => D("span", {
- class: `${K}-handler-down-inner`
- }, [a.downIcon()]) : () => D(D2, {
- class: `${K}-handler-down-inner`
- }, null)
- });
- const we = _E(ye) || _E(se), He = _E(he);
- if (He || Q) {
- const je = Re(`${K}-affix-wrapper`, Eu(`${K}-affix-wrapper`, u.value, Q), {
- [`${K}-affix-wrapper-focused`]: x.value,
- [`${K}-affix-wrapper-disabled`]: m.value,
- [`${K}-affix-wrapper-sm`]: O.value === "small",
- [`${K}-affix-wrapper-lg`]: O.value === "large",
- [`${K}-affix-wrapper-rtl`]: d.value === "rtl",
- [`${K}-affix-wrapper-readonly`]: fe,
- [`${K}-affix-wrapper-borderless`]: !ne,
- // className will go to addon wrapper
- [`${Y}`]: !we && Y
- }, _.value);
- xe = D("div", {
- class: je,
- style: ue,
- onClick: P
- }, [He && D("span", {
- class: `${K}-prefix`
- }, [he]), xe, Q && D("span", {
- class: `${K}-suffix`
- }, [H])]);
- }
- if (we) {
- const je = `${K}-group`, Be = `${je}-addon`, Le = ye ? D("div", {
- class: Be
- }, [ye]) : null, Pe = se ? D("div", {
- class: Be
- }, [se]) : null, Fe = Re(`${K}-wrapper`, je, {
- [`${je}-rtl`]: d.value === "rtl"
- }, _.value), Ye = Re(`${K}-group-wrapper`, {
- [`${K}-group-wrapper-sm`]: O.value === "small",
- [`${K}-group-wrapper-lg`]: O.value === "large",
- [`${K}-group-wrapper-rtl`]: d.value === "rtl"
- }, Eu(`${c}-group-wrapper`, u.value, Q), Y, _.value);
- xe = D("div", {
- class: Ye,
- style: ue
- }, [D("div", {
- class: Fe
- }, [Le && D(iC, null, {
- default: () => [D(rC, null, {
- default: () => [Le]
- })]
- }), xe, Pe && D(iC, null, {
- default: () => [D(rC, null, {
- default: () => [Pe]
- })]
- })])]);
- }
- return y(xr(xe, {
- style: ue
- }));
- };
- }
- }), Y_ = k(OE, {
- install: (t) => (t.component(OE.name, OE), t)
- });
- function TWe(t, e, n) {
- var r = n || {}, i = r.noTrailing, a = i === void 0 ? !1 : i, o = r.noLeading, s = o === void 0 ? !1 : o, l = r.debounceMode, u = l === void 0 ? void 0 : l, c, f = !1, d = 0;
- function h() {
- c && clearTimeout(c);
- }
- function p(g) {
- var m = g || {}, y = m.upcomingOnly, _ = y === void 0 ? !1 : y;
- h(), f = !_;
- }
- function v() {
- for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
- m[y] = arguments[y];
- var _ = this, O = Date.now() - d;
- if (f)
- return;
- function S() {
- d = Date.now(), e.apply(_, m);
- }
- function x() {
- c = void 0;
- }
- !s && u && !c && S(), h(), u === void 0 && O > t ? s ? (d = Date.now(), a || (c = setTimeout(u ? x : S, t))) : S() : a !== !0 && (c = setTimeout(u ? x : S, u === void 0 ? t - O : t));
- }
- return v.cancel = p, v;
- }
- function PWe(t, e, n) {
- var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
- return TWe(t, e, {
- debounceMode: a !== !1
- });
- }
- const $We = new qt("antSpinMove", {
- to: {
- opacity: 1
- }
- }), AWe = new qt("antRotate", {
- to: {
- transform: "rotate(405deg)"
- }
- }), EWe = (t) => ({
- [`${t.componentCls}`]: k(k({}, Gn(t)), {
- position: "absolute",
- display: "none",
- color: t.colorPrimary,
- textAlign: "center",
- verticalAlign: "middle",
- opacity: 0,
- transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
- "&-spinning": {
- position: "static",
- display: "inline-block",
- opacity: 1
- },
- "&-nested-loading": {
- position: "relative",
- [`> div > ${t.componentCls}`]: {
- position: "absolute",
- top: 0,
- insetInlineStart: 0,
- zIndex: 4,
- display: "block",
- width: "100%",
- height: "100%",
- maxHeight: t.contentHeight,
- [`${t.componentCls}-dot`]: {
- position: "absolute",
- top: "50%",
- insetInlineStart: "50%",
- margin: -t.spinDotSize / 2
- },
- [`${t.componentCls}-text`]: {
- position: "absolute",
- top: "50%",
- width: "100%",
- paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
- textShadow: `0 1px 2px ${t.colorBgContainer}`
- // FIXME: shadow
- },
- [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
- marginTop: -(t.spinDotSize / 2) - 10
- },
- "&-sm": {
- [`${t.componentCls}-dot`]: {
- margin: -t.spinDotSizeSM / 2
- },
- [`${t.componentCls}-text`]: {
- paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
- },
- [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
- marginTop: -(t.spinDotSizeSM / 2) - 10
- }
- },
- "&-lg": {
- [`${t.componentCls}-dot`]: {
- margin: -(t.spinDotSizeLG / 2)
- },
- [`${t.componentCls}-text`]: {
- paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
- },
- [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
- marginTop: -(t.spinDotSizeLG / 2) - 10
- }
- }
- },
- [`${t.componentCls}-container`]: {
- position: "relative",
- transition: `opacity ${t.motionDurationSlow}`,
- "&::after": {
- position: "absolute",
- top: 0,
- insetInlineEnd: 0,
- bottom: 0,
- insetInlineStart: 0,
- zIndex: 10,
- width: "100%",
- height: "100%",
- background: t.colorBgContainer,
- opacity: 0,
- transition: `all ${t.motionDurationSlow}`,
- content: '""',
- pointerEvents: "none"
- }
- },
- [`${t.componentCls}-blur`]: {
- clear: "both",
- opacity: 0.5,
- userSelect: "none",
- pointerEvents: "none",
- "&::after": {
- opacity: 0.4,
- pointerEvents: "auto"
- }
- }
- },
- // tip
- // ------------------------------
- "&-tip": {
- color: t.spinDotDefault
- },
- // dots
- // ------------------------------
- [`${t.componentCls}-dot`]: {
- position: "relative",
- display: "inline-block",
- fontSize: t.spinDotSize,
- width: "1em",
- height: "1em",
- "&-item": {
- position: "absolute",
- display: "block",
- width: (t.spinDotSize - t.marginXXS / 2) / 2,
- height: (t.spinDotSize - t.marginXXS / 2) / 2,
- backgroundColor: t.colorPrimary,
- borderRadius: "100%",
- transform: "scale(0.75)",
- transformOrigin: "50% 50%",
- opacity: 0.3,
- animationName: $We,
- animationDuration: "1s",
- animationIterationCount: "infinite",
- animationTimingFunction: "linear",
- animationDirection: "alternate",
- "&:nth-child(1)": {
- top: 0,
- insetInlineStart: 0
- },
- "&:nth-child(2)": {
- top: 0,
- insetInlineEnd: 0,
- animationDelay: "0.4s"
- },
- "&:nth-child(3)": {
- insetInlineEnd: 0,
- bottom: 0,
- animationDelay: "0.8s"
- },
- "&:nth-child(4)": {
- bottom: 0,
- insetInlineStart: 0,
- animationDelay: "1.2s"
- }
- },
- "&-spin": {
- transform: "rotate(45deg)",
- animationName: AWe,
- animationDuration: "1.2s",
- animationIterationCount: "infinite",
- animationTimingFunction: "linear"
- }
- },
- // Sizes
- // ------------------------------
- // small
- [`&-sm ${t.componentCls}-dot`]: {
- fontSize: t.spinDotSizeSM,
- i: {
- width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
- height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
- }
- },
- // large
- [`&-lg ${t.componentCls}-dot`]: {
- fontSize: t.spinDotSizeLG,
- i: {
- width: (t.spinDotSizeLG - t.marginXXS) / 2,
- height: (t.spinDotSizeLG - t.marginXXS) / 2
- }
- },
- [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
- display: "block"
- }
- })
- }), MWe = pr("Spin", (t) => {
- const e = bn(t, {
- spinDotDefault: t.colorTextDescription,
- spinDotSize: t.controlHeightLG / 2,
- spinDotSizeSM: t.controlHeightLG * 0.35,
- spinDotSizeLG: t.controlHeight
- });
- return [EWe(e)];
- }, {
- contentHeight: 400
- });
- var IWe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const DWe = () => ({
- prefixCls: String,
- spinning: {
- type: Boolean,
- default: void 0
- },
- size: String,
- wrapperClassName: String,
- tip: oe.any,
- delay: Number,
- indicator: oe.any
- });
- let nw = null;
- function RWe(t, e) {
- return !!t && !!e && !isNaN(Number(e));
- }
- function kWe(t) {
- const e = t.indicator;
- nw = typeof e == "function" ? e : () => D(e, null, null);
- }
- const Zy = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ASpin",
- inheritAttrs: !1,
- props: li(DWe(), {
- size: "default",
- spinning: !0,
- wrapperClassName: ""
- }),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const {
- prefixCls: i,
- size: a,
- direction: o
- } = hn("spin", t), [s, l] = MWe(i), u = ve(t.spinning && !RWe(t.spinning, t.delay));
- let c;
- return me([() => t.spinning, () => t.delay], () => {
- c == null || c.cancel(), c = PWe(t.delay, () => {
- u.value = t.spinning;
- }), c == null || c();
- }, {
- immediate: !0,
- flush: "post"
- }), Qt(() => {
- c == null || c.cancel();
- }), () => {
- var f, d;
- const {
- class: h
- } = n, p = IWe(n, ["class"]), {
- tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
- } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
- [l.value]: !0,
- [i.value]: !0,
- [`${i.value}-sm`]: a.value === "small",
- [`${i.value}-lg`]: a.value === "large",
- [`${i.value}-spinning`]: u.value,
- [`${i.value}-show-text`]: !!v,
- [`${i.value}-rtl`]: o.value === "rtl",
- [h]: !!h
- };
- function y(O) {
- const S = `${O}-dot`;
- let x = y2(r, t, "indicator");
- return x === null ? null : (Array.isArray(x) && (x = x.length === 1 ? x[0] : x), df(x) ? ku(x, {
- class: S
- }) : nw && df(nw()) ? ku(nw(), {
- class: S
- }) : D("span", {
- class: `${S} ${O}-dot-spin`
- }, [D("i", {
- class: `${O}-dot-item`
- }, null), D("i", {
- class: `${O}-dot-item`
- }, null), D("i", {
- class: `${O}-dot-item`
- }, null), D("i", {
- class: `${O}-dot-item`
- }, null)]));
- }
- const _ = D("div", te(te({}, p), {}, {
- class: m,
- "aria-live": "polite",
- "aria-busy": u.value
- }), [y(i.value), v ? D("div", {
- class: `${i.value}-text`
- }, [v]) : null]);
- if (g && Zl(g).length) {
- const O = {
- [`${i.value}-container`]: !0,
- [`${i.value}-blur`]: u.value
- };
- return s(D("div", {
- class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
- }, [u.value && D("div", {
- key: "loading"
- }, [_]), D("div", {
- class: O,
- key: "container"
- }, [g])]));
- }
- return s(_);
- };
- }
- });
- Zy.setDefaultIndicator = kWe;
- Zy.install = function(t) {
- return t.component(Zy.name, Zy), t;
- };
- var LWe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- let GR;
- const NWe = (t) => {
- GR = {
- x: t.pageX,
- y: t.pageY
- }, setTimeout(() => GR = null, 100);
- };
- iae() && yi(document.documentElement, "click", NWe, !0);
- const BWe = () => ({
- prefixCls: String,
- /** @deprecated Please use `open` instead. */
- visible: {
- type: Boolean,
- default: void 0
- },
- open: {
- type: Boolean,
- default: void 0
- },
- confirmLoading: {
- type: Boolean,
- default: void 0
- },
- title: oe.any,
- closable: {
- type: Boolean,
- default: void 0
- },
- closeIcon: oe.any,
- onOk: Function,
- onCancel: Function,
- "onUpdate:visible": Function,
- "onUpdate:open": Function,
- onChange: Function,
- afterClose: Function,
- centered: {
- type: Boolean,
- default: void 0
- },
- width: [String, Number],
- footer: oe.any,
- okText: oe.any,
- okType: String,
- cancelText: oe.any,
- icon: oe.any,
- maskClosable: {
- type: Boolean,
- default: void 0
- },
- forceRender: {
- type: Boolean,
- default: void 0
- },
- okButtonProps: sn(),
- cancelButtonProps: sn(),
- destroyOnClose: {
- type: Boolean,
- default: void 0
- },
- wrapClassName: String,
- maskTransitionName: String,
- transitionName: String,
- getContainer: {
- type: [String, Function, Boolean, Object],
- default: void 0
- },
- zIndex: Number,
- bodyStyle: sn(),
- maskStyle: sn(),
- mask: {
- type: Boolean,
- default: void 0
- },
- keyboard: {
- type: Boolean,
- default: void 0
- },
- wrapProps: Object,
- focusTriggerAfterClose: {
- type: Boolean,
- default: void 0
- },
- modalRender: Function,
- mousePosition: sn()
- }), uo = ae({
- compatConfig: {
- MODE: 3
- },
- name: "AModal",
- inheritAttrs: !1,
- props: li(BWe(), {
- width: 520,
- confirmLoading: !1,
- okType: "primary"
- }),
- setup(t, e) {
- let {
- emit: n,
- slots: r,
- attrs: i
- } = e;
- const [a] = _2("Modal"), {
- prefixCls: o,
- rootPrefixCls: s,
- direction: l,
- getPopupContainer: u
- } = hn("modal", t), [c, f] = nWe(o);
- aa(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
- const d = (v) => {
- n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
- }, h = (v) => {
- n("ok", v);
- }, p = () => {
- var v, g;
- const {
- okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
- okType: y,
- cancelText: _ = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
- confirmLoading: O
- } = t;
- return D(Wt, null, [D(Vi, te({
- onClick: d
- }, t.cancelButtonProps), {
- default: () => [_ || a.value.cancelText]
- }), D(Vi, te(te({}, Cie(y)), {}, {
- loading: O,
- onClick: h
- }, t.okButtonProps), {
- default: () => [m || a.value.okText]
- })]);
- };
- return () => {
- var v, g;
- const {
- prefixCls: m,
- visible: y,
- open: _,
- wrapClassName: O,
- centered: S,
- getContainer: x,
- closeIcon: C = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
- focusTriggerAfterClose: P = !0
- } = t, $ = LWe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), T = Re(O, {
- [`${o.value}-centered`]: !!S,
- [`${o.value}-wrap-rtl`]: l.value === "rtl"
- });
- return c(D(Gae, te(te(te({}, $), i), {}, {
- rootClassName: f.value,
- class: Re(f.value, i.class),
- getContainer: x || (u == null ? void 0 : u.value),
- prefixCls: o.value,
- wrapClassName: T,
- visible: _ ?? y,
- onClose: d,
- focusTriggerAfterClose: P,
- transitionName: Wl(s.value, "zoom", t.transitionName),
- maskTransitionName: Wl(s.value, "fade", t.maskTransitionName),
- mousePosition: (g = $.mousePosition) !== null && g !== void 0 ? g : GR
- }), k(k({}, r), {
- footer: r.footer || p,
- closeIcon: () => D("span", {
- class: `${o.value}-close-x`
- }, [C || D(tc, {
- class: `${o.value}-close-icon`
- }, null)])
- })));
- };
- }
- }), zWe = () => {
- const t = ve(!1);
- return Qt(() => {
- t.value = !0;
- }), t;
- }, VWe = {
- type: {
- type: String
- },
- actionFn: Function,
- close: Function,
- autofocus: Boolean,
- prefixCls: String,
- buttonProps: sn(),
- emitEvent: Boolean,
- quitOnNullishReturnValue: Boolean
- };
- function $9(t) {
- return !!(t && t.then);
- }
- const A9 = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ActionButton",
- props: VWe,
- setup(t, e) {
- let {
- slots: n
- } = e;
- const r = ve(!1), i = ve(), a = ve(!1);
- let o;
- const s = zWe();
- _t(() => {
- t.autofocus && (o = setTimeout(() => {
- var f, d;
- return (d = (f = xu(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
- }));
- }), Qt(() => {
- clearTimeout(o);
- });
- const l = function() {
- for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
- h[p] = arguments[p];
- (f = t.close) === null || f === void 0 || f.call(t, ...h);
- }, u = (f) => {
- $9(f) && (a.value = !0, f.then(function() {
- s.value || (a.value = !1), l(...arguments), r.value = !1;
- }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
- }, c = (f) => {
- const {
- actionFn: d
- } = t;
- if (r.value)
- return;
- if (r.value = !0, !d) {
- l();
- return;
- }
- let h;
- if (t.emitEvent) {
- if (h = d(f), t.quitOnNullishReturnValue && !$9(h)) {
- r.value = !1, l(f);
- return;
- }
- } else if (d.length)
- h = d(t.close), r.value = !1;
- else if (h = d(), !h) {
- l();
- return;
- }
- u(h);
- };
- return () => {
- const {
- type: f,
- prefixCls: d,
- buttonProps: h
- } = t;
- return D(Vi, te(te(te({}, Cie(f)), {}, {
- onClick: c,
- loading: a.value,
- prefixCls: d
- }, h), {}, {
- ref: i
- }), n);
- };
- }
- });
- function Gp(t) {
- return typeof t == "function" ? t() : t;
- }
- const noe = ae({
- name: "ConfirmDialog",
- inheritAttrs: !1,
- props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
- setup(t, e) {
- let {
- attrs: n
- } = e;
- const [r] = _2("Modal");
- return process.env.NODE_ENV !== "production" && aa(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
- const {
- icon: i,
- onCancel: a,
- onOk: o,
- close: s,
- okText: l,
- closable: u = !1,
- zIndex: c,
- afterClose: f,
- keyboard: d,
- centered: h,
- getContainer: p,
- maskStyle: v,
- okButtonProps: g,
- cancelButtonProps: m,
- okCancel: y,
- width: _ = 416,
- mask: O = !0,
- maskClosable: S = !1,
- type: x,
- open: C,
- title: P,
- content: $,
- direction: T,
- closeIcon: E,
- modalRender: M,
- focusTriggerAfterClose: R,
- rootPrefixCls: N,
- bodyStyle: I,
- wrapClassName: B,
- footer: Q
- } = t;
- let W = i;
- if (!i && i !== null)
- switch (x) {
- case "info":
- W = D(cp, null, null);
- break;
- case "success":
- W = D(Df, null, null);
- break;
- case "error":
- W = D(cs, null, null);
- break;
- default:
- W = D(Rf, null, null);
- }
- const H = t.okType || "primary", U = t.prefixCls || "ant-modal", j = `${U}-confirm`, Y = n.style || {}, ne = y ?? x === "confirm", fe = t.autoFocusButton === null ? !1 : t.autoFocusButton || "ok", ue = `${U}-confirm`, ye = Re(ue, `${ue}-${t.type}`, {
- [`${ue}-rtl`]: T === "rtl"
- }, n.class), se = r.value, he = ne && D(A9, {
- actionFn: a,
- close: s,
- autofocus: fe === "cancel",
- buttonProps: m,
- prefixCls: `${N}-btn`
- }, {
- default: () => [Gp(t.cancelText) || se.cancelText]
- });
- return D(uo, {
- prefixCls: U,
- class: ye,
- wrapClassName: Re({
- [`${ue}-centered`]: !!h
- }, B),
- onCancel: (re) => s == null ? void 0 : s({
- triggerCancel: !0
- }, re),
- open: C,
- title: "",
- footer: "",
- transitionName: Wl(N, "zoom", t.transitionName),
- maskTransitionName: Wl(N, "fade", t.maskTransitionName),
- mask: O,
- maskClosable: S,
- maskStyle: v,
- style: Y,
- bodyStyle: I,
- width: _,
- zIndex: c,
- afterClose: f,
- keyboard: d,
- centered: h,
- getContainer: p,
- closable: u,
- closeIcon: E,
- modalRender: M,
- focusTriggerAfterClose: R
- }, {
- default: () => [D("div", {
- class: `${j}-body-wrapper`
- }, [D("div", {
- class: `${j}-body`
- }, [Gp(W), P === void 0 ? null : D("span", {
- class: `${j}-title`
- }, [Gp(P)]), D("div", {
- class: `${j}-content`
- }, [Gp($)])]), Q !== void 0 ? Gp(Q) : D("div", {
- class: `${j}-btns`
- }, [he, D(A9, {
- type: H,
- actionFn: o,
- close: s,
- autofocus: fe === "ok",
- buttonProps: g,
- prefixCls: `${N}-btn`
- }, {
- default: () => [Gp(l) || (ne ? se.okText : se.justOkText)]
- })])])]
- });
- };
- }
- }), nh = [], q_ = (t) => {
- const e = document.createDocumentFragment();
- let n = k(k({}, si(t, ["parentContext", "appContext"])), {
- close: a,
- open: !0
- }), r = null;
- function i() {
- r && (Ih(null, e), r = null);
- for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
- c[f] = arguments[f];
- const d = c.some((h) => h && h.triggerCancel);
- t.onCancel && d && t.onCancel(() => {
- }, ...c.slice(1));
- for (let h = 0; h < nh.length; h++)
- if (nh[h] === a) {
- nh.splice(h, 1);
- break;
- }
- }
- function a() {
- for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
- c[f] = arguments[f];
- n = k(k({}, n), {
- open: !1,
- afterClose: () => {
- typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
- }
- }), n.visible && delete n.visible, o(n);
- }
- function o(u) {
- typeof u == "function" ? n = u(n) : n = k(k({}, n), u), r && nNe(r, n, e);
- }
- const s = (u) => {
- const c = gi, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = rVe();
- return D(Gv, te(te({}, c), {}, {
- prefixCls: f
- }), {
- default: () => [D(noe, te(te({}, u), {}, {
- rootPrefixCls: f,
- prefixCls: d,
- iconPrefixCls: h,
- locale: p,
- cancelText: u.cancelText || p.cancelText
- }), null)]
- });
- };
- function l(u) {
- const c = D(s, k({}, u));
- return c.appContext = t.parentContext || t.appContext || c.appContext, Ih(c, e), c;
- }
- return r = l(n), nh.push(a), {
- destroy: a,
- update: o
- };
- };
- function roe(t) {
- return k(k({}, t), {
- type: "warning"
- });
- }
- function ioe(t) {
- return k(k({}, t), {
- type: "info"
- });
- }
- function aoe(t) {
- return k(k({}, t), {
- type: "success"
- });
- }
- function ooe(t) {
- return k(k({}, t), {
- type: "error"
- });
- }
- function soe(t) {
- return k(k({}, t), {
- type: "confirm"
- });
- }
- const FWe = () => ({
- config: Object,
- afterClose: Function,
- destroyAction: Function,
- open: Boolean
- }), WWe = ae({
- name: "HookModal",
- inheritAttrs: !1,
- props: li(FWe(), {
- config: {
- width: 520,
- okType: "primary"
- }
- }),
- setup(t, e) {
- let {
- expose: n
- } = e;
- var r;
- const i = V(() => t.open), a = V(() => t.config), {
- direction: o,
- getPrefixCls: s
- } = b2(), l = s("modal"), u = s(), c = () => {
- var p, v;
- t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
- }, f = function() {
- t.destroyAction(...arguments);
- };
- n({
- destroy: f
- });
- const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = _2("Modal", Nu.Modal);
- return () => D(noe, te(te({
- prefixCls: l,
- rootPrefixCls: u
- }, a.value), {}, {
- close: f,
- open: i.value,
- afterClose: c,
- okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
- direction: a.value.direction || o.value,
- cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
- }), null);
- }
- });
- let E9 = 0;
- const QWe = ae({
- name: "ElementsHolder",
- inheritAttrs: !1,
- setup(t, e) {
- let {
- expose: n
- } = e;
- const r = ve([]);
- return n({
- addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
- r.value = r.value.filter((o) => o !== a);
- })
- }), () => r.value.map((a) => a());
- }
- });
- function HWe() {
- const t = ve(null), e = ve([]);
- me(e, () => {
- e.value.length && ([...e.value].forEach((o) => {
- o();
- }), e.value = []);
- }, {
- immediate: !0
- });
- const n = (a) => function(s) {
- var l;
- E9 += 1;
- const u = ve(!0), c = ve(null), f = ve(z(s)), d = ve({});
- me(() => s, (_) => {
- g(k(k({}, Vs(_) ? _.value : _), d.value));
- });
- const h = function() {
- u.value = !1;
- for (var _ = arguments.length, O = new Array(_), S = 0; S < _; S++)
- O[S] = arguments[S];
- const x = O.some((C) => C && C.triggerCancel);
- f.value.onCancel && x && f.value.onCancel(() => {
- }, ...O.slice(1));
- };
- let p;
- const v = () => D(WWe, {
- key: `modal-${E9}`,
- config: a(f.value),
- ref: c,
- open: u.value,
- destroyAction: h,
- afterClose: () => {
- p == null || p();
- }
- }, null);
- p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && nh.push(p);
- const g = (_) => {
- f.value = k(k({}, f.value), _);
- };
- return {
- destroy: () => {
- c.value ? h() : e.value = [...e.value, h];
- },
- update: (_) => {
- d.value = _, c.value ? g(_) : e.value = [...e.value, () => g(_)];
- }
- };
- }, r = V(() => ({
- info: n(ioe),
- success: n(aoe),
- error: n(ooe),
- warning: n(roe),
- confirm: n(soe)
- })), i = Symbol("modalHolderKey");
- return [r.value, () => D(QWe, {
- key: i,
- ref: t
- }, null)];
- }
- function loe(t) {
- return q_(roe(t));
- }
- uo.useModal = HWe;
- uo.info = function(e) {
- return q_(ioe(e));
- };
- uo.success = function(e) {
- return q_(aoe(e));
- };
- uo.error = function(e) {
- return q_(ooe(e));
- };
- uo.warning = loe;
- uo.warn = loe;
- uo.confirm = function(e) {
- return q_(soe(e));
- };
- uo.destroyAll = function() {
- for (; nh.length; ) {
- const e = nh.pop();
- e && e();
- }
- };
- uo.install = function(t) {
- return t.component(uo.name, uo), t;
- };
- const G8 = (t, e) => {
- let {
- attrs: n
- } = e;
- const {
- included: r,
- vertical: i,
- style: a,
- class: o
- } = n;
- let {
- length: s,
- offset: l,
- reverse: u
- } = n;
- s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
- const c = i ? {
- [u ? "top" : "bottom"]: `${l}%`,
- [u ? "bottom" : "top"]: "auto",
- height: `${s}%`
- } : {
- [u ? "right" : "left"]: `${l}%`,
- [u ? "left" : "right"]: "auto",
- width: `${s}%`
- }, f = k(k({}, a), c);
- return r ? D("div", {
- class: o,
- style: f
- }, null) : null;
- };
- G8.inheritAttrs = !1;
- const GWe = (t, e, n, r, i, a) => {
- aa(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
- const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
- if (n && r)
- for (let s = i; s <= a; s += r)
- o.indexOf(s) === -1 && o.push(s);
- return o;
- }, uoe = (t, e) => {
- let {
- attrs: n
- } = e;
- const {
- prefixCls: r,
- vertical: i,
- reverse: a,
- marks: o,
- dots: s,
- step: l,
- included: u,
- lowerBound: c,
- upperBound: f,
- max: d,
- min: h,
- dotStyle: p,
- activeDotStyle: v
- } = n, g = d - h, m = GWe(i, o, s, l, h, d).map((y) => {
- const _ = `${Math.abs(y - h) / g * 100}%`, O = !u && y === f || u && y <= f && y >= c;
- let S = i ? k(k({}, p), {
- [a ? "top" : "bottom"]: _
- }) : k(k({}, p), {
- [a ? "right" : "left"]: _
- });
- O && (S = k(k({}, S), v));
- const x = Re({
- [`${r}-dot`]: !0,
- [`${r}-dot-active`]: O,
- [`${r}-dot-reverse`]: a
- });
- return D("span", {
- class: x,
- style: S,
- key: y
- }, null);
- });
- return D("div", {
- class: `${r}-step`
- }, [m]);
- };
- uoe.inheritAttrs = !1;
- const coe = (t, e) => {
- let {
- attrs: n,
- slots: r
- } = e;
- const {
- class: i,
- vertical: a,
- reverse: o,
- marks: s,
- included: l,
- upperBound: u,
- lowerBound: c,
- max: f,
- min: d,
- onClickLabel: h
- } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, _) => y - _).map((y) => {
- const _ = typeof s[y] == "function" ? s[y]() : s[y], O = typeof _ == "object" && !po(_);
- let S = O ? _.label : _;
- if (!S && S !== 0)
- return null;
- v && (S = v({
- point: y,
- label: S
- }));
- const x = !l && y === u || l && y <= u && y >= c, C = Re({
- [`${i}-text`]: !0,
- [`${i}-text-active`]: x
- }), P = {
- marginBottom: "-50%",
- [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
- }, $ = {
- transform: `translateX(${o ? "50%" : "-50%"})`,
- msTransform: `translateX(${o ? "50%" : "-50%"})`,
- [o ? "right" : "left"]: `${(y - d) / g * 100}%`
- }, T = a ? P : $, E = O ? k(k({}, T), _.style) : T, M = {
- [mi ? "onTouchstartPassive" : "onTouchstart"]: (R) => h(R, y)
- };
- return D("span", te({
- class: C,
- style: E,
- key: y,
- onMousedown: (R) => h(R, y)
- }, M), [S]);
- });
- return D("div", {
- class: i
- }, [m]);
- };
- coe.inheritAttrs = !1;
- const foe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Handle",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- vertical: {
- type: Boolean,
- default: void 0
- },
- offset: Number,
- disabled: {
- type: Boolean,
- default: void 0
- },
- min: Number,
- max: Number,
- value: Number,
- tabindex: oe.oneOfType([oe.number, oe.string]),
- reverse: {
- type: Boolean,
- default: void 0
- },
- ariaLabel: String,
- ariaLabelledBy: String,
- ariaValueTextFormatter: Function,
- onMouseenter: {
- type: Function
- },
- onMouseleave: {
- type: Function
- },
- onMousedown: {
- type: Function
- }
- },
- setup(t, e) {
- let {
- attrs: n,
- emit: r,
- expose: i
- } = e;
- const a = ve(!1), o = ve(), s = () => {
- document.activeElement === o.value && (a.value = !0);
- }, l = (g) => {
- a.value = !1, r("blur", g);
- }, u = () => {
- a.value = !1;
- }, c = () => {
- var g;
- (g = o.value) === null || g === void 0 || g.focus();
- }, f = () => {
- var g;
- (g = o.value) === null || g === void 0 || g.blur();
- }, d = () => {
- a.value = !0, c();
- }, h = (g) => {
- g.preventDefault(), c(), r("mousedown", g);
- };
- i({
- focus: c,
- blur: f,
- clickFocus: d,
- ref: o
- });
- let p = null;
- _t(() => {
- p = yi(document, "mouseup", s);
- }), Qt(() => {
- p == null || p.remove();
- });
- const v = V(() => {
- const {
- vertical: g,
- offset: m,
- reverse: y
- } = t;
- return g ? {
- [y ? "top" : "bottom"]: `${m}%`,
- [y ? "bottom" : "top"]: "auto",
- transform: y ? null : "translateY(+50%)"
- } : {
- [y ? "right" : "left"]: `${m}%`,
- [y ? "left" : "right"]: "auto",
- transform: `translateX(${y ? "+" : "-"}50%)`
- };
- });
- return () => {
- const {
- prefixCls: g,
- disabled: m,
- min: y,
- max: _,
- value: O,
- tabindex: S,
- ariaLabel: x,
- ariaLabelledBy: C,
- ariaValueTextFormatter: P,
- onMouseenter: $,
- onMouseleave: T
- } = t, E = Re(n.class, {
- [`${g}-handle-click-focused`]: a.value
- }), M = {
- "aria-valuemin": y,
- "aria-valuemax": _,
- "aria-valuenow": O,
- "aria-disabled": !!m
- }, R = [n.style, v.value];
- let N = S || 0;
- (m || S === null) && (N = null);
- let I;
- P && (I = P(O));
- const B = k(k(k(k({}, n), {
- role: "slider",
- tabindex: N
- }), M), {
- class: E,
- onBlur: l,
- onKeydown: u,
- onMousedown: h,
- onMouseenter: $,
- onMouseleave: T,
- ref: o,
- style: R
- });
- return D("div", te(te({}, B), {}, {
- "aria-label": x,
- "aria-labelledby": C,
- "aria-valuetext": I
- }), null);
- };
- }
- });
- function SE(t, e) {
- try {
- return Object.keys(e).some((n) => t.target === e[n].ref);
- } catch {
- return !1;
- }
- }
- function doe(t, e) {
- let {
- min: n,
- max: r
- } = e;
- return t < n || t > r;
- }
- function M9(t) {
- return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
- }
- function I9(t, e) {
- let {
- marks: n,
- step: r,
- min: i,
- max: a
- } = e;
- const o = Object.keys(n).map(parseFloat);
- if (r !== null) {
- const l = Math.pow(10, hoe(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
- o.push(f);
- }
- const s = o.map((l) => Math.abs(t - l));
- return o[s.indexOf(Math.min(...s))];
- }
- function hoe(t) {
- const e = t.toString();
- let n = 0;
- return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
- }
- function D9(t, e) {
- let n = 1;
- return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
- }
- function R9(t, e) {
- let n = 1;
- return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
- }
- function k9(t, e) {
- const n = e.getBoundingClientRect();
- return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
- }
- function j8(t, e) {
- let {
- max: n,
- min: r
- } = e;
- return t <= r ? r : t >= n ? n : t;
- }
- function poe(t, e) {
- const {
- step: n
- } = e, r = isFinite(I9(t, e)) ? I9(t, e) : 0;
- return n === null ? r : parseFloat(r.toFixed(hoe(n)));
- }
- function zg(t) {
- t.stopPropagation(), t.preventDefault();
- }
- function jWe(t, e, n) {
- const r = {
- increase: (o, s) => o + s,
- decrease: (o, s) => o - s
- }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
- return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
- }
- function voe(t, e, n) {
- const r = "increase", i = "decrease";
- let a = r;
- switch (t.keyCode) {
- case Me.UP:
- a = e && n ? i : r;
- break;
- case Me.RIGHT:
- a = !e && n ? i : r;
- break;
- case Me.DOWN:
- a = e && n ? r : i;
- break;
- case Me.LEFT:
- a = !e && n ? r : i;
- break;
- case Me.END:
- return (o, s) => s.max;
- case Me.HOME:
- return (o, s) => s.min;
- case Me.PAGE_UP:
- return (o, s) => o + s.step * 2;
- case Me.PAGE_DOWN:
- return (o, s) => o - s.step * 2;
- default:
- return;
- }
- return (o, s) => jWe(a, o, s);
- }
- var ZWe = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- function sd() {
- }
- function goe(t) {
- const e = {
- id: String,
- min: Number,
- max: Number,
- step: Number,
- marks: oe.object,
- included: {
- type: Boolean,
- default: void 0
- },
- prefixCls: String,
- disabled: {
- type: Boolean,
- default: void 0
- },
- handle: Function,
- dots: {
- type: Boolean,
- default: void 0
- },
- vertical: {
- type: Boolean,
- default: void 0
- },
- reverse: {
- type: Boolean,
- default: void 0
- },
- minimumTrackStyle: oe.object,
- maximumTrackStyle: oe.object,
- handleStyle: oe.oneOfType([oe.object, oe.arrayOf(oe.object)]),
- trackStyle: oe.oneOfType([oe.object, oe.arrayOf(oe.object)]),
- railStyle: oe.object,
- dotStyle: oe.object,
- activeDotStyle: oe.object,
- autofocus: {
- type: Boolean,
- default: void 0
- },
- draggableTrack: {
- type: Boolean,
- default: void 0
- }
- };
- return ae({
- compatConfig: {
- MODE: 3
- },
- name: "CreateSlider",
- mixins: [A2, t],
- inheritAttrs: !1,
- props: li(e, {
- prefixCls: "rc-slider",
- min: 0,
- max: 100,
- step: 1,
- marks: {},
- included: !0,
- disabled: !1,
- dots: !1,
- vertical: !1,
- reverse: !1,
- trackStyle: [{}],
- handleStyle: [{}],
- railStyle: {},
- dotStyle: {},
- activeDotStyle: {}
- }),
- emits: ["change", "blur", "focus"],
- data() {
- const {
- step: n,
- max: r,
- min: i
- } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
- return aa(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
- },
- mounted() {
- this.$nextTick(() => {
- this.document = this.sliderRef && this.sliderRef.ownerDocument;
- const {
- autofocus: n,
- disabled: r
- } = this;
- n && !r && this.focus();
- });
- },
- beforeUnmount() {
- this.$nextTick(() => {
- this.removeDocumentEvents();
- });
- },
- methods: {
- defaultHandle(n) {
- var {
- index: r,
- directives: i,
- className: a,
- style: o
- } = n, s = ZWe(n, ["index", "directives", "className", "style"]);
- if (delete s.dragging, s.value === null)
- return null;
- const l = k(k({}, s), {
- class: a,
- style: o,
- key: r
- });
- return D(foe, l, null);
- },
- onDown(n, r) {
- let i = r;
- const {
- draggableTrack: a,
- vertical: o
- } = this.$props, {
- bounds: s
- } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = SE(n, this.handlesRefs);
- if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
- const d = f ? !0 : c >= s[f];
- return f === l.length - 1 ? c <= s[f] : d;
- }).some((c) => !c), this.dragTrack)
- this.dragOffset = i, this.startBounds = [...s];
- else {
- if (!u)
- this.dragOffset = 0;
- else {
- const c = k9(o, n.target);
- this.dragOffset = i - c, i = c;
- }
- this.onStart(i);
- }
- },
- onMouseDown(n) {
- if (n.button !== 0)
- return;
- this.removeDocumentEvents();
- const r = this.$props.vertical, i = D9(r, n);
- this.onDown(n, i), this.addDocumentMouseEvents();
- },
- onTouchStart(n) {
- if (M9(n)) return;
- const r = this.vertical, i = R9(r, n);
- this.onDown(n, i), this.addDocumentTouchEvents(), zg(n);
- },
- onFocus(n) {
- const {
- vertical: r
- } = this;
- if (SE(n, this.handlesRefs) && !this.dragTrack) {
- const i = k9(r, n.target);
- this.dragOffset = 0, this.onStart(i), zg(n), this.$emit("focus", n);
- }
- },
- onBlur(n) {
- this.dragTrack || this.onEnd(), this.$emit("blur", n);
- },
- onMouseUp() {
- this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
- },
- onMouseMove(n) {
- if (!this.sliderRef) {
- this.onEnd();
- return;
- }
- const r = D9(this.vertical, n);
- this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
- },
- onTouchMove(n) {
- if (M9(n) || !this.sliderRef) {
- this.onEnd();
- return;
- }
- const r = R9(this.vertical, n);
- this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
- },
- onKeyDown(n) {
- this.sliderRef && SE(n, this.handlesRefs) && this.onKeyboard(n);
- },
- onClickMarkLabel(n, r) {
- n.stopPropagation(), this.onChange({
- sValue: r
- }), this.setState({
- sValue: r
- }, () => this.onEnd(!0));
- },
- getSliderStart() {
- const n = this.sliderRef, {
- vertical: r,
- reverse: i
- } = this, a = n.getBoundingClientRect();
- return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
- },
- getSliderLength() {
- const n = this.sliderRef;
- if (!n)
- return 0;
- const r = n.getBoundingClientRect();
- return this.vertical ? r.height : r.width;
- },
- addDocumentTouchEvents() {
- this.onTouchMoveListener = yi(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = yi(this.document, "touchend", this.onEnd);
- },
- addDocumentMouseEvents() {
- this.onMouseMoveListener = yi(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = yi(this.document, "mouseup", this.onEnd);
- },
- removeDocumentEvents() {
- this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
- },
- focus() {
- var n;
- this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
- },
- blur() {
- this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
- var r, i;
- (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
- });
- },
- calcValue(n) {
- const {
- vertical: r,
- min: i,
- max: a
- } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
- return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
- },
- calcValueByPos(n) {
- const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
- return this.trimAlignValue(this.calcValue(i));
- },
- calcOffset(n) {
- const {
- min: r,
- max: i
- } = this, a = (n - r) / (i - r);
- return Math.max(0, a * 100);
- },
- saveSlider(n) {
- this.sliderRef = n;
- },
- saveHandle(n, r) {
- this.handlesRefs[n] = r;
- }
- },
- render() {
- const {
- prefixCls: n,
- marks: r,
- dots: i,
- step: a,
- included: o,
- disabled: s,
- vertical: l,
- reverse: u,
- min: c,
- max: f,
- maximumTrackStyle: d,
- railStyle: h,
- dotStyle: p,
- activeDotStyle: v,
- id: g
- } = this, {
- class: m,
- style: y
- } = this.$attrs, {
- tracks: _,
- handles: O
- } = this.renderSlider(), S = Re(n, m, {
- [`${n}-with-marks`]: Object.keys(r).length,
- [`${n}-disabled`]: s,
- [`${n}-vertical`]: l,
- [`${n}-horizontal`]: !l
- }), x = {
- vertical: l,
- marks: r,
- included: o,
- lowerBound: this.getLowerBound(),
- upperBound: this.getUpperBound(),
- max: f,
- min: c,
- reverse: u,
- class: `${n}-mark`,
- onClickLabel: s ? sd : this.onClickMarkLabel
- }, C = {
- [mi ? "onTouchstartPassive" : "onTouchstart"]: s ? sd : this.onTouchStart
- };
- return D("div", te(te({
- id: g,
- ref: this.saveSlider,
- tabindex: "-1",
- class: S
- }, C), {}, {
- onMousedown: s ? sd : this.onMouseDown,
- onMouseup: s ? sd : this.onMouseUp,
- onKeydown: s ? sd : this.onKeyDown,
- onFocus: s ? sd : this.onFocus,
- onBlur: s ? sd : this.onBlur,
- style: y
- }), [D("div", {
- class: `${n}-rail`,
- style: k(k({}, d), h)
- }, null), _, D(uoe, {
- prefixCls: n,
- vertical: l,
- reverse: u,
- marks: r,
- dots: i,
- step: a,
- included: o,
- lowerBound: this.getLowerBound(),
- upperBound: this.getUpperBound(),
- max: f,
- min: c,
- dotStyle: p,
- activeDotStyle: v
- }, null), O, D(coe, x, {
- mark: this.$slots.mark
- }), Ine(this)]);
- }
- });
- }
- const UWe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Slider",
- mixins: [A2],
- inheritAttrs: !1,
- props: {
- defaultValue: Number,
- value: Number,
- disabled: {
- type: Boolean,
- default: void 0
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- tabindex: oe.oneOfType([oe.number, oe.string]),
- reverse: {
- type: Boolean,
- default: void 0
- },
- min: Number,
- max: Number,
- ariaLabelForHandle: String,
- ariaLabelledByForHandle: String,
- ariaValueTextFormatterForHandle: String,
- startPoint: Number
- },
- emits: ["beforeChange", "afterChange", "change"],
- data() {
- const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
- return {
- sValue: this.trimAlignValue(e),
- dragging: !1
- };
- },
- watch: {
- value: {
- handler(t) {
- this.setChangeValue(t);
- },
- deep: !0
- },
- min() {
- const {
- sValue: t
- } = this;
- this.setChangeValue(t);
- },
- max() {
- const {
- sValue: t
- } = this;
- this.setChangeValue(t);
- }
- },
- methods: {
- setChangeValue(t) {
- const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
- n !== this.sValue && (this.setState({
- sValue: n
- }), doe(e, this.$props) && this.$emit("change", n));
- },
- onChange(t) {
- const e = !Zw(this, "value"), n = t.sValue > this.max ? k(k({}, t), {
- sValue: this.max
- }) : t;
- e && this.setState(n);
- const r = n.sValue;
- this.$emit("change", r);
- },
- onStart(t) {
- this.setState({
- dragging: !0
- });
- const {
- sValue: e
- } = this;
- this.$emit("beforeChange", e);
- const n = this.calcValueByPos(t);
- this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
- sValue: n
- }));
- },
- onEnd(t) {
- const {
- dragging: e
- } = this;
- this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
- dragging: !1
- });
- },
- onMove(t, e) {
- zg(t);
- const {
- sValue: n
- } = this, r = this.calcValueByPos(e);
- r !== n && this.onChange({
- sValue: r
- });
- },
- onKeyboard(t) {
- const {
- reverse: e,
- vertical: n
- } = this.$props, r = voe(t, n, e);
- if (r) {
- zg(t);
- const {
- sValue: i
- } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
- if (o === i) return;
- this.onChange({
- sValue: o
- }), this.$emit("afterChange", o), this.onEnd();
- }
- },
- getLowerBound() {
- const t = this.$props.startPoint || this.$props.min;
- return this.$data.sValue > t ? t : this.$data.sValue;
- },
- getUpperBound() {
- return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
- },
- trimAlignValue(t) {
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- if (t === null)
- return null;
- const n = k(k({}, this.$props), e), r = j8(t, n);
- return poe(r, n);
- },
- getTrack(t) {
- let {
- prefixCls: e,
- reverse: n,
- vertical: r,
- included: i,
- minimumTrackStyle: a,
- mergedTrackStyle: o,
- length: s,
- offset: l
- } = t;
- return D(G8, {
- class: `${e}-track`,
- vertical: r,
- included: i,
- offset: l,
- reverse: n,
- length: s,
- style: k(k({}, a), o)
- }, null);
- },
- renderSlider() {
- const {
- prefixCls: t,
- vertical: e,
- included: n,
- disabled: r,
- minimumTrackStyle: i,
- trackStyle: a,
- handleStyle: o,
- tabindex: s,
- ariaLabelForHandle: l,
- ariaLabelledByForHandle: u,
- ariaValueTextFormatterForHandle: c,
- min: f,
- max: d,
- startPoint: h,
- reverse: p,
- handle: v,
- defaultHandle: g
- } = this, m = v || g, {
- sValue: y,
- dragging: _
- } = this, O = this.calcOffset(y), S = m({
- class: `${t}-handle`,
- prefixCls: t,
- vertical: e,
- offset: O,
- value: y,
- dragging: _,
- disabled: r,
- min: f,
- max: d,
- reverse: p,
- index: 0,
- tabindex: s,
- ariaLabel: l,
- ariaLabelledBy: u,
- ariaValueTextFormatter: c,
- style: o[0] || o,
- ref: (P) => this.saveHandle(0, P),
- onFocus: this.onFocus,
- onBlur: this.onBlur
- }), x = h !== void 0 ? this.calcOffset(h) : 0, C = a[0] || a;
- return {
- tracks: this.getTrack({
- prefixCls: t,
- reverse: p,
- vertical: e,
- included: n,
- offset: x,
- minimumTrackStyle: i,
- mergedTrackStyle: C,
- length: O - x
- }),
- handles: S
- };
- }
- }
- }), XWe = goe(UWe), S0 = (t) => {
- let {
- value: e,
- handle: n,
- bounds: r,
- props: i
- } = t;
- const {
- allowCross: a,
- pushable: o
- } = i, s = Number(o), l = j8(e, i);
- let u = l;
- return !a && n != null && r !== void 0 && (n > 0 && l <= r[n - 1] + s && (u = r[n - 1] + s), n < r.length - 1 && l >= r[n + 1] - s && (u = r[n + 1] - s)), poe(u, i);
- }, YWe = {
- defaultValue: oe.arrayOf(oe.number),
- value: oe.arrayOf(oe.number),
- count: Number,
- pushable: m4e(oe.oneOfType([oe.looseBool, oe.number])),
- allowCross: {
- type: Boolean,
- default: void 0
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- reverse: {
- type: Boolean,
- default: void 0
- },
- tabindex: oe.arrayOf(oe.number),
- prefixCls: String,
- min: Number,
- max: Number,
- autofocus: {
- type: Boolean,
- default: void 0
- },
- ariaLabelGroupForHandles: Array,
- ariaLabelledByGroupForHandles: Array,
- ariaValueTextFormatterGroupForHandles: Array,
- draggableTrack: {
- type: Boolean,
- default: void 0
- }
- }, qWe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "Range",
- mixins: [A2],
- inheritAttrs: !1,
- props: li(YWe, {
- count: 1,
- allowCross: !0,
- pushable: !1,
- tabindex: [],
- draggableTrack: !1,
- ariaLabelGroupForHandles: [],
- ariaLabelledByGroupForHandles: [],
- ariaValueTextFormatterGroupForHandles: []
- }),
- emits: ["beforeChange", "afterChange", "change"],
- displayName: "Range",
- data() {
- const {
- count: t,
- min: e,
- max: n
- } = this, r = Array(...Array(t + 1)).map(() => e), i = Zw(this, "defaultValue") ? this.defaultValue : r;
- let {
- value: a
- } = this;
- a === void 0 && (a = i);
- const o = a.map((l, u) => S0({
- value: l,
- handle: u,
- props: this.$props
- }));
- return {
- sHandle: null,
- recent: o[0] === n ? 0 : o.length - 1,
- bounds: o
- };
- },
- watch: {
- value: {
- handler(t) {
- const {
- bounds: e
- } = this;
- this.setChangeValue(t || e);
- },
- deep: !0
- },
- min() {
- const {
- value: t
- } = this;
- this.setChangeValue(t || this.bounds);
- },
- max() {
- const {
- value: t
- } = this;
- this.setChangeValue(t || this.bounds);
- }
- },
- methods: {
- setChangeValue(t) {
- const {
- bounds: e
- } = this;
- let n = t.map((r, i) => S0({
- value: r,
- handle: i,
- bounds: e,
- props: this.$props
- }));
- if (e.length === n.length) {
- if (n.every((r, i) => r === e[i]))
- return null;
- } else
- n = t.map((r, i) => S0({
- value: r,
- handle: i,
- props: this.$props
- }));
- if (this.setState({
- bounds: n
- }), t.some((r) => doe(r, this.$props))) {
- const r = t.map((i) => j8(i, this.$props));
- this.$emit("change", r);
- }
- },
- onChange(t) {
- if (!Zw(this, "value"))
- this.setState(t);
- else {
- const i = {};
- ["sHandle", "recent"].forEach((a) => {
- t[a] !== void 0 && (i[a] = t[a]);
- }), Object.keys(i).length && this.setState(i);
- }
- const r = k(k({}, this.$data), t).bounds;
- this.$emit("change", r);
- },
- positionGetValue(t) {
- const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
- if (n === a) return null;
- const o = [...e];
- return o[i] = n, o;
- },
- onStart(t) {
- const {
- bounds: e
- } = this;
- this.$emit("beforeChange", e);
- const n = this.calcValueByPos(t);
- this.startValue = n, this.startPosition = t;
- const r = this.getClosestBound(n);
- this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
- sHandle: this.prevMovedHandleIndex,
- recent: this.prevMovedHandleIndex
- });
- const i = e[this.prevMovedHandleIndex];
- if (n === i) return;
- const a = [...e];
- a[this.prevMovedHandleIndex] = n, this.onChange({
- bounds: a
- });
- },
- onEnd(t) {
- const {
- sHandle: e
- } = this;
- this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
- sHandle: null
- });
- },
- onMove(t, e, n, r) {
- zg(t);
- const {
- $data: i,
- $props: a
- } = this, o = a.max || 100, s = a.min || 0;
- if (n) {
- let d = a.vertical ? -e : e;
- d = a.reverse ? -d : d;
- const h = o - Math.max(...r), p = s - Math.min(...r), v = Math.min(Math.max(d / (this.getSliderLength() / 100), p), h), g = r.map((m) => Math.floor(Math.max(Math.min(m + v, o), s)));
- i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
- bounds: g
- });
- return;
- }
- const {
- bounds: l,
- sHandle: u
- } = this, c = this.calcValueByPos(e), f = l[u];
- c !== f && this.moveTo(c);
- },
- onKeyboard(t) {
- const {
- reverse: e,
- vertical: n
- } = this.$props, r = voe(t, n, e);
- if (r) {
- zg(t);
- const {
- bounds: i,
- sHandle: a
- } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = S0({
- value: s,
- handle: a,
- bounds: i,
- props: this.$props
- });
- if (l === o) return;
- this.moveTo(l, !0);
- }
- },
- getClosestBound(t) {
- const {
- bounds: e
- } = this;
- let n = 0;
- for (let r = 1; r < e.length - 1; r += 1)
- t >= e[r] && (n = r);
- return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
- },
- getBoundNeedMoving(t, e) {
- const {
- bounds: n,
- recent: r
- } = this;
- let i = e;
- const a = n[e + 1] === n[e];
- return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
- },
- getLowerBound() {
- return this.bounds[0];
- },
- getUpperBound() {
- const {
- bounds: t
- } = this;
- return t[t.length - 1];
- },
- /**
- * Returns an array of possible slider points, taking into account both
- * `marks` and `step`. The result is cached.
- */
- getPoints() {
- const {
- marks: t,
- step: e,
- min: n,
- max: r
- } = this, i = this.internalPointsCache;
- if (!i || i.marks !== t || i.step !== e) {
- const a = k({}, t);
- if (e !== null)
- for (let s = n; s <= r; s += e)
- a[s] = s;
- const o = Object.keys(a).map(parseFloat);
- o.sort((s, l) => s - l), this.internalPointsCache = {
- marks: t,
- step: e,
- points: o
- };
- }
- return this.internalPointsCache.points;
- },
- moveTo(t, e) {
- const n = [...this.bounds], {
- sHandle: r,
- recent: i
- } = this, a = r === null ? i : r;
- n[a] = t;
- let o = a;
- this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
- recent: o,
- sHandle: o,
- bounds: n
- }), e && (this.$emit("afterChange", n), this.setState({}, () => {
- this.handlesRefs[o].focus();
- }), this.onEnd());
- },
- pushSurroundingHandles(t, e) {
- const n = t[e], {
- pushable: r
- } = this, i = Number(r);
- let a = 0;
- if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
- return;
- const o = e + a, s = a * (t[o] - n);
- this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
- },
- pushHandle(t, e, n, r) {
- const i = t[e];
- let a = t[e];
- for (; n * (a - i) < r; ) {
- if (!this.pushHandleOnePoint(t, e, n))
- return t[e] = i, !1;
- a = t[e];
- }
- return !0;
- },
- pushHandleOnePoint(t, e, n) {
- const r = this.getPoints(), a = r.indexOf(t[e]) + n;
- if (a >= r.length || a < 0)
- return !1;
- const o = e + n, s = r[a], {
- pushable: l
- } = this, u = Number(l), c = n * (t[o] - s);
- return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
- },
- trimAlignValue(t) {
- const {
- sHandle: e,
- bounds: n
- } = this;
- return S0({
- value: t,
- handle: e,
- bounds: n,
- props: this.$props
- });
- },
- ensureValueNotConflict(t, e, n) {
- let {
- allowCross: r,
- pushable: i
- } = n;
- const a = this.$data || {}, {
- bounds: o
- } = a;
- if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
- if (t > 0 && e <= o[t - 1] + i)
- return o[t - 1] + i;
- if (t < o.length - 1 && e >= o[t + 1] - i)
- return o[t + 1] - i;
- }
- return e;
- },
- getTrack(t) {
- let {
- bounds: e,
- prefixCls: n,
- reverse: r,
- vertical: i,
- included: a,
- offsets: o,
- trackStyle: s
- } = t;
- return e.slice(0, -1).map((l, u) => {
- const c = u + 1, f = Re({
- [`${n}-track`]: !0,
- [`${n}-track-${c}`]: !0
- });
- return D(G8, {
- class: f,
- vertical: i,
- reverse: r,
- included: a,
- offset: o[c - 1],
- length: o[c] - o[c - 1],
- style: s[u],
- key: c
- }, null);
- });
- },
- renderSlider() {
- const {
- sHandle: t,
- bounds: e,
- prefixCls: n,
- vertical: r,
- included: i,
- disabled: a,
- min: o,
- max: s,
- reverse: l,
- handle: u,
- defaultHandle: c,
- trackStyle: f,
- handleStyle: d,
- tabindex: h,
- ariaLabelGroupForHandles: p,
- ariaLabelledByGroupForHandles: v,
- ariaValueTextFormatterGroupForHandles: g
- } = this, m = u || c, y = e.map((S) => this.calcOffset(S)), _ = `${n}-handle`, O = e.map((S, x) => {
- let C = h[x] || 0;
- (a || h[x] === null) && (C = null);
- const P = t === x;
- return m({
- class: Re({
- [_]: !0,
- [`${_}-${x + 1}`]: !0,
- [`${_}-dragging`]: P
- }),
- prefixCls: n,
- vertical: r,
- dragging: P,
- offset: y[x],
- value: S,
- index: x,
- tabindex: C,
- min: o,
- max: s,
- reverse: l,
- disabled: a,
- style: d[x],
- ref: ($) => this.saveHandle(x, $),
- onFocus: this.onFocus,
- onBlur: this.onBlur,
- ariaLabel: p[x],
- ariaLabelledBy: v[x],
- ariaValueTextFormatter: g[x]
- });
- });
- return {
- tracks: this.getTrack({
- bounds: e,
- prefixCls: n,
- reverse: l,
- vertical: r,
- included: i,
- offsets: y,
- trackStyle: f
- }),
- handles: O
- };
- }
- }
- }), KWe = goe(qWe), JWe = ae({
- compatConfig: {
- MODE: 3
- },
- name: "SliderTooltip",
- inheritAttrs: !1,
- props: wie(),
- setup(t, e) {
- let {
- attrs: n,
- slots: r
- } = e;
- const i = ee(null), a = ee(null);
- function o() {
- en.cancel(a.value), a.value = null;
- }
- function s() {
- a.value = en(() => {
- var u;
- (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
- });
- }
- const l = () => {
- o(), t.open && s();
- };
- return me([() => t.open, () => t.title], () => {
- l();
- }, {
- flush: "post",
- immediate: !0
- }), hxe(() => {
- l();
- }), Qt(() => {
- o();
- }), () => D(F2, te(te({
- ref: i
- }, t), n), r);
- }
- }), e7e = (t) => {
- const {
- componentCls: e,
- controlSize: n,
- dotSize: r,
- marginFull: i,
- marginPart: a,
- colorFillContentHover: o
- } = t;
- return {
- [e]: k(k({}, Gn(t)), {
- position: "relative",
- height: n,
- margin: `${a}px ${i}px`,
- padding: 0,
- cursor: "pointer",
- touchAction: "none",
- "&-vertical": {
- margin: `${i}px ${a}px`
- },
- [`${e}-rail`]: {
- position: "absolute",
- backgroundColor: t.colorFillTertiary,
- borderRadius: t.borderRadiusXS,
- transition: `background-color ${t.motionDurationMid}`
- },
- [`${e}-track`]: {
- position: "absolute",
- backgroundColor: t.colorPrimaryBorder,
- borderRadius: t.borderRadiusXS,
- transition: `background-color ${t.motionDurationMid}`
- },
- "&:hover": {
- [`${e}-rail`]: {
- backgroundColor: t.colorFillSecondary
- },
- [`${e}-track`]: {
- backgroundColor: t.colorPrimaryBorderHover
- },
- [`${e}-dot`]: {
- borderColor: o
- },
- [`${e}-handle::after`]: {
- boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
- },
- [`${e}-dot-active`]: {
- borderColor: t.colorPrimary
- }
- },
- [`${e}-handle`]: {
- position: "absolute",
- width: t.handleSize,
- height: t.handleSize,
- outline: "none",
- [`${e}-dragging`]: {
- zIndex: 1
- },
- // 扩大选区
- "&::before": {
- content: '""',
- position: "absolute",
- insetInlineStart: -t.handleLineWidth,
- insetBlockStart: -t.handleLineWidth,
- width: t.handleSize + t.handleLineWidth * 2,
- height: t.handleSize + t.handleLineWidth * 2,
- backgroundColor: "transparent"
- },
- "&::after": {
- content: '""',
- position: "absolute",
- insetBlockStart: 0,
- insetInlineStart: 0,
- width: t.handleSize,
- height: t.handleSize,
- backgroundColor: t.colorBgElevated,
- boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
- borderRadius: "50%",
- cursor: "pointer",
- transition: `
- inset-inline-start ${t.motionDurationMid},
- inset-block-start ${t.motionDurationMid},
- width ${t.motionDurationMid},
- height ${t.motionDurationMid},
- box-shadow ${t.motionDurationMid}
- `
- },
- "&:hover, &:active, &:focus": {
- "&::before": {
- insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
- insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
- width: t.handleSizeHover + t.handleLineWidthHover * 2,
- height: t.handleSizeHover + t.handleLineWidthHover * 2
- },
- "&::after": {
- boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
- width: t.handleSizeHover,
- height: t.handleSizeHover,
- insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
- insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
- }
- }
- },
- [`${e}-mark`]: {
- position: "absolute",
- fontSize: t.fontSize
- },
- [`${e}-mark-text`]: {
- position: "absolute",
- display: "inline-block",
- color: t.colorTextDescription,
- textAlign: "center",
- wordBreak: "keep-all",
- cursor: "pointer",
- userSelect: "none",
- "&-active": {
- color: t.colorText
- }
- },
- [`${e}-step`]: {
- position: "absolute",
- background: "transparent",
- pointerEvents: "none"
- },
- [`${e}-dot`]: {
- position: "absolute",
- width: r,
- height: r,
- backgroundColor: t.colorBgElevated,
- border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
- borderRadius: "50%",
- cursor: "pointer",
- transition: `border-color ${t.motionDurationSlow}`,
- "&-active": {
- borderColor: t.colorPrimaryBorder
- }
- },
- [`&${e}-disabled`]: {
- cursor: "not-allowed",
- [`${e}-rail`]: {
- backgroundColor: `${t.colorFillSecondary} !important`
- },
- [`${e}-track`]: {
- backgroundColor: `${t.colorTextDisabled} !important`
- },
- [`
- ${e}-dot
- `]: {
- backgroundColor: t.colorBgElevated,
- borderColor: t.colorTextDisabled,
- boxShadow: "none",
- cursor: "not-allowed"
- },
- [`${e}-handle::after`]: {
- backgroundColor: t.colorBgElevated,
- cursor: "not-allowed",
- width: t.handleSize,
- height: t.handleSize,
- boxShadow: `0 0 0 ${t.handleLineWidth}px ${new Hn(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
- insetInlineStart: 0,
- insetBlockStart: 0
- },
- [`
- ${e}-mark-text,
- ${e}-dot
- `]: {
- cursor: "not-allowed !important"
- }
- }
- })
- };
- }, moe = (t, e) => {
- const {
- componentCls: n,
- railSize: r,
- handleSize: i,
- dotSize: a
- } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
- return {
- [o]: r,
- [l]: r * 3,
- [`${n}-rail`]: {
- [s]: "100%",
- [l]: r
- },
- [`${n}-track`]: {
- [l]: r
- },
- [`${n}-handle`]: {
- [u]: (r * 3 - i) / 2
- },
- [`${n}-mark`]: {
- // Reset all
- insetInlineStart: 0,
- top: 0,
- [c]: i,
- [s]: "100%"
- },
- [`${n}-step`]: {
- // Reset all
- insetInlineStart: 0,
- top: 0,
- [c]: r,
- [s]: "100%",
- [l]: r
- },
- [`${n}-dot`]: {
- position: "absolute",
- [u]: (r - a) / 2
- }
- };
- }, t7e = (t) => {
- const {
- componentCls: e,
- marginPartWithMark: n
- } = t;
- return {
- [`${e}-horizontal`]: k(k({}, moe(t, !0)), {
- [`&${e}-with-marks`]: {
- marginBottom: n
- }
- })
- };
- }, n7e = (t) => {
- const {
- componentCls: e
- } = t;
- return {
- [`${e}-vertical`]: k(k({}, moe(t, !1)), {
- height: "100%"
- })
- };
- }, r7e = pr("Slider", (t) => {
- const e = bn(t, {
- marginPart: (t.controlHeight - t.controlSize) / 2,
- marginFull: t.controlSize / 2,
- marginPartWithMark: t.controlHeightLG - t.controlSize
- });
- return [e7e(e), t7e(e), n7e(e)];
- }, (t) => {
- const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
- return {
- controlSize: n,
- railSize: 4,
- handleSize: n,
- handleSizeHover: r,
- dotSize: 8,
- handleLineWidth: i,
- handleLineWidthHover: a
- };
- });
- var L9 = function(t, e) {
- var n = {};
- for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
- if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
- return n;
- };
- const i7e = (t) => typeof t == "number" ? t.toString() : "", a7e = () => ({
- id: String,
- prefixCls: String,
- tooltipPrefixCls: String,
- range: or([Boolean, Object]),
- reverse: Tt(),
- min: Number,
- max: Number,
- step: or([Object, Number]),
- marks: sn(),
- dots: Tt(),
- value: or([Array, Number]),
- defaultValue: or([Array, Number]),
- included: Tt(),
- disabled: Tt(),
- vertical: Tt(),
- tipFormatter: or([Function, Object], () => i7e),
- tooltipOpen: Tt(),
- /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
- tooltipVisible: Tt(),
- tooltipPlacement: rr(),
- getTooltipPopupContainer: Ct(),
- autofocus: Tt(),
- handleStyle: or([Array, Object]),
- trackStyle: or([Array, Object]),
- onChange: Ct(),
- onAfterChange: Ct(),
- onFocus: Ct(),
- onBlur: Ct(),
- "onUpdate:value": Ct()
- }), o7e = ae({
- compatConfig: {
- MODE: 3
- },
- name: "ASlider",
- inheritAttrs: !1,
- props: a7e(),
- // emits: ['update:value', 'change', 'afterChange', 'blur'],
- slots: Object,
- setup(t, e) {
- let {
- attrs: n,
- slots: r,
- emit: i,
- expose: a
- } = e;
- process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((C) => {
- let [P, $] = C;
- lo(t.tooltipVisible === void 0, "Slider", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
- });
- const {
- prefixCls: o,
- rootPrefixCls: s,
- direction: l,
- getPopupContainer: u,
- configProvider: c
- } = hn("slider", t), [f, d] = r7e(o), h = Ul(), p = ee(), v = ee({}), g = (C, P) => {
- v.value[C] = P;
- }, m = V(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
- var C;
- (C = p.value) === null || C === void 0 || C.focus();
- }, _ = () => {
- var C;
- (C = p.value) === null || C === void 0 || C.blur();
- }, O = (C) => {
- i("update:value", C), i("change", C), h.onFieldChange();
- }, S = (C) => {
- i("blur", C);
- };
- a({
- focus: y,
- blur: _
- });
- const x = (C) => {
- var {
- tooltipPrefixCls: P
- } = C, $ = C.info, {
- value: T,
- dragging: E,
- index: M
- } = $, R = L9($, ["value", "dragging", "index"]);
- const {
- tipFormatter: N,
- tooltipOpen: I = t.tooltipVisible,
- getTooltipPopupContainer: B
- } = t, Q = N ? v.value[M] || E : !1, W = I || I === void 0 && Q;
- return D(JWe, {
- prefixCls: P,
- title: N ? N(T) : "",
- open: W,
- placement: m.value,
- transitionName: `${s.value}-zoom-down`,
- key: M,
- overlayClassName: `${o.value}-tooltip`,
- getPopupContainer: B || (u == null ? void 0 : u.value)
- }, {
- default: () => [D(foe, te(te({}, R), {}, {
- value: T,
- onMouseenter: () => g(M, !0),
- onMouseleave: () => g(M, !1)
- }), null)]
- });
- };
- return () => {
- const {
- tooltipPrefixCls: C,
- range: P,
- id: $ = h.id.value
- } = t, T = L9(t, ["tooltipPrefixCls", "range", "id"]), E = c.getPrefixCls("tooltip", C), M = Re(n.class, {
- [`${o.value}-rtl`]: l.value === "rtl"
- }, d.value);
- l.value === "rtl" && !T.vertical && (T.reverse = !T.reverse);
- let R;
- return typeof P == "object" && (R = P.draggableTrack), f(P ? D(KWe, te(te(te({}, n), T), {}, {
- step: T.step,
- draggableTrack: R,
- class: M,
- ref: p,
- handle: (N) => x({
- tooltipPrefixCls: E,
- prefixCls: o.value,
- info: N
- }),
- prefixCls: o.value,
- onChange: O,
- onBlur: S
- }), {
- mark: r.mark
- }) : D(XWe, te(te(te({}, n), T), {}, {
- id: $,
- step: T.step,
- class: M,
- ref: p,
- handle: (N) => x({
- tooltipPrefixCls: E,
- prefixCls: o.value,
- info: N
- }),
- prefixCls: o.value,
- onChange: O,
- onBlur: S
- }), {
- mark: r.mark
- }));
- };
- }
- }), s7e = fm(o7e);
- var l7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-center", theme: "outlined" };
- function N9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- u7e(t, i, n[i]);
- });
- }
- return t;
- }
- function u7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Z8 = function(e, n) {
- var r = N9({}, e, n.attrs);
- return D(Rt, N9({}, r, {
- icon: l7e
- }), null);
- };
- Z8.displayName = "AlignCenterOutlined";
- Z8.inheritAttrs = !1;
- var c7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-left", theme: "outlined" };
- function B9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- f7e(t, i, n[i]);
- });
- }
- return t;
- }
- function f7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var U8 = function(e, n) {
- var r = B9({}, e, n.attrs);
- return D(Rt, B9({}, r, {
- icon: c7e
- }), null);
- };
- U8.displayName = "AlignLeftOutlined";
- U8.inheritAttrs = !1;
- var d7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-right", theme: "outlined" };
- function z9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- h7e(t, i, n[i]);
- });
- }
- return t;
- }
- function h7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var X8 = function(e, n) {
- var r = z9({}, e, n.attrs);
- return D(Rt, z9({}, r, {
- icon: d7e
- }), null);
- };
- X8.displayName = "AlignRightOutlined";
- X8.inheritAttrs = !1;
- var p7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z" } }] }, name: "bold", theme: "outlined" };
- function V9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- v7e(t, i, n[i]);
- });
- }
- return t;
- }
- function v7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var Y8 = function(e, n) {
- var r = V9({}, e, n.attrs);
- return D(Rt, V9({}, r, {
- icon: p7e
- }), null);
- };
- Y8.displayName = "BoldOutlined";
- Y8.inheritAttrs = !1;
- var g7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 808H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-720-94h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-498h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm166 166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm222-72h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388 426h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, name: "border-bottom", theme: "outlined" };
- function F9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- m7e(t, i, n[i]);
- });
- }
- return t;
- }
- function m7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var q8 = function(e, n) {
- var r = F9({}, e, n.attrs);
- return D(Rt, F9({}, r, {
- icon: g7e
- }), null);
- };
- q8.displayName = "BorderBottomOutlined";
- q8.inheritAttrs = !1;
- var y7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M208 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM540 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-left", theme: "outlined" };
- function W9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- b7e(t, i, n[i]);
- });
- }
- return t;
- }
- function b7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var K8 = function(e, n) {
- var r = W9({}, e, n.attrs);
- return D(Rt, W9({}, r, {
- icon: y7e
- }), null);
- };
- K8.displayName = "BorderLeftOutlined";
- K8.inheritAttrs = !1;
- var _7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-right", theme: "outlined" };
- function Q9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- O7e(t, i, n[i]);
- });
- }
- return t;
- }
- function O7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var J8 = function(e, n) {
- var r = Q9({}, e, n.attrs);
- return D(Rt, Q9({}, r, {
- icon: _7e
- }), null);
- };
- J8.displayName = "BorderRightOutlined";
- J8.inheritAttrs = !1;
- var S7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332-498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-top", theme: "outlined" };
- function H9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- x7e(t, i, n[i]);
- });
- }
- return t;
- }
- function x7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var e5 = function(e, n) {
- var r = H9({}, e, n.attrs);
- return D(Rt, H9({}, r, {
- icon: S7e
- }), null);
- };
- e5.displayName = "BorderTopOutlined";
- e5.inheritAttrs = !1;
- var w7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "database", theme: "outlined" };
- function G9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- C7e(t, i, n[i]);
- });
- }
- return t;
- }
- function C7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var K_ = function(e, n) {
- var r = G9({}, e, n.attrs);
- return D(Rt, G9({}, r, {
- icon: w7e
- }), null);
- };
- K_.displayName = "DatabaseOutlined";
- K_.inheritAttrs = !1;
- var T7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z" } }] }, name: "font-colors", theme: "outlined" };
- function j9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- P7e(t, i, n[i]);
- });
- }
- return t;
- }
- function P7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var t5 = function(e, n) {
- var r = j9({}, e, n.attrs);
- return D(Rt, j9({}, r, {
- icon: T7e
- }), null);
- };
- t5.displayName = "FontColorsOutlined";
- t5.inheritAttrs = !1;
- var $7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "italic", theme: "outlined" };
- function Z9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- A7e(t, i, n[i]);
- });
- }
- return t;
- }
- function A7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var n5 = function(e, n) {
- var r = Z9({}, e, n.attrs);
- return D(Rt, Z9({}, r, {
- icon: $7e
- }), null);
- };
- n5.displayName = "ItalicOutlined";
- n5.inheritAttrs = !1;
- var E7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M712 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm2-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM136 374h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-174h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm752 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-230 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 624H358c-87.3 0-158-70.7-158-158V484c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v182c0 127 103 230 230 230h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomleft", theme: "outlined" };
- function U9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- M7e(t, i, n[i]);
- });
- }
- return t;
- }
- function M7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var r5 = function(e, n) {
- var r = U9({}, e, n.attrs);
- return D(Rt, U9({}, r, {
- icon: E7e
- }), null);
- };
- r5.displayName = "RadiusBottomleftOutlined";
- r5.inheritAttrs = !1;
- var I7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-58-624h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm578 102h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm292 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm174 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 276h-56c-4.4 0-8 3.6-8 8v182c0 87.3-70.7 158-158 158H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c127 0 230-103 230-230V484c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomright", theme: "outlined" };
- function X9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- D7e(t, i, n[i]);
- });
- }
- return t;
- }
- function D7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var i5 = function(e, n) {
- var r = X9({}, e, n.attrs);
- return D(Rt, X9({}, r, {
- icon: I7e
- }), null);
- };
- i5.displayName = "RadiusBottomrightOutlined";
- i5.inheritAttrs = !1;
- var R7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M656 200h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm58 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 650h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm696-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174-696H358c-127 0-230 103-230 230v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-87.3 70.7-158 158-158h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-upleft", theme: "outlined" };
- function Y9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- k7e(t, i, n[i]);
- });
- }
- return t;
- }
- function k7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var a5 = function(e, n) {
- var r = Y9({}, e, n.attrs);
- return D(Rt, Y9({}, r, {
- icon: R7e
- }), null);
- };
- a5.displayName = "RadiusUpleftOutlined";
- a5.inheritAttrs = !1;
- var L7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-2 696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm522-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-48-696H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c87.3 0 158 70.7 158 158v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-127-103-230-230-230z" } }] }, name: "radius-upright", theme: "outlined" };
- function q9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- N7e(t, i, n[i]);
- });
- }
- return t;
- }
- function N7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var o5 = function(e, n) {
- var r = q9({}, e, n.attrs);
- return D(Rt, q9({}, r, {
- icon: L7e
- }), null);
- };
- o5.displayName = "RadiusUprightOutlined";
- o5.inheritAttrs = !1;
- var B7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, name: "setting", theme: "outlined" };
- function K9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- z7e(t, i, n[i]);
- });
- }
- return t;
- }
- function z7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var vC = function(e, n) {
- var r = K9({}, e, n.attrs);
- return D(Rt, K9({}, r, {
- icon: B7e
- }), null);
- };
- vC.displayName = "SettingOutlined";
- vC.inheritAttrs = !1;
- var V7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z" } }] }, name: "skin", theme: "outlined" };
- function J9(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
- typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
- }))), r.forEach(function(i) {
- F7e(t, i, n[i]);
- });
- }
- return t;
- }
- function F7e(t, e, n) {
- return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
- }
- var J_ = function(e, n) {
- var r = J9({}, e, n.attrs);
- return D(Rt, J9({}, r, {
- icon: V7e
- }), null);
- };
- J_.displayName = "SkinOutlined";
- J_.inheritAttrs = !1;
- function yoe(t, e) {
- return function() {
- return t.apply(e, arguments);
- };
- }
- const { toString: W7e } = Object.prototype, { getPrototypeOf: s5 } = Object, J2 = /* @__PURE__ */ ((t) => (e) => {
- const n = W7e.call(e);
- return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
- })(/* @__PURE__ */ Object.create(null)), Ks = (t) => (t = t.toLowerCase(), (e) => J2(e) === t), eP = (t) => (e) => typeof e === t, { isArray: vm } = Array, Bb = eP("undefined");
- function Q7e(t) {
- return t !== null && !Bb(t) && t.constructor !== null && !Bb(t.constructor) && Yo(t.constructor.isBuffer) && t.constructor.isBuffer(t);
- }
- const boe = Ks("ArrayBuffer");
- function H7e(t) {
- let e;
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && boe(t.buffer), e;
- }
- const G7e = eP("string"), Yo = eP("function"), _oe = eP("number"), tP = (t) => t !== null && typeof t == "object", j7e = (t) => t === !0 || t === !1, rw = (t) => {
- if (J2(t) !== "object")
- return !1;
- const e = s5(t);
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
- }, Z7e = Ks("Date"), U7e = Ks("File"), X7e = Ks("Blob"), Y7e = Ks("FileList"), q7e = (t) => tP(t) && Yo(t.pipe), K7e = (t) => {
- let e;
- return t && (typeof FormData == "function" && t instanceof FormData || Yo(t.append) && ((e = J2(t)) === "formdata" || // detect form-data instance
- e === "object" && Yo(t.toString) && t.toString() === "[object FormData]"));
- }, J7e = Ks("URLSearchParams"), [eQe, tQe, nQe, rQe] = ["ReadableStream", "Request", "Response", "Headers"].map(Ks), iQe = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- function e1(t, e, { allOwnKeys: n = !1 } = {}) {
- if (t === null || typeof t > "u")
- return;
- let r, i;
- if (typeof t != "object" && (t = [t]), vm(t))
- for (r = 0, i = t.length; r < i; r++)
- e.call(null, t[r], r, t);
- else {
- const a = n ? Object.getOwnPropertyNames(t) : Object.keys(t), o = a.length;
- let s;
- for (r = 0; r < o; r++)
- s = a[r], e.call(null, t[s], s, t);
- }
- }
- function Ooe(t, e) {
- e = e.toLowerCase();
- const n = Object.keys(t);
- let r = n.length, i;
- for (; r-- > 0; )
- if (i = n[r], e === i.toLowerCase())
- return i;
- return null;
- }
- const Soe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xoe = (t) => !Bb(t) && t !== Soe;
- function jR() {
- const { caseless: t } = xoe(this) && this || {}, e = {}, n = (r, i) => {
- const a = t && Ooe(e, i) || i;
- rw(e[a]) && rw(r) ? e[a] = jR(e[a], r) : rw(r) ? e[a] = jR({}, r) : vm(r) ? e[a] = r.slice() : e[a] = r;
- };
- for (let r = 0, i = arguments.length; r < i; r++)
- arguments[r] && e1(arguments[r], n);
- return e;
- }
- const aQe = (t, e, n, { allOwnKeys: r } = {}) => (e1(e, (i, a) => {
- n && Yo(i) ? t[a] = yoe(i, n) : t[a] = i;
- }, { allOwnKeys: r }), t), oQe = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), sQe = (t, e, n, r) => {
- t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
- value: e.prototype
- }), n && Object.assign(t.prototype, n);
- }, lQe = (t, e, n, r) => {
- let i, a, o;
- const s = {};
- if (e = e || {}, t == null) return e;
- do {
- for (i = Object.getOwnPropertyNames(t), a = i.length; a-- > 0; )
- o = i[a], (!r || r(o, t, e)) && !s[o] && (e[o] = t[o], s[o] = !0);
- t = n !== !1 && s5(t);
- } while (t && (!n || n(t, e)) && t !== Object.prototype);
- return e;
- }, uQe = (t, e, n) => {
- t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
- const r = t.indexOf(e, n);
- return r !== -1 && r === n;
- }, cQe = (t) => {
- if (!t) return null;
- if (vm(t)) return t;
- let e = t.length;
- if (!_oe(e)) return null;
- const n = new Array(e);
- for (; e-- > 0; )
- n[e] = t[e];
- return n;
- }, fQe = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && s5(Uint8Array)), dQe = (t, e) => {
- const r = (t && t[Symbol.iterator]).call(t);
- let i;
- for (; (i = r.next()) && !i.done; ) {
- const a = i.value;
- e.call(t, a[0], a[1]);
- }
- }, hQe = (t, e) => {
- let n;
- const r = [];
- for (; (n = t.exec(e)) !== null; )
- r.push(n);
- return r;
- }, pQe = Ks("HTMLFormElement"), vQe = (t) => t.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function(n, r, i) {
- return r.toUpperCase() + i;
- }
- ), eH = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), gQe = Ks("RegExp"), woe = (t, e) => {
- const n = Object.getOwnPropertyDescriptors(t), r = {};
- e1(n, (i, a) => {
- let o;
- (o = e(i, a, t)) !== !1 && (r[a] = o || i);
- }), Object.defineProperties(t, r);
- }, mQe = (t) => {
- woe(t, (e, n) => {
- if (Yo(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
- return !1;
- const r = t[n];
- if (Yo(r)) {
- if (e.enumerable = !1, "writable" in e) {
- e.writable = !1;
- return;
- }
- e.set || (e.set = () => {
- throw Error("Can not rewrite read-only method '" + n + "'");
- });
- }
- });
- }, yQe = (t, e) => {
- const n = {}, r = (i) => {
- i.forEach((a) => {
- n[a] = !0;
- });
- };
- return vm(t) ? r(t) : r(String(t).split(e)), n;
- }, bQe = () => {
- }, _Qe = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, xE = "abcdefghijklmnopqrstuvwxyz", tH = "0123456789", Coe = {
- DIGIT: tH,
- ALPHA: xE,
- ALPHA_DIGIT: xE + xE.toUpperCase() + tH
- }, OQe = (t = 16, e = Coe.ALPHA_DIGIT) => {
- let n = "";
- const { length: r } = e;
- for (; t--; )
- n += e[Math.random() * r | 0];
- return n;
- };
- function SQe(t) {
- return !!(t && Yo(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
- }
- const xQe = (t) => {
- const e = new Array(10), n = (r, i) => {
- if (tP(r)) {
- if (e.indexOf(r) >= 0)
- return;
- if (!("toJSON" in r)) {
- e[i] = r;
- const a = vm(r) ? [] : {};
- return e1(r, (o, s) => {
- const l = n(o, i + 1);
- !Bb(l) && (a[s] = l);
- }), e[i] = void 0, a;
- }
- }
- return r;
- };
- return n(t, 0);
- }, wQe = Ks("AsyncFunction"), CQe = (t) => t && (tP(t) || Yo(t)) && Yo(t.then) && Yo(t.catch), Te = {
- isArray: vm,
- isArrayBuffer: boe,
- isBuffer: Q7e,
- isFormData: K7e,
- isArrayBufferView: H7e,
- isString: G7e,
- isNumber: _oe,
- isBoolean: j7e,
- isObject: tP,
- isPlainObject: rw,
- isReadableStream: eQe,
- isRequest: tQe,
- isResponse: nQe,
- isHeaders: rQe,
- isUndefined: Bb,
- isDate: Z7e,
- isFile: U7e,
- isBlob: X7e,
- isRegExp: gQe,
- isFunction: Yo,
- isStream: q7e,
- isURLSearchParams: J7e,
- isTypedArray: fQe,
- isFileList: Y7e,
- forEach: e1,
- merge: jR,
- extend: aQe,
- trim: iQe,
- stripBOM: oQe,
- inherits: sQe,
- toFlatObject: lQe,
- kindOf: J2,
- kindOfTest: Ks,
- endsWith: uQe,
- toArray: cQe,
- forEachEntry: dQe,
- matchAll: hQe,
- isHTMLForm: pQe,
- hasOwnProperty: eH,
- hasOwnProp: eH,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors: woe,
- freezeMethods: mQe,
- toObjectSet: yQe,
- toCamelCase: vQe,
- noop: bQe,
- toFiniteNumber: _Qe,
- findKey: Ooe,
- global: Soe,
- isContextDefined: xoe,
- ALPHABET: Coe,
- generateString: OQe,
- isSpecCompliantForm: SQe,
- toJSONObject: xQe,
- isAsyncFn: wQe,
- isThenable: CQe
- };
- function Ht(t, e, n, r, i) {
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), i && (this.response = i);
- }
- Te.inherits(Ht, Error, {
- toJSON: function() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: Te.toJSONObject(this.config),
- code: this.code,
- status: this.response && this.response.status ? this.response.status : null
- };
- }
- });
- const Toe = Ht.prototype, Poe = {};
- [
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED",
- "ERR_NOT_SUPPORT",
- "ERR_INVALID_URL"
- // eslint-disable-next-line func-names
- ].forEach((t) => {
- Poe[t] = { value: t };
- });
- Object.defineProperties(Ht, Poe);
- Object.defineProperty(Toe, "isAxiosError", { value: !0 });
- Ht.from = (t, e, n, r, i, a) => {
- const o = Object.create(Toe);
- return Te.toFlatObject(t, o, function(l) {
- return l !== Error.prototype;
- }, (s) => s !== "isAxiosError"), Ht.call(o, t.message, e, n, r, i), o.cause = t, o.name = t.name, a && Object.assign(o, a), o;
- };
- const TQe = null;
- function ZR(t) {
- return Te.isPlainObject(t) || Te.isArray(t);
- }
- function $oe(t) {
- return Te.endsWith(t, "[]") ? t.slice(0, -2) : t;
- }
- function nH(t, e, n) {
- return t ? t.concat(e).map(function(i, a) {
- return i = $oe(i), !n && a ? "[" + i + "]" : i;
- }).join(n ? "." : "") : e;
- }
- function PQe(t) {
- return Te.isArray(t) && !t.some(ZR);
- }
- const $Qe = Te.toFlatObject(Te, {}, null, function(e) {
- return /^is[A-Z]/.test(e);
- });
- function nP(t, e, n) {
- if (!Te.isObject(t))
- throw new TypeError("target must be an object");
- e = e || new FormData(), n = Te.toFlatObject(n, {
- metaTokens: !0,
- dots: !1,
- indexes: !1
- }, !1, function(v, g) {
- return !Te.isUndefined(g[v]);
- });
- const r = n.metaTokens, i = n.visitor || c, a = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && Te.isSpecCompliantForm(e);
- if (!Te.isFunction(i))
- throw new TypeError("visitor must be a function");
- function u(p) {
- if (p === null) return "";
- if (Te.isDate(p))
- return p.toISOString();
- if (!l && Te.isBlob(p))
- throw new Ht("Blob is not supported. Use a Buffer instead.");
- return Te.isArrayBuffer(p) || Te.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
- }
- function c(p, v, g) {
- let m = p;
- if (p && !g && typeof p == "object") {
- if (Te.endsWith(v, "{}"))
- v = r ? v : v.slice(0, -2), p = JSON.stringify(p);
- else if (Te.isArray(p) && PQe(p) || (Te.isFileList(p) || Te.endsWith(v, "[]")) && (m = Te.toArray(p)))
- return v = $oe(v), m.forEach(function(_, O) {
- !(Te.isUndefined(_) || _ === null) && e.append(
- // eslint-disable-next-line no-nested-ternary
- o === !0 ? nH([v], O, a) : o === null ? v : v + "[]",
- u(_)
- );
- }), !1;
- }
- return ZR(p) ? !0 : (e.append(nH(g, v, a), u(p)), !1);
- }
- const f = [], d = Object.assign($Qe, {
- defaultVisitor: c,
- convertValue: u,
- isVisitable: ZR
- });
- function h(p, v) {
- if (!Te.isUndefined(p)) {
- if (f.indexOf(p) !== -1)
- throw Error("Circular reference detected in " + v.join("."));
- f.push(p), Te.forEach(p, function(m, y) {
- (!(Te.isUndefined(m) || m === null) && i.call(
- e,
- m,
- Te.isString(y) ? y.trim() : y,
- v,
- d
- )) === !0 && h(m, v ? v.concat(y) : [y]);
- }), f.pop();
- }
- }
- if (!Te.isObject(t))
- throw new TypeError("data must be an object");
- return h(t), e;
- }
- function rH(t) {
- const e = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
- return e[r];
- });
- }
- function l5(t, e) {
- this._pairs = [], t && nP(t, this, e);
- }
- const Aoe = l5.prototype;
- Aoe.append = function(e, n) {
- this._pairs.push([e, n]);
- };
- Aoe.toString = function(e) {
- const n = e ? function(r) {
- return e.call(this, r, rH);
- } : rH;
- return this._pairs.map(function(i) {
- return n(i[0]) + "=" + n(i[1]);
- }, "").join("&");
- };
- function AQe(t) {
- return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function Eoe(t, e, n) {
- if (!e)
- return t;
- const r = n && n.encode || AQe, i = n && n.serialize;
- let a;
- if (i ? a = i(e, n) : a = Te.isURLSearchParams(e) ? e.toString() : new l5(e, n).toString(r), a) {
- const o = t.indexOf("#");
- o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + a;
- }
- return t;
- }
- class iH {
- constructor() {
- this.handlers = [];
- }
- /**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
- use(e, n, r) {
- return this.handlers.push({
- fulfilled: e,
- rejected: n,
- synchronous: r ? r.synchronous : !1,
- runWhen: r ? r.runWhen : null
- }), this.handlers.length - 1;
- }
- /**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- *
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
- */
- eject(e) {
- this.handlers[e] && (this.handlers[e] = null);
- }
- /**
- * Clear all interceptors from the stack
- *
- * @returns {void}
- */
- clear() {
- this.handlers && (this.handlers = []);
- }
- /**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- *
- * @returns {void}
- */
- forEach(e) {
- Te.forEach(this.handlers, function(r) {
- r !== null && e(r);
- });
- }
- }
- const Moe = {
- silentJSONParsing: !0,
- forcedJSONParsing: !0,
- clarifyTimeoutError: !1
- }, EQe = typeof URLSearchParams < "u" ? URLSearchParams : l5, MQe = typeof FormData < "u" ? FormData : null, IQe = typeof Blob < "u" ? Blob : null, DQe = {
- isBrowser: !0,
- classes: {
- URLSearchParams: EQe,
- FormData: MQe,
- Blob: IQe
- },
- protocols: ["http", "https", "file", "blob", "url", "data"]
- }, u5 = typeof window < "u" && typeof document < "u", RQe = ((t) => u5 && ["ReactNative", "NativeScript", "NS"].indexOf(t) < 0)(typeof navigator < "u" && navigator.product), kQe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", LQe = u5 && window.location.href || "http://localhost", NQe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- hasBrowserEnv: u5,
- hasStandardBrowserEnv: RQe,
- hasStandardBrowserWebWorkerEnv: kQe,
- origin: LQe
- }, Symbol.toStringTag, { value: "Module" })), Ls = {
- ...NQe,
- ...DQe
- };
- function BQe(t, e) {
- return nP(t, new Ls.classes.URLSearchParams(), Object.assign({
- visitor: function(n, r, i, a) {
- return Ls.isNode && Te.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
- }
- }, e));
- }
- function zQe(t) {
- return Te.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
- }
- function VQe(t) {
- const e = {}, n = Object.keys(t);
- let r;
- const i = n.length;
- let a;
- for (r = 0; r < i; r++)
- a = n[r], e[a] = t[a];
- return e;
- }
- function Ioe(t) {
- function e(n, r, i, a) {
- let o = n[a++];
- if (o === "__proto__") return !0;
- const s = Number.isFinite(+o), l = a >= n.length;
- return o = !o && Te.isArray(i) ? i.length : o, l ? (Te.hasOwnProp(i, o) ? i[o] = [i[o], r] : i[o] = r, !s) : ((!i[o] || !Te.isObject(i[o])) && (i[o] = []), e(n, r, i[o], a) && Te.isArray(i[o]) && (i[o] = VQe(i[o])), !s);
- }
- if (Te.isFormData(t) && Te.isFunction(t.entries)) {
- const n = {};
- return Te.forEachEntry(t, (r, i) => {
- e(zQe(r), i, n, 0);
- }), n;
- }
- return null;
- }
- function FQe(t, e, n) {
- if (Te.isString(t))
- try {
- return (e || JSON.parse)(t), Te.trim(t);
- } catch (r) {
- if (r.name !== "SyntaxError")
- throw r;
- }
- return (n || JSON.stringify)(t);
- }
- const t1 = {
- transitional: Moe,
- adapter: ["xhr", "http", "fetch"],
- transformRequest: [function(e, n) {
- const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, a = Te.isObject(e);
- if (a && Te.isHTMLForm(e) && (e = new FormData(e)), Te.isFormData(e))
- return i ? JSON.stringify(Ioe(e)) : e;
- if (Te.isArrayBuffer(e) || Te.isBuffer(e) || Te.isStream(e) || Te.isFile(e) || Te.isBlob(e) || Te.isReadableStream(e))
- return e;
- if (Te.isArrayBufferView(e))
- return e.buffer;
- if (Te.isURLSearchParams(e))
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
- let s;
- if (a) {
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
- return BQe(e, this.formSerializer).toString();
- if ((s = Te.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
- const l = this.env && this.env.FormData;
- return nP(
- s ? { "files[]": e } : e,
- l && new l(),
- this.formSerializer
- );
- }
- }
- return a || i ? (n.setContentType("application/json", !1), FQe(e)) : e;
- }],
- transformResponse: [function(e) {
- const n = this.transitional || t1.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json";
- if (Te.isResponse(e) || Te.isReadableStream(e))
- return e;
- if (e && Te.isString(e) && (r && !this.responseType || i)) {
- const o = !(n && n.silentJSONParsing) && i;
- try {
- return JSON.parse(e);
- } catch (s) {
- if (o)
- throw s.name === "SyntaxError" ? Ht.from(s, Ht.ERR_BAD_RESPONSE, this, null, this.response) : s;
- }
- }
- return e;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: Ls.classes.FormData,
- Blob: Ls.classes.Blob
- },
- validateStatus: function(e) {
- return e >= 200 && e < 300;
- },
- headers: {
- common: {
- Accept: "application/json, text/plain, */*",
- "Content-Type": void 0
- }
- }
- };
- Te.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
- t1.headers[t] = {};
- });
- const WQe = Te.toObjectSet([
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
- ]), QQe = (t) => {
- const e = {};
- let n, r, i;
- return t && t.split(`
- `).forEach(function(o) {
- i = o.indexOf(":"), n = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!n || e[n] && WQe[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
- }), e;
- }, aH = Symbol("internals");
- function x0(t) {
- return t && String(t).trim().toLowerCase();
- }
- function iw(t) {
- return t === !1 || t == null ? t : Te.isArray(t) ? t.map(iw) : String(t);
- }
- function HQe(t) {
- const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let r;
- for (; r = n.exec(t); )
- e[r[1]] = r[2];
- return e;
- }
- const GQe = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
- function wE(t, e, n, r, i) {
- if (Te.isFunction(r))
- return r.call(this, e, n);
- if (i && (e = n), !!Te.isString(e)) {
- if (Te.isString(r))
- return e.indexOf(r) !== -1;
- if (Te.isRegExp(r))
- return r.test(e);
- }
- }
- function jQe(t) {
- return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
- }
- function ZQe(t, e) {
- const n = Te.toCamelCase(" " + e);
- ["get", "set", "has"].forEach((r) => {
- Object.defineProperty(t, r + n, {
- value: function(i, a, o) {
- return this[r].call(this, e, i, a, o);
- },
- configurable: !0
- });
- });
- }
- class La {
- constructor(e) {
- e && this.set(e);
- }
- set(e, n, r) {
- const i = this;
- function a(s, l, u) {
- const c = x0(l);
- if (!c)
- throw new Error("header name must be a non-empty string");
- const f = Te.findKey(i, c);
- (!f || i[f] === void 0 || u === !0 || u === void 0 && i[f] !== !1) && (i[f || l] = iw(s));
- }
- const o = (s, l) => Te.forEach(s, (u, c) => a(u, c, l));
- if (Te.isPlainObject(e) || e instanceof this.constructor)
- o(e, n);
- else if (Te.isString(e) && (e = e.trim()) && !GQe(e))
- o(QQe(e), n);
- else if (Te.isHeaders(e))
- for (const [s, l] of e.entries())
- a(l, s, r);
- else
- e != null && a(n, e, r);
- return this;
- }
- get(e, n) {
- if (e = x0(e), e) {
- const r = Te.findKey(this, e);
- if (r) {
- const i = this[r];
- if (!n)
- return i;
- if (n === !0)
- return HQe(i);
- if (Te.isFunction(n))
- return n.call(this, i, r);
- if (Te.isRegExp(n))
- return n.exec(i);
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(e, n) {
- if (e = x0(e), e) {
- const r = Te.findKey(this, e);
- return !!(r && this[r] !== void 0 && (!n || wE(this, this[r], r, n)));
- }
- return !1;
- }
- delete(e, n) {
- const r = this;
- let i = !1;
- function a(o) {
- if (o = x0(o), o) {
- const s = Te.findKey(r, o);
- s && (!n || wE(r, r[s], s, n)) && (delete r[s], i = !0);
- }
- }
- return Te.isArray(e) ? e.forEach(a) : a(e), i;
- }
- clear(e) {
- const n = Object.keys(this);
- let r = n.length, i = !1;
- for (; r--; ) {
- const a = n[r];
- (!e || wE(this, this[a], a, e, !0)) && (delete this[a], i = !0);
- }
- return i;
- }
- normalize(e) {
- const n = this, r = {};
- return Te.forEach(this, (i, a) => {
- const o = Te.findKey(r, a);
- if (o) {
- n[o] = iw(i), delete n[a];
- return;
- }
- const s = e ? jQe(a) : String(a).trim();
- s !== a && delete n[a], n[s] = iw(i), r[s] = !0;
- }), this;
- }
- concat(...e) {
- return this.constructor.concat(this, ...e);
- }
- toJSON(e) {
- const n = /* @__PURE__ */ Object.create(null);
- return Te.forEach(this, (r, i) => {
- r != null && r !== !1 && (n[i] = e && Te.isArray(r) ? r.join(", ") : r);
- }), n;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
- `);
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(e) {
- return e instanceof this ? e : new this(e);
- }
- static concat(e, ...n) {
- const r = new this(e);
- return n.forEach((i) => r.set(i)), r;
- }
- static accessor(e) {
- const r = (this[aH] = this[aH] = {
- accessors: {}
- }).accessors, i = this.prototype;
- function a(o) {
- const s = x0(o);
- r[s] || (ZQe(i, o), r[s] = !0);
- }
- return Te.isArray(e) ? e.forEach(a) : a(e), this;
- }
- }
- La.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
- Te.reduceDescriptors(La.prototype, ({ value: t }, e) => {
- let n = e[0].toUpperCase() + e.slice(1);
- return {
- get: () => t,
- set(r) {
- this[n] = r;
- }
- };
- });
- Te.freezeMethods(La);
- function CE(t, e) {
- const n = this || t1, r = e || n, i = La.from(r.headers);
- let a = r.data;
- return Te.forEach(t, function(s) {
- a = s.call(n, a, i.normalize(), e ? e.status : void 0);
- }), i.normalize(), a;
- }
- function Doe(t) {
- return !!(t && t.__CANCEL__);
- }
- function gm(t, e, n) {
- Ht.call(this, t ?? "canceled", Ht.ERR_CANCELED, e, n), this.name = "CanceledError";
- }
- Te.inherits(gm, Ht, {
- __CANCEL__: !0
- });
- function Roe(t, e, n) {
- const r = n.config.validateStatus;
- !n.status || !r || r(n.status) ? t(n) : e(new Ht(
- "Request failed with status code " + n.status,
- [Ht.ERR_BAD_REQUEST, Ht.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
- n.config,
- n.request,
- n
- ));
- }
- function UQe(t) {
- const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
- return e && e[1] || "";
- }
- function XQe(t, e) {
- t = t || 10;
- const n = new Array(t), r = new Array(t);
- let i = 0, a = 0, o;
- return e = e !== void 0 ? e : 1e3, function(l) {
- const u = Date.now(), c = r[a];
- o || (o = u), n[i] = l, r[i] = u;
- let f = a, d = 0;
- for (; f !== i; )
- d += n[f++], f = f % t;
- if (i = (i + 1) % t, i === a && (a = (a + 1) % t), u - o < e)
- return;
- const h = c && u - c;
- return h ? Math.round(d * 1e3 / h) : void 0;
- };
- }
- function YQe(t, e) {
- let n = 0;
- const r = 1e3 / e;
- let i = null;
- return function() {
- const o = this === !0, s = Date.now();
- if (o || s - n > r)
- return i && (clearTimeout(i), i = null), n = s, t.apply(null, arguments);
- i || (i = setTimeout(() => (i = null, n = Date.now(), t.apply(null, arguments)), r - (s - n)));
- };
- }
- const gC = (t, e, n = 3) => {
- let r = 0;
- const i = XQe(50, 250);
- return YQe((a) => {
- const o = a.loaded, s = a.lengthComputable ? a.total : void 0, l = o - r, u = i(l), c = o <= s;
- r = o;
- const f = {
- loaded: o,
- total: s,
- progress: s ? o / s : void 0,
- bytes: l,
- rate: u || void 0,
- estimated: u && s && c ? (s - o) / u : void 0,
- event: a,
- lengthComputable: s != null
- };
- f[e ? "download" : "upload"] = !0, t(f);
- }, n);
- }, qQe = Ls.hasStandardBrowserEnv ? (
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- function() {
- const e = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
- let r;
- function i(a) {
- let o = a;
- return e && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), {
- href: n.href,
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
- host: n.host,
- search: n.search ? n.search.replace(/^\?/, "") : "",
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
- hostname: n.hostname,
- port: n.port,
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
- };
- }
- return r = i(window.location.href), function(o) {
- const s = Te.isString(o) ? i(o) : o;
- return s.protocol === r.protocol && s.host === r.host;
- };
- }()
- ) : (
- // Non standard browser envs (web workers, react-native) lack needed support.
- /* @__PURE__ */ function() {
- return function() {
- return !0;
- };
- }()
- ), KQe = Ls.hasStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- {
- write(t, e, n, r, i, a) {
- const o = [t + "=" + encodeURIComponent(e)];
- Te.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), Te.isString(r) && o.push("path=" + r), Te.isString(i) && o.push("domain=" + i), a === !0 && o.push("secure"), document.cookie = o.join("; ");
- },
- read(t) {
- const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
- return e ? decodeURIComponent(e[3]) : null;
- },
- remove(t) {
- this.write(t, "", Date.now() - 864e5);
- }
- }
- ) : (
- // Non-standard browser env (web workers, react-native) lack needed support.
- {
- write() {
- },
- read() {
- return null;
- },
- remove() {
- }
- }
- );
- function JQe(t) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
- }
- function e9e(t, e) {
- return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
- }
- function koe(t, e) {
- return t && !JQe(e) ? e9e(t, e) : e;
- }
- const oH = (t) => t instanceof La ? { ...t } : t;
- function Qh(t, e) {
- e = e || {};
- const n = {};
- function r(u, c, f) {
- return Te.isPlainObject(u) && Te.isPlainObject(c) ? Te.merge.call({ caseless: f }, u, c) : Te.isPlainObject(c) ? Te.merge({}, c) : Te.isArray(c) ? c.slice() : c;
- }
- function i(u, c, f) {
- if (Te.isUndefined(c)) {
- if (!Te.isUndefined(u))
- return r(void 0, u, f);
- } else return r(u, c, f);
- }
- function a(u, c) {
- if (!Te.isUndefined(c))
- return r(void 0, c);
- }
- function o(u, c) {
- if (Te.isUndefined(c)) {
- if (!Te.isUndefined(u))
- return r(void 0, u);
- } else return r(void 0, c);
- }
- function s(u, c, f) {
- if (f in e)
- return r(u, c);
- if (f in t)
- return r(void 0, u);
- }
- const l = {
- url: a,
- method: a,
- data: a,
- baseURL: o,
- transformRequest: o,
- transformResponse: o,
- paramsSerializer: o,
- timeout: o,
- timeoutMessage: o,
- withCredentials: o,
- withXSRFToken: o,
- adapter: o,
- responseType: o,
- xsrfCookieName: o,
- xsrfHeaderName: o,
- onUploadProgress: o,
- onDownloadProgress: o,
- decompress: o,
- maxContentLength: o,
- maxBodyLength: o,
- beforeRedirect: o,
- transport: o,
- httpAgent: o,
- httpsAgent: o,
- cancelToken: o,
- socketPath: o,
- responseEncoding: o,
- validateStatus: s,
- headers: (u, c) => i(oH(u), oH(c), !0)
- };
- return Te.forEach(Object.keys(Object.assign({}, t, e)), function(c) {
- const f = l[c] || i, d = f(t[c], e[c], c);
- Te.isUndefined(d) && f !== s || (n[c] = d);
- }), n;
- }
- const Loe = (t) => {
- const e = Qh({}, t);
- let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = e;
- e.headers = o = La.from(o), e.url = Eoe(koe(e.baseURL, e.url), t.params, t.paramsSerializer), s && o.set(
- "Authorization",
- "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
- );
- let l;
- if (Te.isFormData(n)) {
- if (Ls.hasStandardBrowserEnv || Ls.hasStandardBrowserWebWorkerEnv)
- o.setContentType(void 0);
- else if ((l = o.getContentType()) !== !1) {
- const [u, ...c] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
- o.setContentType([u || "multipart/form-data", ...c].join("; "));
- }
- }
- if (Ls.hasStandardBrowserEnv && (r && Te.isFunction(r) && (r = r(e)), r || r !== !1 && qQe(e.url))) {
- const u = i && a && KQe.read(a);
- u && o.set(i, u);
- }
- return e;
- }, t9e = typeof XMLHttpRequest < "u", n9e = t9e && function(t) {
- return new Promise(function(n, r) {
- const i = Loe(t);
- let a = i.data;
- const o = La.from(i.headers).normalize();
- let { responseType: s } = i, l;
- function u() {
- i.cancelToken && i.cancelToken.unsubscribe(l), i.signal && i.signal.removeEventListener("abort", l);
- }
- let c = new XMLHttpRequest();
- c.open(i.method.toUpperCase(), i.url, !0), c.timeout = i.timeout;
- function f() {
- if (!c)
- return;
- const h = La.from(
- "getAllResponseHeaders" in c && c.getAllResponseHeaders()
- ), v = {
- data: !s || s === "text" || s === "json" ? c.responseText : c.response,
- status: c.status,
- statusText: c.statusText,
- headers: h,
- config: t,
- request: c
- };
- Roe(function(m) {
- n(m), u();
- }, function(m) {
- r(m), u();
- }, v), c = null;
- }
- "onloadend" in c ? c.onloadend = f : c.onreadystatechange = function() {
- !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(f);
- }, c.onabort = function() {
- c && (r(new Ht("Request aborted", Ht.ECONNABORTED, i, c)), c = null);
- }, c.onerror = function() {
- r(new Ht("Network Error", Ht.ERR_NETWORK, i, c)), c = null;
- }, c.ontimeout = function() {
- let p = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
- const v = i.transitional || Moe;
- i.timeoutErrorMessage && (p = i.timeoutErrorMessage), r(new Ht(
- p,
- v.clarifyTimeoutError ? Ht.ETIMEDOUT : Ht.ECONNABORTED,
- i,
- c
- )), c = null;
- }, a === void 0 && o.setContentType(null), "setRequestHeader" in c && Te.forEach(o.toJSON(), function(p, v) {
- c.setRequestHeader(v, p);
- }), Te.isUndefined(i.withCredentials) || (c.withCredentials = !!i.withCredentials), s && s !== "json" && (c.responseType = i.responseType), typeof i.onDownloadProgress == "function" && c.addEventListener("progress", gC(i.onDownloadProgress, !0)), typeof i.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", gC(i.onUploadProgress)), (i.cancelToken || i.signal) && (l = (h) => {
- c && (r(!h || h.type ? new gm(null, t, c) : h), c.abort(), c = null);
- }, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
- const d = UQe(i.url);
- if (d && Ls.protocols.indexOf(d) === -1) {
- r(new Ht("Unsupported protocol " + d + ":", Ht.ERR_BAD_REQUEST, t));
- return;
- }
- c.send(a || null);
- });
- }, r9e = (t, e) => {
- let n = new AbortController(), r;
- const i = function(l) {
- if (!r) {
- r = !0, o();
- const u = l instanceof Error ? l : this.reason;
- n.abort(u instanceof Ht ? u : new gm(u instanceof Error ? u.message : u));
- }
- };
- let a = e && setTimeout(() => {
- i(new Ht(`timeout ${e} of ms exceeded`, Ht.ETIMEDOUT));
- }, e);
- const o = () => {
- t && (a && clearTimeout(a), a = null, t.forEach((l) => {
- l && (l.removeEventListener ? l.removeEventListener("abort", i) : l.unsubscribe(i));
- }), t = null);
- };
- t.forEach((l) => l && l.addEventListener && l.addEventListener("abort", i));
- const { signal: s } = n;
- return s.unsubscribe = o, [s, () => {
- a && clearTimeout(a), a = null;
- }];
- }, i9e = function* (t, e) {
- let n = t.byteLength;
- if (!e || n < e) {
- yield t;
- return;
- }
- let r = 0, i;
- for (; r < n; )
- i = r + e, yield t.slice(r, i), r = i;
- }, a9e = async function* (t, e, n) {
- for await (const r of t)
- yield* i9e(ArrayBuffer.isView(r) ? r : await n(String(r)), e);
- }, sH = (t, e, n, r, i) => {
- const a = a9e(t, e, i);
- let o = 0;
- return new ReadableStream({
- type: "bytes",
- async pull(s) {
- const { done: l, value: u } = await a.next();
- if (l) {
- s.close(), r();
- return;
- }
- let c = u.byteLength;
- n && n(o += c), s.enqueue(new Uint8Array(u));
- },
- cancel(s) {
- return r(s), a.return();
- }
- }, {
- highWaterMark: 2
- });
- }, lH = (t, e) => {
- const n = t != null;
- return (r) => setTimeout(() => e({
- lengthComputable: n,
- total: t,
- loaded: r
- }));
- }, rP = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Noe = rP && typeof ReadableStream == "function", UR = rP && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), o9e = Noe && (() => {
- let t = !1;
- const e = new Request(Ls.origin, {
- body: new ReadableStream(),
- method: "POST",
- get duplex() {
- return t = !0, "half";
- }
- }).headers.has("Content-Type");
- return t && !e;
- })(), uH = 64 * 1024, XR = Noe && !!(() => {
- try {
- return Te.isReadableStream(new Response("").body);
- } catch {
- }
- })(), mC = {
- stream: XR && ((t) => t.body)
- };
- rP && ((t) => {
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
- !mC[e] && (mC[e] = Te.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
- throw new Ht(`Response type '${e}' is not supported`, Ht.ERR_NOT_SUPPORT, r);
- });
- });
- })(new Response());
- const s9e = async (t) => {
- if (t == null)
- return 0;
- if (Te.isBlob(t))
- return t.size;
- if (Te.isSpecCompliantForm(t))
- return (await new Request(t).arrayBuffer()).byteLength;
- if (Te.isArrayBufferView(t))
- return t.byteLength;
- if (Te.isURLSearchParams(t) && (t = t + ""), Te.isString(t))
- return (await UR(t)).byteLength;
- }, l9e = async (t, e) => {
- const n = Te.toFiniteNumber(t.getContentLength());
- return n ?? s9e(e);
- }, u9e = rP && (async (t) => {
- let {
- url: e,
- method: n,
- data: r,
- signal: i,
- cancelToken: a,
- timeout: o,
- onDownloadProgress: s,
- onUploadProgress: l,
- responseType: u,
- headers: c,
- withCredentials: f = "same-origin",
- fetchOptions: d
- } = Loe(t);
- u = u ? (u + "").toLowerCase() : "text";
- let [h, p] = i || a || o ? r9e([i, a], o) : [], v, g;
- const m = () => {
- !v && setTimeout(() => {
- h && h.unsubscribe();
- }), v = !0;
- };
- let y;
- try {
- if (l && o9e && n !== "get" && n !== "head" && (y = await l9e(c, r)) !== 0) {
- let x = new Request(e, {
- method: "POST",
- body: r,
- duplex: "half"
- }), C;
- Te.isFormData(r) && (C = x.headers.get("content-type")) && c.setContentType(C), x.body && (r = sH(x.body, uH, lH(
- y,
- gC(l)
- ), null, UR));
- }
- Te.isString(f) || (f = f ? "cors" : "omit"), g = new Request(e, {
- ...d,
- signal: h,
- method: n.toUpperCase(),
- headers: c.normalize().toJSON(),
- body: r,
- duplex: "half",
- withCredentials: f
- });
- let _ = await fetch(g);
- const O = XR && (u === "stream" || u === "response");
- if (XR && (s || O)) {
- const x = {};
- ["status", "statusText", "headers"].forEach((P) => {
- x[P] = _[P];
- });
- const C = Te.toFiniteNumber(_.headers.get("content-length"));
- _ = new Response(
- sH(_.body, uH, s && lH(
- C,
- gC(s, !0)
- ), O && m, UR),
- x
- );
- }
- u = u || "text";
- let S = await mC[Te.findKey(mC, u) || "text"](_, t);
- return !O && m(), p && p(), await new Promise((x, C) => {
- Roe(x, C, {
- data: S,
- headers: La.from(_.headers),
- status: _.status,
- statusText: _.statusText,
- config: t,
- request: g
- });
- });
- } catch (_) {
- throw m(), _ && _.name === "TypeError" && /fetch/i.test(_.message) ? Object.assign(
- new Ht("Network Error", Ht.ERR_NETWORK, t, g),
- {
- cause: _.cause || _
- }
- ) : Ht.from(_, _ && _.code, t, g);
- }
- }), YR = {
- http: TQe,
- xhr: n9e,
- fetch: u9e
- };
- Te.forEach(YR, (t, e) => {
- if (t) {
- try {
- Object.defineProperty(t, "name", { value: e });
- } catch {
- }
- Object.defineProperty(t, "adapterName", { value: e });
- }
- });
- const cH = (t) => `- ${t}`, c9e = (t) => Te.isFunction(t) || t === null || t === !1, Boe = {
- getAdapter: (t) => {
- t = Te.isArray(t) ? t : [t];
- const { length: e } = t;
- let n, r;
- const i = {};
- for (let a = 0; a < e; a++) {
- n = t[a];
- let o;
- if (r = n, !c9e(n) && (r = YR[(o = String(n)).toLowerCase()], r === void 0))
- throw new Ht(`Unknown adapter '${o}'`);
- if (r)
- break;
- i[o || "#" + a] = r;
- }
- if (!r) {
- const a = Object.entries(i).map(
- ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
- );
- let o = e ? a.length > 1 ? `since :
- ` + a.map(cH).join(`
- `) : " " + cH(a[0]) : "as no adapter specified";
- throw new Ht(
- "There is no suitable adapter to dispatch the request " + o,
- "ERR_NOT_SUPPORT"
- );
- }
- return r;
- },
- adapters: YR
- };
- function TE(t) {
- if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
- throw new gm(null, t);
- }
- function fH(t) {
- return TE(t), t.headers = La.from(t.headers), t.data = CE.call(
- t,
- t.transformRequest
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Boe.getAdapter(t.adapter || t1.adapter)(t).then(function(r) {
- return TE(t), r.data = CE.call(
- t,
- t.transformResponse,
- r
- ), r.headers = La.from(r.headers), r;
- }, function(r) {
- return Doe(r) || (TE(t), r && r.response && (r.response.data = CE.call(
- t,
- t.transformResponse,
- r.response
- ), r.response.headers = La.from(r.response.headers))), Promise.reject(r);
- });
- }
- const zoe = "1.7.2", c5 = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
- c5[t] = function(r) {
- return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
- };
- });
- const dH = {};
- c5.transitional = function(e, n, r) {
- function i(a, o) {
- return "[Axios v" + zoe + "] Transitional option '" + a + "'" + o + (r ? ". " + r : "");
- }
- return (a, o, s) => {
- if (e === !1)
- throw new Ht(
- i(o, " has been removed" + (n ? " in " + n : "")),
- Ht.ERR_DEPRECATED
- );
- return n && !dH[o] && (dH[o] = !0, console.warn(
- i(
- o,
- " has been deprecated since v" + n + " and will be removed in the near future"
- )
- )), e ? e(a, o, s) : !0;
- };
- };
- function f9e(t, e, n) {
- if (typeof t != "object")
- throw new Ht("options must be an object", Ht.ERR_BAD_OPTION_VALUE);
- const r = Object.keys(t);
- let i = r.length;
- for (; i-- > 0; ) {
- const a = r[i], o = e[a];
- if (o) {
- const s = t[a], l = s === void 0 || o(s, a, t);
- if (l !== !0)
- throw new Ht("option " + a + " must be " + l, Ht.ERR_BAD_OPTION_VALUE);
- continue;
- }
- if (n !== !0)
- throw new Ht("Unknown option " + a, Ht.ERR_BAD_OPTION);
- }
- }
- const qR = {
- assertOptions: f9e,
- validators: c5
- }, yc = qR.validators;
- class Oh {
- constructor(e) {
- this.defaults = e, this.interceptors = {
- request: new iH(),
- response: new iH()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- async request(e, n) {
- try {
- return await this._request(e, n);
- } catch (r) {
- if (r instanceof Error) {
- let i;
- Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error();
- const a = i.stack ? i.stack.replace(/^.+\n/, "") : "";
- try {
- r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
- ` + a) : r.stack = a;
- } catch {
- }
- }
- throw r;
- }
- }
- _request(e, n) {
- typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = Qh(this.defaults, n);
- const { transitional: r, paramsSerializer: i, headers: a } = n;
- r !== void 0 && qR.assertOptions(r, {
- silentJSONParsing: yc.transitional(yc.boolean),
- forcedJSONParsing: yc.transitional(yc.boolean),
- clarifyTimeoutError: yc.transitional(yc.boolean)
- }, !1), i != null && (Te.isFunction(i) ? n.paramsSerializer = {
- serialize: i
- } : qR.assertOptions(i, {
- encode: yc.function,
- serialize: yc.function
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
- let o = a && Te.merge(
- a.common,
- a[n.method]
- );
- a && Te.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (p) => {
- delete a[p];
- }
- ), n.headers = La.concat(o, a);
- const s = [];
- let l = !0;
- this.interceptors.request.forEach(function(v) {
- typeof v.runWhen == "function" && v.runWhen(n) === !1 || (l = l && v.synchronous, s.unshift(v.fulfilled, v.rejected));
- });
- const u = [];
- this.interceptors.response.forEach(function(v) {
- u.push(v.fulfilled, v.rejected);
- });
- let c, f = 0, d;
- if (!l) {
- const p = [fH.bind(this), void 0];
- for (p.unshift.apply(p, s), p.push.apply(p, u), d = p.length, c = Promise.resolve(n); f < d; )
- c = c.then(p[f++], p[f++]);
- return c;
- }
- d = s.length;
- let h = n;
- for (f = 0; f < d; ) {
- const p = s[f++], v = s[f++];
- try {
- h = p(h);
- } catch (g) {
- v.call(this, g);
- break;
- }
- }
- try {
- c = fH.call(this, h);
- } catch (p) {
- return Promise.reject(p);
- }
- for (f = 0, d = u.length; f < d; )
- c = c.then(u[f++], u[f++]);
- return c;
- }
- getUri(e) {
- e = Qh(this.defaults, e);
- const n = koe(e.baseURL, e.url);
- return Eoe(n, e.params, e.paramsSerializer);
- }
- }
- Te.forEach(["delete", "get", "head", "options"], function(e) {
- Oh.prototype[e] = function(n, r) {
- return this.request(Qh(r || {}, {
- method: e,
- url: n,
- data: (r || {}).data
- }));
- };
- });
- Te.forEach(["post", "put", "patch"], function(e) {
- function n(r) {
- return function(a, o, s) {
- return this.request(Qh(s || {}, {
- method: e,
- headers: r ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url: a,
- data: o
- }));
- };
- }
- Oh.prototype[e] = n(), Oh.prototype[e + "Form"] = n(!0);
- });
- class f5 {
- constructor(e) {
- if (typeof e != "function")
- throw new TypeError("executor must be a function.");
- let n;
- this.promise = new Promise(function(a) {
- n = a;
- });
- const r = this;
- this.promise.then((i) => {
- if (!r._listeners) return;
- let a = r._listeners.length;
- for (; a-- > 0; )
- r._listeners[a](i);
- r._listeners = null;
- }), this.promise.then = (i) => {
- let a;
- const o = new Promise((s) => {
- r.subscribe(s), a = s;
- }).then(i);
- return o.cancel = function() {
- r.unsubscribe(a);
- }, o;
- }, e(function(a, o, s) {
- r.reason || (r.reason = new gm(a, o, s), n(r.reason));
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason)
- throw this.reason;
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(e) {
- if (this.reason) {
- e(this.reason);
- return;
- }
- this._listeners ? this._listeners.push(e) : this._listeners = [e];
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(e) {
- if (!this._listeners)
- return;
- const n = this._listeners.indexOf(e);
- n !== -1 && this._listeners.splice(n, 1);
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let e;
- return {
- token: new f5(function(i) {
- e = i;
- }),
- cancel: e
- };
- }
- }
- function d9e(t) {
- return function(n) {
- return t.apply(null, n);
- };
- }
- function h9e(t) {
- return Te.isObject(t) && t.isAxiosError === !0;
- }
- const KR = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
- };
- Object.entries(KR).forEach(([t, e]) => {
- KR[e] = t;
- });
- function Voe(t) {
- const e = new Oh(t), n = yoe(Oh.prototype.request, e);
- return Te.extend(n, Oh.prototype, e, { allOwnKeys: !0 }), Te.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(i) {
- return Voe(Qh(t, i));
- }, n;
- }
- const Wr = Voe(t1);
- Wr.Axios = Oh;
- Wr.CanceledError = gm;
- Wr.CancelToken = f5;
- Wr.isCancel = Doe;
- Wr.VERSION = zoe;
- Wr.toFormData = nP;
- Wr.AxiosError = Ht;
- Wr.Cancel = Wr.CanceledError;
- Wr.all = function(e) {
- return Promise.all(e);
- };
- Wr.spread = d9e;
- Wr.isAxiosError = h9e;
- Wr.mergeConfig = Qh;
- Wr.AxiosHeaders = La;
- Wr.formToJSON = (t) => Ioe(Te.isHTMLForm(t) ? new FormData(t) : t);
- Wr.getAdapter = Boe.getAdapter;
- Wr.HttpStatusCode = KR;
- Wr.default = Wr;
- class p9e {
- constructor(e, n) {
- this.axiosInstance = Wr.create({
- baseURL: e,
- timeout: 5e3
- // Set your desired timeout value
- }), this.options = n;
- }
- get(e, n) {
- return this.request({ url: e, method: "GET", ...n });
- }
- post(e, n, r) {
- return this.request({ url: e, method: "POST", data: n, ...r });
- }
- put(e, n, r) {
- return this.request({ url: e, method: "PUT", data: n, ...r });
- }
- delete(e, n) {
- return this.request({ url: e, method: "DELETE", ...n });
- }
- request(e) {
- e.headers = {
- ...e.headers,
- Authorization: localStorage.getItem("token") || ""
- };
- const { transformResponse: n } = this.options || {};
- return new Promise((r, i) => {
- this.axiosInstance.request(e).then((a) => {
- if (n)
- try {
- const o = n(a.data, e);
- r(o);
- } catch (o) {
- i(o);
- }
- r(a.data);
- }).catch((a) => {
- i(a);
- });
- });
- }
- }
- var v9e = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
- const g9e = v9e.VITE_APP_BASE_URL, m9e = (t, e) => {
- if (e.responseType === "blob")
- return t;
- if (t.code === 1)
- return t.result;
- throw Wh.warning(t.error), new Error(t.error);
- }, Foe = new p9e(g9e, { transformResponse: m9e });
- function y9e(t) {
- return Foe.post("/api/table/GetAllTablesAndViews", t);
- }
- function b9e(t) {
- return Foe.post("/api/system/GetAllBasicData", t);
- }
- const _9e = (t) => {
- const e = ee(), n = ee(!1), r = ee(""), i = ee(""), a = ee(), o = ee("");
- t === "view" && (e.value = [
- { label: "系统视图", children: [] },
- { label: "数据源视图", children: [] }
- ], n.value = !0, y9e({ types: t }).then((u) => {
- const { bpmViewTables: c = [] } = u || {};
- c.forEach((f) => {
- const { name: d, schemaName: h, type: p, id: v } = f;
- e.value[p - 1] && e.value[p - 1].children.push({
- label: `${h}(${d})`,
- value: h,
- id: v
- });
- });
- }).finally(() => {
- n.value = !1;
- }));
- const s = (u, c) => {
- if (u.level === 0)
- return c([{ name: "基础数据" }]);
- const f = u.data;
- b9e({
- currentPage: 1,
- pageSize: 999,
- orderByProperty: "id",
- Ascending: !0,
- totalPage: 1,
- totalCount: 1,
- filters: f != null && f.id ? [{ name: "parentId", value: f.id }] : null
- }).then((d) => {
- c(d || []);
- });
- }, l = () => t === "table" ? /* @__PURE__ */ React.createElement(
- WW,
- {
- ref: a,
- lazy: !0,
- load: s,
- props: {
- label: (u) => u.path ? `${u.path}(${u.name})` : u.name,
- children: "children"
- },
- "onNode-click": (u) => {
- u != null && u.path && (r.value = u.path);
- },
- filterNodeMethod: (u, c) => {
- var f;
- return ((f = c.path) == null ? void 0 : f.toUpperCase().includes(u.toUpperCase())) || c.name.toUpperCase().includes(u.toUpperCase());
- },
- "empty-text": "暂无数据"
- }
- ) : /* @__PURE__ */ React.createElement(
- WW,
- {
- ref: a,
- data: e.value,
- defaultExpandAll: !0,
- "onNode-click": (u) => {
- u != null && u.value && u.id && (r.value = u.value, o.value = u.id);
- },
- filterNodeMethod: (u, c) => {
- var f;
- return (f = c.label) == null ? void 0 : f.includes(u);
- },
- "empty-text": "暂无数据"
- }
- );
- return new Promise((u, c) => {
- const f = document.createElement("div"), d = pxe({
- render() {
- return /* @__PURE__ */ React.createElement(
- uRe,
- {
- modelValue: !0,
- title: t === "table" ? "选择数据集" : "选择视图表",
- width: "800px",
- style: { height: "600px" },
- "v-slots": {
- footer: () => /* @__PURE__ */ React.createElement(
- oR,
- {
- type: "primary",
- disabled: !r.value,
- onClick: () => {
- u({ value: r.value }), document.body.removeChild(f);
- }
- },
- "确定"
- )
- },
- onClose: () => {
- c("close"), document.body.removeChild(f);
- }
- },
- /* @__PURE__ */ React.createElement(
- p2,
- {
- size: "small",
- placeholder: "请输入关键字进行搜索",
- "v-model": i.value,
- onInput: () => {
- var h;
- (h = a.value) == null || h.filter(i.value);
- },
- style: {
- marginBottom: "10px",
- height: "35px",
- fontSize: "14px"
- }
- }
- ),
- /* @__PURE__ */ React.createElement("div", { style: { height: "379px", overflow: "auto" } }, l())
- );
- }
- });
- document.body.appendChild(f), d.mount(f);
- });
- };
- function JR(t) {
- const e = {};
- for (const n in t)
- if (typeof t[n] == "object")
- switch (n) {
- case "background":
- t[n].type === "none" && (e[n] = "none"), t[n].type === "color" && (e[n] = t[n].color), t[n].type === "image" && (e[n + "-image"] = `url(${t[n].image}) no-repeat center center`, e[n + "-size"] = t[n].fillType);
- break;
- case "border":
- t[n].type === "none" ? e[n] = "none" : e[n] = `${t[n].width}px ${t[n].type} ${t[n].color}`;
- break;
- case "borderRadius":
- t[n].type === "all" ? e[n] = `${t[n].value}${t[n].unit}` : e[n] = `${t[n].topLeft}${t[n].unit} ${t[n].topRight}${t[n].unit} ${t[n].bottomLeft}${t[n].unit} ${t[n].bottomRight}${t[n].unit}`;
- break;
- case "boxShadow":
- t[n].enabled && (e[n] = `${t[n].offsetX}px ${t[n].offsetY}px ${t[n].blurRadius}px ${t[n].spreadRadius}px ${t[n].color} ${t[n].inset ? "inset" : ""}`);
- break;
- case "backdropFilter":
- t[n].enabled && (e[n] = `blur(${t[n].blur}px)`);
- break;
- }
- else typeof t[n] == "number" ? e[n] = t[n] + "px" : typeof t[n] == "string" && (e[n] = t[n]);
- return e;
- }
- var yC = { exports: {} };
- /**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- yC.exports;
- (function(t, e) {
- (function() {
- var n, r = "4.17.21", i = 200, a = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", s = "Invalid `variable` option passed into `_.template`", l = "__lodash_hash_undefined__", u = 500, c = "__lodash_placeholder__", f = 1, d = 2, h = 4, p = 1, v = 2, g = 1, m = 2, y = 4, _ = 8, O = 16, S = 32, x = 64, C = 128, P = 256, $ = 512, T = 30, E = "...", M = 800, R = 16, N = 1, I = 2, B = 3, Q = 1 / 0, W = 9007199254740991, H = 17976931348623157e292, U = NaN, j = 4294967295, Y = j - 1, ne = j >>> 1, fe = [
- ["ary", C],
- ["bind", g],
- ["bindKey", m],
- ["curry", _],
- ["curryRight", O],
- ["flip", $],
- ["partial", S],
- ["partialRight", x],
- ["rearg", P]
- ], ue = "[object Arguments]", ye = "[object Array]", se = "[object AsyncFunction]", he = "[object Boolean]", re = "[object Date]", q = "[object DOMException]", K = "[object Error]", de = "[object Function]", xe = "[object GeneratorFunction]", we = "[object Map]", He = "[object Number]", je = "[object Null]", Be = "[object Object]", Le = "[object Promise]", Pe = "[object Proxy]", Fe = "[object RegExp]", Ye = "[object Set]", xt = "[object String]", It = "[object Symbol]", an = "[object Undefined]", Ae = "[object WeakMap]", gt = "[object WeakSet]", Xt = "[object ArrayBuffer]", Bn = "[object DataView]", Dn = "[object Float32Array]", Dr = "[object Float64Array]", ji = "[object Int8Array]", tu = "[object Int16Array]", nu = "[object Int32Array]", oc = "[object Uint8Array]", Qf = "[object Uint8ClampedArray]", rl = "[object Uint16Array]", Hf = "[object Uint32Array]", Gf = /\b__p \+= '';/g, Gm = /\b(__p \+=) '' \+/g, sc = /(__e\(.*?\)|\b__t\)) \+\n'';/g, jm = /&(?:amp|lt|gt|quot|#39);/g, g$ = /[&<>"']/g, FB = RegExp(jm.source), WB = RegExp(g$.source), QB = /<%-([\s\S]+?)%>/g, HB = /<%([\s\S]+?)%>/g, Sp = /<%=([\s\S]+?)%>/g, Zm = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, z1 = /^\w*$/, xp = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Um = /[\\^$.*+?()[\]{}|]/g, m$ = RegExp(Um.source), Xm = /^\s+/, y$ = /\s/, b$ = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, _$ = /\{\n\/\* \[wrapped with (.+)\] \*/, V1 = /,? & /, jf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Ym = /[()=,{}\[\]\/\s]/, F1 = /\\(\\)?/g, W1 = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, qm = /\w*$/, Q1 = /^[-+]0x[0-9a-f]+$/i, O$ = /^0b[01]+$/i, S$ = /^\[object .+?Constructor\]$/, x$ = /^0o[0-7]+$/i, H1 = /^(?:0|[1-9]\d*)$/, Km = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, yo = /($^)/, G1 = /['\n\r\u2028\u2029\\]/g, wp = "\\ud800-\\udfff", Jme = "\\u0300-\\u036f", e0e = "\\ufe20-\\ufe2f", t0e = "\\u20d0-\\u20ff", GB = Jme + e0e + t0e, jB = "\\u2700-\\u27bf", ZB = "a-z\\xdf-\\xf6\\xf8-\\xff", n0e = "\\xac\\xb1\\xd7\\xf7", r0e = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", i0e = "\\u2000-\\u206f", a0e = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", UB = "A-Z\\xc0-\\xd6\\xd8-\\xde", XB = "\\ufe0e\\ufe0f", YB = n0e + r0e + i0e + a0e, w$ = "['’]", o0e = "[" + wp + "]", qB = "[" + YB + "]", j1 = "[" + GB + "]", KB = "\\d+", s0e = "[" + jB + "]", JB = "[" + ZB + "]", ez = "[^" + wp + YB + KB + jB + ZB + UB + "]", C$ = "\\ud83c[\\udffb-\\udfff]", l0e = "(?:" + j1 + "|" + C$ + ")", tz = "[^" + wp + "]", T$ = "(?:\\ud83c[\\udde6-\\uddff]){2}", P$ = "[\\ud800-\\udbff][\\udc00-\\udfff]", Cp = "[" + UB + "]", nz = "\\u200d", rz = "(?:" + JB + "|" + ez + ")", u0e = "(?:" + Cp + "|" + ez + ")", iz = "(?:" + w$ + "(?:d|ll|m|re|s|t|ve))?", az = "(?:" + w$ + "(?:D|LL|M|RE|S|T|VE))?", oz = l0e + "?", sz = "[" + XB + "]?", c0e = "(?:" + nz + "(?:" + [tz, T$, P$].join("|") + ")" + sz + oz + ")*", f0e = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", d0e = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", lz = sz + oz + c0e, h0e = "(?:" + [s0e, T$, P$].join("|") + ")" + lz, p0e = "(?:" + [tz + j1 + "?", j1, T$, P$, o0e].join("|") + ")", v0e = RegExp(w$, "g"), g0e = RegExp(j1, "g"), $$ = RegExp(C$ + "(?=" + C$ + ")|" + p0e + lz, "g"), m0e = RegExp([
- Cp + "?" + JB + "+" + iz + "(?=" + [qB, Cp, "$"].join("|") + ")",
- u0e + "+" + az + "(?=" + [qB, Cp + rz, "$"].join("|") + ")",
- Cp + "?" + rz + "+" + iz,
- Cp + "+" + az,
- d0e,
- f0e,
- KB,
- h0e
- ].join("|"), "g"), y0e = RegExp("[" + nz + wp + GB + XB + "]"), b0e = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, _0e = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout"
- ], O0e = -1, qn = {};
- qn[Dn] = qn[Dr] = qn[ji] = qn[tu] = qn[nu] = qn[oc] = qn[Qf] = qn[rl] = qn[Hf] = !0, qn[ue] = qn[ye] = qn[Xt] = qn[he] = qn[Bn] = qn[re] = qn[K] = qn[de] = qn[we] = qn[He] = qn[Be] = qn[Fe] = qn[Ye] = qn[xt] = qn[Ae] = !1;
- var jn = {};
- jn[ue] = jn[ye] = jn[Xt] = jn[Bn] = jn[he] = jn[re] = jn[Dn] = jn[Dr] = jn[ji] = jn[tu] = jn[nu] = jn[we] = jn[He] = jn[Be] = jn[Fe] = jn[Ye] = jn[xt] = jn[It] = jn[oc] = jn[Qf] = jn[rl] = jn[Hf] = !0, jn[K] = jn[de] = jn[Ae] = !1;
- var S0e = {
- // Latin-1 Supplement block.
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
- // Latin Extended-A block.
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s"
- }, x0e = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, w0e = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'"
- }, C0e = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, T0e = parseFloat, P0e = parseInt, uz = typeof Su == "object" && Su && Su.Object === Object && Su, $0e = typeof self == "object" && self && self.Object === Object && self, di = uz || $0e || Function("return this")(), A$ = e && !e.nodeType && e, Zf = A$ && !0 && t && !t.nodeType && t, cz = Zf && Zf.exports === A$, E$ = cz && uz.process, bo = function() {
- try {
- var pe = Zf && Zf.require && Zf.require("util").types;
- return pe || E$ && E$.binding && E$.binding("util");
- } catch {
- }
- }(), fz = bo && bo.isArrayBuffer, dz = bo && bo.isDate, hz = bo && bo.isMap, pz = bo && bo.isRegExp, vz = bo && bo.isSet, gz = bo && bo.isTypedArray;
- function Fa(pe, $e, Oe) {
- switch (Oe.length) {
- case 0:
- return pe.call($e);
- case 1:
- return pe.call($e, Oe[0]);
- case 2:
- return pe.call($e, Oe[0], Oe[1]);
- case 3:
- return pe.call($e, Oe[0], Oe[1], Oe[2]);
- }
- return pe.apply($e, Oe);
- }
- function A0e(pe, $e, Oe, st) {
- for (var Lt = -1, Pn = pe == null ? 0 : pe.length; ++Lt < Pn; ) {
- var Qr = pe[Lt];
- $e(st, Qr, Oe(Qr), pe);
- }
- return st;
- }
- function _o(pe, $e) {
- for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st && $e(pe[Oe], Oe, pe) !== !1; )
- ;
- return pe;
- }
- function E0e(pe, $e) {
- for (var Oe = pe == null ? 0 : pe.length; Oe-- && $e(pe[Oe], Oe, pe) !== !1; )
- ;
- return pe;
- }
- function mz(pe, $e) {
- for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st; )
- if (!$e(pe[Oe], Oe, pe))
- return !1;
- return !0;
- }
- function lc(pe, $e) {
- for (var Oe = -1, st = pe == null ? 0 : pe.length, Lt = 0, Pn = []; ++Oe < st; ) {
- var Qr = pe[Oe];
- $e(Qr, Oe, pe) && (Pn[Lt++] = Qr);
- }
- return Pn;
- }
- function Z1(pe, $e) {
- var Oe = pe == null ? 0 : pe.length;
- return !!Oe && Tp(pe, $e, 0) > -1;
- }
- function M$(pe, $e, Oe) {
- for (var st = -1, Lt = pe == null ? 0 : pe.length; ++st < Lt; )
- if (Oe($e, pe[st]))
- return !0;
- return !1;
- }
- function ar(pe, $e) {
- for (var Oe = -1, st = pe == null ? 0 : pe.length, Lt = Array(st); ++Oe < st; )
- Lt[Oe] = $e(pe[Oe], Oe, pe);
- return Lt;
- }
- function uc(pe, $e) {
- for (var Oe = -1, st = $e.length, Lt = pe.length; ++Oe < st; )
- pe[Lt + Oe] = $e[Oe];
- return pe;
- }
- function I$(pe, $e, Oe, st) {
- var Lt = -1, Pn = pe == null ? 0 : pe.length;
- for (st && Pn && (Oe = pe[++Lt]); ++Lt < Pn; )
- Oe = $e(Oe, pe[Lt], Lt, pe);
- return Oe;
- }
- function M0e(pe, $e, Oe, st) {
- var Lt = pe == null ? 0 : pe.length;
- for (st && Lt && (Oe = pe[--Lt]); Lt--; )
- Oe = $e(Oe, pe[Lt], Lt, pe);
- return Oe;
- }
- function D$(pe, $e) {
- for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st; )
- if ($e(pe[Oe], Oe, pe))
- return !0;
- return !1;
- }
- var I0e = R$("length");
- function D0e(pe) {
- return pe.split("");
- }
- function R0e(pe) {
- return pe.match(jf) || [];
- }
- function yz(pe, $e, Oe) {
- var st;
- return Oe(pe, function(Lt, Pn, Qr) {
- if ($e(Lt, Pn, Qr))
- return st = Pn, !1;
- }), st;
- }
- function U1(pe, $e, Oe, st) {
- for (var Lt = pe.length, Pn = Oe + (st ? 1 : -1); st ? Pn-- : ++Pn < Lt; )
- if ($e(pe[Pn], Pn, pe))
- return Pn;
- return -1;
- }
- function Tp(pe, $e, Oe) {
- return $e === $e ? j0e(pe, $e, Oe) : U1(pe, bz, Oe);
- }
- function k0e(pe, $e, Oe, st) {
- for (var Lt = Oe - 1, Pn = pe.length; ++Lt < Pn; )
- if (st(pe[Lt], $e))
- return Lt;
- return -1;
- }
- function bz(pe) {
- return pe !== pe;
- }
- function _z(pe, $e) {
- var Oe = pe == null ? 0 : pe.length;
- return Oe ? L$(pe, $e) / Oe : U;
- }
- function R$(pe) {
- return function($e) {
- return $e == null ? n : $e[pe];
- };
- }
- function k$(pe) {
- return function($e) {
- return pe == null ? n : pe[$e];
- };
- }
- function Oz(pe, $e, Oe, st, Lt) {
- return Lt(pe, function(Pn, Qr, Fn) {
- Oe = st ? (st = !1, Pn) : $e(Oe, Pn, Qr, Fn);
- }), Oe;
- }
- function L0e(pe, $e) {
- var Oe = pe.length;
- for (pe.sort($e); Oe--; )
- pe[Oe] = pe[Oe].value;
- return pe;
- }
- function L$(pe, $e) {
- for (var Oe, st = -1, Lt = pe.length; ++st < Lt; ) {
- var Pn = $e(pe[st]);
- Pn !== n && (Oe = Oe === n ? Pn : Oe + Pn);
- }
- return Oe;
- }
- function N$(pe, $e) {
- for (var Oe = -1, st = Array(pe); ++Oe < pe; )
- st[Oe] = $e(Oe);
- return st;
- }
- function N0e(pe, $e) {
- return ar($e, function(Oe) {
- return [Oe, pe[Oe]];
- });
- }
- function Sz(pe) {
- return pe && pe.slice(0, Tz(pe) + 1).replace(Xm, "");
- }
- function Wa(pe) {
- return function($e) {
- return pe($e);
- };
- }
- function B$(pe, $e) {
- return ar($e, function(Oe) {
- return pe[Oe];
- });
- }
- function Jm(pe, $e) {
- return pe.has($e);
- }
- function xz(pe, $e) {
- for (var Oe = -1, st = pe.length; ++Oe < st && Tp($e, pe[Oe], 0) > -1; )
- ;
- return Oe;
- }
- function wz(pe, $e) {
- for (var Oe = pe.length; Oe-- && Tp($e, pe[Oe], 0) > -1; )
- ;
- return Oe;
- }
- function B0e(pe, $e) {
- for (var Oe = pe.length, st = 0; Oe--; )
- pe[Oe] === $e && ++st;
- return st;
- }
- var z0e = k$(S0e), V0e = k$(x0e);
- function F0e(pe) {
- return "\\" + C0e[pe];
- }
- function W0e(pe, $e) {
- return pe == null ? n : pe[$e];
- }
- function Pp(pe) {
- return y0e.test(pe);
- }
- function Q0e(pe) {
- return b0e.test(pe);
- }
- function H0e(pe) {
- for (var $e, Oe = []; !($e = pe.next()).done; )
- Oe.push($e.value);
- return Oe;
- }
- function z$(pe) {
- var $e = -1, Oe = Array(pe.size);
- return pe.forEach(function(st, Lt) {
- Oe[++$e] = [Lt, st];
- }), Oe;
- }
- function Cz(pe, $e) {
- return function(Oe) {
- return pe($e(Oe));
- };
- }
- function cc(pe, $e) {
- for (var Oe = -1, st = pe.length, Lt = 0, Pn = []; ++Oe < st; ) {
- var Qr = pe[Oe];
- (Qr === $e || Qr === c) && (pe[Oe] = c, Pn[Lt++] = Oe);
- }
- return Pn;
- }
- function X1(pe) {
- var $e = -1, Oe = Array(pe.size);
- return pe.forEach(function(st) {
- Oe[++$e] = st;
- }), Oe;
- }
- function G0e(pe) {
- var $e = -1, Oe = Array(pe.size);
- return pe.forEach(function(st) {
- Oe[++$e] = [st, st];
- }), Oe;
- }
- function j0e(pe, $e, Oe) {
- for (var st = Oe - 1, Lt = pe.length; ++st < Lt; )
- if (pe[st] === $e)
- return st;
- return -1;
- }
- function Z0e(pe, $e, Oe) {
- for (var st = Oe + 1; st--; )
- if (pe[st] === $e)
- return st;
- return st;
- }
- function $p(pe) {
- return Pp(pe) ? X0e(pe) : I0e(pe);
- }
- function ms(pe) {
- return Pp(pe) ? Y0e(pe) : D0e(pe);
- }
- function Tz(pe) {
- for (var $e = pe.length; $e-- && y$.test(pe.charAt($e)); )
- ;
- return $e;
- }
- var U0e = k$(w0e);
- function X0e(pe) {
- for (var $e = $$.lastIndex = 0; $$.test(pe); )
- ++$e;
- return $e;
- }
- function Y0e(pe) {
- return pe.match($$) || [];
- }
- function q0e(pe) {
- return pe.match(m0e) || [];
- }
- var K0e = function pe($e) {
- $e = $e == null ? di : Ap.defaults(di.Object(), $e, Ap.pick(di, _0e));
- var Oe = $e.Array, st = $e.Date, Lt = $e.Error, Pn = $e.Function, Qr = $e.Math, Fn = $e.Object, V$ = $e.RegExp, J0e = $e.String, Oo = $e.TypeError, Y1 = Oe.prototype, eye = Pn.prototype, Ep = Fn.prototype, q1 = $e["__core-js_shared__"], K1 = eye.toString, Rn = Ep.hasOwnProperty, tye = 0, Pz = function() {
- var b = /[^.]+$/.exec(q1 && q1.keys && q1.keys.IE_PROTO || "");
- return b ? "Symbol(src)_1." + b : "";
- }(), J1 = Ep.toString, nye = K1.call(Fn), rye = di._, iye = V$(
- "^" + K1.call(Rn).replace(Um, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), eO = cz ? $e.Buffer : n, fc = $e.Symbol, tO = $e.Uint8Array, $z = eO ? eO.allocUnsafe : n, nO = Cz(Fn.getPrototypeOf, Fn), Az = Fn.create, Ez = Ep.propertyIsEnumerable, rO = Y1.splice, Mz = fc ? fc.isConcatSpreadable : n, e0 = fc ? fc.iterator : n, Uf = fc ? fc.toStringTag : n, iO = function() {
- try {
- var b = Jf(Fn, "defineProperty");
- return b({}, "", {}), b;
- } catch {
- }
- }(), aye = $e.clearTimeout !== di.clearTimeout && $e.clearTimeout, oye = st && st.now !== di.Date.now && st.now, sye = $e.setTimeout !== di.setTimeout && $e.setTimeout, aO = Qr.ceil, oO = Qr.floor, F$ = Fn.getOwnPropertySymbols, lye = eO ? eO.isBuffer : n, Iz = $e.isFinite, uye = Y1.join, cye = Cz(Fn.keys, Fn), Hr = Qr.max, Mi = Qr.min, fye = st.now, dye = $e.parseInt, Dz = Qr.random, hye = Y1.reverse, W$ = Jf($e, "DataView"), t0 = Jf($e, "Map"), Q$ = Jf($e, "Promise"), Mp = Jf($e, "Set"), n0 = Jf($e, "WeakMap"), r0 = Jf(Fn, "create"), sO = n0 && new n0(), Ip = {}, pye = ed(W$), vye = ed(t0), gye = ed(Q$), mye = ed(Mp), yye = ed(n0), lO = fc ? fc.prototype : n, i0 = lO ? lO.valueOf : n, Rz = lO ? lO.toString : n;
- function Z(b) {
- if (gr(b) && !Ft(b) && !(b instanceof un)) {
- if (b instanceof So)
- return b;
- if (Rn.call(b, "__wrapped__"))
- return kV(b);
- }
- return new So(b);
- }
- var Dp = /* @__PURE__ */ function() {
- function b() {
- }
- return function(w) {
- if (!cr(w))
- return {};
- if (Az)
- return Az(w);
- b.prototype = w;
- var A = new b();
- return b.prototype = n, A;
- };
- }();
- function uO() {
- }
- function So(b, w) {
- this.__wrapped__ = b, this.__actions__ = [], this.__chain__ = !!w, this.__index__ = 0, this.__values__ = n;
- }
- Z.templateSettings = {
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- escape: QB,
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- evaluate: HB,
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- interpolate: Sp,
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- variable: "",
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- imports: {
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- _: Z
- }
- }, Z.prototype = uO.prototype, Z.prototype.constructor = Z, So.prototype = Dp(uO.prototype), So.prototype.constructor = So;
- function un(b) {
- this.__wrapped__ = b, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = j, this.__views__ = [];
- }
- function bye() {
- var b = new un(this.__wrapped__);
- return b.__actions__ = ga(this.__actions__), b.__dir__ = this.__dir__, b.__filtered__ = this.__filtered__, b.__iteratees__ = ga(this.__iteratees__), b.__takeCount__ = this.__takeCount__, b.__views__ = ga(this.__views__), b;
- }
- function _ye() {
- if (this.__filtered__) {
- var b = new un(this);
- b.__dir__ = -1, b.__filtered__ = !0;
- } else
- b = this.clone(), b.__dir__ *= -1;
- return b;
- }
- function Oye() {
- var b = this.__wrapped__.value(), w = this.__dir__, A = Ft(b), L = w < 0, G = A ? b.length : 0, X = Dbe(0, G, this.__views__), J = X.start, ie = X.end, ge = ie - J, Ee = L ? ie : J - 1, Ie = this.__iteratees__, Ne = Ie.length, Ke = 0, ht = Mi(ge, this.__takeCount__);
- if (!A || !L && G == ge && ht == ge)
- return iV(b, this.__actions__);
- var Pt = [];
- e:
- for (; ge-- && Ke < ht; ) {
- Ee += w;
- for (var Jt = -1, $t = b[Ee]; ++Jt < Ne; ) {
- var on = Ie[Jt], pn = on.iteratee, Ga = on.type, Xi = pn($t);
- if (Ga == I)
- $t = Xi;
- else if (!Xi) {
- if (Ga == N)
- continue e;
- break e;
- }
- }
- Pt[Ke++] = $t;
- }
- return Pt;
- }
- un.prototype = Dp(uO.prototype), un.prototype.constructor = un;
- function Xf(b) {
- var w = -1, A = b == null ? 0 : b.length;
- for (this.clear(); ++w < A; ) {
- var L = b[w];
- this.set(L[0], L[1]);
- }
- }
- function Sye() {
- this.__data__ = r0 ? r0(null) : {}, this.size = 0;
- }
- function xye(b) {
- var w = this.has(b) && delete this.__data__[b];
- return this.size -= w ? 1 : 0, w;
- }
- function wye(b) {
- var w = this.__data__;
- if (r0) {
- var A = w[b];
- return A === l ? n : A;
- }
- return Rn.call(w, b) ? w[b] : n;
- }
- function Cye(b) {
- var w = this.__data__;
- return r0 ? w[b] !== n : Rn.call(w, b);
- }
- function Tye(b, w) {
- var A = this.__data__;
- return this.size += this.has(b) ? 0 : 1, A[b] = r0 && w === n ? l : w, this;
- }
- Xf.prototype.clear = Sye, Xf.prototype.delete = xye, Xf.prototype.get = wye, Xf.prototype.has = Cye, Xf.prototype.set = Tye;
- function ru(b) {
- var w = -1, A = b == null ? 0 : b.length;
- for (this.clear(); ++w < A; ) {
- var L = b[w];
- this.set(L[0], L[1]);
- }
- }
- function Pye() {
- this.__data__ = [], this.size = 0;
- }
- function $ye(b) {
- var w = this.__data__, A = cO(w, b);
- if (A < 0)
- return !1;
- var L = w.length - 1;
- return A == L ? w.pop() : rO.call(w, A, 1), --this.size, !0;
- }
- function Aye(b) {
- var w = this.__data__, A = cO(w, b);
- return A < 0 ? n : w[A][1];
- }
- function Eye(b) {
- return cO(this.__data__, b) > -1;
- }
- function Mye(b, w) {
- var A = this.__data__, L = cO(A, b);
- return L < 0 ? (++this.size, A.push([b, w])) : A[L][1] = w, this;
- }
- ru.prototype.clear = Pye, ru.prototype.delete = $ye, ru.prototype.get = Aye, ru.prototype.has = Eye, ru.prototype.set = Mye;
- function iu(b) {
- var w = -1, A = b == null ? 0 : b.length;
- for (this.clear(); ++w < A; ) {
- var L = b[w];
- this.set(L[0], L[1]);
- }
- }
- function Iye() {
- this.size = 0, this.__data__ = {
- hash: new Xf(),
- map: new (t0 || ru)(),
- string: new Xf()
- };
- }
- function Dye(b) {
- var w = SO(this, b).delete(b);
- return this.size -= w ? 1 : 0, w;
- }
- function Rye(b) {
- return SO(this, b).get(b);
- }
- function kye(b) {
- return SO(this, b).has(b);
- }
- function Lye(b, w) {
- var A = SO(this, b), L = A.size;
- return A.set(b, w), this.size += A.size == L ? 0 : 1, this;
- }
- iu.prototype.clear = Iye, iu.prototype.delete = Dye, iu.prototype.get = Rye, iu.prototype.has = kye, iu.prototype.set = Lye;
- function Yf(b) {
- var w = -1, A = b == null ? 0 : b.length;
- for (this.__data__ = new iu(); ++w < A; )
- this.add(b[w]);
- }
- function Nye(b) {
- return this.__data__.set(b, l), this;
- }
- function Bye(b) {
- return this.__data__.has(b);
- }
- Yf.prototype.add = Yf.prototype.push = Nye, Yf.prototype.has = Bye;
- function ys(b) {
- var w = this.__data__ = new ru(b);
- this.size = w.size;
- }
- function zye() {
- this.__data__ = new ru(), this.size = 0;
- }
- function Vye(b) {
- var w = this.__data__, A = w.delete(b);
- return this.size = w.size, A;
- }
- function Fye(b) {
- return this.__data__.get(b);
- }
- function Wye(b) {
- return this.__data__.has(b);
- }
- function Qye(b, w) {
- var A = this.__data__;
- if (A instanceof ru) {
- var L = A.__data__;
- if (!t0 || L.length < i - 1)
- return L.push([b, w]), this.size = ++A.size, this;
- A = this.__data__ = new iu(L);
- }
- return A.set(b, w), this.size = A.size, this;
- }
- ys.prototype.clear = zye, ys.prototype.delete = Vye, ys.prototype.get = Fye, ys.prototype.has = Wye, ys.prototype.set = Qye;
- function kz(b, w) {
- var A = Ft(b), L = !A && td(b), G = !A && !L && gc(b), X = !A && !L && !G && Np(b), J = A || L || G || X, ie = J ? N$(b.length, J0e) : [], ge = ie.length;
- for (var Ee in b)
- (w || Rn.call(b, Ee)) && !(J && // Safari 9 has enumerable `arguments.length` in strict mode.
- (Ee == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- G && (Ee == "offset" || Ee == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- X && (Ee == "buffer" || Ee == "byteLength" || Ee == "byteOffset") || // Skip index properties.
- lu(Ee, ge))) && ie.push(Ee);
- return ie;
- }
- function Lz(b) {
- var w = b.length;
- return w ? b[eA(0, w - 1)] : n;
- }
- function Hye(b, w) {
- return xO(ga(b), qf(w, 0, b.length));
- }
- function Gye(b) {
- return xO(ga(b));
- }
- function H$(b, w, A) {
- (A !== n && !bs(b[w], A) || A === n && !(w in b)) && au(b, w, A);
- }
- function a0(b, w, A) {
- var L = b[w];
- (!(Rn.call(b, w) && bs(L, A)) || A === n && !(w in b)) && au(b, w, A);
- }
- function cO(b, w) {
- for (var A = b.length; A--; )
- if (bs(b[A][0], w))
- return A;
- return -1;
- }
- function jye(b, w, A, L) {
- return dc(b, function(G, X, J) {
- w(L, G, A(G), J);
- }), L;
- }
- function Nz(b, w) {
- return b && al(w, ri(w), b);
- }
- function Zye(b, w) {
- return b && al(w, ya(w), b);
- }
- function au(b, w, A) {
- w == "__proto__" && iO ? iO(b, w, {
- configurable: !0,
- enumerable: !0,
- value: A,
- writable: !0
- }) : b[w] = A;
- }
- function G$(b, w) {
- for (var A = -1, L = w.length, G = Oe(L), X = b == null; ++A < L; )
- G[A] = X ? n : CA(b, w[A]);
- return G;
- }
- function qf(b, w, A) {
- return b === b && (A !== n && (b = b <= A ? b : A), w !== n && (b = b >= w ? b : w)), b;
- }
- function xo(b, w, A, L, G, X) {
- var J, ie = w & f, ge = w & d, Ee = w & h;
- if (A && (J = G ? A(b, L, G, X) : A(b)), J !== n)
- return J;
- if (!cr(b))
- return b;
- var Ie = Ft(b);
- if (Ie) {
- if (J = kbe(b), !ie)
- return ga(b, J);
- } else {
- var Ne = Ii(b), Ke = Ne == de || Ne == xe;
- if (gc(b))
- return sV(b, ie);
- if (Ne == Be || Ne == ue || Ke && !G) {
- if (J = ge || Ke ? {} : TV(b), !ie)
- return ge ? wbe(b, Zye(J, b)) : xbe(b, Nz(J, b));
- } else {
- if (!jn[Ne])
- return G ? b : {};
- J = Lbe(b, Ne, ie);
- }
- }
- X || (X = new ys());
- var ht = X.get(b);
- if (ht)
- return ht;
- X.set(b, J), tF(b) ? b.forEach(function($t) {
- J.add(xo($t, w, A, $t, b, X));
- }) : JV(b) && b.forEach(function($t, on) {
- J.set(on, xo($t, w, A, on, b, X));
- });
- var Pt = Ee ? ge ? fA : cA : ge ? ya : ri, Jt = Ie ? n : Pt(b);
- return _o(Jt || b, function($t, on) {
- Jt && (on = $t, $t = b[on]), a0(J, on, xo($t, w, A, on, b, X));
- }), J;
- }
- function Uye(b) {
- var w = ri(b);
- return function(A) {
- return Bz(A, b, w);
- };
- }
- function Bz(b, w, A) {
- var L = A.length;
- if (b == null)
- return !L;
- for (b = Fn(b); L--; ) {
- var G = A[L], X = w[G], J = b[G];
- if (J === n && !(G in b) || !X(J))
- return !1;
- }
- return !0;
- }
- function zz(b, w, A) {
- if (typeof b != "function")
- throw new Oo(o);
- return d0(function() {
- b.apply(n, A);
- }, w);
- }
- function o0(b, w, A, L) {
- var G = -1, X = Z1, J = !0, ie = b.length, ge = [], Ee = w.length;
- if (!ie)
- return ge;
- A && (w = ar(w, Wa(A))), L ? (X = M$, J = !1) : w.length >= i && (X = Jm, J = !1, w = new Yf(w));
- e:
- for (; ++G < ie; ) {
- var Ie = b[G], Ne = A == null ? Ie : A(Ie);
- if (Ie = L || Ie !== 0 ? Ie : 0, J && Ne === Ne) {
- for (var Ke = Ee; Ke--; )
- if (w[Ke] === Ne)
- continue e;
- ge.push(Ie);
- } else X(w, Ne, L) || ge.push(Ie);
- }
- return ge;
- }
- var dc = dV(il), Vz = dV(Z$, !0);
- function Xye(b, w) {
- var A = !0;
- return dc(b, function(L, G, X) {
- return A = !!w(L, G, X), A;
- }), A;
- }
- function fO(b, w, A) {
- for (var L = -1, G = b.length; ++L < G; ) {
- var X = b[L], J = w(X);
- if (J != null && (ie === n ? J === J && !Ha(J) : A(J, ie)))
- var ie = J, ge = X;
- }
- return ge;
- }
- function Yye(b, w, A, L) {
- var G = b.length;
- for (A = Yt(A), A < 0 && (A = -A > G ? 0 : G + A), L = L === n || L > G ? G : Yt(L), L < 0 && (L += G), L = A > L ? 0 : rF(L); A < L; )
- b[A++] = w;
- return b;
- }
- function Fz(b, w) {
- var A = [];
- return dc(b, function(L, G, X) {
- w(L, G, X) && A.push(L);
- }), A;
- }
- function hi(b, w, A, L, G) {
- var X = -1, J = b.length;
- for (A || (A = Bbe), G || (G = []); ++X < J; ) {
- var ie = b[X];
- w > 0 && A(ie) ? w > 1 ? hi(ie, w - 1, A, L, G) : uc(G, ie) : L || (G[G.length] = ie);
- }
- return G;
- }
- var j$ = hV(), Wz = hV(!0);
- function il(b, w) {
- return b && j$(b, w, ri);
- }
- function Z$(b, w) {
- return b && Wz(b, w, ri);
- }
- function dO(b, w) {
- return lc(w, function(A) {
- return uu(b[A]);
- });
- }
- function Kf(b, w) {
- w = pc(w, b);
- for (var A = 0, L = w.length; b != null && A < L; )
- b = b[ol(w[A++])];
- return A && A == L ? b : n;
- }
- function Qz(b, w, A) {
- var L = w(b);
- return Ft(b) ? L : uc(L, A(b));
- }
- function Zi(b) {
- return b == null ? b === n ? an : je : Uf && Uf in Fn(b) ? Ibe(b) : Gbe(b);
- }
- function U$(b, w) {
- return b > w;
- }
- function qye(b, w) {
- return b != null && Rn.call(b, w);
- }
- function Kye(b, w) {
- return b != null && w in Fn(b);
- }
- function Jye(b, w, A) {
- return b >= Mi(w, A) && b < Hr(w, A);
- }
- function X$(b, w, A) {
- for (var L = A ? M$ : Z1, G = b[0].length, X = b.length, J = X, ie = Oe(X), ge = 1 / 0, Ee = []; J--; ) {
- var Ie = b[J];
- J && w && (Ie = ar(Ie, Wa(w))), ge = Mi(Ie.length, ge), ie[J] = !A && (w || G >= 120 && Ie.length >= 120) ? new Yf(J && Ie) : n;
- }
- Ie = b[0];
- var Ne = -1, Ke = ie[0];
- e:
- for (; ++Ne < G && Ee.length < ge; ) {
- var ht = Ie[Ne], Pt = w ? w(ht) : ht;
- if (ht = A || ht !== 0 ? ht : 0, !(Ke ? Jm(Ke, Pt) : L(Ee, Pt, A))) {
- for (J = X; --J; ) {
- var Jt = ie[J];
- if (!(Jt ? Jm(Jt, Pt) : L(b[J], Pt, A)))
- continue e;
- }
- Ke && Ke.push(Pt), Ee.push(ht);
- }
- }
- return Ee;
- }
- function ebe(b, w, A, L) {
- return il(b, function(G, X, J) {
- w(L, A(G), X, J);
- }), L;
- }
- function s0(b, w, A) {
- w = pc(w, b), b = EV(b, w);
- var L = b == null ? b : b[ol(Co(w))];
- return L == null ? n : Fa(L, b, A);
- }
- function Hz(b) {
- return gr(b) && Zi(b) == ue;
- }
- function tbe(b) {
- return gr(b) && Zi(b) == Xt;
- }
- function nbe(b) {
- return gr(b) && Zi(b) == re;
- }
- function l0(b, w, A, L, G) {
- return b === w ? !0 : b == null || w == null || !gr(b) && !gr(w) ? b !== b && w !== w : rbe(b, w, A, L, l0, G);
- }
- function rbe(b, w, A, L, G, X) {
- var J = Ft(b), ie = Ft(w), ge = J ? ye : Ii(b), Ee = ie ? ye : Ii(w);
- ge = ge == ue ? Be : ge, Ee = Ee == ue ? Be : Ee;
- var Ie = ge == Be, Ne = Ee == Be, Ke = ge == Ee;
- if (Ke && gc(b)) {
- if (!gc(w))
- return !1;
- J = !0, Ie = !1;
- }
- if (Ke && !Ie)
- return X || (X = new ys()), J || Np(b) ? xV(b, w, A, L, G, X) : Ebe(b, w, ge, A, L, G, X);
- if (!(A & p)) {
- var ht = Ie && Rn.call(b, "__wrapped__"), Pt = Ne && Rn.call(w, "__wrapped__");
- if (ht || Pt) {
- var Jt = ht ? b.value() : b, $t = Pt ? w.value() : w;
- return X || (X = new ys()), G(Jt, $t, A, L, X);
- }
- }
- return Ke ? (X || (X = new ys()), Mbe(b, w, A, L, G, X)) : !1;
- }
- function ibe(b) {
- return gr(b) && Ii(b) == we;
- }
- function Y$(b, w, A, L) {
- var G = A.length, X = G, J = !L;
- if (b == null)
- return !X;
- for (b = Fn(b); G--; ) {
- var ie = A[G];
- if (J && ie[2] ? ie[1] !== b[ie[0]] : !(ie[0] in b))
- return !1;
- }
- for (; ++G < X; ) {
- ie = A[G];
- var ge = ie[0], Ee = b[ge], Ie = ie[1];
- if (J && ie[2]) {
- if (Ee === n && !(ge in b))
- return !1;
- } else {
- var Ne = new ys();
- if (L)
- var Ke = L(Ee, Ie, ge, b, w, Ne);
- if (!(Ke === n ? l0(Ie, Ee, p | v, L, Ne) : Ke))
- return !1;
- }
- }
- return !0;
- }
- function Gz(b) {
- if (!cr(b) || Vbe(b))
- return !1;
- var w = uu(b) ? iye : S$;
- return w.test(ed(b));
- }
- function abe(b) {
- return gr(b) && Zi(b) == Fe;
- }
- function obe(b) {
- return gr(b) && Ii(b) == Ye;
- }
- function sbe(b) {
- return gr(b) && AO(b.length) && !!qn[Zi(b)];
- }
- function jz(b) {
- return typeof b == "function" ? b : b == null ? ba : typeof b == "object" ? Ft(b) ? Xz(b[0], b[1]) : Uz(b) : pF(b);
- }
- function q$(b) {
- if (!f0(b))
- return cye(b);
- var w = [];
- for (var A in Fn(b))
- Rn.call(b, A) && A != "constructor" && w.push(A);
- return w;
- }
- function lbe(b) {
- if (!cr(b))
- return Hbe(b);
- var w = f0(b), A = [];
- for (var L in b)
- L == "constructor" && (w || !Rn.call(b, L)) || A.push(L);
- return A;
- }
- function K$(b, w) {
- return b < w;
- }
- function Zz(b, w) {
- var A = -1, L = ma(b) ? Oe(b.length) : [];
- return dc(b, function(G, X, J) {
- L[++A] = w(G, X, J);
- }), L;
- }
- function Uz(b) {
- var w = hA(b);
- return w.length == 1 && w[0][2] ? $V(w[0][0], w[0][1]) : function(A) {
- return A === b || Y$(A, b, w);
- };
- }
- function Xz(b, w) {
- return vA(b) && PV(w) ? $V(ol(b), w) : function(A) {
- var L = CA(A, b);
- return L === n && L === w ? TA(A, b) : l0(w, L, p | v);
- };
- }
- function hO(b, w, A, L, G) {
- b !== w && j$(w, function(X, J) {
- if (G || (G = new ys()), cr(X))
- ube(b, w, J, A, hO, L, G);
- else {
- var ie = L ? L(mA(b, J), X, J + "", b, w, G) : n;
- ie === n && (ie = X), H$(b, J, ie);
- }
- }, ya);
- }
- function ube(b, w, A, L, G, X, J) {
- var ie = mA(b, A), ge = mA(w, A), Ee = J.get(ge);
- if (Ee) {
- H$(b, A, Ee);
- return;
- }
- var Ie = X ? X(ie, ge, A + "", b, w, J) : n, Ne = Ie === n;
- if (Ne) {
- var Ke = Ft(ge), ht = !Ke && gc(ge), Pt = !Ke && !ht && Np(ge);
- Ie = ge, Ke || ht || Pt ? Ft(ie) ? Ie = ie : Cr(ie) ? Ie = ga(ie) : ht ? (Ne = !1, Ie = sV(ge, !0)) : Pt ? (Ne = !1, Ie = lV(ge, !0)) : Ie = [] : h0(ge) || td(ge) ? (Ie = ie, td(ie) ? Ie = iF(ie) : (!cr(ie) || uu(ie)) && (Ie = TV(ge))) : Ne = !1;
- }
- Ne && (J.set(ge, Ie), G(Ie, ge, L, X, J), J.delete(ge)), H$(b, A, Ie);
- }
- function Yz(b, w) {
- var A = b.length;
- if (A)
- return w += w < 0 ? A : 0, lu(w, A) ? b[w] : n;
- }
- function qz(b, w, A) {
- w.length ? w = ar(w, function(X) {
- return Ft(X) ? function(J) {
- return Kf(J, X.length === 1 ? X[0] : X);
- } : X;
- }) : w = [ba];
- var L = -1;
- w = ar(w, Wa(wt()));
- var G = Zz(b, function(X, J, ie) {
- var ge = ar(w, function(Ee) {
- return Ee(X);
- });
- return { criteria: ge, index: ++L, value: X };
- });
- return L0e(G, function(X, J) {
- return Sbe(X, J, A);
- });
- }
- function cbe(b, w) {
- return Kz(b, w, function(A, L) {
- return TA(b, L);
- });
- }
- function Kz(b, w, A) {
- for (var L = -1, G = w.length, X = {}; ++L < G; ) {
- var J = w[L], ie = Kf(b, J);
- A(ie, J) && u0(X, pc(J, b), ie);
- }
- return X;
- }
- function fbe(b) {
- return function(w) {
- return Kf(w, b);
- };
- }
- function J$(b, w, A, L) {
- var G = L ? k0e : Tp, X = -1, J = w.length, ie = b;
- for (b === w && (w = ga(w)), A && (ie = ar(b, Wa(A))); ++X < J; )
- for (var ge = 0, Ee = w[X], Ie = A ? A(Ee) : Ee; (ge = G(ie, Ie, ge, L)) > -1; )
- ie !== b && rO.call(ie, ge, 1), rO.call(b, ge, 1);
- return b;
- }
- function Jz(b, w) {
- for (var A = b ? w.length : 0, L = A - 1; A--; ) {
- var G = w[A];
- if (A == L || G !== X) {
- var X = G;
- lu(G) ? rO.call(b, G, 1) : rA(b, G);
- }
- }
- return b;
- }
- function eA(b, w) {
- return b + oO(Dz() * (w - b + 1));
- }
- function dbe(b, w, A, L) {
- for (var G = -1, X = Hr(aO((w - b) / (A || 1)), 0), J = Oe(X); X--; )
- J[L ? X : ++G] = b, b += A;
- return J;
- }
- function tA(b, w) {
- var A = "";
- if (!b || w < 1 || w > W)
- return A;
- do
- w % 2 && (A += b), w = oO(w / 2), w && (b += b);
- while (w);
- return A;
- }
- function nn(b, w) {
- return yA(AV(b, w, ba), b + "");
- }
- function hbe(b) {
- return Lz(Bp(b));
- }
- function pbe(b, w) {
- var A = Bp(b);
- return xO(A, qf(w, 0, A.length));
- }
- function u0(b, w, A, L) {
- if (!cr(b))
- return b;
- w = pc(w, b);
- for (var G = -1, X = w.length, J = X - 1, ie = b; ie != null && ++G < X; ) {
- var ge = ol(w[G]), Ee = A;
- if (ge === "__proto__" || ge === "constructor" || ge === "prototype")
- return b;
- if (G != J) {
- var Ie = ie[ge];
- Ee = L ? L(Ie, ge, ie) : n, Ee === n && (Ee = cr(Ie) ? Ie : lu(w[G + 1]) ? [] : {});
- }
- a0(ie, ge, Ee), ie = ie[ge];
- }
- return b;
- }
- var eV = sO ? function(b, w) {
- return sO.set(b, w), b;
- } : ba, vbe = iO ? function(b, w) {
- return iO(b, "toString", {
- configurable: !0,
- enumerable: !1,
- value: $A(w),
- writable: !0
- });
- } : ba;
- function gbe(b) {
- return xO(Bp(b));
- }
- function wo(b, w, A) {
- var L = -1, G = b.length;
- w < 0 && (w = -w > G ? 0 : G + w), A = A > G ? G : A, A < 0 && (A += G), G = w > A ? 0 : A - w >>> 0, w >>>= 0;
- for (var X = Oe(G); ++L < G; )
- X[L] = b[L + w];
- return X;
- }
- function mbe(b, w) {
- var A;
- return dc(b, function(L, G, X) {
- return A = w(L, G, X), !A;
- }), !!A;
- }
- function pO(b, w, A) {
- var L = 0, G = b == null ? L : b.length;
- if (typeof w == "number" && w === w && G <= ne) {
- for (; L < G; ) {
- var X = L + G >>> 1, J = b[X];
- J !== null && !Ha(J) && (A ? J <= w : J < w) ? L = X + 1 : G = X;
- }
- return G;
- }
- return nA(b, w, ba, A);
- }
- function nA(b, w, A, L) {
- var G = 0, X = b == null ? 0 : b.length;
- if (X === 0)
- return 0;
- w = A(w);
- for (var J = w !== w, ie = w === null, ge = Ha(w), Ee = w === n; G < X; ) {
- var Ie = oO((G + X) / 2), Ne = A(b[Ie]), Ke = Ne !== n, ht = Ne === null, Pt = Ne === Ne, Jt = Ha(Ne);
- if (J)
- var $t = L || Pt;
- else Ee ? $t = Pt && (L || Ke) : ie ? $t = Pt && Ke && (L || !ht) : ge ? $t = Pt && Ke && !ht && (L || !Jt) : ht || Jt ? $t = !1 : $t = L ? Ne <= w : Ne < w;
- $t ? G = Ie + 1 : X = Ie;
- }
- return Mi(X, Y);
- }
- function tV(b, w) {
- for (var A = -1, L = b.length, G = 0, X = []; ++A < L; ) {
- var J = b[A], ie = w ? w(J) : J;
- if (!A || !bs(ie, ge)) {
- var ge = ie;
- X[G++] = J === 0 ? 0 : J;
- }
- }
- return X;
- }
- function nV(b) {
- return typeof b == "number" ? b : Ha(b) ? U : +b;
- }
- function Qa(b) {
- if (typeof b == "string")
- return b;
- if (Ft(b))
- return ar(b, Qa) + "";
- if (Ha(b))
- return Rz ? Rz.call(b) : "";
- var w = b + "";
- return w == "0" && 1 / b == -Q ? "-0" : w;
- }
- function hc(b, w, A) {
- var L = -1, G = Z1, X = b.length, J = !0, ie = [], ge = ie;
- if (A)
- J = !1, G = M$;
- else if (X >= i) {
- var Ee = w ? null : $be(b);
- if (Ee)
- return X1(Ee);
- J = !1, G = Jm, ge = new Yf();
- } else
- ge = w ? [] : ie;
- e:
- for (; ++L < X; ) {
- var Ie = b[L], Ne = w ? w(Ie) : Ie;
- if (Ie = A || Ie !== 0 ? Ie : 0, J && Ne === Ne) {
- for (var Ke = ge.length; Ke--; )
- if (ge[Ke] === Ne)
- continue e;
- w && ge.push(Ne), ie.push(Ie);
- } else G(ge, Ne, A) || (ge !== ie && ge.push(Ne), ie.push(Ie));
- }
- return ie;
- }
- function rA(b, w) {
- return w = pc(w, b), b = EV(b, w), b == null || delete b[ol(Co(w))];
- }
- function rV(b, w, A, L) {
- return u0(b, w, A(Kf(b, w)), L);
- }
- function vO(b, w, A, L) {
- for (var G = b.length, X = L ? G : -1; (L ? X-- : ++X < G) && w(b[X], X, b); )
- ;
- return A ? wo(b, L ? 0 : X, L ? X + 1 : G) : wo(b, L ? X + 1 : 0, L ? G : X);
- }
- function iV(b, w) {
- var A = b;
- return A instanceof un && (A = A.value()), I$(w, function(L, G) {
- return G.func.apply(G.thisArg, uc([L], G.args));
- }, A);
- }
- function iA(b, w, A) {
- var L = b.length;
- if (L < 2)
- return L ? hc(b[0]) : [];
- for (var G = -1, X = Oe(L); ++G < L; )
- for (var J = b[G], ie = -1; ++ie < L; )
- ie != G && (X[G] = o0(X[G] || J, b[ie], w, A));
- return hc(hi(X, 1), w, A);
- }
- function aV(b, w, A) {
- for (var L = -1, G = b.length, X = w.length, J = {}; ++L < G; ) {
- var ie = L < X ? w[L] : n;
- A(J, b[L], ie);
- }
- return J;
- }
- function aA(b) {
- return Cr(b) ? b : [];
- }
- function oA(b) {
- return typeof b == "function" ? b : ba;
- }
- function pc(b, w) {
- return Ft(b) ? b : vA(b, w) ? [b] : RV(An(b));
- }
- var ybe = nn;
- function vc(b, w, A) {
- var L = b.length;
- return A = A === n ? L : A, !w && A >= L ? b : wo(b, w, A);
- }
- var oV = aye || function(b) {
- return di.clearTimeout(b);
- };
- function sV(b, w) {
- if (w)
- return b.slice();
- var A = b.length, L = $z ? $z(A) : new b.constructor(A);
- return b.copy(L), L;
- }
- function sA(b) {
- var w = new b.constructor(b.byteLength);
- return new tO(w).set(new tO(b)), w;
- }
- function bbe(b, w) {
- var A = w ? sA(b.buffer) : b.buffer;
- return new b.constructor(A, b.byteOffset, b.byteLength);
- }
- function _be(b) {
- var w = new b.constructor(b.source, qm.exec(b));
- return w.lastIndex = b.lastIndex, w;
- }
- function Obe(b) {
- return i0 ? Fn(i0.call(b)) : {};
- }
- function lV(b, w) {
- var A = w ? sA(b.buffer) : b.buffer;
- return new b.constructor(A, b.byteOffset, b.length);
- }
- function uV(b, w) {
- if (b !== w) {
- var A = b !== n, L = b === null, G = b === b, X = Ha(b), J = w !== n, ie = w === null, ge = w === w, Ee = Ha(w);
- if (!ie && !Ee && !X && b > w || X && J && ge && !ie && !Ee || L && J && ge || !A && ge || !G)
- return 1;
- if (!L && !X && !Ee && b < w || Ee && A && G && !L && !X || ie && A && G || !J && G || !ge)
- return -1;
- }
- return 0;
- }
- function Sbe(b, w, A) {
- for (var L = -1, G = b.criteria, X = w.criteria, J = G.length, ie = A.length; ++L < J; ) {
- var ge = uV(G[L], X[L]);
- if (ge) {
- if (L >= ie)
- return ge;
- var Ee = A[L];
- return ge * (Ee == "desc" ? -1 : 1);
- }
- }
- return b.index - w.index;
- }
- function cV(b, w, A, L) {
- for (var G = -1, X = b.length, J = A.length, ie = -1, ge = w.length, Ee = Hr(X - J, 0), Ie = Oe(ge + Ee), Ne = !L; ++ie < ge; )
- Ie[ie] = w[ie];
- for (; ++G < J; )
- (Ne || G < X) && (Ie[A[G]] = b[G]);
- for (; Ee--; )
- Ie[ie++] = b[G++];
- return Ie;
- }
- function fV(b, w, A, L) {
- for (var G = -1, X = b.length, J = -1, ie = A.length, ge = -1, Ee = w.length, Ie = Hr(X - ie, 0), Ne = Oe(Ie + Ee), Ke = !L; ++G < Ie; )
- Ne[G] = b[G];
- for (var ht = G; ++ge < Ee; )
- Ne[ht + ge] = w[ge];
- for (; ++J < ie; )
- (Ke || G < X) && (Ne[ht + A[J]] = b[G++]);
- return Ne;
- }
- function ga(b, w) {
- var A = -1, L = b.length;
- for (w || (w = Oe(L)); ++A < L; )
- w[A] = b[A];
- return w;
- }
- function al(b, w, A, L) {
- var G = !A;
- A || (A = {});
- for (var X = -1, J = w.length; ++X < J; ) {
- var ie = w[X], ge = L ? L(A[ie], b[ie], ie, A, b) : n;
- ge === n && (ge = b[ie]), G ? au(A, ie, ge) : a0(A, ie, ge);
- }
- return A;
- }
- function xbe(b, w) {
- return al(b, pA(b), w);
- }
- function wbe(b, w) {
- return al(b, wV(b), w);
- }
- function gO(b, w) {
- return function(A, L) {
- var G = Ft(A) ? A0e : jye, X = w ? w() : {};
- return G(A, b, wt(L, 2), X);
- };
- }
- function Rp(b) {
- return nn(function(w, A) {
- var L = -1, G = A.length, X = G > 1 ? A[G - 1] : n, J = G > 2 ? A[2] : n;
- for (X = b.length > 3 && typeof X == "function" ? (G--, X) : n, J && Ui(A[0], A[1], J) && (X = G < 3 ? n : X, G = 1), w = Fn(w); ++L < G; ) {
- var ie = A[L];
- ie && b(w, ie, L, X);
- }
- return w;
- });
- }
- function dV(b, w) {
- return function(A, L) {
- if (A == null)
- return A;
- if (!ma(A))
- return b(A, L);
- for (var G = A.length, X = w ? G : -1, J = Fn(A); (w ? X-- : ++X < G) && L(J[X], X, J) !== !1; )
- ;
- return A;
- };
- }
- function hV(b) {
- return function(w, A, L) {
- for (var G = -1, X = Fn(w), J = L(w), ie = J.length; ie--; ) {
- var ge = J[b ? ie : ++G];
- if (A(X[ge], ge, X) === !1)
- break;
- }
- return w;
- };
- }
- function Cbe(b, w, A) {
- var L = w & g, G = c0(b);
- function X() {
- var J = this && this !== di && this instanceof X ? G : b;
- return J.apply(L ? A : this, arguments);
- }
- return X;
- }
- function pV(b) {
- return function(w) {
- w = An(w);
- var A = Pp(w) ? ms(w) : n, L = A ? A[0] : w.charAt(0), G = A ? vc(A, 1).join("") : w.slice(1);
- return L[b]() + G;
- };
- }
- function kp(b) {
- return function(w) {
- return I$(dF(fF(w).replace(v0e, "")), b, "");
- };
- }
- function c0(b) {
- return function() {
- var w = arguments;
- switch (w.length) {
- case 0:
- return new b();
- case 1:
- return new b(w[0]);
- case 2:
- return new b(w[0], w[1]);
- case 3:
- return new b(w[0], w[1], w[2]);
- case 4:
- return new b(w[0], w[1], w[2], w[3]);
- case 5:
- return new b(w[0], w[1], w[2], w[3], w[4]);
- case 6:
- return new b(w[0], w[1], w[2], w[3], w[4], w[5]);
- case 7:
- return new b(w[0], w[1], w[2], w[3], w[4], w[5], w[6]);
- }
- var A = Dp(b.prototype), L = b.apply(A, w);
- return cr(L) ? L : A;
- };
- }
- function Tbe(b, w, A) {
- var L = c0(b);
- function G() {
- for (var X = arguments.length, J = Oe(X), ie = X, ge = Lp(G); ie--; )
- J[ie] = arguments[ie];
- var Ee = X < 3 && J[0] !== ge && J[X - 1] !== ge ? [] : cc(J, ge);
- if (X -= Ee.length, X < A)
- return bV(
- b,
- w,
- mO,
- G.placeholder,
- n,
- J,
- Ee,
- n,
- n,
- A - X
- );
- var Ie = this && this !== di && this instanceof G ? L : b;
- return Fa(Ie, this, J);
- }
- return G;
- }
- function vV(b) {
- return function(w, A, L) {
- var G = Fn(w);
- if (!ma(w)) {
- var X = wt(A, 3);
- w = ri(w), A = function(ie) {
- return X(G[ie], ie, G);
- };
- }
- var J = b(w, A, L);
- return J > -1 ? G[X ? w[J] : J] : n;
- };
- }
- function gV(b) {
- return su(function(w) {
- var A = w.length, L = A, G = So.prototype.thru;
- for (b && w.reverse(); L--; ) {
- var X = w[L];
- if (typeof X != "function")
- throw new Oo(o);
- if (G && !J && OO(X) == "wrapper")
- var J = new So([], !0);
- }
- for (L = J ? L : A; ++L < A; ) {
- X = w[L];
- var ie = OO(X), ge = ie == "wrapper" ? dA(X) : n;
- ge && gA(ge[0]) && ge[1] == (C | _ | S | P) && !ge[4].length && ge[9] == 1 ? J = J[OO(ge[0])].apply(J, ge[3]) : J = X.length == 1 && gA(X) ? J[ie]() : J.thru(X);
- }
- return function() {
- var Ee = arguments, Ie = Ee[0];
- if (J && Ee.length == 1 && Ft(Ie))
- return J.plant(Ie).value();
- for (var Ne = 0, Ke = A ? w[Ne].apply(this, Ee) : Ie; ++Ne < A; )
- Ke = w[Ne].call(this, Ke);
- return Ke;
- };
- });
- }
- function mO(b, w, A, L, G, X, J, ie, ge, Ee) {
- var Ie = w & C, Ne = w & g, Ke = w & m, ht = w & (_ | O), Pt = w & $, Jt = Ke ? n : c0(b);
- function $t() {
- for (var on = arguments.length, pn = Oe(on), Ga = on; Ga--; )
- pn[Ga] = arguments[Ga];
- if (ht)
- var Xi = Lp($t), ja = B0e(pn, Xi);
- if (L && (pn = cV(pn, L, G, ht)), X && (pn = fV(pn, X, J, ht)), on -= ja, ht && on < Ee) {
- var Tr = cc(pn, Xi);
- return bV(
- b,
- w,
- mO,
- $t.placeholder,
- A,
- pn,
- Tr,
- ie,
- ge,
- Ee - on
- );
- }
- var _s = Ne ? A : this, fu = Ke ? _s[b] : b;
- return on = pn.length, ie ? pn = jbe(pn, ie) : Pt && on > 1 && pn.reverse(), Ie && ge < on && (pn.length = ge), this && this !== di && this instanceof $t && (fu = Jt || c0(fu)), fu.apply(_s, pn);
- }
- return $t;
- }
- function mV(b, w) {
- return function(A, L) {
- return ebe(A, b, w(L), {});
- };
- }
- function yO(b, w) {
- return function(A, L) {
- var G;
- if (A === n && L === n)
- return w;
- if (A !== n && (G = A), L !== n) {
- if (G === n)
- return L;
- typeof A == "string" || typeof L == "string" ? (A = Qa(A), L = Qa(L)) : (A = nV(A), L = nV(L)), G = b(A, L);
- }
- return G;
- };
- }
- function lA(b) {
- return su(function(w) {
- return w = ar(w, Wa(wt())), nn(function(A) {
- var L = this;
- return b(w, function(G) {
- return Fa(G, L, A);
- });
- });
- });
- }
- function bO(b, w) {
- w = w === n ? " " : Qa(w);
- var A = w.length;
- if (A < 2)
- return A ? tA(w, b) : w;
- var L = tA(w, aO(b / $p(w)));
- return Pp(w) ? vc(ms(L), 0, b).join("") : L.slice(0, b);
- }
- function Pbe(b, w, A, L) {
- var G = w & g, X = c0(b);
- function J() {
- for (var ie = -1, ge = arguments.length, Ee = -1, Ie = L.length, Ne = Oe(Ie + ge), Ke = this && this !== di && this instanceof J ? X : b; ++Ee < Ie; )
- Ne[Ee] = L[Ee];
- for (; ge--; )
- Ne[Ee++] = arguments[++ie];
- return Fa(Ke, G ? A : this, Ne);
- }
- return J;
- }
- function yV(b) {
- return function(w, A, L) {
- return L && typeof L != "number" && Ui(w, A, L) && (A = L = n), w = cu(w), A === n ? (A = w, w = 0) : A = cu(A), L = L === n ? w < A ? 1 : -1 : cu(L), dbe(w, A, L, b);
- };
- }
- function _O(b) {
- return function(w, A) {
- return typeof w == "string" && typeof A == "string" || (w = To(w), A = To(A)), b(w, A);
- };
- }
- function bV(b, w, A, L, G, X, J, ie, ge, Ee) {
- var Ie = w & _, Ne = Ie ? J : n, Ke = Ie ? n : J, ht = Ie ? X : n, Pt = Ie ? n : X;
- w |= Ie ? S : x, w &= ~(Ie ? x : S), w & y || (w &= ~(g | m));
- var Jt = [
- b,
- w,
- G,
- ht,
- Ne,
- Pt,
- Ke,
- ie,
- ge,
- Ee
- ], $t = A.apply(n, Jt);
- return gA(b) && MV($t, Jt), $t.placeholder = L, IV($t, b, w);
- }
- function uA(b) {
- var w = Qr[b];
- return function(A, L) {
- if (A = To(A), L = L == null ? 0 : Mi(Yt(L), 292), L && Iz(A)) {
- var G = (An(A) + "e").split("e"), X = w(G[0] + "e" + (+G[1] + L));
- return G = (An(X) + "e").split("e"), +(G[0] + "e" + (+G[1] - L));
- }
- return w(A);
- };
- }
- var $be = Mp && 1 / X1(new Mp([, -0]))[1] == Q ? function(b) {
- return new Mp(b);
- } : MA;
- function _V(b) {
- return function(w) {
- var A = Ii(w);
- return A == we ? z$(w) : A == Ye ? G0e(w) : N0e(w, b(w));
- };
- }
- function ou(b, w, A, L, G, X, J, ie) {
- var ge = w & m;
- if (!ge && typeof b != "function")
- throw new Oo(o);
- var Ee = L ? L.length : 0;
- if (Ee || (w &= ~(S | x), L = G = n), J = J === n ? J : Hr(Yt(J), 0), ie = ie === n ? ie : Yt(ie), Ee -= G ? G.length : 0, w & x) {
- var Ie = L, Ne = G;
- L = G = n;
- }
- var Ke = ge ? n : dA(b), ht = [
- b,
- w,
- A,
- L,
- G,
- Ie,
- Ne,
- X,
- J,
- ie
- ];
- if (Ke && Qbe(ht, Ke), b = ht[0], w = ht[1], A = ht[2], L = ht[3], G = ht[4], ie = ht[9] = ht[9] === n ? ge ? 0 : b.length : Hr(ht[9] - Ee, 0), !ie && w & (_ | O) && (w &= ~(_ | O)), !w || w == g)
- var Pt = Cbe(b, w, A);
- else w == _ || w == O ? Pt = Tbe(b, w, ie) : (w == S || w == (g | S)) && !G.length ? Pt = Pbe(b, w, A, L) : Pt = mO.apply(n, ht);
- var Jt = Ke ? eV : MV;
- return IV(Jt(Pt, ht), b, w);
- }
- function OV(b, w, A, L) {
- return b === n || bs(b, Ep[A]) && !Rn.call(L, A) ? w : b;
- }
- function SV(b, w, A, L, G, X) {
- return cr(b) && cr(w) && (X.set(w, b), hO(b, w, n, SV, X), X.delete(w)), b;
- }
- function Abe(b) {
- return h0(b) ? n : b;
- }
- function xV(b, w, A, L, G, X) {
- var J = A & p, ie = b.length, ge = w.length;
- if (ie != ge && !(J && ge > ie))
- return !1;
- var Ee = X.get(b), Ie = X.get(w);
- if (Ee && Ie)
- return Ee == w && Ie == b;
- var Ne = -1, Ke = !0, ht = A & v ? new Yf() : n;
- for (X.set(b, w), X.set(w, b); ++Ne < ie; ) {
- var Pt = b[Ne], Jt = w[Ne];
- if (L)
- var $t = J ? L(Jt, Pt, Ne, w, b, X) : L(Pt, Jt, Ne, b, w, X);
- if ($t !== n) {
- if ($t)
- continue;
- Ke = !1;
- break;
- }
- if (ht) {
- if (!D$(w, function(on, pn) {
- if (!Jm(ht, pn) && (Pt === on || G(Pt, on, A, L, X)))
- return ht.push(pn);
- })) {
- Ke = !1;
- break;
- }
- } else if (!(Pt === Jt || G(Pt, Jt, A, L, X))) {
- Ke = !1;
- break;
- }
- }
- return X.delete(b), X.delete(w), Ke;
- }
- function Ebe(b, w, A, L, G, X, J) {
- switch (A) {
- case Bn:
- if (b.byteLength != w.byteLength || b.byteOffset != w.byteOffset)
- return !1;
- b = b.buffer, w = w.buffer;
- case Xt:
- return !(b.byteLength != w.byteLength || !X(new tO(b), new tO(w)));
- case he:
- case re:
- case He:
- return bs(+b, +w);
- case K:
- return b.name == w.name && b.message == w.message;
- case Fe:
- case xt:
- return b == w + "";
- case we:
- var ie = z$;
- case Ye:
- var ge = L & p;
- if (ie || (ie = X1), b.size != w.size && !ge)
- return !1;
- var Ee = J.get(b);
- if (Ee)
- return Ee == w;
- L |= v, J.set(b, w);
- var Ie = xV(ie(b), ie(w), L, G, X, J);
- return J.delete(b), Ie;
- case It:
- if (i0)
- return i0.call(b) == i0.call(w);
- }
- return !1;
- }
- function Mbe(b, w, A, L, G, X) {
- var J = A & p, ie = cA(b), ge = ie.length, Ee = cA(w), Ie = Ee.length;
- if (ge != Ie && !J)
- return !1;
- for (var Ne = ge; Ne--; ) {
- var Ke = ie[Ne];
- if (!(J ? Ke in w : Rn.call(w, Ke)))
- return !1;
- }
- var ht = X.get(b), Pt = X.get(w);
- if (ht && Pt)
- return ht == w && Pt == b;
- var Jt = !0;
- X.set(b, w), X.set(w, b);
- for (var $t = J; ++Ne < ge; ) {
- Ke = ie[Ne];
- var on = b[Ke], pn = w[Ke];
- if (L)
- var Ga = J ? L(pn, on, Ke, w, b, X) : L(on, pn, Ke, b, w, X);
- if (!(Ga === n ? on === pn || G(on, pn, A, L, X) : Ga)) {
- Jt = !1;
- break;
- }
- $t || ($t = Ke == "constructor");
- }
- if (Jt && !$t) {
- var Xi = b.constructor, ja = w.constructor;
- Xi != ja && "constructor" in b && "constructor" in w && !(typeof Xi == "function" && Xi instanceof Xi && typeof ja == "function" && ja instanceof ja) && (Jt = !1);
- }
- return X.delete(b), X.delete(w), Jt;
- }
- function su(b) {
- return yA(AV(b, n, BV), b + "");
- }
- function cA(b) {
- return Qz(b, ri, pA);
- }
- function fA(b) {
- return Qz(b, ya, wV);
- }
- var dA = sO ? function(b) {
- return sO.get(b);
- } : MA;
- function OO(b) {
- for (var w = b.name + "", A = Ip[w], L = Rn.call(Ip, w) ? A.length : 0; L--; ) {
- var G = A[L], X = G.func;
- if (X == null || X == b)
- return G.name;
- }
- return w;
- }
- function Lp(b) {
- var w = Rn.call(Z, "placeholder") ? Z : b;
- return w.placeholder;
- }
- function wt() {
- var b = Z.iteratee || AA;
- return b = b === AA ? jz : b, arguments.length ? b(arguments[0], arguments[1]) : b;
- }
- function SO(b, w) {
- var A = b.__data__;
- return zbe(w) ? A[typeof w == "string" ? "string" : "hash"] : A.map;
- }
- function hA(b) {
- for (var w = ri(b), A = w.length; A--; ) {
- var L = w[A], G = b[L];
- w[A] = [L, G, PV(G)];
- }
- return w;
- }
- function Jf(b, w) {
- var A = W0e(b, w);
- return Gz(A) ? A : n;
- }
- function Ibe(b) {
- var w = Rn.call(b, Uf), A = b[Uf];
- try {
- b[Uf] = n;
- var L = !0;
- } catch {
- }
- var G = J1.call(b);
- return L && (w ? b[Uf] = A : delete b[Uf]), G;
- }
- var pA = F$ ? function(b) {
- return b == null ? [] : (b = Fn(b), lc(F$(b), function(w) {
- return Ez.call(b, w);
- }));
- } : IA, wV = F$ ? function(b) {
- for (var w = []; b; )
- uc(w, pA(b)), b = nO(b);
- return w;
- } : IA, Ii = Zi;
- (W$ && Ii(new W$(new ArrayBuffer(1))) != Bn || t0 && Ii(new t0()) != we || Q$ && Ii(Q$.resolve()) != Le || Mp && Ii(new Mp()) != Ye || n0 && Ii(new n0()) != Ae) && (Ii = function(b) {
- var w = Zi(b), A = w == Be ? b.constructor : n, L = A ? ed(A) : "";
- if (L)
- switch (L) {
- case pye:
- return Bn;
- case vye:
- return we;
- case gye:
- return Le;
- case mye:
- return Ye;
- case yye:
- return Ae;
- }
- return w;
- });
- function Dbe(b, w, A) {
- for (var L = -1, G = A.length; ++L < G; ) {
- var X = A[L], J = X.size;
- switch (X.type) {
- case "drop":
- b += J;
- break;
- case "dropRight":
- w -= J;
- break;
- case "take":
- w = Mi(w, b + J);
- break;
- case "takeRight":
- b = Hr(b, w - J);
- break;
- }
- }
- return { start: b, end: w };
- }
- function Rbe(b) {
- var w = b.match(_$);
- return w ? w[1].split(V1) : [];
- }
- function CV(b, w, A) {
- w = pc(w, b);
- for (var L = -1, G = w.length, X = !1; ++L < G; ) {
- var J = ol(w[L]);
- if (!(X = b != null && A(b, J)))
- break;
- b = b[J];
- }
- return X || ++L != G ? X : (G = b == null ? 0 : b.length, !!G && AO(G) && lu(J, G) && (Ft(b) || td(b)));
- }
- function kbe(b) {
- var w = b.length, A = new b.constructor(w);
- return w && typeof b[0] == "string" && Rn.call(b, "index") && (A.index = b.index, A.input = b.input), A;
- }
- function TV(b) {
- return typeof b.constructor == "function" && !f0(b) ? Dp(nO(b)) : {};
- }
- function Lbe(b, w, A) {
- var L = b.constructor;
- switch (w) {
- case Xt:
- return sA(b);
- case he:
- case re:
- return new L(+b);
- case Bn:
- return bbe(b, A);
- case Dn:
- case Dr:
- case ji:
- case tu:
- case nu:
- case oc:
- case Qf:
- case rl:
- case Hf:
- return lV(b, A);
- case we:
- return new L();
- case He:
- case xt:
- return new L(b);
- case Fe:
- return _be(b);
- case Ye:
- return new L();
- case It:
- return Obe(b);
- }
- }
- function Nbe(b, w) {
- var A = w.length;
- if (!A)
- return b;
- var L = A - 1;
- return w[L] = (A > 1 ? "& " : "") + w[L], w = w.join(A > 2 ? ", " : " "), b.replace(b$, `{
- /* [wrapped with ` + w + `] */
- `);
- }
- function Bbe(b) {
- return Ft(b) || td(b) || !!(Mz && b && b[Mz]);
- }
- function lu(b, w) {
- var A = typeof b;
- return w = w ?? W, !!w && (A == "number" || A != "symbol" && H1.test(b)) && b > -1 && b % 1 == 0 && b < w;
- }
- function Ui(b, w, A) {
- if (!cr(A))
- return !1;
- var L = typeof w;
- return (L == "number" ? ma(A) && lu(w, A.length) : L == "string" && w in A) ? bs(A[w], b) : !1;
- }
- function vA(b, w) {
- if (Ft(b))
- return !1;
- var A = typeof b;
- return A == "number" || A == "symbol" || A == "boolean" || b == null || Ha(b) ? !0 : z1.test(b) || !Zm.test(b) || w != null && b in Fn(w);
- }
- function zbe(b) {
- var w = typeof b;
- return w == "string" || w == "number" || w == "symbol" || w == "boolean" ? b !== "__proto__" : b === null;
- }
- function gA(b) {
- var w = OO(b), A = Z[w];
- if (typeof A != "function" || !(w in un.prototype))
- return !1;
- if (b === A)
- return !0;
- var L = dA(A);
- return !!L && b === L[0];
- }
- function Vbe(b) {
- return !!Pz && Pz in b;
- }
- var Fbe = q1 ? uu : DA;
- function f0(b) {
- var w = b && b.constructor, A = typeof w == "function" && w.prototype || Ep;
- return b === A;
- }
- function PV(b) {
- return b === b && !cr(b);
- }
- function $V(b, w) {
- return function(A) {
- return A == null ? !1 : A[b] === w && (w !== n || b in Fn(A));
- };
- }
- function Wbe(b) {
- var w = PO(b, function(L) {
- return A.size === u && A.clear(), L;
- }), A = w.cache;
- return w;
- }
- function Qbe(b, w) {
- var A = b[1], L = w[1], G = A | L, X = G < (g | m | C), J = L == C && A == _ || L == C && A == P && b[7].length <= w[8] || L == (C | P) && w[7].length <= w[8] && A == _;
- if (!(X || J))
- return b;
- L & g && (b[2] = w[2], G |= A & g ? 0 : y);
- var ie = w[3];
- if (ie) {
- var ge = b[3];
- b[3] = ge ? cV(ge, ie, w[4]) : ie, b[4] = ge ? cc(b[3], c) : w[4];
- }
- return ie = w[5], ie && (ge = b[5], b[5] = ge ? fV(ge, ie, w[6]) : ie, b[6] = ge ? cc(b[5], c) : w[6]), ie = w[7], ie && (b[7] = ie), L & C && (b[8] = b[8] == null ? w[8] : Mi(b[8], w[8])), b[9] == null && (b[9] = w[9]), b[0] = w[0], b[1] = G, b;
- }
- function Hbe(b) {
- var w = [];
- if (b != null)
- for (var A in Fn(b))
- w.push(A);
- return w;
- }
- function Gbe(b) {
- return J1.call(b);
- }
- function AV(b, w, A) {
- return w = Hr(w === n ? b.length - 1 : w, 0), function() {
- for (var L = arguments, G = -1, X = Hr(L.length - w, 0), J = Oe(X); ++G < X; )
- J[G] = L[w + G];
- G = -1;
- for (var ie = Oe(w + 1); ++G < w; )
- ie[G] = L[G];
- return ie[w] = A(J), Fa(b, this, ie);
- };
- }
- function EV(b, w) {
- return w.length < 2 ? b : Kf(b, wo(w, 0, -1));
- }
- function jbe(b, w) {
- for (var A = b.length, L = Mi(w.length, A), G = ga(b); L--; ) {
- var X = w[L];
- b[L] = lu(X, A) ? G[X] : n;
- }
- return b;
- }
- function mA(b, w) {
- if (!(w === "constructor" && typeof b[w] == "function") && w != "__proto__")
- return b[w];
- }
- var MV = DV(eV), d0 = sye || function(b, w) {
- return di.setTimeout(b, w);
- }, yA = DV(vbe);
- function IV(b, w, A) {
- var L = w + "";
- return yA(b, Nbe(L, Zbe(Rbe(L), A)));
- }
- function DV(b) {
- var w = 0, A = 0;
- return function() {
- var L = fye(), G = R - (L - A);
- if (A = L, G > 0) {
- if (++w >= M)
- return arguments[0];
- } else
- w = 0;
- return b.apply(n, arguments);
- };
- }
- function xO(b, w) {
- var A = -1, L = b.length, G = L - 1;
- for (w = w === n ? L : w; ++A < w; ) {
- var X = eA(A, G), J = b[X];
- b[X] = b[A], b[A] = J;
- }
- return b.length = w, b;
- }
- var RV = Wbe(function(b) {
- var w = [];
- return b.charCodeAt(0) === 46 && w.push(""), b.replace(xp, function(A, L, G, X) {
- w.push(G ? X.replace(F1, "$1") : L || A);
- }), w;
- });
- function ol(b) {
- if (typeof b == "string" || Ha(b))
- return b;
- var w = b + "";
- return w == "0" && 1 / b == -Q ? "-0" : w;
- }
- function ed(b) {
- if (b != null) {
- try {
- return K1.call(b);
- } catch {
- }
- try {
- return b + "";
- } catch {
- }
- }
- return "";
- }
- function Zbe(b, w) {
- return _o(fe, function(A) {
- var L = "_." + A[0];
- w & A[1] && !Z1(b, L) && b.push(L);
- }), b.sort();
- }
- function kV(b) {
- if (b instanceof un)
- return b.clone();
- var w = new So(b.__wrapped__, b.__chain__);
- return w.__actions__ = ga(b.__actions__), w.__index__ = b.__index__, w.__values__ = b.__values__, w;
- }
- function Ube(b, w, A) {
- (A ? Ui(b, w, A) : w === n) ? w = 1 : w = Hr(Yt(w), 0);
- var L = b == null ? 0 : b.length;
- if (!L || w < 1)
- return [];
- for (var G = 0, X = 0, J = Oe(aO(L / w)); G < L; )
- J[X++] = wo(b, G, G += w);
- return J;
- }
- function Xbe(b) {
- for (var w = -1, A = b == null ? 0 : b.length, L = 0, G = []; ++w < A; ) {
- var X = b[w];
- X && (G[L++] = X);
- }
- return G;
- }
- function Ybe() {
- var b = arguments.length;
- if (!b)
- return [];
- for (var w = Oe(b - 1), A = arguments[0], L = b; L--; )
- w[L - 1] = arguments[L];
- return uc(Ft(A) ? ga(A) : [A], hi(w, 1));
- }
- var qbe = nn(function(b, w) {
- return Cr(b) ? o0(b, hi(w, 1, Cr, !0)) : [];
- }), Kbe = nn(function(b, w) {
- var A = Co(w);
- return Cr(A) && (A = n), Cr(b) ? o0(b, hi(w, 1, Cr, !0), wt(A, 2)) : [];
- }), Jbe = nn(function(b, w) {
- var A = Co(w);
- return Cr(A) && (A = n), Cr(b) ? o0(b, hi(w, 1, Cr, !0), n, A) : [];
- });
- function e_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- return L ? (w = A || w === n ? 1 : Yt(w), wo(b, w < 0 ? 0 : w, L)) : [];
- }
- function t_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- return L ? (w = A || w === n ? 1 : Yt(w), w = L - w, wo(b, 0, w < 0 ? 0 : w)) : [];
- }
- function n_e(b, w) {
- return b && b.length ? vO(b, wt(w, 3), !0, !0) : [];
- }
- function r_e(b, w) {
- return b && b.length ? vO(b, wt(w, 3), !0) : [];
- }
- function i_e(b, w, A, L) {
- var G = b == null ? 0 : b.length;
- return G ? (A && typeof A != "number" && Ui(b, w, A) && (A = 0, L = G), Yye(b, w, A, L)) : [];
- }
- function LV(b, w, A) {
- var L = b == null ? 0 : b.length;
- if (!L)
- return -1;
- var G = A == null ? 0 : Yt(A);
- return G < 0 && (G = Hr(L + G, 0)), U1(b, wt(w, 3), G);
- }
- function NV(b, w, A) {
- var L = b == null ? 0 : b.length;
- if (!L)
- return -1;
- var G = L - 1;
- return A !== n && (G = Yt(A), G = A < 0 ? Hr(L + G, 0) : Mi(G, L - 1)), U1(b, wt(w, 3), G, !0);
- }
- function BV(b) {
- var w = b == null ? 0 : b.length;
- return w ? hi(b, 1) : [];
- }
- function a_e(b) {
- var w = b == null ? 0 : b.length;
- return w ? hi(b, Q) : [];
- }
- function o_e(b, w) {
- var A = b == null ? 0 : b.length;
- return A ? (w = w === n ? 1 : Yt(w), hi(b, w)) : [];
- }
- function s_e(b) {
- for (var w = -1, A = b == null ? 0 : b.length, L = {}; ++w < A; ) {
- var G = b[w];
- L[G[0]] = G[1];
- }
- return L;
- }
- function zV(b) {
- return b && b.length ? b[0] : n;
- }
- function l_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- if (!L)
- return -1;
- var G = A == null ? 0 : Yt(A);
- return G < 0 && (G = Hr(L + G, 0)), Tp(b, w, G);
- }
- function u_e(b) {
- var w = b == null ? 0 : b.length;
- return w ? wo(b, 0, -1) : [];
- }
- var c_e = nn(function(b) {
- var w = ar(b, aA);
- return w.length && w[0] === b[0] ? X$(w) : [];
- }), f_e = nn(function(b) {
- var w = Co(b), A = ar(b, aA);
- return w === Co(A) ? w = n : A.pop(), A.length && A[0] === b[0] ? X$(A, wt(w, 2)) : [];
- }), d_e = nn(function(b) {
- var w = Co(b), A = ar(b, aA);
- return w = typeof w == "function" ? w : n, w && A.pop(), A.length && A[0] === b[0] ? X$(A, n, w) : [];
- });
- function h_e(b, w) {
- return b == null ? "" : uye.call(b, w);
- }
- function Co(b) {
- var w = b == null ? 0 : b.length;
- return w ? b[w - 1] : n;
- }
- function p_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- if (!L)
- return -1;
- var G = L;
- return A !== n && (G = Yt(A), G = G < 0 ? Hr(L + G, 0) : Mi(G, L - 1)), w === w ? Z0e(b, w, G) : U1(b, bz, G, !0);
- }
- function v_e(b, w) {
- return b && b.length ? Yz(b, Yt(w)) : n;
- }
- var g_e = nn(VV);
- function VV(b, w) {
- return b && b.length && w && w.length ? J$(b, w) : b;
- }
- function m_e(b, w, A) {
- return b && b.length && w && w.length ? J$(b, w, wt(A, 2)) : b;
- }
- function y_e(b, w, A) {
- return b && b.length && w && w.length ? J$(b, w, n, A) : b;
- }
- var b_e = su(function(b, w) {
- var A = b == null ? 0 : b.length, L = G$(b, w);
- return Jz(b, ar(w, function(G) {
- return lu(G, A) ? +G : G;
- }).sort(uV)), L;
- });
- function __e(b, w) {
- var A = [];
- if (!(b && b.length))
- return A;
- var L = -1, G = [], X = b.length;
- for (w = wt(w, 3); ++L < X; ) {
- var J = b[L];
- w(J, L, b) && (A.push(J), G.push(L));
- }
- return Jz(b, G), A;
- }
- function bA(b) {
- return b == null ? b : hye.call(b);
- }
- function O_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- return L ? (A && typeof A != "number" && Ui(b, w, A) ? (w = 0, A = L) : (w = w == null ? 0 : Yt(w), A = A === n ? L : Yt(A)), wo(b, w, A)) : [];
- }
- function S_e(b, w) {
- return pO(b, w);
- }
- function x_e(b, w, A) {
- return nA(b, w, wt(A, 2));
- }
- function w_e(b, w) {
- var A = b == null ? 0 : b.length;
- if (A) {
- var L = pO(b, w);
- if (L < A && bs(b[L], w))
- return L;
- }
- return -1;
- }
- function C_e(b, w) {
- return pO(b, w, !0);
- }
- function T_e(b, w, A) {
- return nA(b, w, wt(A, 2), !0);
- }
- function P_e(b, w) {
- var A = b == null ? 0 : b.length;
- if (A) {
- var L = pO(b, w, !0) - 1;
- if (bs(b[L], w))
- return L;
- }
- return -1;
- }
- function $_e(b) {
- return b && b.length ? tV(b) : [];
- }
- function A_e(b, w) {
- return b && b.length ? tV(b, wt(w, 2)) : [];
- }
- function E_e(b) {
- var w = b == null ? 0 : b.length;
- return w ? wo(b, 1, w) : [];
- }
- function M_e(b, w, A) {
- return b && b.length ? (w = A || w === n ? 1 : Yt(w), wo(b, 0, w < 0 ? 0 : w)) : [];
- }
- function I_e(b, w, A) {
- var L = b == null ? 0 : b.length;
- return L ? (w = A || w === n ? 1 : Yt(w), w = L - w, wo(b, w < 0 ? 0 : w, L)) : [];
- }
- function D_e(b, w) {
- return b && b.length ? vO(b, wt(w, 3), !1, !0) : [];
- }
- function R_e(b, w) {
- return b && b.length ? vO(b, wt(w, 3)) : [];
- }
- var k_e = nn(function(b) {
- return hc(hi(b, 1, Cr, !0));
- }), L_e = nn(function(b) {
- var w = Co(b);
- return Cr(w) && (w = n), hc(hi(b, 1, Cr, !0), wt(w, 2));
- }), N_e = nn(function(b) {
- var w = Co(b);
- return w = typeof w == "function" ? w : n, hc(hi(b, 1, Cr, !0), n, w);
- });
- function B_e(b) {
- return b && b.length ? hc(b) : [];
- }
- function z_e(b, w) {
- return b && b.length ? hc(b, wt(w, 2)) : [];
- }
- function V_e(b, w) {
- return w = typeof w == "function" ? w : n, b && b.length ? hc(b, n, w) : [];
- }
- function _A(b) {
- if (!(b && b.length))
- return [];
- var w = 0;
- return b = lc(b, function(A) {
- if (Cr(A))
- return w = Hr(A.length, w), !0;
- }), N$(w, function(A) {
- return ar(b, R$(A));
- });
- }
- function FV(b, w) {
- if (!(b && b.length))
- return [];
- var A = _A(b);
- return w == null ? A : ar(A, function(L) {
- return Fa(w, n, L);
- });
- }
- var F_e = nn(function(b, w) {
- return Cr(b) ? o0(b, w) : [];
- }), W_e = nn(function(b) {
- return iA(lc(b, Cr));
- }), Q_e = nn(function(b) {
- var w = Co(b);
- return Cr(w) && (w = n), iA(lc(b, Cr), wt(w, 2));
- }), H_e = nn(function(b) {
- var w = Co(b);
- return w = typeof w == "function" ? w : n, iA(lc(b, Cr), n, w);
- }), G_e = nn(_A);
- function j_e(b, w) {
- return aV(b || [], w || [], a0);
- }
- function Z_e(b, w) {
- return aV(b || [], w || [], u0);
- }
- var U_e = nn(function(b) {
- var w = b.length, A = w > 1 ? b[w - 1] : n;
- return A = typeof A == "function" ? (b.pop(), A) : n, FV(b, A);
- });
- function WV(b) {
- var w = Z(b);
- return w.__chain__ = !0, w;
- }
- function X_e(b, w) {
- return w(b), b;
- }
- function wO(b, w) {
- return w(b);
- }
- var Y_e = su(function(b) {
- var w = b.length, A = w ? b[0] : 0, L = this.__wrapped__, G = function(X) {
- return G$(X, b);
- };
- return w > 1 || this.__actions__.length || !(L instanceof un) || !lu(A) ? this.thru(G) : (L = L.slice(A, +A + (w ? 1 : 0)), L.__actions__.push({
- func: wO,
- args: [G],
- thisArg: n
- }), new So(L, this.__chain__).thru(function(X) {
- return w && !X.length && X.push(n), X;
- }));
- });
- function q_e() {
- return WV(this);
- }
- function K_e() {
- return new So(this.value(), this.__chain__);
- }
- function J_e() {
- this.__values__ === n && (this.__values__ = nF(this.value()));
- var b = this.__index__ >= this.__values__.length, w = b ? n : this.__values__[this.__index__++];
- return { done: b, value: w };
- }
- function e1e() {
- return this;
- }
- function t1e(b) {
- for (var w, A = this; A instanceof uO; ) {
- var L = kV(A);
- L.__index__ = 0, L.__values__ = n, w ? G.__wrapped__ = L : w = L;
- var G = L;
- A = A.__wrapped__;
- }
- return G.__wrapped__ = b, w;
- }
- function n1e() {
- var b = this.__wrapped__;
- if (b instanceof un) {
- var w = b;
- return this.__actions__.length && (w = new un(this)), w = w.reverse(), w.__actions__.push({
- func: wO,
- args: [bA],
- thisArg: n
- }), new So(w, this.__chain__);
- }
- return this.thru(bA);
- }
- function r1e() {
- return iV(this.__wrapped__, this.__actions__);
- }
- var i1e = gO(function(b, w, A) {
- Rn.call(b, A) ? ++b[A] : au(b, A, 1);
- });
- function a1e(b, w, A) {
- var L = Ft(b) ? mz : Xye;
- return A && Ui(b, w, A) && (w = n), L(b, wt(w, 3));
- }
- function o1e(b, w) {
- var A = Ft(b) ? lc : Fz;
- return A(b, wt(w, 3));
- }
- var s1e = vV(LV), l1e = vV(NV);
- function u1e(b, w) {
- return hi(CO(b, w), 1);
- }
- function c1e(b, w) {
- return hi(CO(b, w), Q);
- }
- function f1e(b, w, A) {
- return A = A === n ? 1 : Yt(A), hi(CO(b, w), A);
- }
- function QV(b, w) {
- var A = Ft(b) ? _o : dc;
- return A(b, wt(w, 3));
- }
- function HV(b, w) {
- var A = Ft(b) ? E0e : Vz;
- return A(b, wt(w, 3));
- }
- var d1e = gO(function(b, w, A) {
- Rn.call(b, A) ? b[A].push(w) : au(b, A, [w]);
- });
- function h1e(b, w, A, L) {
- b = ma(b) ? b : Bp(b), A = A && !L ? Yt(A) : 0;
- var G = b.length;
- return A < 0 && (A = Hr(G + A, 0)), EO(b) ? A <= G && b.indexOf(w, A) > -1 : !!G && Tp(b, w, A) > -1;
- }
- var p1e = nn(function(b, w, A) {
- var L = -1, G = typeof w == "function", X = ma(b) ? Oe(b.length) : [];
- return dc(b, function(J) {
- X[++L] = G ? Fa(w, J, A) : s0(J, w, A);
- }), X;
- }), v1e = gO(function(b, w, A) {
- au(b, A, w);
- });
- function CO(b, w) {
- var A = Ft(b) ? ar : Zz;
- return A(b, wt(w, 3));
- }
- function g1e(b, w, A, L) {
- return b == null ? [] : (Ft(w) || (w = w == null ? [] : [w]), A = L ? n : A, Ft(A) || (A = A == null ? [] : [A]), qz(b, w, A));
- }
- var m1e = gO(function(b, w, A) {
- b[A ? 0 : 1].push(w);
- }, function() {
- return [[], []];
- });
- function y1e(b, w, A) {
- var L = Ft(b) ? I$ : Oz, G = arguments.length < 3;
- return L(b, wt(w, 4), A, G, dc);
- }
- function b1e(b, w, A) {
- var L = Ft(b) ? M0e : Oz, G = arguments.length < 3;
- return L(b, wt(w, 4), A, G, Vz);
- }
- function _1e(b, w) {
- var A = Ft(b) ? lc : Fz;
- return A(b, $O(wt(w, 3)));
- }
- function O1e(b) {
- var w = Ft(b) ? Lz : hbe;
- return w(b);
- }
- function S1e(b, w, A) {
- (A ? Ui(b, w, A) : w === n) ? w = 1 : w = Yt(w);
- var L = Ft(b) ? Hye : pbe;
- return L(b, w);
- }
- function x1e(b) {
- var w = Ft(b) ? Gye : gbe;
- return w(b);
- }
- function w1e(b) {
- if (b == null)
- return 0;
- if (ma(b))
- return EO(b) ? $p(b) : b.length;
- var w = Ii(b);
- return w == we || w == Ye ? b.size : q$(b).length;
- }
- function C1e(b, w, A) {
- var L = Ft(b) ? D$ : mbe;
- return A && Ui(b, w, A) && (w = n), L(b, wt(w, 3));
- }
- var T1e = nn(function(b, w) {
- if (b == null)
- return [];
- var A = w.length;
- return A > 1 && Ui(b, w[0], w[1]) ? w = [] : A > 2 && Ui(w[0], w[1], w[2]) && (w = [w[0]]), qz(b, hi(w, 1), []);
- }), TO = oye || function() {
- return di.Date.now();
- };
- function P1e(b, w) {
- if (typeof w != "function")
- throw new Oo(o);
- return b = Yt(b), function() {
- if (--b < 1)
- return w.apply(this, arguments);
- };
- }
- function GV(b, w, A) {
- return w = A ? n : w, w = b && w == null ? b.length : w, ou(b, C, n, n, n, n, w);
- }
- function jV(b, w) {
- var A;
- if (typeof w != "function")
- throw new Oo(o);
- return b = Yt(b), function() {
- return --b > 0 && (A = w.apply(this, arguments)), b <= 1 && (w = n), A;
- };
- }
- var OA = nn(function(b, w, A) {
- var L = g;
- if (A.length) {
- var G = cc(A, Lp(OA));
- L |= S;
- }
- return ou(b, L, w, A, G);
- }), ZV = nn(function(b, w, A) {
- var L = g | m;
- if (A.length) {
- var G = cc(A, Lp(ZV));
- L |= S;
- }
- return ou(w, L, b, A, G);
- });
- function UV(b, w, A) {
- w = A ? n : w;
- var L = ou(b, _, n, n, n, n, n, w);
- return L.placeholder = UV.placeholder, L;
- }
- function XV(b, w, A) {
- w = A ? n : w;
- var L = ou(b, O, n, n, n, n, n, w);
- return L.placeholder = XV.placeholder, L;
- }
- function YV(b, w, A) {
- var L, G, X, J, ie, ge, Ee = 0, Ie = !1, Ne = !1, Ke = !0;
- if (typeof b != "function")
- throw new Oo(o);
- w = To(w) || 0, cr(A) && (Ie = !!A.leading, Ne = "maxWait" in A, X = Ne ? Hr(To(A.maxWait) || 0, w) : X, Ke = "trailing" in A ? !!A.trailing : Ke);
- function ht(Tr) {
- var _s = L, fu = G;
- return L = G = n, Ee = Tr, J = b.apply(fu, _s), J;
- }
- function Pt(Tr) {
- return Ee = Tr, ie = d0(on, w), Ie ? ht(Tr) : J;
- }
- function Jt(Tr) {
- var _s = Tr - ge, fu = Tr - Ee, vF = w - _s;
- return Ne ? Mi(vF, X - fu) : vF;
- }
- function $t(Tr) {
- var _s = Tr - ge, fu = Tr - Ee;
- return ge === n || _s >= w || _s < 0 || Ne && fu >= X;
- }
- function on() {
- var Tr = TO();
- if ($t(Tr))
- return pn(Tr);
- ie = d0(on, Jt(Tr));
- }
- function pn(Tr) {
- return ie = n, Ke && L ? ht(Tr) : (L = G = n, J);
- }
- function Ga() {
- ie !== n && oV(ie), Ee = 0, L = ge = G = ie = n;
- }
- function Xi() {
- return ie === n ? J : pn(TO());
- }
- function ja() {
- var Tr = TO(), _s = $t(Tr);
- if (L = arguments, G = this, ge = Tr, _s) {
- if (ie === n)
- return Pt(ge);
- if (Ne)
- return oV(ie), ie = d0(on, w), ht(ge);
- }
- return ie === n && (ie = d0(on, w)), J;
- }
- return ja.cancel = Ga, ja.flush = Xi, ja;
- }
- var $1e = nn(function(b, w) {
- return zz(b, 1, w);
- }), A1e = nn(function(b, w, A) {
- return zz(b, To(w) || 0, A);
- });
- function E1e(b) {
- return ou(b, $);
- }
- function PO(b, w) {
- if (typeof b != "function" || w != null && typeof w != "function")
- throw new Oo(o);
- var A = function() {
- var L = arguments, G = w ? w.apply(this, L) : L[0], X = A.cache;
- if (X.has(G))
- return X.get(G);
- var J = b.apply(this, L);
- return A.cache = X.set(G, J) || X, J;
- };
- return A.cache = new (PO.Cache || iu)(), A;
- }
- PO.Cache = iu;
- function $O(b) {
- if (typeof b != "function")
- throw new Oo(o);
- return function() {
- var w = arguments;
- switch (w.length) {
- case 0:
- return !b.call(this);
- case 1:
- return !b.call(this, w[0]);
- case 2:
- return !b.call(this, w[0], w[1]);
- case 3:
- return !b.call(this, w[0], w[1], w[2]);
- }
- return !b.apply(this, w);
- };
- }
- function M1e(b) {
- return jV(2, b);
- }
- var I1e = ybe(function(b, w) {
- w = w.length == 1 && Ft(w[0]) ? ar(w[0], Wa(wt())) : ar(hi(w, 1), Wa(wt()));
- var A = w.length;
- return nn(function(L) {
- for (var G = -1, X = Mi(L.length, A); ++G < X; )
- L[G] = w[G].call(this, L[G]);
- return Fa(b, this, L);
- });
- }), SA = nn(function(b, w) {
- var A = cc(w, Lp(SA));
- return ou(b, S, n, w, A);
- }), qV = nn(function(b, w) {
- var A = cc(w, Lp(qV));
- return ou(b, x, n, w, A);
- }), D1e = su(function(b, w) {
- return ou(b, P, n, n, n, w);
- });
- function R1e(b, w) {
- if (typeof b != "function")
- throw new Oo(o);
- return w = w === n ? w : Yt(w), nn(b, w);
- }
- function k1e(b, w) {
- if (typeof b != "function")
- throw new Oo(o);
- return w = w == null ? 0 : Hr(Yt(w), 0), nn(function(A) {
- var L = A[w], G = vc(A, 0, w);
- return L && uc(G, L), Fa(b, this, G);
- });
- }
- function L1e(b, w, A) {
- var L = !0, G = !0;
- if (typeof b != "function")
- throw new Oo(o);
- return cr(A) && (L = "leading" in A ? !!A.leading : L, G = "trailing" in A ? !!A.trailing : G), YV(b, w, {
- leading: L,
- maxWait: w,
- trailing: G
- });
- }
- function N1e(b) {
- return GV(b, 1);
- }
- function B1e(b, w) {
- return SA(oA(w), b);
- }
- function z1e() {
- if (!arguments.length)
- return [];
- var b = arguments[0];
- return Ft(b) ? b : [b];
- }
- function V1e(b) {
- return xo(b, h);
- }
- function F1e(b, w) {
- return w = typeof w == "function" ? w : n, xo(b, h, w);
- }
- function W1e(b) {
- return xo(b, f | h);
- }
- function Q1e(b, w) {
- return w = typeof w == "function" ? w : n, xo(b, f | h, w);
- }
- function H1e(b, w) {
- return w == null || Bz(b, w, ri(w));
- }
- function bs(b, w) {
- return b === w || b !== b && w !== w;
- }
- var G1e = _O(U$), j1e = _O(function(b, w) {
- return b >= w;
- }), td = Hz(/* @__PURE__ */ function() {
- return arguments;
- }()) ? Hz : function(b) {
- return gr(b) && Rn.call(b, "callee") && !Ez.call(b, "callee");
- }, Ft = Oe.isArray, Z1e = fz ? Wa(fz) : tbe;
- function ma(b) {
- return b != null && AO(b.length) && !uu(b);
- }
- function Cr(b) {
- return gr(b) && ma(b);
- }
- function U1e(b) {
- return b === !0 || b === !1 || gr(b) && Zi(b) == he;
- }
- var gc = lye || DA, X1e = dz ? Wa(dz) : nbe;
- function Y1e(b) {
- return gr(b) && b.nodeType === 1 && !h0(b);
- }
- function q1e(b) {
- if (b == null)
- return !0;
- if (ma(b) && (Ft(b) || typeof b == "string" || typeof b.splice == "function" || gc(b) || Np(b) || td(b)))
- return !b.length;
- var w = Ii(b);
- if (w == we || w == Ye)
- return !b.size;
- if (f0(b))
- return !q$(b).length;
- for (var A in b)
- if (Rn.call(b, A))
- return !1;
- return !0;
- }
- function K1e(b, w) {
- return l0(b, w);
- }
- function J1e(b, w, A) {
- A = typeof A == "function" ? A : n;
- var L = A ? A(b, w) : n;
- return L === n ? l0(b, w, n, A) : !!L;
- }
- function xA(b) {
- if (!gr(b))
- return !1;
- var w = Zi(b);
- return w == K || w == q || typeof b.message == "string" && typeof b.name == "string" && !h0(b);
- }
- function eOe(b) {
- return typeof b == "number" && Iz(b);
- }
- function uu(b) {
- if (!cr(b))
- return !1;
- var w = Zi(b);
- return w == de || w == xe || w == se || w == Pe;
- }
- function KV(b) {
- return typeof b == "number" && b == Yt(b);
- }
- function AO(b) {
- return typeof b == "number" && b > -1 && b % 1 == 0 && b <= W;
- }
- function cr(b) {
- var w = typeof b;
- return b != null && (w == "object" || w == "function");
- }
- function gr(b) {
- return b != null && typeof b == "object";
- }
- var JV = hz ? Wa(hz) : ibe;
- function tOe(b, w) {
- return b === w || Y$(b, w, hA(w));
- }
- function nOe(b, w, A) {
- return A = typeof A == "function" ? A : n, Y$(b, w, hA(w), A);
- }
- function rOe(b) {
- return eF(b) && b != +b;
- }
- function iOe(b) {
- if (Fbe(b))
- throw new Lt(a);
- return Gz(b);
- }
- function aOe(b) {
- return b === null;
- }
- function oOe(b) {
- return b == null;
- }
- function eF(b) {
- return typeof b == "number" || gr(b) && Zi(b) == He;
- }
- function h0(b) {
- if (!gr(b) || Zi(b) != Be)
- return !1;
- var w = nO(b);
- if (w === null)
- return !0;
- var A = Rn.call(w, "constructor") && w.constructor;
- return typeof A == "function" && A instanceof A && K1.call(A) == nye;
- }
- var wA = pz ? Wa(pz) : abe;
- function sOe(b) {
- return KV(b) && b >= -W && b <= W;
- }
- var tF = vz ? Wa(vz) : obe;
- function EO(b) {
- return typeof b == "string" || !Ft(b) && gr(b) && Zi(b) == xt;
- }
- function Ha(b) {
- return typeof b == "symbol" || gr(b) && Zi(b) == It;
- }
- var Np = gz ? Wa(gz) : sbe;
- function lOe(b) {
- return b === n;
- }
- function uOe(b) {
- return gr(b) && Ii(b) == Ae;
- }
- function cOe(b) {
- return gr(b) && Zi(b) == gt;
- }
- var fOe = _O(K$), dOe = _O(function(b, w) {
- return b <= w;
- });
- function nF(b) {
- if (!b)
- return [];
- if (ma(b))
- return EO(b) ? ms(b) : ga(b);
- if (e0 && b[e0])
- return H0e(b[e0]());
- var w = Ii(b), A = w == we ? z$ : w == Ye ? X1 : Bp;
- return A(b);
- }
- function cu(b) {
- if (!b)
- return b === 0 ? b : 0;
- if (b = To(b), b === Q || b === -Q) {
- var w = b < 0 ? -1 : 1;
- return w * H;
- }
- return b === b ? b : 0;
- }
- function Yt(b) {
- var w = cu(b), A = w % 1;
- return w === w ? A ? w - A : w : 0;
- }
- function rF(b) {
- return b ? qf(Yt(b), 0, j) : 0;
- }
- function To(b) {
- if (typeof b == "number")
- return b;
- if (Ha(b))
- return U;
- if (cr(b)) {
- var w = typeof b.valueOf == "function" ? b.valueOf() : b;
- b = cr(w) ? w + "" : w;
- }
- if (typeof b != "string")
- return b === 0 ? b : +b;
- b = Sz(b);
- var A = O$.test(b);
- return A || x$.test(b) ? P0e(b.slice(2), A ? 2 : 8) : Q1.test(b) ? U : +b;
- }
- function iF(b) {
- return al(b, ya(b));
- }
- function hOe(b) {
- return b ? qf(Yt(b), -W, W) : b === 0 ? b : 0;
- }
- function An(b) {
- return b == null ? "" : Qa(b);
- }
- var pOe = Rp(function(b, w) {
- if (f0(w) || ma(w)) {
- al(w, ri(w), b);
- return;
- }
- for (var A in w)
- Rn.call(w, A) && a0(b, A, w[A]);
- }), aF = Rp(function(b, w) {
- al(w, ya(w), b);
- }), MO = Rp(function(b, w, A, L) {
- al(w, ya(w), b, L);
- }), vOe = Rp(function(b, w, A, L) {
- al(w, ri(w), b, L);
- }), gOe = su(G$);
- function mOe(b, w) {
- var A = Dp(b);
- return w == null ? A : Nz(A, w);
- }
- var yOe = nn(function(b, w) {
- b = Fn(b);
- var A = -1, L = w.length, G = L > 2 ? w[2] : n;
- for (G && Ui(w[0], w[1], G) && (L = 1); ++A < L; )
- for (var X = w[A], J = ya(X), ie = -1, ge = J.length; ++ie < ge; ) {
- var Ee = J[ie], Ie = b[Ee];
- (Ie === n || bs(Ie, Ep[Ee]) && !Rn.call(b, Ee)) && (b[Ee] = X[Ee]);
- }
- return b;
- }), bOe = nn(function(b) {
- return b.push(n, SV), Fa(oF, n, b);
- });
- function _Oe(b, w) {
- return yz(b, wt(w, 3), il);
- }
- function OOe(b, w) {
- return yz(b, wt(w, 3), Z$);
- }
- function SOe(b, w) {
- return b == null ? b : j$(b, wt(w, 3), ya);
- }
- function xOe(b, w) {
- return b == null ? b : Wz(b, wt(w, 3), ya);
- }
- function wOe(b, w) {
- return b && il(b, wt(w, 3));
- }
- function COe(b, w) {
- return b && Z$(b, wt(w, 3));
- }
- function TOe(b) {
- return b == null ? [] : dO(b, ri(b));
- }
- function POe(b) {
- return b == null ? [] : dO(b, ya(b));
- }
- function CA(b, w, A) {
- var L = b == null ? n : Kf(b, w);
- return L === n ? A : L;
- }
- function $Oe(b, w) {
- return b != null && CV(b, w, qye);
- }
- function TA(b, w) {
- return b != null && CV(b, w, Kye);
- }
- var AOe = mV(function(b, w, A) {
- w != null && typeof w.toString != "function" && (w = J1.call(w)), b[w] = A;
- }, $A(ba)), EOe = mV(function(b, w, A) {
- w != null && typeof w.toString != "function" && (w = J1.call(w)), Rn.call(b, w) ? b[w].push(A) : b[w] = [A];
- }, wt), MOe = nn(s0);
- function ri(b) {
- return ma(b) ? kz(b) : q$(b);
- }
- function ya(b) {
- return ma(b) ? kz(b, !0) : lbe(b);
- }
- function IOe(b, w) {
- var A = {};
- return w = wt(w, 3), il(b, function(L, G, X) {
- au(A, w(L, G, X), L);
- }), A;
- }
- function DOe(b, w) {
- var A = {};
- return w = wt(w, 3), il(b, function(L, G, X) {
- au(A, G, w(L, G, X));
- }), A;
- }
- var ROe = Rp(function(b, w, A) {
- hO(b, w, A);
- }), oF = Rp(function(b, w, A, L) {
- hO(b, w, A, L);
- }), kOe = su(function(b, w) {
- var A = {};
- if (b == null)
- return A;
- var L = !1;
- w = ar(w, function(X) {
- return X = pc(X, b), L || (L = X.length > 1), X;
- }), al(b, fA(b), A), L && (A = xo(A, f | d | h, Abe));
- for (var G = w.length; G--; )
- rA(A, w[G]);
- return A;
- });
- function LOe(b, w) {
- return sF(b, $O(wt(w)));
- }
- var NOe = su(function(b, w) {
- return b == null ? {} : cbe(b, w);
- });
- function sF(b, w) {
- if (b == null)
- return {};
- var A = ar(fA(b), function(L) {
- return [L];
- });
- return w = wt(w), Kz(b, A, function(L, G) {
- return w(L, G[0]);
- });
- }
- function BOe(b, w, A) {
- w = pc(w, b);
- var L = -1, G = w.length;
- for (G || (G = 1, b = n); ++L < G; ) {
- var X = b == null ? n : b[ol(w[L])];
- X === n && (L = G, X = A), b = uu(X) ? X.call(b) : X;
- }
- return b;
- }
- function zOe(b, w, A) {
- return b == null ? b : u0(b, w, A);
- }
- function VOe(b, w, A, L) {
- return L = typeof L == "function" ? L : n, b == null ? b : u0(b, w, A, L);
- }
- var lF = _V(ri), uF = _V(ya);
- function FOe(b, w, A) {
- var L = Ft(b), G = L || gc(b) || Np(b);
- if (w = wt(w, 4), A == null) {
- var X = b && b.constructor;
- G ? A = L ? new X() : [] : cr(b) ? A = uu(X) ? Dp(nO(b)) : {} : A = {};
- }
- return (G ? _o : il)(b, function(J, ie, ge) {
- return w(A, J, ie, ge);
- }), A;
- }
- function WOe(b, w) {
- return b == null ? !0 : rA(b, w);
- }
- function QOe(b, w, A) {
- return b == null ? b : rV(b, w, oA(A));
- }
- function HOe(b, w, A, L) {
- return L = typeof L == "function" ? L : n, b == null ? b : rV(b, w, oA(A), L);
- }
- function Bp(b) {
- return b == null ? [] : B$(b, ri(b));
- }
- function GOe(b) {
- return b == null ? [] : B$(b, ya(b));
- }
- function jOe(b, w, A) {
- return A === n && (A = w, w = n), A !== n && (A = To(A), A = A === A ? A : 0), w !== n && (w = To(w), w = w === w ? w : 0), qf(To(b), w, A);
- }
- function ZOe(b, w, A) {
- return w = cu(w), A === n ? (A = w, w = 0) : A = cu(A), b = To(b), Jye(b, w, A);
- }
- function UOe(b, w, A) {
- if (A && typeof A != "boolean" && Ui(b, w, A) && (w = A = n), A === n && (typeof w == "boolean" ? (A = w, w = n) : typeof b == "boolean" && (A = b, b = n)), b === n && w === n ? (b = 0, w = 1) : (b = cu(b), w === n ? (w = b, b = 0) : w = cu(w)), b > w) {
- var L = b;
- b = w, w = L;
- }
- if (A || b % 1 || w % 1) {
- var G = Dz();
- return Mi(b + G * (w - b + T0e("1e-" + ((G + "").length - 1))), w);
- }
- return eA(b, w);
- }
- var XOe = kp(function(b, w, A) {
- return w = w.toLowerCase(), b + (A ? cF(w) : w);
- });
- function cF(b) {
- return PA(An(b).toLowerCase());
- }
- function fF(b) {
- return b = An(b), b && b.replace(Km, z0e).replace(g0e, "");
- }
- function YOe(b, w, A) {
- b = An(b), w = Qa(w);
- var L = b.length;
- A = A === n ? L : qf(Yt(A), 0, L);
- var G = A;
- return A -= w.length, A >= 0 && b.slice(A, G) == w;
- }
- function qOe(b) {
- return b = An(b), b && WB.test(b) ? b.replace(g$, V0e) : b;
- }
- function KOe(b) {
- return b = An(b), b && m$.test(b) ? b.replace(Um, "\\$&") : b;
- }
- var JOe = kp(function(b, w, A) {
- return b + (A ? "-" : "") + w.toLowerCase();
- }), eSe = kp(function(b, w, A) {
- return b + (A ? " " : "") + w.toLowerCase();
- }), tSe = pV("toLowerCase");
- function nSe(b, w, A) {
- b = An(b), w = Yt(w);
- var L = w ? $p(b) : 0;
- if (!w || L >= w)
- return b;
- var G = (w - L) / 2;
- return bO(oO(G), A) + b + bO(aO(G), A);
- }
- function rSe(b, w, A) {
- b = An(b), w = Yt(w);
- var L = w ? $p(b) : 0;
- return w && L < w ? b + bO(w - L, A) : b;
- }
- function iSe(b, w, A) {
- b = An(b), w = Yt(w);
- var L = w ? $p(b) : 0;
- return w && L < w ? bO(w - L, A) + b : b;
- }
- function aSe(b, w, A) {
- return A || w == null ? w = 0 : w && (w = +w), dye(An(b).replace(Xm, ""), w || 0);
- }
- function oSe(b, w, A) {
- return (A ? Ui(b, w, A) : w === n) ? w = 1 : w = Yt(w), tA(An(b), w);
- }
- function sSe() {
- var b = arguments, w = An(b[0]);
- return b.length < 3 ? w : w.replace(b[1], b[2]);
- }
- var lSe = kp(function(b, w, A) {
- return b + (A ? "_" : "") + w.toLowerCase();
- });
- function uSe(b, w, A) {
- return A && typeof A != "number" && Ui(b, w, A) && (w = A = n), A = A === n ? j : A >>> 0, A ? (b = An(b), b && (typeof w == "string" || w != null && !wA(w)) && (w = Qa(w), !w && Pp(b)) ? vc(ms(b), 0, A) : b.split(w, A)) : [];
- }
- var cSe = kp(function(b, w, A) {
- return b + (A ? " " : "") + PA(w);
- });
- function fSe(b, w, A) {
- return b = An(b), A = A == null ? 0 : qf(Yt(A), 0, b.length), w = Qa(w), b.slice(A, A + w.length) == w;
- }
- function dSe(b, w, A) {
- var L = Z.templateSettings;
- A && Ui(b, w, A) && (w = n), b = An(b), w = MO({}, w, L, OV);
- var G = MO({}, w.imports, L.imports, OV), X = ri(G), J = B$(G, X), ie, ge, Ee = 0, Ie = w.interpolate || yo, Ne = "__p += '", Ke = V$(
- (w.escape || yo).source + "|" + Ie.source + "|" + (Ie === Sp ? W1 : yo).source + "|" + (w.evaluate || yo).source + "|$",
- "g"
- ), ht = "//# sourceURL=" + (Rn.call(w, "sourceURL") ? (w.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++O0e + "]") + `
- `;
- b.replace(Ke, function($t, on, pn, Ga, Xi, ja) {
- return pn || (pn = Ga), Ne += b.slice(Ee, ja).replace(G1, F0e), on && (ie = !0, Ne += `' +
- __e(` + on + `) +
- '`), Xi && (ge = !0, Ne += `';
- ` + Xi + `;
- __p += '`), pn && (Ne += `' +
- ((__t = (` + pn + `)) == null ? '' : __t) +
- '`), Ee = ja + $t.length, $t;
- }), Ne += `';
- `;
- var Pt = Rn.call(w, "variable") && w.variable;
- if (!Pt)
- Ne = `with (obj) {
- ` + Ne + `
- }
- `;
- else if (Ym.test(Pt))
- throw new Lt(s);
- Ne = (ge ? Ne.replace(Gf, "") : Ne).replace(Gm, "$1").replace(sc, "$1;"), Ne = "function(" + (Pt || "obj") + `) {
- ` + (Pt ? "" : `obj || (obj = {});
- `) + "var __t, __p = ''" + (ie ? ", __e = _.escape" : "") + (ge ? `, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- ` : `;
- `) + Ne + `return __p
- }`;
- var Jt = hF(function() {
- return Pn(X, ht + "return " + Ne).apply(n, J);
- });
- if (Jt.source = Ne, xA(Jt))
- throw Jt;
- return Jt;
- }
- function hSe(b) {
- return An(b).toLowerCase();
- }
- function pSe(b) {
- return An(b).toUpperCase();
- }
- function vSe(b, w, A) {
- if (b = An(b), b && (A || w === n))
- return Sz(b);
- if (!b || !(w = Qa(w)))
- return b;
- var L = ms(b), G = ms(w), X = xz(L, G), J = wz(L, G) + 1;
- return vc(L, X, J).join("");
- }
- function gSe(b, w, A) {
- if (b = An(b), b && (A || w === n))
- return b.slice(0, Tz(b) + 1);
- if (!b || !(w = Qa(w)))
- return b;
- var L = ms(b), G = wz(L, ms(w)) + 1;
- return vc(L, 0, G).join("");
- }
- function mSe(b, w, A) {
- if (b = An(b), b && (A || w === n))
- return b.replace(Xm, "");
- if (!b || !(w = Qa(w)))
- return b;
- var L = ms(b), G = xz(L, ms(w));
- return vc(L, G).join("");
- }
- function ySe(b, w) {
- var A = T, L = E;
- if (cr(w)) {
- var G = "separator" in w ? w.separator : G;
- A = "length" in w ? Yt(w.length) : A, L = "omission" in w ? Qa(w.omission) : L;
- }
- b = An(b);
- var X = b.length;
- if (Pp(b)) {
- var J = ms(b);
- X = J.length;
- }
- if (A >= X)
- return b;
- var ie = A - $p(L);
- if (ie < 1)
- return L;
- var ge = J ? vc(J, 0, ie).join("") : b.slice(0, ie);
- if (G === n)
- return ge + L;
- if (J && (ie += ge.length - ie), wA(G)) {
- if (b.slice(ie).search(G)) {
- var Ee, Ie = ge;
- for (G.global || (G = V$(G.source, An(qm.exec(G)) + "g")), G.lastIndex = 0; Ee = G.exec(Ie); )
- var Ne = Ee.index;
- ge = ge.slice(0, Ne === n ? ie : Ne);
- }
- } else if (b.indexOf(Qa(G), ie) != ie) {
- var Ke = ge.lastIndexOf(G);
- Ke > -1 && (ge = ge.slice(0, Ke));
- }
- return ge + L;
- }
- function bSe(b) {
- return b = An(b), b && FB.test(b) ? b.replace(jm, U0e) : b;
- }
- var _Se = kp(function(b, w, A) {
- return b + (A ? " " : "") + w.toUpperCase();
- }), PA = pV("toUpperCase");
- function dF(b, w, A) {
- return b = An(b), w = A ? n : w, w === n ? Q0e(b) ? q0e(b) : R0e(b) : b.match(w) || [];
- }
- var hF = nn(function(b, w) {
- try {
- return Fa(b, n, w);
- } catch (A) {
- return xA(A) ? A : new Lt(A);
- }
- }), OSe = su(function(b, w) {
- return _o(w, function(A) {
- A = ol(A), au(b, A, OA(b[A], b));
- }), b;
- });
- function SSe(b) {
- var w = b == null ? 0 : b.length, A = wt();
- return b = w ? ar(b, function(L) {
- if (typeof L[1] != "function")
- throw new Oo(o);
- return [A(L[0]), L[1]];
- }) : [], nn(function(L) {
- for (var G = -1; ++G < w; ) {
- var X = b[G];
- if (Fa(X[0], this, L))
- return Fa(X[1], this, L);
- }
- });
- }
- function xSe(b) {
- return Uye(xo(b, f));
- }
- function $A(b) {
- return function() {
- return b;
- };
- }
- function wSe(b, w) {
- return b == null || b !== b ? w : b;
- }
- var CSe = gV(), TSe = gV(!0);
- function ba(b) {
- return b;
- }
- function AA(b) {
- return jz(typeof b == "function" ? b : xo(b, f));
- }
- function PSe(b) {
- return Uz(xo(b, f));
- }
- function $Se(b, w) {
- return Xz(b, xo(w, f));
- }
- var ASe = nn(function(b, w) {
- return function(A) {
- return s0(A, b, w);
- };
- }), ESe = nn(function(b, w) {
- return function(A) {
- return s0(b, A, w);
- };
- });
- function EA(b, w, A) {
- var L = ri(w), G = dO(w, L);
- A == null && !(cr(w) && (G.length || !L.length)) && (A = w, w = b, b = this, G = dO(w, ri(w)));
- var X = !(cr(A) && "chain" in A) || !!A.chain, J = uu(b);
- return _o(G, function(ie) {
- var ge = w[ie];
- b[ie] = ge, J && (b.prototype[ie] = function() {
- var Ee = this.__chain__;
- if (X || Ee) {
- var Ie = b(this.__wrapped__), Ne = Ie.__actions__ = ga(this.__actions__);
- return Ne.push({ func: ge, args: arguments, thisArg: b }), Ie.__chain__ = Ee, Ie;
- }
- return ge.apply(b, uc([this.value()], arguments));
- });
- }), b;
- }
- function MSe() {
- return di._ === this && (di._ = rye), this;
- }
- function MA() {
- }
- function ISe(b) {
- return b = Yt(b), nn(function(w) {
- return Yz(w, b);
- });
- }
- var DSe = lA(ar), RSe = lA(mz), kSe = lA(D$);
- function pF(b) {
- return vA(b) ? R$(ol(b)) : fbe(b);
- }
- function LSe(b) {
- return function(w) {
- return b == null ? n : Kf(b, w);
- };
- }
- var NSe = yV(), BSe = yV(!0);
- function IA() {
- return [];
- }
- function DA() {
- return !1;
- }
- function zSe() {
- return {};
- }
- function VSe() {
- return "";
- }
- function FSe() {
- return !0;
- }
- function WSe(b, w) {
- if (b = Yt(b), b < 1 || b > W)
- return [];
- var A = j, L = Mi(b, j);
- w = wt(w), b -= j;
- for (var G = N$(L, w); ++A < b; )
- w(A);
- return G;
- }
- function QSe(b) {
- return Ft(b) ? ar(b, ol) : Ha(b) ? [b] : ga(RV(An(b)));
- }
- function HSe(b) {
- var w = ++tye;
- return An(b) + w;
- }
- var GSe = yO(function(b, w) {
- return b + w;
- }, 0), jSe = uA("ceil"), ZSe = yO(function(b, w) {
- return b / w;
- }, 1), USe = uA("floor");
- function XSe(b) {
- return b && b.length ? fO(b, ba, U$) : n;
- }
- function YSe(b, w) {
- return b && b.length ? fO(b, wt(w, 2), U$) : n;
- }
- function qSe(b) {
- return _z(b, ba);
- }
- function KSe(b, w) {
- return _z(b, wt(w, 2));
- }
- function JSe(b) {
- return b && b.length ? fO(b, ba, K$) : n;
- }
- function exe(b, w) {
- return b && b.length ? fO(b, wt(w, 2), K$) : n;
- }
- var txe = yO(function(b, w) {
- return b * w;
- }, 1), nxe = uA("round"), rxe = yO(function(b, w) {
- return b - w;
- }, 0);
- function ixe(b) {
- return b && b.length ? L$(b, ba) : 0;
- }
- function axe(b, w) {
- return b && b.length ? L$(b, wt(w, 2)) : 0;
- }
- return Z.after = P1e, Z.ary = GV, Z.assign = pOe, Z.assignIn = aF, Z.assignInWith = MO, Z.assignWith = vOe, Z.at = gOe, Z.before = jV, Z.bind = OA, Z.bindAll = OSe, Z.bindKey = ZV, Z.castArray = z1e, Z.chain = WV, Z.chunk = Ube, Z.compact = Xbe, Z.concat = Ybe, Z.cond = SSe, Z.conforms = xSe, Z.constant = $A, Z.countBy = i1e, Z.create = mOe, Z.curry = UV, Z.curryRight = XV, Z.debounce = YV, Z.defaults = yOe, Z.defaultsDeep = bOe, Z.defer = $1e, Z.delay = A1e, Z.difference = qbe, Z.differenceBy = Kbe, Z.differenceWith = Jbe, Z.drop = e_e, Z.dropRight = t_e, Z.dropRightWhile = n_e, Z.dropWhile = r_e, Z.fill = i_e, Z.filter = o1e, Z.flatMap = u1e, Z.flatMapDeep = c1e, Z.flatMapDepth = f1e, Z.flatten = BV, Z.flattenDeep = a_e, Z.flattenDepth = o_e, Z.flip = E1e, Z.flow = CSe, Z.flowRight = TSe, Z.fromPairs = s_e, Z.functions = TOe, Z.functionsIn = POe, Z.groupBy = d1e, Z.initial = u_e, Z.intersection = c_e, Z.intersectionBy = f_e, Z.intersectionWith = d_e, Z.invert = AOe, Z.invertBy = EOe, Z.invokeMap = p1e, Z.iteratee = AA, Z.keyBy = v1e, Z.keys = ri, Z.keysIn = ya, Z.map = CO, Z.mapKeys = IOe, Z.mapValues = DOe, Z.matches = PSe, Z.matchesProperty = $Se, Z.memoize = PO, Z.merge = ROe, Z.mergeWith = oF, Z.method = ASe, Z.methodOf = ESe, Z.mixin = EA, Z.negate = $O, Z.nthArg = ISe, Z.omit = kOe, Z.omitBy = LOe, Z.once = M1e, Z.orderBy = g1e, Z.over = DSe, Z.overArgs = I1e, Z.overEvery = RSe, Z.overSome = kSe, Z.partial = SA, Z.partialRight = qV, Z.partition = m1e, Z.pick = NOe, Z.pickBy = sF, Z.property = pF, Z.propertyOf = LSe, Z.pull = g_e, Z.pullAll = VV, Z.pullAllBy = m_e, Z.pullAllWith = y_e, Z.pullAt = b_e, Z.range = NSe, Z.rangeRight = BSe, Z.rearg = D1e, Z.reject = _1e, Z.remove = __e, Z.rest = R1e, Z.reverse = bA, Z.sampleSize = S1e, Z.set = zOe, Z.setWith = VOe, Z.shuffle = x1e, Z.slice = O_e, Z.sortBy = T1e, Z.sortedUniq = $_e, Z.sortedUniqBy = A_e, Z.split = uSe, Z.spread = k1e, Z.tail = E_e, Z.take = M_e, Z.takeRight = I_e, Z.takeRightWhile = D_e, Z.takeWhile = R_e, Z.tap = X_e, Z.throttle = L1e, Z.thru = wO, Z.toArray = nF, Z.toPairs = lF, Z.toPairsIn = uF, Z.toPath = QSe, Z.toPlainObject = iF, Z.transform = FOe, Z.unary = N1e, Z.union = k_e, Z.unionBy = L_e, Z.unionWith = N_e, Z.uniq = B_e, Z.uniqBy = z_e, Z.uniqWith = V_e, Z.unset = WOe, Z.unzip = _A, Z.unzipWith = FV, Z.update = QOe, Z.updateWith = HOe, Z.values = Bp, Z.valuesIn = GOe, Z.without = F_e, Z.words = dF, Z.wrap = B1e, Z.xor = W_e, Z.xorBy = Q_e, Z.xorWith = H_e, Z.zip = G_e, Z.zipObject = j_e, Z.zipObjectDeep = Z_e, Z.zipWith = U_e, Z.entries = lF, Z.entriesIn = uF, Z.extend = aF, Z.extendWith = MO, EA(Z, Z), Z.add = GSe, Z.attempt = hF, Z.camelCase = XOe, Z.capitalize = cF, Z.ceil = jSe, Z.clamp = jOe, Z.clone = V1e, Z.cloneDeep = W1e, Z.cloneDeepWith = Q1e, Z.cloneWith = F1e, Z.conformsTo = H1e, Z.deburr = fF, Z.defaultTo = wSe, Z.divide = ZSe, Z.endsWith = YOe, Z.eq = bs, Z.escape = qOe, Z.escapeRegExp = KOe, Z.every = a1e, Z.find = s1e, Z.findIndex = LV, Z.findKey = _Oe, Z.findLast = l1e, Z.findLastIndex = NV, Z.findLastKey = OOe, Z.floor = USe, Z.forEach = QV, Z.forEachRight = HV, Z.forIn = SOe, Z.forInRight = xOe, Z.forOwn = wOe, Z.forOwnRight = COe, Z.get = CA, Z.gt = G1e, Z.gte = j1e, Z.has = $Oe, Z.hasIn = TA, Z.head = zV, Z.identity = ba, Z.includes = h1e, Z.indexOf = l_e, Z.inRange = ZOe, Z.invoke = MOe, Z.isArguments = td, Z.isArray = Ft, Z.isArrayBuffer = Z1e, Z.isArrayLike = ma, Z.isArrayLikeObject = Cr, Z.isBoolean = U1e, Z.isBuffer = gc, Z.isDate = X1e, Z.isElement = Y1e, Z.isEmpty = q1e, Z.isEqual = K1e, Z.isEqualWith = J1e, Z.isError = xA, Z.isFinite = eOe, Z.isFunction = uu, Z.isInteger = KV, Z.isLength = AO, Z.isMap = JV, Z.isMatch = tOe, Z.isMatchWith = nOe, Z.isNaN = rOe, Z.isNative = iOe, Z.isNil = oOe, Z.isNull = aOe, Z.isNumber = eF, Z.isObject = cr, Z.isObjectLike = gr, Z.isPlainObject = h0, Z.isRegExp = wA, Z.isSafeInteger = sOe, Z.isSet = tF, Z.isString = EO, Z.isSymbol = Ha, Z.isTypedArray = Np, Z.isUndefined = lOe, Z.isWeakMap = uOe, Z.isWeakSet = cOe, Z.join = h_e, Z.kebabCase = JOe, Z.last = Co, Z.lastIndexOf = p_e, Z.lowerCase = eSe, Z.lowerFirst = tSe, Z.lt = fOe, Z.lte = dOe, Z.max = XSe, Z.maxBy = YSe, Z.mean = qSe, Z.meanBy = KSe, Z.min = JSe, Z.minBy = exe, Z.stubArray = IA, Z.stubFalse = DA, Z.stubObject = zSe, Z.stubString = VSe, Z.stubTrue = FSe, Z.multiply = txe, Z.nth = v_e, Z.noConflict = MSe, Z.noop = MA, Z.now = TO, Z.pad = nSe, Z.padEnd = rSe, Z.padStart = iSe, Z.parseInt = aSe, Z.random = UOe, Z.reduce = y1e, Z.reduceRight = b1e, Z.repeat = oSe, Z.replace = sSe, Z.result = BOe, Z.round = nxe, Z.runInContext = pe, Z.sample = O1e, Z.size = w1e, Z.snakeCase = lSe, Z.some = C1e, Z.sortedIndex = S_e, Z.sortedIndexBy = x_e, Z.sortedIndexOf = w_e, Z.sortedLastIndex = C_e, Z.sortedLastIndexBy = T_e, Z.sortedLastIndexOf = P_e, Z.startCase = cSe, Z.startsWith = fSe, Z.subtract = rxe, Z.sum = ixe, Z.sumBy = axe, Z.template = dSe, Z.times = WSe, Z.toFinite = cu, Z.toInteger = Yt, Z.toLength = rF, Z.toLower = hSe, Z.toNumber = To, Z.toSafeInteger = hOe, Z.toString = An, Z.toUpper = pSe, Z.trim = vSe, Z.trimEnd = gSe, Z.trimStart = mSe, Z.truncate = ySe, Z.unescape = bSe, Z.uniqueId = HSe, Z.upperCase = _Se, Z.upperFirst = PA, Z.each = QV, Z.eachRight = HV, Z.first = zV, EA(Z, function() {
- var b = {};
- return il(Z, function(w, A) {
- Rn.call(Z.prototype, A) || (b[A] = w);
- }), b;
- }(), { chain: !1 }), Z.VERSION = r, _o(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(b) {
- Z[b].placeholder = Z;
- }), _o(["drop", "take"], function(b, w) {
- un.prototype[b] = function(A) {
- A = A === n ? 1 : Hr(Yt(A), 0);
- var L = this.__filtered__ && !w ? new un(this) : this.clone();
- return L.__filtered__ ? L.__takeCount__ = Mi(A, L.__takeCount__) : L.__views__.push({
- size: Mi(A, j),
- type: b + (L.__dir__ < 0 ? "Right" : "")
- }), L;
- }, un.prototype[b + "Right"] = function(A) {
- return this.reverse()[b](A).reverse();
- };
- }), _o(["filter", "map", "takeWhile"], function(b, w) {
- var A = w + 1, L = A == N || A == B;
- un.prototype[b] = function(G) {
- var X = this.clone();
- return X.__iteratees__.push({
- iteratee: wt(G, 3),
- type: A
- }), X.__filtered__ = X.__filtered__ || L, X;
- };
- }), _o(["head", "last"], function(b, w) {
- var A = "take" + (w ? "Right" : "");
- un.prototype[b] = function() {
- return this[A](1).value()[0];
- };
- }), _o(["initial", "tail"], function(b, w) {
- var A = "drop" + (w ? "" : "Right");
- un.prototype[b] = function() {
- return this.__filtered__ ? new un(this) : this[A](1);
- };
- }), un.prototype.compact = function() {
- return this.filter(ba);
- }, un.prototype.find = function(b) {
- return this.filter(b).head();
- }, un.prototype.findLast = function(b) {
- return this.reverse().find(b);
- }, un.prototype.invokeMap = nn(function(b, w) {
- return typeof b == "function" ? new un(this) : this.map(function(A) {
- return s0(A, b, w);
- });
- }), un.prototype.reject = function(b) {
- return this.filter($O(wt(b)));
- }, un.prototype.slice = function(b, w) {
- b = Yt(b);
- var A = this;
- return A.__filtered__ && (b > 0 || w < 0) ? new un(A) : (b < 0 ? A = A.takeRight(-b) : b && (A = A.drop(b)), w !== n && (w = Yt(w), A = w < 0 ? A.dropRight(-w) : A.take(w - b)), A);
- }, un.prototype.takeRightWhile = function(b) {
- return this.reverse().takeWhile(b).reverse();
- }, un.prototype.toArray = function() {
- return this.take(j);
- }, il(un.prototype, function(b, w) {
- var A = /^(?:filter|find|map|reject)|While$/.test(w), L = /^(?:head|last)$/.test(w), G = Z[L ? "take" + (w == "last" ? "Right" : "") : w], X = L || /^find/.test(w);
- G && (Z.prototype[w] = function() {
- var J = this.__wrapped__, ie = L ? [1] : arguments, ge = J instanceof un, Ee = ie[0], Ie = ge || Ft(J), Ne = function(on) {
- var pn = G.apply(Z, uc([on], ie));
- return L && Ke ? pn[0] : pn;
- };
- Ie && A && typeof Ee == "function" && Ee.length != 1 && (ge = Ie = !1);
- var Ke = this.__chain__, ht = !!this.__actions__.length, Pt = X && !Ke, Jt = ge && !ht;
- if (!X && Ie) {
- J = Jt ? J : new un(this);
- var $t = b.apply(J, ie);
- return $t.__actions__.push({ func: wO, args: [Ne], thisArg: n }), new So($t, Ke);
- }
- return Pt && Jt ? b.apply(this, ie) : ($t = this.thru(Ne), Pt ? L ? $t.value()[0] : $t.value() : $t);
- });
- }), _o(["pop", "push", "shift", "sort", "splice", "unshift"], function(b) {
- var w = Y1[b], A = /^(?:push|sort|unshift)$/.test(b) ? "tap" : "thru", L = /^(?:pop|shift)$/.test(b);
- Z.prototype[b] = function() {
- var G = arguments;
- if (L && !this.__chain__) {
- var X = this.value();
- return w.apply(Ft(X) ? X : [], G);
- }
- return this[A](function(J) {
- return w.apply(Ft(J) ? J : [], G);
- });
- };
- }), il(un.prototype, function(b, w) {
- var A = Z[w];
- if (A) {
- var L = A.name + "";
- Rn.call(Ip, L) || (Ip[L] = []), Ip[L].push({ name: w, func: A });
- }
- }), Ip[mO(n, m).name] = [{
- name: "wrapper",
- func: n
- }], un.prototype.clone = bye, un.prototype.reverse = _ye, un.prototype.value = Oye, Z.prototype.at = Y_e, Z.prototype.chain = q_e, Z.prototype.commit = K_e, Z.prototype.next = J_e, Z.prototype.plant = t1e, Z.prototype.reverse = n1e, Z.prototype.toJSON = Z.prototype.valueOf = Z.prototype.value = r1e, Z.prototype.first = Z.prototype.head, e0 && (Z.prototype[e0] = e1e), Z;
- }, Ap = K0e();
- Zf ? ((Zf.exports = Ap)._ = Ap, A$._ = Ap) : di._ = Ap;
- }).call(Su);
- })(yC, yC.exports);
- var hH = yC.exports;
- const O9e = ae({
- name: "DContainer",
- props: {
- style: Object,
- props: Object
- },
- setup(t) {
- const e = V(() => {
- var i, a, o, s, l, u;
- return {
- width: ((i = t.props) == null ? void 0 : i.width) + "px",
- height: ((a = t.props) == null ? void 0 : a.height) + "px",
- transform: `rotateX(${((o = t.props) == null ? void 0 : o.rotateX) || 0}deg) rotateY(${((s = t.props) == null ? void 0 : s.rotateY) || 0}deg) rotateZ(${((l = t.props) == null ? void 0 : l.rotateZ) || 0}deg)`,
- opacity: ((u = t.props) == null ? void 0 : u.opacity) / 100,
- ...JR(
- hH.pick(t.style, [
- "boxShadow",
- "webkitBoxReflect"
- ])
- )
- };
- }), n = V(() => {
- var i, a, o, s;
- return {
- paddingLeft: ((i = t.props) == null ? void 0 : i.paddingLeft) + "px",
- paddingRight: ((a = t.props) == null ? void 0 : a.paddingRight) + "px",
- paddingTop: ((o = t.props) == null ? void 0 : o.paddingTop) + "px",
- paddingBottom: ((s = t.props) == null ? void 0 : s.paddingBottom) + "px",
- overflow: "hidden"
- };
- }), r = V(() => {
- var o, s;
- const { style: i = {} } = t, a = JR(
- hH.pick(i, [
- "background",
- "backdropFilter",
- "borderRadius",
- "borderStyle",
- "borderColor",
- "borderWidth"
- ])
- );
- return {
- position: "absolute",
- boxSizing: "border-box",
- left: 0,
- top: 0,
- opacity: i.opacity / 100,
- width: ((o = t.props) == null ? void 0 : o.width) + "px",
- height: ((s = t.props) == null ? void 0 : s.height) + "px",
- ...a
- };
- });
- return {
- getContentStyle: n,
- getBackgroundStyle: r,
- getContainetStyle: e
- };
- }
- }), ui = (t, e) => {
- const n = t.__vccOpts || t;
- for (const [r, i] of e)
- n[r] = i;
- return n;
- };
- function S9e(t, e, n, r, i, a) {
- return be(), Ue("div", Xn({
- class: "component-contaier",
- style: t.getContainetStyle
- }, t.$attrs), [
- tt("div", {
- class: "component-background",
- style: dr(t.getBackgroundStyle)
- }, null, 4),
- tt("div", {
- class: "component-content",
- style: dr(t.getContentStyle)
- }, [
- ln(t.$slots, "default", {}, void 0, !0)
- ], 4)
- ], 16);
- }
- const jv = /* @__PURE__ */ ui(O9e, [["render", S9e], ["__scopeId", "data-v-54953270"]]);
- jv.install = (t) => (t.component(jv.name, jv), t);
- const x9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Container: jv,
- default: jv
- }, Symbol.toStringTag, { value: "Module" })), d5 = {
- text: {
- type: String,
- required: !0
- },
- width: {
- type: Number
- },
- height: {
- type: Number
- },
- fontSize: {
- type: Number
- },
- fontWeight: {
- type: [Number, String]
- },
- color: {
- type: String
- },
- backgroundColor: {
- type: String
- },
- textAlign: {
- type: String
- },
- direction: {
- type: String
- }
- }, w9e = {
- container: {
- style: {
- background: {
- type: "none"
- }
- },
- props: {
- width: 300,
- height: 80
- }
- },
- props: {
- text: "标题内容",
- fontSize: 24,
- color: "#fff",
- fontWeight: "bold",
- textAlign: "left",
- direction: "horizontal"
- }
- }, C9e = ae({
- name: "DTitle",
- props: d5,
- setup(t) {
- return {
- style: V(() => {
- const n = JR(t), r = {};
- return n.color.length > 9 && (r.backgroundImage = n.color, r.webkitBackgroundClip = "text", r.webkitTextFillColor = "transparent"), {
- ...r,
- ...n,
- width: "100%",
- height: "100%",
- lineHeight: t.height + "px"
- };
- })
- };
- }
- });
- function T9e(t, e, n, r, i, a) {
- return be(), Ue("div", {
- class: "cus-title",
- style: dr(t.style)
- }, xi(t.text), 5);
- }
- const Zv = /* @__PURE__ */ ui(C9e, [["render", T9e]]), Woe = (t) => (JT("data-v-eace9702"), t = t(), e2(), t), P9e = {
- key: 0,
- class: "color-box"
- }, $9e = { class: "img-preview" }, A9e = /* @__PURE__ */ Woe(() => /* @__PURE__ */ tt("div", { class: "img-empty" }, "未选择", -1)), E9e = /* @__PURE__ */ Woe(() => /* @__PURE__ */ tt("div", { class: "img-tip" }, "选择素材", -1)), M9e = /* @__PURE__ */ ae({
- __name: "BackgroundSelect",
- props: {
- value: { default: () => ({
- type: "none",
- color: "",
- image: "",
- fillType: ""
- }) },
- filterOptions: {}
- },
- emits: ["update:value"],
- setup(t, { emit: e }) {
- const n = t, r = e, i = ee(n.value), a = [
- { label: "无", value: "none" },
- { label: "颜色", value: "color" },
- { label: "图片", value: "image" }
- ], o = V(() => n.filterOptions ? a.filter((l) => {
- var u;
- return !((u = n.filterOptions) != null && u.includes(l.value));
- }) : a);
- me(
- () => i.value,
- () => {
- r("update:value", i.value);
- },
- {
- deep: !0
- }
- );
- const s = (l) => {
- l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
- };
- return (l, u) => (be(), Ue(Wt, null, [
- D(z(Ca), {
- value: i.value.type,
- "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
- style: { width: "100%" },
- options: o.value,
- onChange: s
- }, null, 8, ["value", "options"]),
- i.value.type === "color" ? (be(), Ue("div", P9e, [
- D(z(Fv), {
- modelValue: i.value.color,
- "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
- "color-format": "hex",
- "show-alpha": "",
- size: "small"
- }, null, 8, ["modelValue"]),
- D(z(p2), {
- modelValue: i.value.color,
- "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
- size: "small"
- }, null, 8, ["modelValue"])
- ])) : i.value.type === "image" ? (be(), Ue(Wt, { key: 1 }, [
- D(z(mr), {
- style: { "margin-top": "12px" },
- placeholder: "图片地址",
- value: i.value.image,
- "onUpdate:value": u[3] || (u[3] = (c) => i.value.image = c)
- }, null, 8, ["value"]),
- tt("div", $9e, [
- A9e,
- D(z(Lc), {
- src: i.value.image
- }, null, 8, ["src"]),
- E9e
- ]),
- D(z(yne), {
- modelValue: i.value.fillType,
- "onUpdate:modelValue": u[4] || (u[4] = (c) => i.value.fillType = c)
- }, {
- default: ke(() => [
- D(z(By), { value: "cover" }, {
- default: ke(() => [
- On("填充")
- ]),
- _: 1
- }),
- D(z(By), { value: "contain" }, {
- default: ke(() => [
- On("适应")
- ]),
- _: 1
- }),
- D(z(By), { value: "stretch" }, {
- default: ke(() => [
- On("拉伸")
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["modelValue"])
- ], 64)) : Ot("", !0)
- ], 64));
- }
- }), I9e = /* @__PURE__ */ ui(M9e, [["__scopeId", "data-v-eace9702"]]), D9e = /* @__PURE__ */ ae({
- __name: "ColorSelect",
- props: {
- value: {},
- gradient: { type: Boolean, default: !0 }
- },
- emits: ["update:value"],
- setup(t, { emit: e }) {
- var s, l;
- const n = e, r = t, i = ee(((s = r.value) == null ? void 0 : s.length) <= 9 || !r.value ? "pure" : "gradient"), a = ee(r.value), o = ee(((l = r.value) == null ? void 0 : l.length) >= 9 ? r.value.slice(22).replace(")", "").split(",") : ["#4ba9ff", "#fff"]);
- return me(
- () => [i.value, a.value, o.value],
- () => {
- i.value === "pure" ? a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value : a.value = `linear-gradient(90deg, ${o.value.join(",")})`, n("update:value", a.value);
- },
- {
- deep: !0
- }
- ), me(
- () => r.gradient,
- (u) => {
- u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
- }
- ), (u, c) => (be(), Ue(Wt, null, [
- u.gradient ? (be(), Je(z(yne), {
- key: 0,
- modelValue: i.value,
- "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
- size: "small",
- style: { width: "100%" }
- }, {
- default: ke(() => [
- D(z(By), { value: "pure" }, {
- default: ke(() => [
- On("单色")
- ]),
- _: 1
- }),
- D(z(By), { value: "gradient" }, {
- default: ke(() => [
- On("渐变色")
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["modelValue"])) : Ot("", !0),
- i.value === "pure" ? (be(), Ue("div", {
- key: 1,
- class: "color-box",
- style: dr({ marginTop: u.gradient ? "12px" : "0" })
- }, [
- D(z(Fv), {
- modelValue: a.value,
- "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
- "color-format": "hex",
- "show-alpha": "",
- size: "small"
- }, null, 8, ["modelValue"]),
- D(z(p2), {
- modelValue: a.value,
- "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
- size: "small"
- }, null, 8, ["modelValue"])
- ], 4)) : i.value === "gradient" ? (be(), Ue("div", {
- key: 2,
- class: "gradient-box",
- style: dr({ background: a.value })
- }, [
- D(z(Fv), {
- modelValue: o.value[0],
- "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
- "color-format": "hex",
- "show-alpha": "",
- size: "small"
- }, null, 8, ["modelValue"]),
- D(z(Fv), {
- modelValue: o.value[1],
- "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
- "color-format": "hex",
- "show-alpha": "",
- size: "small"
- }, null, 8, ["modelValue"])
- ], 4)) : Ot("", !0)
- ], 64));
- }
- }), R9e = /* @__PURE__ */ ui(D9e, [["__scopeId", "data-v-d5768739"]]), bC = [
- {
- name: "清新",
- color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
- },
- {
- name: "复古",
- color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
- },
- {
- name: "商务",
- color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
- },
- {
- name: "经典",
- color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
- },
- {
- name: "怀旧",
- color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
- }
- ], k9e = {
- // 调色盘-预设颜色
- color: bC[0].color,
- // 标题
- title: {
- show: !0,
- left: "center",
- top: 8,
- textStyle: {
- color: "#FFFFFFFF",
- fontSize: 16,
- fontWeight: "normal"
- }
- },
- // 图例
- legend: {
- show: !0,
- textStyle: {
- color: "#FFFFFFFF"
- },
- top: 32,
- bottom: "auto",
- left: "center",
- right: "auto"
- },
- // 布局
- grid: {
- bottom: 34,
- right: 20,
- left: 20,
- top: 60
- },
- // x轴
- xAxis: {
- type: "category",
- name: "",
- nameLocation: "middle",
- nameTruncate: {
- ellipsis: "...",
- maxWidth: 80
- },
- nameTextStyle: {
- color: "#FFFFFFFF",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal"
- },
- axisLabel: {
- show: !0,
- color: "#9fadbf",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal"
- },
- axisLine: {
- show: !0,
- lineStyle: {
- width: 1
- }
- },
- axisTick: {
- show: !0,
- lineStyle: {
- width: 1,
- color: "#ccc"
- }
- }
- },
- // y轴
- yAxis: {
- splitLine: {
- show: !0,
- lineStyle: {
- type: "dashed",
- color: "#36485f"
- }
- },
- type: "value",
- name: "",
- nameLocation: "middle",
- nameTruncate: {
- ellipsis: "...",
- maxWidth: 80
- },
- nameTextStyle: {
- color: "#FFFFFFFF",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal"
- },
- axisLabel: {
- show: !0,
- color: "#9fadbf",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal",
- rotate: 0
- },
- axisLine: {
- show: !1,
- lineStyle: {
- width: 1,
- color: "#ccc"
- }
- },
- axisTick: {
- show: !1,
- lineStyle: {
- width: 1,
- color: "#ccc"
- }
- }
- },
- // 提示
- tooltip: {
- show: !0,
- trigger: "axis",
- formatter: "{b} {c}",
- // valueFormatter: "(value, dataIndex) => value",
- axisPointer: {
- type: "line"
- },
- textStyle: {
- color: "#000000FF",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal"
- },
- padding: 10,
- borderWidth: 1,
- borderColor: "#ccc",
- borderRadius: 4,
- backgroundColor: "#FFFFFFFF",
- extraCssText: ""
- }
- }, L9e = { class: "color-list" }, N9e = { class: "del-btn" }, B9e = /* @__PURE__ */ ae({
- __name: "ColorScheme",
- props: {
- value: {
- type: Array,
- default: () => []
- }
- },
- emits: ["update:value"],
- setup(t, { emit: e }) {
- const n = t, r = bC.map((d) => d.color.join(",")), i = e, a = ee(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = ee(n.value), s = ee();
- function l(d) {
- d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
- }
- const u = () => {
- var d;
- (d = s.value) == null || d.show();
- };
- function c(d) {
- o.value.push(d), a.value = "custom", i("update:value", o.value);
- }
- const f = (d) => {
- o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
- };
- return (d, h) => (be(), Ue("div", null, [
- D(z(Ca), {
- value: a.value,
- "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
- size: "small",
- style: { width: "100%" },
- onChange: l
- }, {
- default: ke(() => [
- (be(!0), Ue(Wt, null, hh(z(bC), (p) => (be(), Je(z(Ev), {
- key: p.name,
- value: p.color.join(",")
- }, {
- default: ke(() => [
- (be(!0), Ue(Wt, null, hh(p.color.slice(0, 5), (v) => (be(), Ue("span", {
- class: "color-block",
- key: v,
- style: dr({ background: v })
- }, null, 4))), 128)),
- On(" " + xi(p.name), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128)),
- D(z(Ev), { value: "custom" }, {
- default: ke(() => [
- On("自定义组合")
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"]),
- tt("div", L9e, [
- (be(!0), Ue(Wt, null, hh(o.value, (p, v) => (be(), Ue("span", {
- class: "color-block",
- key: v,
- style: dr({ background: p })
- }, [
- tt("span", N9e, [
- D(z(cs), {
- onClick: (g) => f(v)
- }, null, 8, ["onClick"])
- ])
- ], 4))), 128)),
- tt("span", {
- class: "color-block cus-btn",
- onClick: u
- }, [
- D(z(j2))
- ]),
- D(z(Fv), {
- ref_key: "colorPickerRef",
- ref: s,
- style: { width: "0", height: "0", opacity: "0" },
- onChange: c
- }, null, 512)
- ])
- ]));
- }
- }), z9e = /* @__PURE__ */ ui(B9e, [["__scopeId", "data-v-b29b1b78"]]), V9e = { class: "position" }, F9e = /* @__PURE__ */ ae({
- __name: "Position",
- props: {
- value: {},
- type: { default: "line" }
- },
- emits: ["update:value"],
- setup(t) {
- return (e, n) => (be(), Ue("div", V9e, [
- e.type === "line" ? (be(), Je(z(Fh), {
- key: 0,
- value: e.value,
- onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
- }, {
- default: ke(() => [
- D(z(_l), { value: "left" }, {
- default: ke(() => [
- D(z(U8))
- ]),
- _: 1
- }),
- D(z(_l), { value: "center" }, {
- default: ke(() => [
- D(z(Z8))
- ]),
- _: 1
- }),
- D(z(_l), { value: "right" }, {
- default: ke(() => [
- D(z(X8))
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"])) : e.type === "round" ? (be(), Je(z(Fh), {
- key: 1,
- value: e.value,
- onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
- }, {
- default: ke(() => [
- D(z(_l), { value: "top" }, {
- default: ke(() => [
- D(z(e5))
- ]),
- _: 1
- }),
- D(z(_l), { value: "bottom" }, {
- default: ke(() => [
- D(z(q8))
- ]),
- _: 1
- }),
- D(z(_l), { value: "left" }, {
- default: ke(() => [
- D(z(K8))
- ]),
- _: 1
- }),
- D(z(_l), { value: "right" }, {
- default: ke(() => [
- D(z(J8))
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"])) : Ot("", !0)
- ]));
- }
- }), W9e = /* @__PURE__ */ ui(F9e, [["__scopeId", "data-v-a4b8591a"]]), Q9e = { class: "font-style" }, H9e = { class: "cus-btn" }, G9e = /* @__PURE__ */ ae({
- __name: "FontStyle",
- props: {
- value: {}
- },
- emits: ["update:value"],
- setup(t, { emit: e }) {
- var v, g, m, y;
- const n = t, r = e, i = ee((v = n.value) == null ? void 0 : v.bold), a = ee((g = n.value) == null ? void 0 : g.italic), o = ee((m = n.value) == null ? void 0 : m.size), s = ee((y = n.value) == null ? void 0 : y.color), l = ee(), u = () => {
- r("update:value", {
- size: o.value,
- bold: i.value,
- italic: a.value,
- color: s.value
- });
- }, c = () => {
- i.value = !i.value, u();
- }, f = () => {
- a.value = !a.value, u();
- };
- function d(_) {
- s.value = _, u();
- }
- function h(_) {
- o.value = _, u();
- }
- const p = () => {
- var _;
- (_ = l.value) == null || _.show();
- };
- return (_, O) => (be(), Ue("div", Q9e, [
- D(z(Vi), {
- size: "small",
- onClick: p
- }, {
- default: ke(() => [
- tt("span", H9e, [
- D(z(t5)),
- tt("div", {
- class: "color-block",
- style: dr({ background: s.value })
- }, null, 4),
- D(z(Fv), {
- ref_key: "colorPickerRef",
- ref: l,
- style: { width: "0", height: "0", opacity: "0" },
- value: s.value,
- "onUpdate:value": O[0] || (O[0] = (S) => s.value = S),
- onChange: d
- }, null, 8, ["value"])
- ])
- ]),
- _: 1
- }),
- D(z(Vi), {
- size: "small",
- onClick: c
- }, {
- default: ke(() => [
- tt("span", {
- class: Ge(["cus-btn", { "active-btn": i.value }])
- }, [
- D(z(Y8))
- ], 2)
- ]),
- _: 1
- }),
- D(z(Vi), {
- size: "small",
- onClick: f
- }, {
- default: ke(() => [
- tt("span", {
- class: Ge(["cus-btn", { "active-btn": a.value }])
- }, [
- D(z(n5))
- ], 2)
- ]),
- _: 1
- }),
- D(z(Y_), {
- size: "small",
- value: o.value,
- min: 12,
- step: 1,
- precision: 0,
- style: { width: "80px" },
- onChange: h
- }, {
- addonAfter: ke(() => [
- On("px")
- ]),
- _: 1
- }, 8, ["value"])
- ]));
- }
- }), j9e = /* @__PURE__ */ ui(G9e, [["__scopeId", "data-v-12e62bfe"]]), Z9e = { class: "cus-slider" }, U9e = /* @__PURE__ */ ae({
- __name: "CusSlider",
- props: {
- value: {}
- },
- emits: ["update:value"],
- setup(t) {
- return (e, n) => (be(), Ue("div", Z9e, [
- D(z(s7e), {
- value: e.value,
- onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
- "tip-formatter": (r) => `${r}%`
- }, null, 8, ["value", "tip-formatter"]),
- D(z(Y_), {
- value: e.value,
- onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
- "addon-after": "%"
- }, null, 8, ["value"])
- ]));
- }
- }), X9e = /* @__PURE__ */ ui(U9e, [["__scopeId", "data-v-2fe8fa98"]]), Y9e = ae({
- name: "FmBorderRadius",
- components: {
- RadioGroup: Fh,
- RadioButton: _l,
- InputNumber: Y_,
- Select: Ca,
- RadiusUpleftOutlined: a5,
- RadiusUprightOutlined: o5,
- RadiusBottomleftOutlined: r5,
- RadiusBottomrightOutlined: i5
- },
- props: {
- value: {
- type: Object,
- default: () => ({})
- }
- },
- emits: ["update:value"],
- setup(t, { emit: e }) {
- var r, i, a, o;
- const n = zn({
- type: t.value.type || "all",
- value: t.value.type === "all" ? t.value.value : 0,
- unit: t.value.unit || "px",
- topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
- topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
- bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
- bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
- });
- return me(
- () => n,
- (s) => {
- e("update:value", {
- type: s.type,
- value: s.type === "all" ? s.value : {
- topLeft: s.topLeft,
- topRight: s.topRight,
- bottomLeft: s.bottomLeft,
- bottomRight: s.bottomRight
- },
- unit: s.unit
- });
- },
- {
- deep: !0
- }
- ), {
- radius: n,
- unitOptions: [
- { label: "px", value: "px" },
- { label: "%", value: "%" }
- ]
- };
- }
- }), q9e = {
- key: 0,
- class: "all"
- }, K9e = {
- key: 1,
- class: "custom"
- };
- function J9e(t, e, n, r, i, a) {
- const o = br("RadioButton"), s = br("RadioGroup"), l = br("InputNumber"), u = br("Select"), c = br("RadiusUpleftOutlined"), f = br("RadiusUprightOutlined"), d = br("RadiusBottomleftOutlined"), h = br("RadiusBottomrightOutlined");
- return be(), Ue("div", null, [
- D(s, {
- value: t.radius.type,
- "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
- }, {
- default: ke(() => [
- D(o, { value: "all" }, {
- default: ke(() => [
- On("整体")
- ]),
- _: 1
- }),
- D(o, { value: "custom" }, {
- default: ke(() => [
- On("单个")
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"]),
- t.radius.type === "all" ? (be(), Ue("div", q9e, [
- D(l, {
- value: t.radius.value,
- "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
- }, null, 8, ["value"]),
- D(u, {
- value: t.radius.unit,
- "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
- options: t.unitOptions
- }, null, 8, ["value", "options"])
- ])) : (be(), Ue("div", K9e, [
- D(l, {
- value: t.radius.topLeft,
- "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
- }, {
- addonBefore: ke(() => [
- D(c)
- ]),
- _: 1
- }, 8, ["value"]),
- D(l, {
- value: t.radius.topRight,
- "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
- }, {
- addonBefore: ke(() => [
- D(f)
- ]),
- _: 1
- }, 8, ["value"]),
- D(l, {
- value: t.radius.bottomLeft,
- "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
- }, {
- addonBefore: ke(() => [
- D(d)
- ]),
- _: 1
- }, 8, ["value"]),
- D(l, {
- value: t.radius.bottomRight,
- "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
- }, {
- addonBefore: ke(() => [
- D(h)
- ]),
- _: 1
- }, 8, ["value"]),
- D(u, {
- value: t.radius.unit,
- "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
- options: t.unitOptions
- }, null, 8, ["value", "options"])
- ]))
- ]);
- }
- const eHe = /* @__PURE__ */ ui(Y9e, [["render", J9e], ["__scopeId", "data-v-da2b5cf6"]]), tHe = /* @__PURE__ */ ae({
- __name: "CusFormItem",
- props: {
- item: {},
- modelValue: {}
- },
- emits: ["update:modelValue"],
- setup(t, { emit: e }) {
- const n = t, r = e, i = ee(n.modelValue);
- return me(
- () => i.value,
- () => {
- r("update:modelValue", i.value);
- },
- { deep: !0 }
- ), me(
- () => n.modelValue,
- (a) => {
- z_(a, i.value) || (i.value = a);
- }
- ), (a, o) => (be(), Je(z(pae), {
- label: a.item.type !== "divider" ? a.item.label : "",
- name: a.item.prop,
- rules: a.item.rules
- }, {
- default: ke(() => {
- var s, l, u, c, f, d, h, p, v, g, m;
- return [
- a.item.type === "divider" ? (be(), Je(z(nFe), {
- key: 0,
- style: { margin: "0" }
- }, {
- default: ke(() => [
- On(xi(a.item.label), 1)
- ]),
- _: 1
- })) : a.item.type === "input" ? (be(), Je(z(mr), Xn({
- key: 1,
- value: i.value,
- "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
- }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (be(), Je(z(Ca), Xn({
- key: 2,
- value: i.value,
- "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
- }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (be(), Je(z(Y_), Xn({
- key: 3,
- value: i.value,
- "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
- }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (be(), Je(z(Lc), Xn({
- key: 4,
- value: i.value,
- "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
- }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (be(), Je(z(dC), Xn({
- key: 5,
- value: i.value,
- "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
- }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (be(), Je(I9e, Xn({
- key: 6,
- value: i.value,
- "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
- }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (be(), Je(R9e, Xn({
- key: 7,
- value: i.value,
- "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
- }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (be(), Je(z9e, Xn({
- key: 8,
- value: i.value,
- "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
- }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (be(), Je(z(Fh), Xn({
- key: 9,
- value: i.value,
- "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
- size: "small"
- }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (be(), Je(z(Fh), {
- key: 10,
- value: i.value,
- "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
- size: "small"
- }, {
- default: ke(() => [
- (be(!0), Ue(Wt, null, hh(a.item.fieldProps.options, (y) => (be(), Je(z(_l), {
- key: y.value,
- value: y.value
- }, {
- default: ke(() => [
- On(xi(y.label), 1)
- ]),
- _: 2
- }, 1032, ["value"]))), 128))
- ]),
- _: 1
- }, 8, ["value"])) : a.item.type === "position" ? (be(), Je(W9e, Xn({
- key: 11,
- value: i.value,
- "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
- }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (be(), Je(j9e, Xn({
- key: 12,
- value: i.value,
- "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
- }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (be(), Je(z(Lb), { key: 13 }, {
- default: ke(() => {
- var y;
- return [
- D(X9e, Xn({
- value: i.value,
- "onUpdate:value": o[12] || (o[12] = (_) => i.value = _)
- }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
- ];
- }),
- _: 1
- })) : a.item.type === "boderRadiusSelect" ? (be(), Je(z(Lb), { key: 14 }, {
- default: ke(() => {
- var y;
- return [
- D(eHe, Xn({
- value: i.value,
- "onUpdate:value": o[13] || (o[13] = (_) => i.value = _)
- }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
- ];
- }),
- _: 1
- })) : Ot("", !0),
- a.item.tip ? (be(), Je(z(F2), {
- key: 15,
- title: a.item.tip
- }, {
- default: ke(() => [
- D(z(V2), { style: { color: "#666" } })
- ]),
- _: 1
- }, 8, ["title"])) : Ot("", !0)
- ];
- }),
- _: 1
- }, 8, ["label", "name", "rules"]));
- }
- }), nHe = /* @__PURE__ */ ui(tHe, [["__scopeId", "data-v-04c55003"]]), Sh = ae({
- name: "DCusForm",
- props: {
- columns: {
- type: Array,
- default: () => []
- },
- formModel: {
- type: Object,
- default: () => ({})
- }
- },
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = ee({}), r = ee(), i = ee({}), a = V(() => t.columns.map((f) => ({
- ...f,
- rules: (f == null ? void 0 : f.rules) || []
- }))), o = (f) => {
- f == null || f.forEach((d) => {
- var h;
- if (d.type === "group")
- o(d.children);
- else if (d.type === "dependency") {
- const p = (h = d.children) == null ? void 0 : h.call(
- d,
- mg(n.value, d.name || []),
- n
- );
- o(p);
- } else {
- if (d.type === "divider") return;
- const p = vn(t.formModel, d.prop);
- n.value[d.prop] = d != null && d.valueToForm ? d.valueToForm(p, t.formModel) : p ?? d.defaultValue, d.format ? d.format(i, n.value[d.prop]) : i.value[d.prop] = p ?? d.defaultValue;
- }
- });
- }, s = (f, d) => {
- n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
- }, l = (f) => {
- var d;
- switch (f.type) {
- case "dependency": {
- const h = (d = f.children) == null ? void 0 : d.call(
- f,
- mg(n.value, f.name || []),
- n
- );
- return o(h), c(h);
- }
- case "group":
- return u(f);
- default:
- return /* @__PURE__ */ React.createElement(
- nHe,
- {
- key: f.prop,
- item: f,
- modelValue: n.value[f.prop],
- "onUpdate:modelValue": (h) => {
- s(h, f);
- }
- }
- );
- }
- }, u = (f) => {
- var d;
- return /* @__PURE__ */ React.createElement(Wy, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(fC, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
- }, c = (f) => f.map((d) => {
- switch (d.type) {
- case "group":
- return u(d);
- default:
- return l(d);
- }
- });
- return me(
- () => a.value,
- (f) => {
- f && o(f);
- },
- { immediate: !0 }
- ), () => /* @__PURE__ */ React.createElement(
- Gr,
- {
- model: n,
- colon: !1,
- "label-col": { span: 8 },
- ref: r,
- layout: "horizontal",
- size: "small"
- },
- c(a.value)
- );
- }
- });
- Sh.install = (t) => (t.component(Sh.name, Sh), t);
- const Qoe = /* @__PURE__ */ ae({
- __name: "Config",
- props: d5,
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = t, r = e, i = V(() => [
- {
- label: "内容",
- prop: "text",
- type: "input",
- defaultValue: n.text
- },
- {
- label: "字体",
- prop: "fontSize",
- type: "inputNumber",
- defaultValue: n.fontSize
- },
- {
- label: "颜色",
- prop: "color",
- type: "colorSelect",
- defaultValue: n.color
- },
- {
- label: "对齐",
- prop: "textAlign",
- type: "radioGroup",
- defaultValue: n.textAlign,
- fieldProps: {
- options: [
- { label: "左对齐", value: "left" },
- { label: "居中", value: "center" },
- { label: "右对齐", value: "right" }
- ]
- }
- }
- ]), a = (o) => {
- r("change", o);
- };
- return (o, s) => (be(), Je(z(Sh), Xn({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
- }
- });
- Zv.Config = Qoe;
- Zv.install = (t) => (t.component(Zv.name, Zv), t);
- const rHe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Config: Qoe,
- default: Zv,
- defaultPropsValue: w9e,
- titleProps: d5
- }, Symbol.toStringTag, { value: "Module" }));
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */
- var ek = function(t, e) {
- return ek = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
- n.__proto__ = r;
- } || function(n, r) {
- for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
- }, ek(t, e);
- };
- function le(t, e) {
- if (typeof e != "function" && e !== null)
- throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
- ek(t, e);
- function n() {
- this.constructor = t;
- }
- t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
- }
- var iHe = /* @__PURE__ */ function() {
- function t() {
- this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
- }
- return t;
- }(), aHe = /* @__PURE__ */ function() {
- function t() {
- this.browser = new iHe(), 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 = typeof window < "u";
- }
- return t;
- }(), Rd = new aHe();
- typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (Rd.wxa = !0, Rd.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? Rd.worker = !0 : typeof navigator > "u" || navigator.userAgent.indexOf("Node.js") === 0 ? (Rd.node = !0, Rd.svgSupported = !0) : oHe(navigator.userAgent, Rd);
- function oHe(t, e) {
- var n = e.browser, r = t.match(/Firefox\/([\d.]+)/), i = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(t);
- r && (n.firefox = !0, n.version = r[1]), i && (n.ie = !0, n.version = i[1]), a && (n.edge = !0, n.version = a[1], n.newEdge = +a[1].split(".")[0] > 18), o && (n.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = typeof document < "u";
- var s = document.documentElement.style;
- 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;
- }
- const Gt = Rd;
- var h5 = 12, Hoe = "sans-serif", vf = h5 + "px " + Hoe, sHe = 20, lHe = 100, uHe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
- function cHe(t) {
- var e = {};
- if (typeof JSON > "u")
- return e;
- for (var n = 0; n < t.length; n++) {
- var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - sHe) / lHe;
- e[r] = i;
- }
- return e;
- }
- var fHe = cHe(uHe), Hs = {
- createCanvas: function() {
- return typeof document < "u" && document.createElement("canvas");
- },
- measureText: /* @__PURE__ */ function() {
- var t, e;
- return function(n, r) {
- if (!t) {
- var i = Hs.createCanvas();
- t = i && i.getContext("2d");
- }
- if (t)
- return e !== r && (e = t.font = r || vf), t.measureText(n);
- n = n || "", r = r || vf;
- var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || h5, s = 0;
- if (r.indexOf("mono") >= 0)
- s = o * n.length;
- else
- for (var l = 0; l < n.length; l++) {
- var u = fHe[n[l]];
- s += u == null ? o : u * o;
- }
- return { width: s };
- };
- }(),
- loadImage: function(t, e, n) {
- var r = new Image();
- return r.onload = e, r.onerror = n, r.src = t, r;
- }
- };
- function Goe(t) {
- for (var e in Hs)
- t[e] && (Hs[e] = t[e]);
- }
- var joe = os([
- "Function",
- "RegExp",
- "Date",
- "Error",
- "CanvasGradient",
- "CanvasPattern",
- "Image",
- "Canvas"
- ], function(t, e) {
- return t["[object " + e + "]"] = !0, t;
- }, {}), Zoe = os([
- "Int8",
- "Uint8",
- "Uint8Clamped",
- "Int16",
- "Uint16",
- "Int32",
- "Uint32",
- "Float32",
- "Float64"
- ], function(t, e) {
- return t["[object " + e + "Array]"] = !0, t;
- }, {}), mm = Object.prototype.toString, iP = Array.prototype, dHe = iP.forEach, hHe = iP.filter, p5 = iP.slice, pHe = iP.map, pH = (function() {
- }).constructor, nS = pH ? pH.prototype : null, v5 = "__proto__", vHe = 2311;
- function g5() {
- return vHe++;
- }
- function qo() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- typeof console < "u" && console.error.apply(console, t);
- }
- function ot(t) {
- if (t == null || typeof t != "object")
- return t;
- var e = t, n = mm.call(t);
- if (n === "[object Array]") {
- if (!Uv(t)) {
- e = [];
- for (var r = 0, i = t.length; r < i; r++)
- e[r] = ot(t[r]);
- }
- } else if (Zoe[n]) {
- if (!Uv(t)) {
- var a = t.constructor;
- if (a.from)
- e = a.from(t);
- else {
- e = new a(t.length);
- for (var r = 0, i = t.length; r < i; r++)
- e[r] = t[r];
- }
- }
- } else if (!joe[n] && !Uv(t) && !gf(t)) {
- e = {};
- for (var o in t)
- t.hasOwnProperty(o) && o !== v5 && (e[o] = ot(t[o]));
- }
- return e;
- }
- function mt(t, e, n) {
- if (!nt(e) || !nt(t))
- return n ? ot(e) : t;
- for (var r in e)
- if (e.hasOwnProperty(r) && r !== v5) {
- var i = t[r], a = e[r];
- nt(a) && nt(i) && !Se(a) && !Se(i) && !gf(a) && !gf(i) && !tk(a) && !tk(i) && !Uv(a) && !Uv(i) ? mt(i, a, n) : (n || !(r in t)) && (t[r] = ot(e[r]));
- }
- return t;
- }
- function aP(t, e) {
- for (var n = t[0], r = 1, i = t.length; r < i; r++)
- n = mt(n, t[r], e);
- return n;
- }
- function _e(t, e) {
- if (Object.assign)
- Object.assign(t, e);
- else
- for (var n in e)
- e.hasOwnProperty(n) && n !== v5 && (t[n] = e[n]);
- return t;
- }
- function it(t, e, n) {
- for (var r = kt(e), i = 0; i < r.length; i++) {
- var a = r[i];
- (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
- }
- return t;
- }
- var gHe = Hs.createCanvas;
- function St(t, e) {
- if (t) {
- if (t.indexOf)
- return t.indexOf(e);
- for (var n = 0, r = t.length; n < r; n++)
- if (t[n] === e)
- return n;
- }
- return -1;
- }
- function m5(t, e) {
- var n = t.prototype;
- function r() {
- }
- r.prototype = e.prototype, t.prototype = new r();
- for (var i in n)
- n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
- t.prototype.constructor = t, t.superClass = e;
- }
- function vr(t, e, n) {
- if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
- for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
- var a = r[i];
- a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
- }
- else
- it(t, e, n);
- }
- function Pi(t) {
- return !t || typeof t == "string" ? !1 : typeof t.length == "number";
- }
- function F(t, e, n) {
- if (t && e)
- if (t.forEach && t.forEach === dHe)
- t.forEach(e, n);
- else if (t.length === +t.length)
- for (var r = 0, i = t.length; r < i; r++)
- e.call(n, t[r], r, t);
- else
- for (var a in t)
- t.hasOwnProperty(a) && e.call(n, t[a], a, t);
- }
- function Ce(t, e, n) {
- if (!t)
- return [];
- if (!e)
- return oP(t);
- if (t.map && t.map === pHe)
- return t.map(e, n);
- for (var r = [], i = 0, a = t.length; i < a; i++)
- r.push(e.call(n, t[i], i, t));
- return r;
- }
- function os(t, e, n, r) {
- if (t && e) {
- for (var i = 0, a = t.length; i < a; i++)
- n = e.call(r, n, t[i], i, t);
- return n;
- }
- }
- function yn(t, e, n) {
- if (!t)
- return [];
- if (!e)
- return oP(t);
- if (t.filter && t.filter === hHe)
- return t.filter(e, n);
- for (var r = [], i = 0, a = t.length; i < a; i++)
- e.call(n, t[i], i, t) && r.push(t[i]);
- return r;
- }
- function Uoe(t, e, n) {
- if (t && e) {
- for (var r = 0, i = t.length; r < i; r++)
- if (e.call(n, t[r], r, t))
- return t[r];
- }
- }
- function kt(t) {
- if (!t)
- return [];
- if (Object.keys)
- return Object.keys(t);
- var e = [];
- for (var n in t)
- t.hasOwnProperty(n) && e.push(n);
- return e;
- }
- function mHe(t, e) {
- for (var n = [], r = 2; r < arguments.length; r++)
- n[r - 2] = arguments[r];
- return function() {
- return t.apply(e, n.concat(p5.call(arguments)));
- };
- }
- var We = nS && qe(nS.bind) ? nS.call.bind(nS.bind) : mHe;
- function vt(t) {
- for (var e = [], n = 1; n < arguments.length; n++)
- e[n - 1] = arguments[n];
- return function() {
- return t.apply(this, e.concat(p5.call(arguments)));
- };
- }
- function Se(t) {
- return Array.isArray ? Array.isArray(t) : mm.call(t) === "[object Array]";
- }
- function qe(t) {
- return typeof t == "function";
- }
- function Ve(t) {
- return typeof t == "string";
- }
- function zb(t) {
- return mm.call(t) === "[object String]";
- }
- function Kt(t) {
- return typeof t == "number";
- }
- function nt(t) {
- var e = typeof t;
- return e === "function" || !!t && e === "object";
- }
- function tk(t) {
- return !!joe[mm.call(t)];
- }
- function Qi(t) {
- return !!Zoe[mm.call(t)];
- }
- function gf(t) {
- return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
- }
- function n1(t) {
- return t.colorStops != null;
- }
- function Xoe(t) {
- return t.image != null;
- }
- function y5(t) {
- return mm.call(t) === "[object RegExp]";
- }
- function mf(t) {
- return t !== t;
- }
- function Or() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- for (var n = 0, r = t.length; n < r; n++)
- if (t[n] != null)
- return t[n];
- }
- function dt(t, e) {
- return t ?? e;
- }
- function co(t, e, n) {
- return t ?? e ?? n;
- }
- function oP(t) {
- for (var e = [], n = 1; n < arguments.length; n++)
- e[n - 1] = arguments[n];
- return p5.apply(t, e);
- }
- function sP(t) {
- if (typeof t == "number")
- return [t, t, t, t];
- var e = t.length;
- return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
- }
- function at(t, e) {
- if (!t)
- throw new Error(e);
- }
- function Zo(t) {
- return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- }
- var Yoe = "__ec_primitive__";
- function Vb(t) {
- t[Yoe] = !0;
- }
- function Uv(t) {
- return t[Yoe];
- }
- var yHe = function() {
- function t() {
- this.data = {};
- }
- return t.prototype.delete = function(e) {
- var n = this.has(e);
- return n && delete this.data[e], n;
- }, t.prototype.has = function(e) {
- return this.data.hasOwnProperty(e);
- }, t.prototype.get = function(e) {
- return this.data[e];
- }, t.prototype.set = function(e, n) {
- return this.data[e] = n, this;
- }, t.prototype.keys = function() {
- return kt(this.data);
- }, t.prototype.forEach = function(e) {
- var n = this.data;
- for (var r in n)
- n.hasOwnProperty(r) && e(n[r], r);
- }, t;
- }(), qoe = typeof Map == "function";
- function bHe() {
- return qoe ? /* @__PURE__ */ new Map() : new yHe();
- }
- var Koe = function() {
- function t(e) {
- var n = Se(e);
- this.data = bHe();
- var r = this;
- e instanceof t ? e.each(i) : e && F(e, i);
- function i(a, o) {
- n ? r.set(a, o) : r.set(o, a);
- }
- }
- return t.prototype.hasKey = function(e) {
- return this.data.has(e);
- }, t.prototype.get = function(e) {
- return this.data.get(e);
- }, t.prototype.set = function(e, n) {
- return this.data.set(e, n), n;
- }, t.prototype.each = function(e, n) {
- this.data.forEach(function(r, i) {
- e.call(n, r, i);
- });
- }, t.prototype.keys = function() {
- var e = this.data.keys();
- return qoe ? Array.from(e) : e;
- }, t.prototype.removeKey = function(e) {
- this.data.delete(e);
- }, t;
- }();
- function Ze(t) {
- return new Koe(t);
- }
- function Fb(t, e) {
- for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
- n[r] = t[r];
- for (var i = t.length, r = 0; r < e.length; r++)
- n[r + i] = e[r];
- return n;
- }
- function r1(t, e) {
- var n;
- if (Object.create)
- n = Object.create(t);
- else {
- var r = function() {
- };
- r.prototype = t, n = new r();
- }
- return e && _e(n, e), n;
- }
- function b5(t) {
- var e = t.style;
- e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
- }
- function Qe(t, e) {
- return t.hasOwnProperty(e);
- }
- function fr() {
- }
- var Uy = 180 / Math.PI;
- const _He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- HashMap: Koe,
- RADIAN_TO_DEGREE: Uy,
- assert: at,
- bind: We,
- clone: ot,
- concatArray: Fb,
- createCanvas: gHe,
- createHashMap: Ze,
- createObject: r1,
- curry: vt,
- defaults: it,
- disableUserSelect: b5,
- each: F,
- eqNaN: mf,
- extend: _e,
- filter: yn,
- find: Uoe,
- guid: g5,
- hasOwn: Qe,
- indexOf: St,
- inherits: m5,
- isArray: Se,
- isArrayLike: Pi,
- isBuiltInObject: tk,
- isDom: gf,
- isFunction: qe,
- isGradientObject: n1,
- isImagePatternObject: Xoe,
- isNumber: Kt,
- isObject: nt,
- isPrimitive: Uv,
- isRegExp: y5,
- isString: Ve,
- isStringSafe: zb,
- isTypedArray: Qi,
- keys: kt,
- logError: qo,
- map: Ce,
- merge: mt,
- mergeAll: aP,
- mixin: vr,
- noop: fr,
- normalizeCssArray: sP,
- reduce: os,
- retrieve: Or,
- retrieve2: dt,
- retrieve3: co,
- setAsPrimitive: Vb,
- slice: oP,
- trim: Zo
- }, Symbol.toStringTag, { value: "Module" }));
- function kf(t, e) {
- return t == null && (t = 0), e == null && (e = 0), [t, e];
- }
- function ki(t, e) {
- return t[0] = e[0], t[1] = e[1], t;
- }
- function kl(t) {
- return [t[0], t[1]];
- }
- function Joe(t, e, n) {
- return t[0] = e, t[1] = n, t;
- }
- function nk(t, e, n) {
- return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
- }
- function _C(t, e, n, r) {
- return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
- }
- function Wc(t, e, n) {
- return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
- }
- function Wb(t) {
- return Math.sqrt(_5(t));
- }
- var OHe = Wb;
- function _5(t) {
- return t[0] * t[0] + t[1] * t[1];
- }
- var SHe = _5;
- function xHe(t, e, n) {
- return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
- }
- function wHe(t, e, n) {
- return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
- }
- function CHe(t, e) {
- return t[0] * e[0] + t[1] * e[1];
- }
- function Xy(t, e, n) {
- return t[0] = e[0] * n, t[1] = e[1] * n, t;
- }
- function fp(t, e) {
- var n = Wb(e);
- return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
- }
- function OC(t, e) {
- return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
- }
- var wu = OC;
- function ese(t, e) {
- return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
- }
- var nf = ese;
- function THe(t, e) {
- return t[0] = -e[0], t[1] = -e[1], t;
- }
- function Yy(t, e, n, r) {
- return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
- }
- function oi(t, e, n) {
- var r = e[0], i = e[1];
- return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
- }
- function Cu(t, e, n) {
- return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
- }
- function Tu(t, e, n) {
- return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
- }
- const PHe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- add: nk,
- applyTransform: oi,
- clone: kl,
- copy: ki,
- create: kf,
- dist: wu,
- distSquare: nf,
- distance: OC,
- distanceSquare: ese,
- div: wHe,
- dot: CHe,
- len: Wb,
- lenSquare: _5,
- length: OHe,
- lengthSquare: SHe,
- lerp: Yy,
- max: Tu,
- min: Cu,
- mul: xHe,
- negate: THe,
- normalize: fp,
- scale: Xy,
- scaleAndAdd: _C,
- set: Joe,
- sub: Wc
- }, Symbol.toStringTag, { value: "Module" }));
- var jp = /* @__PURE__ */ function() {
- function t(e, n) {
- this.target = e, this.topTarget = n && n.topTarget;
- }
- return t;
- }(), $He = function() {
- function t(e) {
- this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
- }
- return t.prototype._dragStart = function(e) {
- for (var n = e.target; n && !n.draggable; )
- n = n.parent || n.__hostTarget;
- n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new jp(n, e), "dragstart", e.event));
- }, t.prototype._drag = function(e) {
- var n = this._draggingTarget;
- if (n) {
- var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
- this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new jp(n, e), "drag", e.event);
- var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
- this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new jp(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new jp(s, e), "dragenter", e.event));
- }
- }, t.prototype._dragEnd = function(e) {
- var n = this._draggingTarget;
- n && (n.dragging = !1), this.handler.dispatchToElement(new jp(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new jp(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
- }, t;
- }(), fs = function() {
- function t(e) {
- e && (this._$eventProcessor = e);
- }
- return t.prototype.on = function(e, n, r, i) {
- this._$handlers || (this._$handlers = {});
- var a = this._$handlers;
- if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
- return this;
- var o = this._$eventProcessor;
- n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
- for (var s = 0; s < a[e].length; s++)
- if (a[e][s].h === r)
- return this;
- var l = {
- h: r,
- query: n,
- ctx: i || this,
- callAtLast: r.zrEventfulCallAtLast
- }, u = a[e].length - 1, c = a[e][u];
- return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
- }, t.prototype.isSilent = function(e) {
- var n = this._$handlers;
- return !n || !n[e] || !n[e].length;
- }, t.prototype.off = function(e, n) {
- var r = this._$handlers;
- if (!r)
- return this;
- if (!e)
- return this._$handlers = {}, this;
- if (n) {
- if (r[e]) {
- for (var i = [], a = 0, o = r[e].length; a < o; a++)
- r[e][a].h !== n && i.push(r[e][a]);
- r[e] = i;
- }
- r[e] && r[e].length === 0 && delete r[e];
- } else
- delete r[e];
- return this;
- }, t.prototype.trigger = function(e) {
- for (var n = [], r = 1; r < arguments.length; r++)
- n[r - 1] = arguments[r];
- if (!this._$handlers)
- return this;
- var i = this._$handlers[e], a = this._$eventProcessor;
- if (i)
- for (var o = n.length, s = i.length, l = 0; l < s; l++) {
- var u = i[l];
- if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
- switch (o) {
- case 0:
- u.h.call(u.ctx);
- break;
- case 1:
- u.h.call(u.ctx, n[0]);
- break;
- case 2:
- u.h.call(u.ctx, n[0], n[1]);
- break;
- default:
- u.h.apply(u.ctx, n);
- break;
- }
- }
- return a && a.afterTrigger && a.afterTrigger(e), this;
- }, t.prototype.triggerWithContext = function(e) {
- for (var n = [], r = 1; r < arguments.length; r++)
- n[r - 1] = arguments[r];
- if (!this._$handlers)
- return this;
- var i = this._$handlers[e], a = this._$eventProcessor;
- if (i)
- for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
- var c = i[u];
- if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
- switch (o) {
- case 0:
- c.h.call(s);
- break;
- case 1:
- c.h.call(s, n[0]);
- break;
- case 2:
- c.h.call(s, n[0], n[1]);
- break;
- default:
- c.h.apply(s, n.slice(1, o - 1));
- break;
- }
- }
- return a && a.afterTrigger && a.afterTrigger(e), this;
- }, t;
- }(), AHe = Math.log(2);
- function rk(t, e, n, r, i, a) {
- var o = r + "-" + i, s = t.length;
- if (a.hasOwnProperty(o))
- return a[o];
- if (e === 1) {
- var l = Math.round(Math.log((1 << s) - 1 & ~i) / AHe);
- return t[n][l];
- }
- for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
- c++;
- for (var f = 0, d = 0, h = 0; d < s; d++) {
- var p = 1 << d;
- p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * rk(t, e - 1, c, u, i | p, a), h++);
- }
- return a[o] = f, f;
- }
- function vH(t, e) {
- var n = [
- [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
- [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
- [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
- [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
- [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
- [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
- [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
- [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
- ], r = {}, i = rk(n, 8, 0, 0, 0, r);
- if (i !== 0) {
- for (var a = [], o = 0; o < 8; o++)
- for (var s = 0; s < 8; s++)
- a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * rk(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
- return function(l, u, c) {
- var f = u * a[6] + c * a[7] + 1;
- l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
- };
- }
- }
- var gH = "___zrEVENTSAVED", PE = [];
- function EHe(t, e, n, r, i) {
- return ik(PE, e, r, i, !0) && ik(t, n, PE[0], PE[1]);
- }
- function ik(t, e, n, r, i) {
- if (e.getBoundingClientRect && Gt.domSupported && !tse(e)) {
- var a = e[gH] || (e[gH] = {}), o = MHe(e, a), s = IHe(o, a, i);
- if (s)
- return s(t, n, r), !0;
- }
- return !1;
- }
- function MHe(t, e) {
- var n = e.markers;
- if (n)
- return n;
- n = e.markers = [];
- for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
- var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
- s.cssText = [
- "position: absolute",
- "visibility: hidden",
- "padding: 0",
- "margin: 0",
- "border-width: 0",
- "user-select: none",
- "width:0",
- "height:0",
- r[l] + ":0",
- i[u] + ":0",
- r[1 - l] + ":auto",
- i[1 - u] + ":auto",
- ""
- ].join("!important;"), t.appendChild(o), n.push(o);
- }
- return n;
- }
- function IHe(t, e, n) {
- for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
- var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
- o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
- }
- return l && i ? i : (e.srcCoords = o, e[r] = n ? vH(s, o) : vH(o, s));
- }
- function tse(t) {
- return t.nodeName.toUpperCase() === "CANVAS";
- }
- var DHe = /([&<>"'])/g, RHe = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- };
- function ta(t) {
- return t == null ? "" : (t + "").replace(DHe, function(e, n) {
- return RHe[n];
- });
- }
- var kHe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, $E = [], LHe = Gt.browser.firefox && +Gt.browser.version.split(".")[0] < 39;
- function ak(t, e, n, r) {
- return n = n || {}, r ? mH(t, e, n) : LHe && e.layerX != null && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : e.offsetX != null ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : mH(t, e, n), n;
- }
- function mH(t, e, n) {
- if (Gt.domSupported && t.getBoundingClientRect) {
- var r = e.clientX, i = e.clientY;
- if (tse(t)) {
- var a = t.getBoundingClientRect();
- n.zrX = r - a.left, n.zrY = i - a.top;
- return;
- } else if (ik($E, t, r, i)) {
- n.zrX = $E[0], n.zrY = $E[1];
- return;
- }
- }
- n.zrX = n.zrY = 0;
- }
- function O5(t) {
- return t || window.event;
- }
- function No(t, e, n) {
- if (e = O5(e), e.zrX != null)
- return e;
- var r = e.type, i = r && r.indexOf("touch") >= 0;
- if (i) {
- var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
- o && ak(t, o, e, n);
- } else {
- ak(t, e, e, n);
- var a = NHe(e);
- e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
- }
- var s = e.button;
- return e.which == null && s !== void 0 && kHe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
- }
- function NHe(t) {
- var e = t.wheelDelta;
- if (e)
- return e;
- var n = t.deltaX, r = t.deltaY;
- if (n == null || r == null)
- return e;
- var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
- return 3 * i * a;
- }
- function ok(t, e, n, r) {
- t.addEventListener(e, n, r);
- }
- function BHe(t, e, n, r) {
- t.removeEventListener(e, n, r);
- }
- var Vu = function(t) {
- t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
- };
- function yH(t) {
- return t.which === 2 || t.which === 3;
- }
- var zHe = function() {
- function t() {
- this._track = [];
- }
- return t.prototype.recognize = function(e, n, r) {
- return this._doTrack(e, n, r), this._recognize(e);
- }, t.prototype.clear = function() {
- return this._track.length = 0, this;
- }, t.prototype._doTrack = function(e, n, r) {
- var i = e.touches;
- if (i) {
- for (var a = {
- points: [],
- touches: [],
- target: n,
- event: e
- }, o = 0, s = i.length; o < s; o++) {
- var l = i[o], u = ak(r, l, {});
- a.points.push([u.zrX, u.zrY]), a.touches.push(l);
- }
- this._track.push(a);
- }
- }, t.prototype._recognize = function(e) {
- for (var n in AE)
- if (AE.hasOwnProperty(n)) {
- var r = AE[n](this._track, e);
- if (r)
- return r;
- }
- }, t;
- }();
- function bH(t) {
- var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
- return Math.sqrt(e * e + n * n);
- }
- function VHe(t) {
- return [
- (t[0][0] + t[1][0]) / 2,
- (t[0][1] + t[1][1]) / 2
- ];
- }
- var AE = {
- pinch: function(t, e) {
- var n = t.length;
- if (n) {
- var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
- if (i && i.length > 1 && r && r.length > 1) {
- var a = bH(r) / bH(i);
- !isFinite(a) && (a = 1), e.pinchScale = a;
- var o = VHe(r);
- return e.pinchX = o[0], e.pinchY = o[1], {
- type: "pinch",
- target: t[0].target,
- event: e
- };
- }
- }
- }
- };
- function Na() {
- return [1, 0, 0, 1, 0, 0];
- }
- function i1(t) {
- return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
- }
- function lP(t, e) {
- return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t;
- }
- function Ll(t, e, n) {
- var r = e[0] * n[0] + e[2] * n[1], i = e[1] * n[0] + e[3] * n[1], a = e[0] * n[2] + e[2] * n[3], o = e[1] * n[2] + e[3] * n[3], s = e[0] * n[4] + e[2] * n[5] + e[4], l = e[1] * n[4] + e[3] * n[5] + e[5];
- return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
- }
- function Gs(t, e, n) {
- 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;
- }
- function Lf(t, e, n, r) {
- r === void 0 && (r = [0, 0]);
- var i = e[0], a = e[2], o = e[4], s = e[1], l = e[3], u = e[5], c = Math.sin(n), f = Math.cos(n);
- return t[0] = i * f + s * c, t[1] = -i * c + s * f, t[2] = a * f + l * c, t[3] = -a * c + f * l, t[4] = f * (o - r[0]) + c * (u - r[1]) + r[0], t[5] = f * (u - r[1]) - c * (o - r[0]) + r[1], t;
- }
- function uP(t, e, n) {
- var r = n[0], i = n[1];
- return t[0] = e[0] * r, t[1] = e[1] * i, t[2] = e[2] * r, t[3] = e[3] * i, t[4] = e[4] * r, t[5] = e[5] * i, t;
- }
- function dp(t, e) {
- var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
- return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -r * l, t[3] = n * l, t[4] = (r * s - o * i) * l, t[5] = (a * i - n * s) * l, t) : null;
- }
- function nse(t) {
- var e = Na();
- return lP(e, t), e;
- }
- const FHe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- clone: nse,
- copy: lP,
- create: Na,
- identity: i1,
- invert: dp,
- mul: Ll,
- rotate: Lf,
- scale: uP,
- translate: Gs
- }, Symbol.toStringTag, { value: "Module" }));
- var yt = function() {
- function t(e, n) {
- this.x = e || 0, this.y = n || 0;
- }
- return t.prototype.copy = function(e) {
- return this.x = e.x, this.y = e.y, this;
- }, t.prototype.clone = function() {
- return new t(this.x, this.y);
- }, t.prototype.set = function(e, n) {
- return this.x = e, this.y = n, this;
- }, t.prototype.equal = function(e) {
- return e.x === this.x && e.y === this.y;
- }, t.prototype.add = function(e) {
- return this.x += e.x, this.y += e.y, this;
- }, t.prototype.scale = function(e) {
- this.x *= e, this.y *= e;
- }, t.prototype.scaleAndAdd = function(e, n) {
- this.x += e.x * n, this.y += e.y * n;
- }, t.prototype.sub = function(e) {
- return this.x -= e.x, this.y -= e.y, this;
- }, t.prototype.dot = function(e) {
- return this.x * e.x + this.y * e.y;
- }, t.prototype.len = function() {
- return Math.sqrt(this.x * this.x + this.y * this.y);
- }, t.prototype.lenSquare = function() {
- return this.x * this.x + this.y * this.y;
- }, t.prototype.normalize = function() {
- var e = this.len();
- return this.x /= e, this.y /= e, this;
- }, t.prototype.distance = function(e) {
- var n = this.x - e.x, r = this.y - e.y;
- return Math.sqrt(n * n + r * r);
- }, t.prototype.distanceSquare = function(e) {
- var n = this.x - e.x, r = this.y - e.y;
- return n * n + r * r;
- }, t.prototype.negate = function() {
- return this.x = -this.x, this.y = -this.y, this;
- }, t.prototype.transform = function(e) {
- if (e) {
- var n = this.x, r = this.y;
- return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
- }
- }, t.prototype.toArray = function(e) {
- return e[0] = this.x, e[1] = this.y, e;
- }, t.prototype.fromArray = function(e) {
- this.x = e[0], this.y = e[1];
- }, t.set = function(e, n, r) {
- e.x = n, e.y = r;
- }, t.copy = function(e, n) {
- e.x = n.x, e.y = n.y;
- }, t.len = function(e) {
- return Math.sqrt(e.x * e.x + e.y * e.y);
- }, t.lenSquare = function(e) {
- return e.x * e.x + e.y * e.y;
- }, t.dot = function(e, n) {
- return e.x * n.x + e.y * n.y;
- }, t.add = function(e, n, r) {
- e.x = n.x + r.x, e.y = n.y + r.y;
- }, t.sub = function(e, n, r) {
- e.x = n.x - r.x, e.y = n.y - r.y;
- }, t.scale = function(e, n, r) {
- e.x = n.x * r, e.y = n.y * r;
- }, t.scaleAndAdd = function(e, n, r, i) {
- e.x = n.x + r.x * i, e.y = n.y + r.y * i;
- }, t.lerp = function(e, n, r, i) {
- var a = 1 - i;
- e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
- }, t;
- }(), rS = Math.min, iS = Math.max, ld = new yt(), ud = new yt(), cd = new yt(), fd = new yt(), w0 = new yt(), C0 = new yt(), WHe = function() {
- function t(e, n, r, i) {
- r < 0 && (e = e + r, r = -r), i < 0 && (n = n + i, i = -i), this.x = e, this.y = n, this.width = r, this.height = i;
- }
- return t.prototype.union = function(e) {
- var n = rS(e.x, this.x), r = rS(e.y, this.y);
- isFinite(this.x) && isFinite(this.width) ? this.width = iS(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = iS(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
- }, t.prototype.applyTransform = function(e) {
- t.applyTransform(this, this, e);
- }, t.prototype.calculateTransform = function(e) {
- var n = this, r = e.width / n.width, i = e.height / n.height, a = Na();
- return Gs(a, a, [-n.x, -n.y]), uP(a, a, [r, i]), Gs(a, a, [e.x, e.y]), a;
- }, t.prototype.intersect = function(e, n) {
- if (!e)
- return !1;
- e instanceof t || (e = t.create(e));
- var r = this, i = r.x, a = r.x + r.width, o = r.y, s = r.y + r.height, l = e.x, u = e.x + e.width, c = e.y, f = e.y + e.height, d = !(a < l || u < i || s < c || f < o);
- if (n) {
- var h = 1 / 0, p = 0, v = Math.abs(a - l), g = Math.abs(u - i), m = Math.abs(s - c), y = Math.abs(f - o), _ = Math.min(v, g), O = Math.min(m, y);
- a < l || u < i ? _ > p && (p = _, v < g ? yt.set(C0, -v, 0) : yt.set(C0, g, 0)) : _ < h && (h = _, v < g ? yt.set(w0, v, 0) : yt.set(w0, -g, 0)), s < c || f < o ? O > p && (p = O, m < y ? yt.set(C0, 0, -m) : yt.set(C0, 0, y)) : _ < h && (h = _, m < y ? yt.set(w0, 0, m) : yt.set(w0, 0, -y));
- }
- return n && yt.copy(n, d ? w0 : C0), d;
- }, t.prototype.contain = function(e, n) {
- var r = this;
- return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
- }, t.prototype.clone = function() {
- return new t(this.x, this.y, this.width, this.height);
- }, t.prototype.copy = function(e) {
- t.copy(this, e);
- }, t.prototype.plain = function() {
- return {
- x: this.x,
- y: this.y,
- width: this.width,
- height: this.height
- };
- }, t.prototype.isFinite = function() {
- return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
- }, t.prototype.isZero = function() {
- return this.width === 0 || this.height === 0;
- }, t.create = function(e) {
- return new t(e.x, e.y, e.width, e.height);
- }, t.copy = function(e, n) {
- e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
- }, t.applyTransform = function(e, n, r) {
- if (!r) {
- e !== n && t.copy(e, n);
- return;
- }
- if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
- var i = r[0], a = r[3], o = r[4], s = r[5];
- e.x = n.x * i + o, e.y = n.y * a + s, e.width = n.width * i, e.height = n.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
- return;
- }
- ld.x = cd.x = n.x, ld.y = fd.y = n.y, ud.x = fd.x = n.x + n.width, ud.y = cd.y = n.y + n.height, ld.transform(r), fd.transform(r), ud.transform(r), cd.transform(r), e.x = rS(ld.x, ud.x, cd.x, fd.x), e.y = rS(ld.y, ud.y, cd.y, fd.y);
- var l = iS(ld.x, ud.x, cd.x, fd.x), u = iS(ld.y, ud.y, cd.y, fd.y);
- e.width = l - e.x, e.height = u - e.y;
- }, t;
- }();
- const bt = WHe;
- var rse = "silent";
- function QHe(t, e, n) {
- return {
- type: t,
- event: n,
- target: e.target,
- topTarget: e.topTarget,
- cancelBubble: !1,
- offsetX: n.zrX,
- offsetY: n.zrY,
- gestureEvent: n.gestureEvent,
- pinchX: n.pinchX,
- pinchY: n.pinchY,
- pinchScale: n.pinchScale,
- wheelDelta: n.zrDelta,
- zrByTouch: n.zrByTouch,
- which: n.which,
- stop: HHe
- };
- }
- function HHe() {
- Vu(this.event);
- }
- var GHe = function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.handler = null, n;
- }
- return e.prototype.dispose = function() {
- }, e.prototype.setCursor = function() {
- }, e;
- }(fs), T0 = /* @__PURE__ */ function() {
- function t(e, n) {
- this.x = e, this.y = n;
- }
- return t;
- }(), jHe = [
- "click",
- "dblclick",
- "mousewheel",
- "mouseout",
- "mouseup",
- "mousedown",
- "mousemove",
- "contextmenu"
- ], EE = new bt(0, 0, 0, 0), ise = function(t) {
- le(e, t);
- function e(n, r, i, a, o) {
- var s = t.call(this) || this;
- return s._hovered = new T0(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new GHe(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new $He(s), s;
- }
- return e.prototype.setHandlerProxy = function(n) {
- this.proxy && this.proxy.dispose(), n && (F(jHe, function(r) {
- n.on && n.on(r, this[r], this);
- }, this), n.handler = this), this.proxy = n;
- }, e.prototype.mousemove = function(n) {
- var r = n.zrX, i = n.zrY, a = ase(this, r, i), o = this._hovered, s = o.target;
- s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
- var l = this._hovered = a ? new T0(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
- c.setCursor && c.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", n), this.dispatchToElement(l, "mousemove", n), u && u !== s && this.dispatchToElement(l, "mouseover", n);
- }, e.prototype.mouseout = function(n) {
- var r = n.zrEventControl;
- r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
- }, e.prototype.resize = function() {
- this._hovered = new T0(0, 0);
- }, e.prototype.dispatch = function(n, r) {
- var i = this[n];
- i && i.call(this, r);
- }, e.prototype.dispose = function() {
- this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
- }, e.prototype.setCursorStyle = function(n) {
- var r = this.proxy;
- r.setCursor && r.setCursor(n);
- }, e.prototype.dispatchToElement = function(n, r, i) {
- n = n || {};
- var a = n.target;
- if (!(a && a.silent)) {
- for (var o = "on" + r, s = QHe(r, n, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(r, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); )
- ;
- s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
- typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
- }));
- }
- }, e.prototype.findHover = function(n, r, i) {
- var a = this.storage.getDisplayList(), o = new T0(n, r);
- if (_H(a, o, n, r, i), this._pointerSize && !o.target) {
- for (var s = [], l = this._pointerSize, u = l / 2, c = new bt(n - u, r - u, l, l), f = a.length - 1; f >= 0; f--) {
- var d = a[f];
- d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (EE.copy(d.getBoundingRect()), d.transform && EE.applyTransform(d.transform), EE.intersect(c) && s.push(d));
- }
- if (s.length)
- for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
- for (var m = 0; m < v; m += p) {
- var y = n + g * Math.cos(m), _ = r + g * Math.sin(m);
- if (_H(s, o, y, _, i), o.target)
- return o;
- }
- }
- return o;
- }, e.prototype.processGesture = function(n, r) {
- this._gestureMgr || (this._gestureMgr = new zHe());
- var i = this._gestureMgr;
- r === "start" && i.clear();
- var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
- if (r === "end" && i.clear(), a) {
- var o = a.type;
- n.gestureEvent = o;
- var s = new T0();
- s.target = a.target, this.dispatchToElement(s, o, a.event);
- }
- }, e;
- }(fs);
- F(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
- ise.prototype[t] = function(e) {
- var n = e.zrX, r = e.zrY, i = ase(this, n, r), a, o;
- if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
- this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
- else if (t === "mouseup")
- this._upEl = o;
- else if (t === "click") {
- if (this._downEl !== this._upEl || !this._downPoint || wu(this._downPoint, [e.zrX, e.zrY]) > 4)
- return;
- this._downPoint = null;
- }
- this.dispatchToElement(a, t, e);
- };
- });
- function ZHe(t, e, n) {
- if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
- for (var r = t, i = void 0, a = !1; r; ) {
- if (r.ignoreClip && (a = !0), !a) {
- var o = r.getClipPath();
- if (o && !o.contain(e, n))
- return !1;
- }
- r.silent && (i = !0);
- var s = r.__hostTarget;
- r = s || r.parent;
- }
- return i ? rse : !0;
- }
- return !1;
- }
- function _H(t, e, n, r, i) {
- for (var a = t.length - 1; a >= 0; a--) {
- var o = t[a], s = void 0;
- if (o !== i && !o.ignore && (s = ZHe(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== rse)) {
- e.target = o;
- break;
- }
- }
- }
- function ase(t, e, n) {
- var r = t.painter;
- return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
- }
- var ose = 32, P0 = 7;
- function UHe(t) {
- for (var e = 0; t >= ose; )
- e |= t & 1, t >>= 1;
- return t + e;
- }
- function OH(t, e, n, r) {
- var i = e + 1;
- if (i === n)
- return 1;
- if (r(t[i++], t[e]) < 0) {
- for (; i < n && r(t[i], t[i - 1]) < 0; )
- i++;
- XHe(t, e, i);
- } else
- for (; i < n && r(t[i], t[i - 1]) >= 0; )
- i++;
- return i - e;
- }
- function XHe(t, e, n) {
- for (n--; e < n; ) {
- var r = t[e];
- t[e++] = t[n], t[n--] = r;
- }
- }
- function SH(t, e, n, r, i) {
- for (r === e && r++; r < n; r++) {
- for (var a = t[r], o = e, s = r, l; o < s; )
- l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
- var u = r - o;
- switch (u) {
- case 3:
- t[o + 3] = t[o + 2];
- case 2:
- t[o + 2] = t[o + 1];
- case 1:
- t[o + 1] = t[o];
- break;
- default:
- for (; u > 0; )
- t[o + u] = t[o + u - 1], u--;
- }
- t[o] = a;
- }
- }
- function ME(t, e, n, r, i, a) {
- var o = 0, s = 0, l = 1;
- if (a(t, e[n + i]) > 0) {
- for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
- o = l, l = (l << 1) + 1, l <= 0 && (l = s);
- l > s && (l = s), o += i, l += i;
- } else {
- for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
- o = l, l = (l << 1) + 1, l <= 0 && (l = s);
- l > s && (l = s);
- var u = o;
- o = i - l, l = i - u;
- }
- for (o++; o < l; ) {
- var c = o + (l - o >>> 1);
- a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
- }
- return l;
- }
- function IE(t, e, n, r, i, a) {
- var o = 0, s = 0, l = 1;
- if (a(t, e[n + i]) < 0) {
- for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
- o = l, l = (l << 1) + 1, l <= 0 && (l = s);
- l > s && (l = s);
- var u = o;
- o = i - l, l = i - u;
- } else {
- for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
- o = l, l = (l << 1) + 1, l <= 0 && (l = s);
- l > s && (l = s), o += i, l += i;
- }
- for (o++; o < l; ) {
- var c = o + (l - o >>> 1);
- a(t, e[n + c]) < 0 ? l = c : o = c + 1;
- }
- return l;
- }
- function YHe(t, e) {
- var n = P0, r, i, a = 0, o = [];
- r = [], i = [];
- function s(h, p) {
- r[a] = h, i[a] = p, a += 1;
- }
- function l() {
- for (; a > 1; ) {
- var h = a - 2;
- if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
- i[h - 1] < i[h + 1] && h--;
- else if (i[h] > i[h + 1])
- break;
- c(h);
- }
- }
- function u() {
- for (; a > 1; ) {
- var h = a - 2;
- h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
- }
- }
- function c(h) {
- var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
- i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
- var y = IE(t[g], t, p, v, 0, e);
- p += y, v -= y, v !== 0 && (m = ME(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
- }
- function f(h, p, v, g) {
- var m = 0;
- for (m = 0; m < p; m++)
- o[m] = t[h + m];
- var y = 0, _ = v, O = h;
- if (t[O++] = t[_++], --g === 0) {
- for (m = 0; m < p; m++)
- t[O + m] = o[y + m];
- return;
- }
- if (p === 1) {
- for (m = 0; m < g; m++)
- t[O + m] = t[_ + m];
- t[O + g] = o[y];
- return;
- }
- for (var S = n, x, C, P; ; ) {
- x = 0, C = 0, P = !1;
- do
- if (e(t[_], o[y]) < 0) {
- if (t[O++] = t[_++], C++, x = 0, --g === 0) {
- P = !0;
- break;
- }
- } else if (t[O++] = o[y++], x++, C = 0, --p === 1) {
- P = !0;
- break;
- }
- while ((x | C) < S);
- if (P)
- break;
- do {
- if (x = IE(t[_], o, y, p, 0, e), x !== 0) {
- for (m = 0; m < x; m++)
- t[O + m] = o[y + m];
- if (O += x, y += x, p -= x, p <= 1) {
- P = !0;
- break;
- }
- }
- if (t[O++] = t[_++], --g === 0) {
- P = !0;
- break;
- }
- if (C = ME(o[y], t, _, g, 0, e), C !== 0) {
- for (m = 0; m < C; m++)
- t[O + m] = t[_ + m];
- if (O += C, _ += C, g -= C, g === 0) {
- P = !0;
- break;
- }
- }
- if (t[O++] = o[y++], --p === 1) {
- P = !0;
- break;
- }
- S--;
- } while (x >= P0 || C >= P0);
- if (P)
- break;
- S < 0 && (S = 0), S += 2;
- }
- if (n = S, n < 1 && (n = 1), p === 1) {
- for (m = 0; m < g; m++)
- t[O + m] = t[_ + m];
- t[O + g] = o[y];
- } else {
- if (p === 0)
- throw new Error();
- for (m = 0; m < p; m++)
- t[O + m] = o[y + m];
- }
- }
- function d(h, p, v, g) {
- var m = 0;
- for (m = 0; m < g; m++)
- o[m] = t[v + m];
- var y = h + p - 1, _ = g - 1, O = v + g - 1, S = 0, x = 0;
- if (t[O--] = t[y--], --p === 0) {
- for (S = O - (g - 1), m = 0; m < g; m++)
- t[S + m] = o[m];
- return;
- }
- if (g === 1) {
- for (O -= p, y -= p, x = O + 1, S = y + 1, m = p - 1; m >= 0; m--)
- t[x + m] = t[S + m];
- t[O] = o[_];
- return;
- }
- for (var C = n; ; ) {
- var P = 0, $ = 0, T = !1;
- do
- if (e(o[_], t[y]) < 0) {
- if (t[O--] = t[y--], P++, $ = 0, --p === 0) {
- T = !0;
- break;
- }
- } else if (t[O--] = o[_--], $++, P = 0, --g === 1) {
- T = !0;
- break;
- }
- while ((P | $) < C);
- if (T)
- break;
- do {
- if (P = p - IE(o[_], t, h, p, p - 1, e), P !== 0) {
- for (O -= P, y -= P, p -= P, x = O + 1, S = y + 1, m = P - 1; m >= 0; m--)
- t[x + m] = t[S + m];
- if (p === 0) {
- T = !0;
- break;
- }
- }
- if (t[O--] = o[_--], --g === 1) {
- T = !0;
- break;
- }
- if ($ = g - ME(t[y], o, 0, g, g - 1, e), $ !== 0) {
- for (O -= $, _ -= $, g -= $, x = O + 1, S = _ + 1, m = 0; m < $; m++)
- t[x + m] = o[S + m];
- if (g <= 1) {
- T = !0;
- break;
- }
- }
- if (t[O--] = t[y--], --p === 0) {
- T = !0;
- break;
- }
- C--;
- } while (P >= P0 || $ >= P0);
- if (T)
- break;
- C < 0 && (C = 0), C += 2;
- }
- if (n = C, n < 1 && (n = 1), g === 1) {
- for (O -= p, y -= p, x = O + 1, S = y + 1, m = p - 1; m >= 0; m--)
- t[x + m] = t[S + m];
- t[O] = o[_];
- } else {
- if (g === 0)
- throw new Error();
- for (S = O - (g - 1), m = 0; m < g; m++)
- t[S + m] = o[m];
- }
- }
- return {
- mergeRuns: l,
- forceMergeRuns: u,
- pushRun: s
- };
- }
- function aw(t, e, n, r) {
- n || (n = 0), r || (r = t.length);
- var i = r - n;
- if (!(i < 2)) {
- var a = 0;
- if (i < ose) {
- a = OH(t, n, r, e), SH(t, n, r, n + a, e);
- return;
- }
- var o = YHe(t, e), s = UHe(i);
- do {
- if (a = OH(t, n, r, e), a < s) {
- var l = i;
- l > s && (l = s), SH(t, n, n + l, n + a, e), a = l;
- }
- o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
- } while (i !== 0);
- o.forceMergeRuns();
- }
- }
- var to = 1, hy = 2, _v = 4, xH = !1;
- function DE() {
- xH || (xH = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
- }
- function wH(t, e) {
- return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
- }
- var qHe = function() {
- function t() {
- this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = wH;
- }
- return t.prototype.traverse = function(e, n) {
- for (var r = 0; r < this._roots.length; r++)
- this._roots[r].traverse(e, n);
- }, t.prototype.getDisplayList = function(e, n) {
- n = n || !1;
- var r = this._displayList;
- return (e || !r.length) && this.updateDisplayList(n), r;
- }, t.prototype.updateDisplayList = function(e) {
- this._displayListLen = 0;
- for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
- this._updateAndAddDisplayable(n[i], null, e);
- r.length = this._displayListLen, aw(r, wH);
- }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
- if (!(e.ignore && !r)) {
- e.beforeUpdate(), e.update(), e.afterUpdate();
- var i = e.getClipPath();
- if (e.ignoreClip)
- n = null;
- else if (i) {
- n ? n = n.slice() : n = [];
- for (var a = i, o = e; a; )
- a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
- }
- if (e.childrenRef) {
- for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
- var u = s[l];
- e.__dirty && (u.__dirty |= to), this._updateAndAddDisplayable(u, n, r);
- }
- e.__dirty = 0;
- } else {
- var c = e;
- n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (DE(), c.z = 0), isNaN(c.z2) && (DE(), c.z2 = 0), isNaN(c.zlevel) && (DE(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
- }
- var f = e.getDecalElement && e.getDecalElement();
- f && this._updateAndAddDisplayable(f, n, r);
- var d = e.getTextGuideLine();
- d && this._updateAndAddDisplayable(d, n, r);
- var h = e.getTextContent();
- h && this._updateAndAddDisplayable(h, n, r);
- }
- }, t.prototype.addRoot = function(e) {
- e.__zr && e.__zr.storage === this || this._roots.push(e);
- }, t.prototype.delRoot = function(e) {
- if (e instanceof Array) {
- for (var n = 0, r = e.length; n < r; n++)
- this.delRoot(e[n]);
- return;
- }
- var i = St(this._roots, e);
- i >= 0 && this._roots.splice(i, 1);
- }, t.prototype.delAllRoots = function() {
- this._roots = [], this._displayList = [], this._displayListLen = 0;
- }, t.prototype.getRoots = function() {
- return this._roots;
- }, t.prototype.dispose = function() {
- this._displayList = null, this._roots = null;
- }, t;
- }(), SC;
- SC = Gt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
- return setTimeout(t, 16);
- };
- var qy = {
- linear: function(t) {
- return t;
- },
- quadraticIn: function(t) {
- return t * t;
- },
- quadraticOut: function(t) {
- return t * (2 - t);
- },
- quadraticInOut: function(t) {
- return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
- },
- cubicIn: function(t) {
- return t * t * t;
- },
- cubicOut: function(t) {
- return --t * t * t + 1;
- },
- cubicInOut: function(t) {
- return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
- },
- quarticIn: function(t) {
- return t * t * t * t;
- },
- quarticOut: function(t) {
- return 1 - --t * t * t * t;
- },
- quarticInOut: function(t) {
- return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
- },
- quinticIn: function(t) {
- return t * t * t * t * t;
- },
- quinticOut: function(t) {
- return --t * t * t * t * t + 1;
- },
- quinticInOut: function(t) {
- return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
- },
- sinusoidalIn: function(t) {
- return 1 - Math.cos(t * Math.PI / 2);
- },
- sinusoidalOut: function(t) {
- return Math.sin(t * Math.PI / 2);
- },
- sinusoidalInOut: function(t) {
- return 0.5 * (1 - Math.cos(Math.PI * t));
- },
- exponentialIn: function(t) {
- return t === 0 ? 0 : Math.pow(1024, t - 1);
- },
- exponentialOut: function(t) {
- return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
- },
- exponentialInOut: function(t) {
- return t === 0 ? 0 : t === 1 ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
- },
- circularIn: function(t) {
- return 1 - Math.sqrt(1 - t * t);
- },
- circularOut: function(t) {
- return Math.sqrt(1 - --t * t);
- },
- circularInOut: function(t) {
- return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
- },
- elasticIn: function(t) {
- var e, n = 0.1, r = 0.4;
- return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), -(n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)));
- },
- elasticOut: function(t) {
- var e, n = 0.1, r = 0.4;
- return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / r) + 1);
- },
- elasticInOut: function(t) {
- var e, n = 0.1, r = 0.4;
- return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? -0.5 * (n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)) : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r) * 0.5 + 1);
- },
- backIn: function(t) {
- var e = 1.70158;
- return t * t * ((e + 1) * t - e);
- },
- backOut: function(t) {
- var e = 1.70158;
- return --t * t * ((e + 1) * t + e) + 1;
- },
- backInOut: function(t) {
- var e = 2.5949095;
- return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
- },
- bounceIn: function(t) {
- return 1 - qy.bounceOut(1 - t);
- },
- bounceOut: function(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
- },
- bounceInOut: function(t) {
- return t < 0.5 ? qy.bounceIn(t * 2) * 0.5 : qy.bounceOut(t * 2 - 1) * 0.5 + 0.5;
- }
- }, aS = Math.pow, rf = Math.sqrt, xC = 1e-8, sse = 1e-4, CH = rf(3), oS = 1 / 3, xl = kf(), Qo = kf(), Xv = kf();
- function Qc(t) {
- return t > -xC && t < xC;
- }
- function lse(t) {
- return t > xC || t < -xC;
- }
- function jr(t, e, n, r, i) {
- var a = 1 - i;
- return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
- }
- function TH(t, e, n, r, i) {
- var a = 1 - i;
- return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
- }
- function wC(t, e, n, r, i, a) {
- var o = r + 3 * (e - n) - t, s = 3 * (n - e * 2 + t), l = 3 * (e - t), u = t - i, c = s * s - 3 * o * l, f = s * l - 9 * o * u, d = l * l - 3 * s * u, h = 0;
- if (Qc(c) && Qc(f))
- if (Qc(s))
- a[0] = 0;
- else {
- var p = -l / s;
- p >= 0 && p <= 1 && (a[h++] = p);
- }
- else {
- var v = f * f - 4 * c * d;
- if (Qc(v)) {
- var g = f / c, p = -s / o + g, m = -g / 2;
- p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
- } else if (v > 0) {
- var y = rf(v), _ = c * s + 1.5 * o * (-f + y), O = c * s + 1.5 * o * (-f - y);
- _ < 0 ? _ = -aS(-_, oS) : _ = aS(_, oS), O < 0 ? O = -aS(-O, oS) : O = aS(O, oS);
- var p = (-s - (_ + O)) / (3 * o);
- p >= 0 && p <= 1 && (a[h++] = p);
- } else {
- var S = (2 * c * s - 3 * o * f) / (2 * rf(c * c * c)), x = Math.acos(S) / 3, C = rf(c), P = Math.cos(x), p = (-s - 2 * C * P) / (3 * o), m = (-s + C * (P + CH * Math.sin(x))) / (3 * o), $ = (-s + C * (P - CH * Math.sin(x))) / (3 * o);
- p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), $ >= 0 && $ <= 1 && (a[h++] = $);
- }
- }
- return h;
- }
- function use(t, e, n, r, i) {
- var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
- if (Qc(o)) {
- if (lse(a)) {
- var u = -s / a;
- u >= 0 && u <= 1 && (i[l++] = u);
- }
- } else {
- var c = a * a - 4 * o * s;
- if (Qc(c))
- i[0] = -a / (2 * o);
- else if (c > 0) {
- var f = rf(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
- u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
- }
- }
- return l;
- }
- function yf(t, e, n, r, i, a) {
- var o = (e - t) * i + t, s = (n - e) * i + e, l = (r - n) * i + n, u = (s - o) * i + o, c = (l - s) * i + s, f = (c - u) * i + u;
- a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
- }
- function cse(t, e, n, r, i, a, o, s, l, u, c) {
- var f, d = 5e-3, h = 1 / 0, p, v, g, m;
- xl[0] = l, xl[1] = u;
- for (var y = 0; y < 1; y += 0.05)
- Qo[0] = jr(t, n, i, o, y), Qo[1] = jr(e, r, a, s, y), g = nf(xl, Qo), g < h && (f = y, h = g);
- h = 1 / 0;
- for (var _ = 0; _ < 32 && !(d < sse); _++)
- p = f - d, v = f + d, Qo[0] = jr(t, n, i, o, p), Qo[1] = jr(e, r, a, s, p), g = nf(Qo, xl), p >= 0 && g < h ? (f = p, h = g) : (Xv[0] = jr(t, n, i, o, v), Xv[1] = jr(e, r, a, s, v), m = nf(Xv, xl), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
- return c && (c[0] = jr(t, n, i, o, f), c[1] = jr(e, r, a, s, f)), rf(h);
- }
- function KHe(t, e, n, r, i, a, o, s, l) {
- for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
- var p = h * d, v = jr(t, n, i, o, p), g = jr(e, r, a, s, p), m = v - u, y = g - c;
- f += Math.sqrt(m * m + y * y), u = v, c = g;
- }
- return f;
- }
- function ii(t, e, n, r) {
- var i = 1 - r;
- return i * (i * t + 2 * r * e) + r * r * n;
- }
- function sk(t, e, n, r) {
- return 2 * ((1 - r) * (e - t) + r * (n - e));
- }
- function JHe(t, e, n, r, i) {
- var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
- if (Qc(a)) {
- if (lse(o)) {
- var u = -s / o;
- u >= 0 && u <= 1 && (i[l++] = u);
- }
- } else {
- var c = o * o - 4 * a * s;
- if (Qc(c)) {
- var u = -o / (2 * a);
- u >= 0 && u <= 1 && (i[l++] = u);
- } else if (c > 0) {
- var f = rf(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
- u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
- }
- }
- return l;
- }
- function fse(t, e, n) {
- var r = t + n - 2 * e;
- return r === 0 ? 0.5 : (t - e) / r;
- }
- function Qb(t, e, n, r, i) {
- var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
- i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
- }
- function dse(t, e, n, r, i, a, o, s, l) {
- var u, c = 5e-3, f = 1 / 0;
- xl[0] = o, xl[1] = s;
- for (var d = 0; d < 1; d += 0.05) {
- Qo[0] = ii(t, n, i, d), Qo[1] = ii(e, r, a, d);
- var h = nf(xl, Qo);
- h < f && (u = d, f = h);
- }
- f = 1 / 0;
- for (var p = 0; p < 32 && !(c < sse); p++) {
- var v = u - c, g = u + c;
- Qo[0] = ii(t, n, i, v), Qo[1] = ii(e, r, a, v);
- var h = nf(Qo, xl);
- if (v >= 0 && h < f)
- u = v, f = h;
- else {
- Xv[0] = ii(t, n, i, g), Xv[1] = ii(e, r, a, g);
- var m = nf(Xv, xl);
- g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
- }
- }
- return l && (l[0] = ii(t, n, i, u), l[1] = ii(e, r, a, u)), rf(f);
- }
- function eGe(t, e, n, r, i, a, o) {
- for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
- var d = f * c, h = ii(t, n, i, d), p = ii(e, r, a, d), v = h - s, g = p - l;
- u += Math.sqrt(v * v + g * g), s = h, l = p;
- }
- return u;
- }
- var tGe = /cubic-bezier\(([0-9,\.e ]+)\)/;
- function S5(t) {
- var e = t && tGe.exec(t);
- if (e) {
- var n = e[1].split(","), r = +Zo(n[0]), i = +Zo(n[1]), a = +Zo(n[2]), o = +Zo(n[3]);
- if (isNaN(r + i + a + o))
- return;
- var s = [];
- return function(l) {
- return l <= 0 ? 0 : l >= 1 ? 1 : wC(0, r, a, 1, l, s) && jr(0, i, o, 1, s[0]);
- };
- }
- }
- var nGe = function() {
- function t(e) {
- this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || fr, this.ondestroy = e.ondestroy || fr, this.onrestart = e.onrestart || fr, e.easing && this.setEasing(e.easing);
- }
- return t.prototype.step = function(e, n) {
- if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
- this._pausedTime += n;
- return;
- }
- var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
- a < 0 && (a = 0), a = Math.min(a, 1);
- var o = this.easingFunc, s = o ? o(a) : a;
- if (this.onframe(s), a === 1)
- if (this.loop) {
- var l = i % r;
- this._startTime = e - l, this._pausedTime = 0, this.onrestart();
- } else
- return !0;
- return !1;
- }, t.prototype.pause = function() {
- this._paused = !0;
- }, t.prototype.resume = function() {
- this._paused = !1;
- }, t.prototype.setEasing = function(e) {
- this.easing = e, this.easingFunc = qe(e) ? e : qy[e] || S5(e);
- }, t;
- }(), hse = /* @__PURE__ */ function() {
- function t(e) {
- this.value = e;
- }
- return t;
- }(), rGe = function() {
- function t() {
- this._len = 0;
- }
- return t.prototype.insert = function(e) {
- var n = new hse(e);
- return this.insertEntry(n), n;
- }, t.prototype.insertEntry = function(e) {
- this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
- }, t.prototype.remove = function(e) {
- var n = e.prev, r = e.next;
- n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
- }, t.prototype.len = function() {
- return this._len;
- }, t.prototype.clear = function() {
- this.head = this.tail = null, this._len = 0;
- }, t;
- }(), a1 = function() {
- function t(e) {
- this._list = new rGe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
- }
- return t.prototype.put = function(e, n) {
- var r = this._list, i = this._map, a = null;
- if (i[e] == null) {
- var o = r.len(), s = this._lastRemovedEntry;
- if (o >= this._maxSize && o > 0) {
- var l = r.head;
- r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
- }
- s ? s.value = n : s = new hse(n), s.key = e, r.insertEntry(s), i[e] = s;
- }
- return a;
- }, t.prototype.get = function(e) {
- var n = this._map[e], r = this._list;
- if (n != null)
- return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
- }, t.prototype.clear = function() {
- this._list.clear(), this._map = {};
- }, t.prototype.len = function() {
- return this._list.len();
- }, t;
- }(), PH = {
- transparent: [0, 0, 0, 0],
- aliceblue: [240, 248, 255, 1],
- antiquewhite: [250, 235, 215, 1],
- aqua: [0, 255, 255, 1],
- aquamarine: [127, 255, 212, 1],
- azure: [240, 255, 255, 1],
- beige: [245, 245, 220, 1],
- bisque: [255, 228, 196, 1],
- black: [0, 0, 0, 1],
- blanchedalmond: [255, 235, 205, 1],
- blue: [0, 0, 255, 1],
- blueviolet: [138, 43, 226, 1],
- brown: [165, 42, 42, 1],
- burlywood: [222, 184, 135, 1],
- cadetblue: [95, 158, 160, 1],
- chartreuse: [127, 255, 0, 1],
- chocolate: [210, 105, 30, 1],
- coral: [255, 127, 80, 1],
- cornflowerblue: [100, 149, 237, 1],
- cornsilk: [255, 248, 220, 1],
- crimson: [220, 20, 60, 1],
- cyan: [0, 255, 255, 1],
- darkblue: [0, 0, 139, 1],
- darkcyan: [0, 139, 139, 1],
- darkgoldenrod: [184, 134, 11, 1],
- darkgray: [169, 169, 169, 1],
- darkgreen: [0, 100, 0, 1],
- darkgrey: [169, 169, 169, 1],
- darkkhaki: [189, 183, 107, 1],
- darkmagenta: [139, 0, 139, 1],
- darkolivegreen: [85, 107, 47, 1],
- darkorange: [255, 140, 0, 1],
- darkorchid: [153, 50, 204, 1],
- darkred: [139, 0, 0, 1],
- darksalmon: [233, 150, 122, 1],
- darkseagreen: [143, 188, 143, 1],
- darkslateblue: [72, 61, 139, 1],
- darkslategray: [47, 79, 79, 1],
- darkslategrey: [47, 79, 79, 1],
- darkturquoise: [0, 206, 209, 1],
- darkviolet: [148, 0, 211, 1],
- deeppink: [255, 20, 147, 1],
- deepskyblue: [0, 191, 255, 1],
- dimgray: [105, 105, 105, 1],
- dimgrey: [105, 105, 105, 1],
- dodgerblue: [30, 144, 255, 1],
- firebrick: [178, 34, 34, 1],
- floralwhite: [255, 250, 240, 1],
- forestgreen: [34, 139, 34, 1],
- fuchsia: [255, 0, 255, 1],
- gainsboro: [220, 220, 220, 1],
- ghostwhite: [248, 248, 255, 1],
- gold: [255, 215, 0, 1],
- goldenrod: [218, 165, 32, 1],
- gray: [128, 128, 128, 1],
- green: [0, 128, 0, 1],
- greenyellow: [173, 255, 47, 1],
- grey: [128, 128, 128, 1],
- honeydew: [240, 255, 240, 1],
- hotpink: [255, 105, 180, 1],
- indianred: [205, 92, 92, 1],
- indigo: [75, 0, 130, 1],
- ivory: [255, 255, 240, 1],
- khaki: [240, 230, 140, 1],
- lavender: [230, 230, 250, 1],
- lavenderblush: [255, 240, 245, 1],
- lawngreen: [124, 252, 0, 1],
- lemonchiffon: [255, 250, 205, 1],
- lightblue: [173, 216, 230, 1],
- lightcoral: [240, 128, 128, 1],
- lightcyan: [224, 255, 255, 1],
- lightgoldenrodyellow: [250, 250, 210, 1],
- lightgray: [211, 211, 211, 1],
- lightgreen: [144, 238, 144, 1],
- lightgrey: [211, 211, 211, 1],
- lightpink: [255, 182, 193, 1],
- lightsalmon: [255, 160, 122, 1],
- lightseagreen: [32, 178, 170, 1],
- lightskyblue: [135, 206, 250, 1],
- lightslategray: [119, 136, 153, 1],
- lightslategrey: [119, 136, 153, 1],
- lightsteelblue: [176, 196, 222, 1],
- lightyellow: [255, 255, 224, 1],
- lime: [0, 255, 0, 1],
- limegreen: [50, 205, 50, 1],
- linen: [250, 240, 230, 1],
- magenta: [255, 0, 255, 1],
- maroon: [128, 0, 0, 1],
- mediumaquamarine: [102, 205, 170, 1],
- mediumblue: [0, 0, 205, 1],
- mediumorchid: [186, 85, 211, 1],
- mediumpurple: [147, 112, 219, 1],
- mediumseagreen: [60, 179, 113, 1],
- mediumslateblue: [123, 104, 238, 1],
- mediumspringgreen: [0, 250, 154, 1],
- mediumturquoise: [72, 209, 204, 1],
- mediumvioletred: [199, 21, 133, 1],
- midnightblue: [25, 25, 112, 1],
- mintcream: [245, 255, 250, 1],
- mistyrose: [255, 228, 225, 1],
- moccasin: [255, 228, 181, 1],
- navajowhite: [255, 222, 173, 1],
- navy: [0, 0, 128, 1],
- oldlace: [253, 245, 230, 1],
- olive: [128, 128, 0, 1],
- olivedrab: [107, 142, 35, 1],
- orange: [255, 165, 0, 1],
- orangered: [255, 69, 0, 1],
- orchid: [218, 112, 214, 1],
- palegoldenrod: [238, 232, 170, 1],
- palegreen: [152, 251, 152, 1],
- paleturquoise: [175, 238, 238, 1],
- palevioletred: [219, 112, 147, 1],
- papayawhip: [255, 239, 213, 1],
- peachpuff: [255, 218, 185, 1],
- peru: [205, 133, 63, 1],
- pink: [255, 192, 203, 1],
- plum: [221, 160, 221, 1],
- powderblue: [176, 224, 230, 1],
- purple: [128, 0, 128, 1],
- red: [255, 0, 0, 1],
- rosybrown: [188, 143, 143, 1],
- royalblue: [65, 105, 225, 1],
- saddlebrown: [139, 69, 19, 1],
- salmon: [250, 128, 114, 1],
- sandybrown: [244, 164, 96, 1],
- seagreen: [46, 139, 87, 1],
- seashell: [255, 245, 238, 1],
- sienna: [160, 82, 45, 1],
- silver: [192, 192, 192, 1],
- skyblue: [135, 206, 235, 1],
- slateblue: [106, 90, 205, 1],
- slategray: [112, 128, 144, 1],
- slategrey: [112, 128, 144, 1],
- snow: [255, 250, 250, 1],
- springgreen: [0, 255, 127, 1],
- steelblue: [70, 130, 180, 1],
- tan: [210, 180, 140, 1],
- teal: [0, 128, 128, 1],
- thistle: [216, 191, 216, 1],
- tomato: [255, 99, 71, 1],
- turquoise: [64, 224, 208, 1],
- violet: [238, 130, 238, 1],
- wheat: [245, 222, 179, 1],
- white: [255, 255, 255, 1],
- whitesmoke: [245, 245, 245, 1],
- yellow: [255, 255, 0, 1],
- yellowgreen: [154, 205, 50, 1]
- };
- function Ns(t) {
- return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
- }
- function iGe(t) {
- return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
- }
- function Hb(t) {
- return t < 0 ? 0 : t > 1 ? 1 : t;
- }
- function RE(t) {
- var e = t;
- return e.length && e.charAt(e.length - 1) === "%" ? Ns(parseFloat(e) / 100 * 255) : Ns(parseInt(e, 10));
- }
- function xh(t) {
- var e = t;
- return e.length && e.charAt(e.length - 1) === "%" ? Hb(parseFloat(e) / 100) : Hb(parseFloat(e));
- }
- function kE(t, e, n) {
- return n < 0 ? n += 1 : n > 1 && (n -= 1), n * 6 < 1 ? t + (e - t) * n * 6 : n * 2 < 1 ? e : n * 3 < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t;
- }
- function Hc(t, e, n) {
- return t + (e - t) * n;
- }
- function ko(t, e, n, r, i) {
- return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
- }
- function lk(t, e) {
- return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
- }
- var pse = new a1(20), sS = null;
- function Zp(t, e) {
- sS && lk(sS, e), sS = pse.put(t, sS || e.slice());
- }
- function oa(t, e) {
- if (t) {
- e = e || [];
- var n = pse.get(t);
- if (n)
- return lk(e, n);
- t = t + "";
- var r = t.replace(/ /g, "").toLowerCase();
- if (r in PH)
- return lk(e, PH[r]), Zp(t, e), e;
- var i = r.length;
- if (r.charAt(0) === "#") {
- if (i === 4 || i === 5) {
- var a = parseInt(r.slice(1, 4), 16);
- if (!(a >= 0 && a <= 4095)) {
- ko(e, 0, 0, 0, 1);
- return;
- }
- return ko(e, (a & 3840) >> 4 | (a & 3840) >> 8, a & 240 | (a & 240) >> 4, a & 15 | (a & 15) << 4, i === 5 ? parseInt(r.slice(4), 16) / 15 : 1), Zp(t, e), e;
- } else if (i === 7 || i === 9) {
- var a = parseInt(r.slice(1, 7), 16);
- if (!(a >= 0 && a <= 16777215)) {
- ko(e, 0, 0, 0, 1);
- return;
- }
- return ko(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), Zp(t, e), e;
- }
- return;
- }
- var o = r.indexOf("("), s = r.indexOf(")");
- if (o !== -1 && s + 1 === i) {
- var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
- switch (l) {
- case "rgba":
- if (u.length !== 4)
- return u.length === 3 ? ko(e, +u[0], +u[1], +u[2], 1) : ko(e, 0, 0, 0, 1);
- c = xh(u.pop());
- case "rgb":
- if (u.length >= 3)
- return ko(e, RE(u[0]), RE(u[1]), RE(u[2]), u.length === 3 ? c : xh(u[3])), Zp(t, e), e;
- ko(e, 0, 0, 0, 1);
- return;
- case "hsla":
- if (u.length !== 4) {
- ko(e, 0, 0, 0, 1);
- return;
- }
- return u[3] = xh(u[3]), uk(u, e), Zp(t, e), e;
- case "hsl":
- if (u.length !== 3) {
- ko(e, 0, 0, 0, 1);
- return;
- }
- return uk(u, e), Zp(t, e), e;
- default:
- return;
- }
- }
- ko(e, 0, 0, 0, 1);
- }
- }
- function uk(t, e) {
- var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = xh(t[1]), i = xh(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
- return e = e || [], ko(e, Ns(kE(o, a, n + 1 / 3) * 255), Ns(kE(o, a, n) * 255), Ns(kE(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
- }
- function aGe(t) {
- if (t) {
- var e = t[0] / 255, n = t[1] / 255, r = t[2] / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = a - i, s = (a + i) / 2, l, u;
- if (o === 0)
- l = 0, u = 0;
- else {
- s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
- var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
- e === a ? l = d - f : n === a ? l = 1 / 3 + c - d : r === a && (l = 2 / 3 + f - c), l < 0 && (l += 1), l > 1 && (l -= 1);
- }
- var h = [l * 360, u, s];
- return t[3] != null && h.push(t[3]), h;
- }
- }
- function CC(t, e) {
- var n = oa(t);
- if (n) {
- for (var r = 0; r < 3; r++)
- e < 0 ? n[r] = n[r] * (1 - e) | 0 : n[r] = (255 - n[r]) * e + n[r] | 0, n[r] > 255 ? n[r] = 255 : n[r] < 0 && (n[r] = 0);
- return Bs(n, n.length === 4 ? "rgba" : "rgb");
- }
- }
- function oGe(t) {
- var e = oa(t);
- if (e)
- return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
- }
- function Ky(t, e, n) {
- if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
- n = n || [];
- var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
- return n[0] = Ns(Hc(o[0], s[0], l)), n[1] = Ns(Hc(o[1], s[1], l)), n[2] = Ns(Hc(o[2], s[2], l)), n[3] = Hb(Hc(o[3], s[3], l)), n;
- }
- }
- var sGe = Ky;
- function x5(t, e, n) {
- if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
- var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = oa(e[i]), s = oa(e[a]), l = r - i, u = Bs([
- Ns(Hc(o[0], s[0], l)),
- Ns(Hc(o[1], s[1], l)),
- Ns(Hc(o[2], s[2], l)),
- Hb(Hc(o[3], s[3], l))
- ], "rgba");
- return n ? {
- color: u,
- leftIndex: i,
- rightIndex: a,
- value: r
- } : u;
- }
- }
- var lGe = x5;
- function Yv(t, e, n, r) {
- var i = oa(t);
- if (t)
- return i = aGe(i), e != null && (i[0] = iGe(e)), n != null && (i[1] = xh(n)), r != null && (i[2] = xh(r)), Bs(uk(i), "rgba");
- }
- function Gb(t, e) {
- var n = oa(t);
- if (n && e != null)
- return n[3] = Hb(e), Bs(n, "rgba");
- }
- function Bs(t, e) {
- if (!(!t || !t.length)) {
- var n = t[0] + "," + t[1] + "," + t[2];
- return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
- }
- }
- function jb(t, e) {
- var n = oa(t);
- return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
- }
- function uGe() {
- return Bs([
- Math.round(Math.random() * 255),
- Math.round(Math.random() * 255),
- Math.round(Math.random() * 255)
- ], "rgb");
- }
- var $H = new a1(100);
- function TC(t) {
- if (Ve(t)) {
- var e = $H.get(t);
- return e || (e = CC(t, -0.1), $H.put(t, e)), e;
- } else if (n1(t)) {
- var n = _e({}, t);
- return n.colorStops = Ce(t.colorStops, function(r) {
- return {
- offset: r.offset,
- color: CC(r.color, -0.1)
- };
- }), n;
- }
- return t;
- }
- const cGe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- fastLerp: Ky,
- fastMapToColor: sGe,
- lerp: x5,
- lift: CC,
- liftColor: TC,
- lum: jb,
- mapToColor: lGe,
- modifyAlpha: Gb,
- modifyHSL: Yv,
- parse: oa,
- random: uGe,
- stringify: Bs,
- toHex: oGe
- }, Symbol.toStringTag, { value: "Module" }));
- var PC = Math.round;
- function Zb(t) {
- var e;
- if (!t || t === "transparent")
- t = "none";
- else if (typeof t == "string" && t.indexOf("rgba") > -1) {
- var n = oa(t);
- n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
- }
- return {
- color: t,
- opacity: e ?? 1
- };
- }
- var AH = 1e-4;
- function Gc(t) {
- return t < AH && t > -AH;
- }
- function lS(t) {
- return PC(t * 1e3) / 1e3;
- }
- function ck(t) {
- return PC(t * 1e4) / 1e4;
- }
- function fGe(t) {
- return "matrix(" + lS(t[0]) + "," + lS(t[1]) + "," + lS(t[2]) + "," + lS(t[3]) + "," + ck(t[4]) + "," + ck(t[5]) + ")";
- }
- var dGe = {
- left: "start",
- right: "end",
- center: "middle",
- middle: "middle"
- };
- function hGe(t, e, n) {
- return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
- }
- function pGe(t) {
- return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
- }
- function vGe(t) {
- var e = t.style, n = t.getGlobalScale();
- return [
- e.shadowColor,
- (e.shadowBlur || 0).toFixed(2),
- (e.shadowOffsetX || 0).toFixed(2),
- (e.shadowOffsetY || 0).toFixed(2),
- n[0],
- n[1]
- ].join(",");
- }
- function vse(t) {
- return t && !!t.image;
- }
- function gGe(t) {
- return t && !!t.svgElement;
- }
- function w5(t) {
- return vse(t) || gGe(t);
- }
- function gse(t) {
- return t.type === "linear";
- }
- function mse(t) {
- return t.type === "radial";
- }
- function yse(t) {
- return t && (t.type === "linear" || t.type === "radial");
- }
- function cP(t) {
- return "url(#" + t + ")";
- }
- function bse(t) {
- var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
- return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
- }
- function _se(t) {
- var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Uy, i = dt(t.scaleX, 1), a = dt(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
- return (e || n) && l.push("translate(" + e + "px," + n + "px)"), r && l.push("rotate(" + r + ")"), (i !== 1 || a !== 1) && l.push("scale(" + i + "," + a + ")"), (o || s) && l.push("skew(" + PC(o * Uy) + "deg, " + PC(s * Uy) + "deg)"), l.join(" ");
- }
- var mGe = function() {
- return Gt.hasGlobalWindow && qe(window.btoa) ? function(t) {
- return window.btoa(unescape(encodeURIComponent(t)));
- } : typeof Buffer < "u" ? function(t) {
- return Buffer.from(t).toString("base64");
- } : function(t) {
- return process.env.NODE_ENV !== "production" && qo("Base64 isn't natively supported in the current environment."), null;
- };
- }(), fk = Array.prototype.slice;
- function yu(t, e, n) {
- return (e - t) * n + t;
- }
- function LE(t, e, n, r) {
- for (var i = e.length, a = 0; a < i; a++)
- t[a] = yu(e[a], n[a], r);
- return t;
- }
- function yGe(t, e, n, r) {
- for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
- t[o] || (t[o] = []);
- for (var s = 0; s < a; s++)
- t[o][s] = yu(e[o][s], n[o][s], r);
- }
- return t;
- }
- function uS(t, e, n, r) {
- for (var i = e.length, a = 0; a < i; a++)
- t[a] = e[a] + n[a] * r;
- return t;
- }
- function EH(t, e, n, r) {
- for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
- t[o] || (t[o] = []);
- for (var s = 0; s < a; s++)
- t[o][s] = e[o][s] + n[o][s] * r;
- }
- return t;
- }
- function bGe(t, e) {
- for (var n = t.length, r = e.length, i = n > r ? e : t, a = Math.min(n, r), o = i[a - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = a; s < Math.max(n, r); s++)
- i.push({
- offset: o.offset,
- color: o.color.slice()
- });
- }
- function _Ge(t, e, n) {
- var r = t, i = e;
- if (!(!r.push || !i.push)) {
- var a = r.length, o = i.length;
- if (a !== o) {
- var s = a > o;
- if (s)
- r.length = o;
- else
- for (var l = a; l < o; l++)
- r.push(n === 1 ? i[l] : fk.call(i[l]));
- }
- for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
- if (n === 1)
- isNaN(r[l]) && (r[l] = i[l]);
- else
- for (var c = 0; c < u; c++)
- isNaN(r[l][c]) && (r[l][c] = i[l][c]);
- }
- }
- function Jy(t) {
- if (Pi(t)) {
- var e = t.length;
- if (Pi(t[0])) {
- for (var n = [], r = 0; r < e; r++)
- n.push(fk.call(t[r]));
- return n;
- }
- return fk.call(t);
- }
- return t;
- }
- function ow(t) {
- return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = t[3] == null ? 1 : t[3], "rgba(" + t.join(",") + ")";
- }
- function OGe(t) {
- return Pi(t && t[0]) ? 2 : 1;
- }
- var cS = 0, sw = 1, Ose = 2, py = 3, dk = 4, hk = 5, MH = 6;
- function IH(t) {
- return t === dk || t === hk;
- }
- function fS(t) {
- return t === sw || t === Ose;
- }
- var $0 = [0, 0, 0, 0], SGe = function() {
- function t(e) {
- this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
- }
- return t.prototype.isFinished = function() {
- return this._finished;
- }, t.prototype.setFinished = function() {
- this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
- }, t.prototype.needsAnimate = function() {
- return this.keyframes.length >= 1;
- }, t.prototype.getAdditiveTrack = function() {
- return this._additiveTrack;
- }, t.prototype.addKeyframe = function(e, n, r) {
- this._needsSort = !0;
- var i = this.keyframes, a = i.length, o = !1, s = MH, l = n;
- if (Pi(n)) {
- var u = OGe(n);
- s = u, (u === 1 && !Kt(n[0]) || u === 2 && !Kt(n[0][0])) && (o = !0);
- } else if (Kt(n) && !mf(n))
- s = cS;
- else if (Ve(n))
- if (!isNaN(+n))
- s = cS;
- else {
- var c = oa(n);
- c && (l = c, s = py);
- }
- else if (n1(n)) {
- var f = _e({}, l);
- f.colorStops = Ce(n.colorStops, function(h) {
- return {
- offset: h.offset,
- color: oa(h.color)
- };
- }), gse(n) ? s = dk : mse(n) && (s = hk), l = f;
- }
- a === 0 ? this.valType = s : (s !== this.valType || s === MH) && (o = !0), this.discrete = this.discrete || o;
- var d = {
- time: e,
- value: l,
- rawValue: n,
- percent: 0
- };
- return r && (d.easing = r, d.easingFunc = qe(r) ? r : qy[r] || S5(r)), i.push(d), d;
- }, t.prototype.prepare = function(e, n) {
- var r = this.keyframes;
- this._needsSort && r.sort(function(v, g) {
- return v.time - g.time;
- });
- for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = fS(i), u = IH(i), c = 0; c < a; c++) {
- var f = r[c], d = f.value, h = o.value;
- f.percent = f.time / e, s || (l && c !== a - 1 ? _Ge(d, h, i) : u && bGe(d.colorStops, h.colorStops));
- }
- if (!s && i !== hk && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
- this._additiveTrack = n;
- for (var p = r[0].value, c = 0; c < a; c++)
- i === cS ? r[c].additiveValue = r[c].value - p : i === py ? r[c].additiveValue = uS([], r[c].value, p, -1) : fS(i) && (r[c].additiveValue = i === sw ? uS([], r[c].value, p, -1) : EH([], r[c].value, p, -1));
- }
- }, t.prototype.step = function(e, n) {
- if (!this._finished) {
- this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
- var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === py, c, f = this._lastFr, d = Math.min, h, p;
- if (s === 1)
- h = p = o[0];
- else {
- if (n < 0)
- c = 0;
- else if (n < this._lastFrP) {
- var v = d(f + 1, s - 1);
- for (c = v; c >= 0 && !(o[c].percent <= n); c--)
- ;
- c = d(c, s - 2);
- } else {
- for (c = f; c < s && !(o[c].percent > n); c++)
- ;
- c = d(c - 1, s - 2);
- }
- p = o[c + 1], h = o[c];
- }
- if (h && p) {
- this._lastFr = c, this._lastFrP = n;
- var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
- p.easingFunc && (m = p.easingFunc(m));
- var y = r ? this._additiveValue : u ? $0 : e[l];
- if ((fS(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
- e[l] = m < 1 ? h.rawValue : p.rawValue;
- else if (fS(a))
- a === sw ? LE(y, h[i], p[i], m) : yGe(y, h[i], p[i], m);
- else if (IH(a)) {
- var _ = h[i], O = p[i], S = a === dk;
- e[l] = {
- type: S ? "linear" : "radial",
- x: yu(_.x, O.x, m),
- y: yu(_.y, O.y, m),
- colorStops: Ce(_.colorStops, function(C, P) {
- var $ = O.colorStops[P];
- return {
- offset: yu(C.offset, $.offset, m),
- color: ow(LE([], C.color, $.color, m))
- };
- }),
- global: O.global
- }, S ? (e[l].x2 = yu(_.x2, O.x2, m), e[l].y2 = yu(_.y2, O.y2, m)) : e[l].r = yu(_.r, O.r, m);
- } else if (u)
- LE(y, h[i], p[i], m), r || (e[l] = ow(y));
- else {
- var x = yu(h[i], p[i], m);
- r ? this._additiveValue = x : e[l] = x;
- }
- r && this._addToTarget(e);
- }
- }
- }, t.prototype._addToTarget = function(e) {
- var n = this.valType, r = this.propName, i = this._additiveValue;
- n === cS ? e[r] = e[r] + i : n === py ? (oa(e[r], $0), uS($0, $0, i, 1), e[r] = ow($0)) : n === sw ? uS(e[r], e[r], i, 1) : n === Ose && EH(e[r], e[r], i, 1);
- }, t;
- }(), C5 = function() {
- function t(e, n, r, i) {
- if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
- qo("Can' use additive animation on looped animation.");
- return;
- }
- this._additiveAnimators = i, this._allowDiscrete = r;
- }
- return t.prototype.getMaxTime = function() {
- return this._maxTime;
- }, t.prototype.getDelay = function() {
- return this._delay;
- }, t.prototype.getLoop = function() {
- return this._loop;
- }, t.prototype.getTarget = function() {
- return this._target;
- }, t.prototype.changeTarget = function(e) {
- this._target = e;
- }, t.prototype.when = function(e, n, r) {
- return this.whenWithKeys(e, n, kt(n), r);
- }, t.prototype.whenWithKeys = function(e, n, r, i) {
- for (var a = this._tracks, o = 0; o < r.length; o++) {
- var s = r[o], l = a[s];
- if (!l) {
- l = a[s] = new SGe(s);
- var u = void 0, c = this._getAdditiveTrack(s);
- if (c) {
- var f = c.keyframes, d = f[f.length - 1];
- u = d && d.value, c.valType === py && u && (u = ow(u));
- } else
- u = this._target[s];
- if (u == null)
- continue;
- e > 0 && l.addKeyframe(0, Jy(u), i), this._trackKeys.push(s);
- }
- l.addKeyframe(e, Jy(n[s]), i);
- }
- return this._maxTime = Math.max(this._maxTime, e), this;
- }, t.prototype.pause = function() {
- this._clip.pause(), this._paused = !0;
- }, t.prototype.resume = function() {
- this._clip.resume(), this._paused = !1;
- }, t.prototype.isPaused = function() {
- return !!this._paused;
- }, t.prototype.duration = function(e) {
- return this._maxTime = e, this._force = !0, this;
- }, t.prototype._doneCallback = function() {
- this._setTracksFinished(), this._clip = null;
- var e = this._doneCbs;
- if (e)
- for (var n = e.length, r = 0; r < n; r++)
- e[r].call(this);
- }, t.prototype._abortedCallback = function() {
- this._setTracksFinished();
- var e = this.animation, n = this._abortedCbs;
- if (e && e.removeClip(this._clip), this._clip = null, n)
- for (var r = 0; r < n.length; r++)
- n[r].call(this);
- }, t.prototype._setTracksFinished = function() {
- for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
- e[n[r]].setFinished();
- }, t.prototype._getAdditiveTrack = function(e) {
- var n, r = this._additiveAnimators;
- if (r)
- for (var i = 0; i < r.length; i++) {
- var a = r[i].getTrack(e);
- a && (n = a);
- }
- return n;
- }, t.prototype.start = function(e) {
- if (!(this._started > 0)) {
- this._started = 1;
- for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
- var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
- if (s.prepare(i, l), s.needsAnimate())
- if (!this._allowDiscrete && s.discrete) {
- var f = u[c - 1];
- f && (n._target[s.propName] = f.rawValue), s.setFinished();
- } else
- r.push(s);
- }
- if (r.length || this._force) {
- var d = new nGe({
- life: i,
- loop: this._loop,
- delay: this._delay || 0,
- onframe: function(h) {
- n._started = 2;
- var p = n._additiveAnimators;
- if (p) {
- for (var v = !1, g = 0; g < p.length; g++)
- if (p[g]._clip) {
- v = !0;
- break;
- }
- v || (n._additiveAnimators = null);
- }
- for (var g = 0; g < r.length; g++)
- r[g].step(n._target, h);
- var m = n._onframeCbs;
- if (m)
- for (var g = 0; g < m.length; g++)
- m[g](n._target, h);
- },
- ondestroy: function() {
- n._doneCallback();
- }
- });
- this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
- } else
- this._doneCallback();
- return this;
- }
- }, t.prototype.stop = function(e) {
- if (this._clip) {
- var n = this._clip;
- e && n.onframe(1), this._abortedCallback();
- }
- }, t.prototype.delay = function(e) {
- return this._delay = e, this;
- }, t.prototype.during = function(e) {
- return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
- }, t.prototype.done = function(e) {
- return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
- }, t.prototype.aborted = function(e) {
- return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
- }, t.prototype.getClip = function() {
- return this._clip;
- }, t.prototype.getTrack = function(e) {
- return this._tracks[e];
- }, t.prototype.getTracks = function() {
- var e = this;
- return Ce(this._trackKeys, function(n) {
- return e._tracks[n];
- });
- }, t.prototype.stopTracks = function(e, n) {
- if (!e.length || !this._clip)
- return !0;
- for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
- var o = r[e[a]];
- o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
- }
- for (var s = !0, a = 0; a < i.length; a++)
- if (!r[i[a]].isFinished()) {
- s = !1;
- break;
- }
- return s && this._abortedCallback(), s;
- }, t.prototype.saveTo = function(e, n, r) {
- if (e) {
- n = n || this._trackKeys;
- for (var i = 0; i < n.length; i++) {
- var a = n[i], o = this._tracks[a];
- if (!(!o || o.isFinished())) {
- var s = o.keyframes, l = s[r ? 0 : s.length - 1];
- l && (e[a] = Jy(l.rawValue));
- }
- }
- }
- }, t.prototype.__changeFinalValue = function(e, n) {
- n = n || kt(e);
- for (var r = 0; r < n.length; r++) {
- var i = n[r], a = this._tracks[i];
- if (a) {
- var o = a.keyframes;
- if (o.length > 1) {
- var s = o.pop();
- a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
- }
- }
- }
- }, t;
- }();
- function Iv() {
- return (/* @__PURE__ */ new Date()).getTime();
- }
- var xGe = function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
- }
- return e.prototype.addClip = function(n) {
- n.animation && this.removeClip(n), this._head ? (this._tail.next = n, n.prev = this._tail, n.next = null, this._tail = n) : this._head = this._tail = n, n.animation = this;
- }, e.prototype.addAnimator = function(n) {
- n.animation = this;
- var r = n.getClip();
- r && this.addClip(r);
- }, e.prototype.removeClip = function(n) {
- if (n.animation) {
- var r = n.prev, i = n.next;
- r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
- }
- }, e.prototype.removeAnimator = function(n) {
- var r = n.getClip();
- r && this.removeClip(r), n.animation = null;
- }, e.prototype.update = function(n) {
- for (var r = Iv() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
- var o = a.next, s = a.step(r, i);
- s && (a.ondestroy(), this.removeClip(a)), a = o;
- }
- this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
- }, e.prototype._startLoop = function() {
- var n = this;
- this._running = !0;
- function r() {
- n._running && (SC(r), !n._paused && n.update());
- }
- SC(r);
- }, e.prototype.start = function() {
- this._running || (this._time = Iv(), this._pausedTime = 0, this._startLoop());
- }, e.prototype.stop = function() {
- this._running = !1;
- }, e.prototype.pause = function() {
- this._paused || (this._pauseStart = Iv(), this._paused = !0);
- }, e.prototype.resume = function() {
- this._paused && (this._pausedTime += Iv() - this._pauseStart, this._paused = !1);
- }, e.prototype.clear = function() {
- for (var n = this._head; n; ) {
- var r = n.next;
- n.prev = n.next = n.animation = null, n = r;
- }
- this._head = this._tail = null;
- }, e.prototype.isFinished = function() {
- return this._head == null;
- }, e.prototype.animate = function(n, r) {
- r = r || {}, this.start();
- var i = new C5(n, r.loop);
- return this.addAnimator(i), i;
- }, e;
- }(fs), wGe = 300, NE = Gt.domSupported, BE = function() {
- var t = [
- "click",
- "dblclick",
- "mousewheel",
- "wheel",
- "mouseout",
- "mouseup",
- "mousedown",
- "mousemove",
- "contextmenu"
- ], e = [
- "touchstart",
- "touchend",
- "touchmove"
- ], n = {
- pointerdown: 1,
- pointerup: 1,
- pointermove: 1,
- pointerout: 1
- }, r = Ce(t, function(i) {
- var a = i.replace("mouse", "pointer");
- return n.hasOwnProperty(a) ? a : i;
- });
- return {
- mouse: t,
- touch: e,
- pointer: r
- };
- }(), DH = {
- mouse: ["mousemove", "mouseup"],
- pointer: ["pointermove", "pointerup"]
- }, RH = !1;
- function pk(t) {
- var e = t.pointerType;
- return e === "pen" || e === "touch";
- }
- function CGe(t) {
- t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
- t.touching = !1, t.touchTimer = null;
- }, 700);
- }
- function zE(t) {
- t && (t.zrByTouch = !0);
- }
- function TGe(t, e) {
- return No(t.dom, new PGe(t, e), !0);
- }
- function Sse(t, e) {
- for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
- n = n.parentNode;
- return r;
- }
- var PGe = /* @__PURE__ */ function() {
- function t(e, n) {
- this.stopPropagation = fr, this.stopImmediatePropagation = fr, this.preventDefault = fr, this.type = n.type, this.target = this.currentTarget = e.dom, this.pointerType = n.pointerType, this.clientX = n.clientX, this.clientY = n.clientY;
- }
- return t;
- }(), Cs = {
- mousedown: function(t) {
- t = No(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
- },
- mousemove: function(t) {
- t = No(this.dom, t);
- var e = this.__mayPointerCapture;
- e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
- },
- mouseup: function(t) {
- t = No(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
- },
- mouseout: function(t) {
- t = No(this.dom, t);
- var e = t.toElement || t.relatedTarget;
- Sse(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
- },
- wheel: function(t) {
- RH = !0, t = No(this.dom, t), this.trigger("mousewheel", t);
- },
- mousewheel: function(t) {
- RH || (t = No(this.dom, t), this.trigger("mousewheel", t));
- },
- touchstart: function(t) {
- t = No(this.dom, t), zE(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Cs.mousemove.call(this, t), Cs.mousedown.call(this, t);
- },
- touchmove: function(t) {
- t = No(this.dom, t), zE(t), this.handler.processGesture(t, "change"), Cs.mousemove.call(this, t);
- },
- touchend: function(t) {
- t = No(this.dom, t), zE(t), this.handler.processGesture(t, "end"), Cs.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < wGe && Cs.click.call(this, t);
- },
- pointerdown: function(t) {
- Cs.mousedown.call(this, t);
- },
- pointermove: function(t) {
- pk(t) || Cs.mousemove.call(this, t);
- },
- pointerup: function(t) {
- Cs.mouseup.call(this, t);
- },
- pointerout: function(t) {
- pk(t) || Cs.mouseout.call(this, t);
- }
- };
- F(["click", "dblclick", "contextmenu"], function(t) {
- Cs[t] = function(e) {
- e = No(this.dom, e), this.trigger(t, e);
- };
- });
- var vk = {
- pointermove: function(t) {
- pk(t) || vk.mousemove.call(this, t);
- },
- pointerup: function(t) {
- vk.mouseup.call(this, t);
- },
- mousemove: function(t) {
- this.trigger("mousemove", t);
- },
- mouseup: function(t) {
- var e = this.__pointerCapturing;
- this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
- }
- };
- function $Ge(t, e) {
- var n = e.domHandlers;
- Gt.pointerEventsSupported ? F(BE.pointer, function(r) {
- lw(e, r, function(i) {
- n[r].call(t, i);
- });
- }) : (Gt.touchEventsSupported && F(BE.touch, function(r) {
- lw(e, r, function(i) {
- n[r].call(t, i), CGe(e);
- });
- }), F(BE.mouse, function(r) {
- lw(e, r, function(i) {
- i = O5(i), e.touching || n[r].call(t, i);
- });
- }));
- }
- function AGe(t, e) {
- Gt.pointerEventsSupported ? F(DH.pointer, n) : Gt.touchEventsSupported || F(DH.mouse, n);
- function n(r) {
- function i(a) {
- a = O5(a), Sse(t, a.target) || (a = TGe(t, a), e.domHandlers[r].call(t, a));
- }
- lw(e, r, i, { capture: !0 });
- }
- }
- function lw(t, e, n, r) {
- t.mounted[e] = n, t.listenerOpts[e] = r, ok(t.domTarget, e, n, r);
- }
- function VE(t) {
- var e = t.mounted;
- for (var n in e)
- e.hasOwnProperty(n) && BHe(t.domTarget, n, e[n], t.listenerOpts[n]);
- t.mounted = {};
- }
- var kH = /* @__PURE__ */ function() {
- function t(e, n) {
- this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
- }
- return t;
- }(), EGe = function(t) {
- le(e, t);
- function e(n, r) {
- var i = t.call(this) || this;
- return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new kH(n, Cs), NE && (i._globalHandlerScope = new kH(document, vk)), $Ge(i, i._localHandlerScope), i;
- }
- return e.prototype.dispose = function() {
- VE(this._localHandlerScope), NE && VE(this._globalHandlerScope);
- }, e.prototype.setCursor = function(n) {
- this.dom.style && (this.dom.style.cursor = n || "default");
- }, e.prototype.__togglePointerCapture = function(n) {
- if (this.__mayPointerCapture = null, NE && +this.__pointerCapturing ^ +n) {
- this.__pointerCapturing = n;
- var r = this._globalHandlerScope;
- n ? AGe(this, r) : VE(r);
- }
- }, e;
- }(fs), xse = 1;
- Gt.hasGlobalWindow && (xse = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
- var $C = xse, gk = 0.4, mk = "#333", yk = "#ccc", MGe = "#eee", LH = i1, NH = 5e-5;
- function dd(t) {
- return t > NH || t < -NH;
- }
- var hd = [], Up = [], FE = Na(), WE = Math.abs, IGe = function() {
- function t() {
- }
- return t.prototype.getLocalTransform = function(e) {
- return t.getLocalTransform(this, e);
- }, t.prototype.setPosition = function(e) {
- this.x = e[0], this.y = e[1];
- }, t.prototype.setScale = function(e) {
- this.scaleX = e[0], this.scaleY = e[1];
- }, t.prototype.setSkew = function(e) {
- this.skewX = e[0], this.skewY = e[1];
- }, t.prototype.setOrigin = function(e) {
- this.originX = e[0], this.originY = e[1];
- }, t.prototype.needLocalTransform = function() {
- return dd(this.rotation) || dd(this.x) || dd(this.y) || dd(this.scaleX - 1) || dd(this.scaleY - 1) || dd(this.skewX) || dd(this.skewY);
- }, t.prototype.updateTransform = function() {
- var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
- if (!(n || e)) {
- r && (LH(r), this.invTransform = null);
- return;
- }
- r = r || Na(), n ? this.getLocalTransform(r) : LH(r), e && (n ? Ll(r, e, r) : lP(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
- }, t.prototype._resolveGlobalScaleRatio = function(e) {
- var n = this.globalScaleRatio;
- if (n != null && n !== 1) {
- this.getGlobalScale(hd);
- var r = hd[0] < 0 ? -1 : 1, i = hd[1] < 0 ? -1 : 1, a = ((hd[0] - r) * n + r) / hd[0] || 0, o = ((hd[1] - i) * n + i) / hd[1] || 0;
- e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
- }
- this.invTransform = this.invTransform || Na(), dp(this.invTransform, e);
- }, t.prototype.getComputedTransform = function() {
- for (var e = this, n = []; e; )
- n.push(e), e = e.parent;
- for (; e = n.pop(); )
- e.updateTransform();
- return this.transform;
- }, t.prototype.setLocalTransform = function(e) {
- if (e) {
- var n = e[0] * e[0] + e[1] * e[1], r = e[2] * e[2] + e[3] * e[3], i = Math.atan2(e[1], e[0]), a = Math.PI / 2 + i - Math.atan2(e[3], e[2]);
- r = Math.sqrt(r) * Math.cos(a), n = Math.sqrt(n), this.skewX = a, this.skewY = 0, this.rotation = -i, this.x = +e[4], this.y = +e[5], this.scaleX = n, this.scaleY = r, this.originX = 0, this.originY = 0;
- }
- }, t.prototype.decomposeTransform = function() {
- if (this.transform) {
- var e = this.parent, n = this.transform;
- e && e.transform && (e.invTransform = e.invTransform || Na(), Ll(Up, e.invTransform, n), n = Up);
- var r = this.originX, i = this.originY;
- (r || i) && (FE[4] = r, FE[5] = i, Ll(Up, n, FE), Up[4] -= r, Up[5] -= i, n = Up), this.setLocalTransform(n);
- }
- }, t.prototype.getGlobalScale = function(e) {
- var n = this.transform;
- return e = e || [], n ? (e[0] = Math.sqrt(n[0] * n[0] + n[1] * n[1]), e[1] = Math.sqrt(n[2] * n[2] + n[3] * n[3]), n[0] < 0 && (e[0] = -e[0]), n[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
- }, t.prototype.transformCoordToLocal = function(e, n) {
- var r = [e, n], i = this.invTransform;
- return i && oi(r, r, i), r;
- }, t.prototype.transformCoordToGlobal = function(e, n) {
- var r = [e, n], i = this.transform;
- return i && oi(r, r, i), r;
- }, t.prototype.getLineScale = function() {
- var e = this.transform;
- return e && WE(e[0] - 1) > 1e-10 && WE(e[3] - 1) > 1e-10 ? Math.sqrt(WE(e[0] * e[3] - e[2] * e[1])) : 1;
- }, t.prototype.copyTransform = function(e) {
- wse(this, e);
- }, t.getLocalTransform = function(e, n) {
- n = n || [];
- var r = e.originX || 0, i = e.originY || 0, a = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, c = e.x, f = e.y, d = e.skewX ? Math.tan(e.skewX) : 0, h = e.skewY ? Math.tan(-e.skewY) : 0;
- if (r || i || s || l) {
- var p = r + s, v = i + l;
- n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
- } else
- n[4] = n[5] = 0;
- return n[0] = a, n[3] = o, n[1] = h * a, n[2] = d * o, u && Lf(n, n, u), n[4] += r + c, n[5] += i + f, n;
- }, t.initDefaultProps = function() {
- var e = t.prototype;
- 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;
- }(), t;
- }(), Hl = [
- "x",
- "y",
- "originX",
- "originY",
- "anchorX",
- "anchorY",
- "rotation",
- "scaleX",
- "scaleY",
- "skewX",
- "skewY"
- ];
- function wse(t, e) {
- for (var n = 0; n < Hl.length; n++) {
- var r = Hl[n];
- t[r] = e[r];
- }
- }
- const Pu = IGe;
- var BH = {};
- function fo(t, e) {
- e = e || vf;
- var n = BH[e];
- n || (n = BH[e] = new a1(500));
- var r = n.get(t);
- return r == null && (r = Hs.measureText(t, e).width, n.put(t, r)), r;
- }
- function zH(t, e, n, r) {
- var i = fo(t, e), a = fP(e), o = vy(0, i, n), s = Ov(0, a, r), l = new bt(o, s, i, a);
- return l;
- }
- function o1(t, e, n, r) {
- var i = ((t || "") + "").split(`
- `), a = i.length;
- if (a === 1)
- return zH(i[0], e, n, r);
- for (var o = new bt(0, 0, 0, 0), s = 0; s < i.length; s++) {
- var l = zH(i[s], e, n, r);
- s === 0 ? o.copy(l) : o.union(l);
- }
- return o;
- }
- function vy(t, e, n) {
- return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
- }
- function Ov(t, e, n) {
- return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
- }
- function fP(t) {
- return fo("国", t);
- }
- function js(t, e) {
- return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
- }
- function AC(t, e, n) {
- var r = e.position || "inside", i = e.distance != null ? e.distance : 5, a = n.height, o = n.width, s = a / 2, l = n.x, u = n.y, c = "left", f = "top";
- if (r instanceof Array)
- l += js(r[0], n.width), u += js(r[1], n.height), c = null, f = null;
- else
- switch (r) {
- case "left":
- l -= i, u += s, c = "right", f = "middle";
- break;
- case "right":
- l += i + o, u += s, f = "middle";
- break;
- case "top":
- l += o / 2, u -= i, c = "center", f = "bottom";
- break;
- case "bottom":
- l += o / 2, u += a + i, c = "center";
- break;
- case "inside":
- l += o / 2, u += s, c = "center", f = "middle";
- break;
- case "insideLeft":
- l += i, u += s, f = "middle";
- break;
- case "insideRight":
- l += o - i, u += s, c = "right", f = "middle";
- break;
- case "insideTop":
- l += o / 2, u += i, c = "center";
- break;
- case "insideBottom":
- l += o / 2, u += a - i, c = "center", f = "bottom";
- break;
- case "insideTopLeft":
- l += i, u += i;
- break;
- case "insideTopRight":
- l += o - i, u += i, c = "right";
- break;
- case "insideBottomLeft":
- l += i, u += a - i, f = "bottom";
- break;
- case "insideBottomRight":
- l += o - i, u += a - i, c = "right", f = "bottom";
- break;
- }
- return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
- }
- var QE = "__zr_normal__", HE = Hl.concat(["ignore"]), DGe = os(Hl, function(t, e) {
- return t[e] = !0, t;
- }, { ignore: !1 }), Xp = {}, RGe = new bt(0, 0, 0, 0), dP = function() {
- function t(e) {
- this.id = g5(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
- }
- return t.prototype._init = function(e) {
- this.attr(e);
- }, t.prototype.drift = function(e, n, r) {
- switch (this.draggable) {
- case "horizontal":
- n = 0;
- break;
- case "vertical":
- e = 0;
- break;
- }
- var i = this.transform;
- i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
- }, t.prototype.beforeUpdate = function() {
- }, t.prototype.afterUpdate = function() {
- }, t.prototype.update = function() {
- this.updateTransform(), this.__dirty && this.updateInnerText();
- }, t.prototype.updateInnerText = function(e) {
- var n = this._textContent;
- if (n && (!n.ignore || e)) {
- this.textConfig || (this.textConfig = {});
- var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
- a.parent = i ? this : null;
- var u = !1;
- if (a.copyTransform(n), r.position != null) {
- var c = RGe;
- r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(Xp, r, c) : AC(Xp, r, c), a.x = Xp.x, a.y = Xp.y, o = Xp.align, s = Xp.verticalAlign;
- var f = r.origin;
- if (f && r.rotation != null) {
- var d = void 0, h = void 0;
- f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = js(f[0], c.width), h = js(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
- }
- }
- r.rotation != null && (a.rotation = r.rotation);
- var p = r.offset;
- p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
- var v = r.inside == null ? typeof r.position == "string" && r.position.indexOf("inside") >= 0 : r.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), m = void 0, y = void 0, _ = void 0;
- v && this.canBeInsideText() ? (m = r.insideFill, y = r.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), _ = !0)) : (m = r.outsideFill, y = r.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), _ = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || _ !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = m, g.stroke = y, g.autoStroke = _, g.align = o, g.verticalAlign = s, n.setDefaultTextStyle(g)), n.__dirty |= to, l && n.dirtyStyle(!0);
- }
- }, t.prototype.canBeInsideText = function() {
- return !0;
- }, t.prototype.getInsideTextFill = function() {
- return "#fff";
- }, t.prototype.getInsideTextStroke = function(e) {
- return "#000";
- }, t.prototype.getOutsideFill = function() {
- return this.__zr && this.__zr.isDarkMode() ? yk : mk;
- }, t.prototype.getOutsideStroke = function(e) {
- var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && oa(n);
- r || (r = [255, 255, 255, 1]);
- for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
- r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
- return r[3] = 1, Bs(r, "rgba");
- }, t.prototype.traverse = function(e, n) {
- }, t.prototype.attrKV = function(e, n) {
- e === "textConfig" ? this.setTextConfig(n) : e === "textContent" ? this.setTextContent(n) : e === "clipPath" ? this.setClipPath(n) : e === "extra" ? (this.extra = this.extra || {}, _e(this.extra, n)) : this[e] = n;
- }, t.prototype.hide = function() {
- this.ignore = !0, this.markRedraw();
- }, t.prototype.show = function() {
- this.ignore = !1, this.markRedraw();
- }, t.prototype.attr = function(e, n) {
- if (typeof e == "string")
- this.attrKV(e, n);
- else if (nt(e))
- for (var r = e, i = kt(r), a = 0; a < i.length; a++) {
- var o = i[a];
- this.attrKV(o, e[o]);
- }
- return this.markRedraw(), this;
- }, t.prototype.saveCurrentToNormalState = function(e) {
- this._innerSaveToNormal(e);
- for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
- var i = this.animators[r], a = i.__fromStateTransition;
- if (!(i.getLoop() || a && a !== QE)) {
- var o = i.targetName, s = o ? n[o] : n;
- i.saveTo(s);
- }
- }
- }, t.prototype._innerSaveToNormal = function(e) {
- var n = this._normalState;
- n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, HE);
- }, t.prototype._savePrimaryToNormal = function(e, n, r) {
- for (var i = 0; i < r.length; i++) {
- var a = r[i];
- e[a] != null && !(a in n) && (n[a] = this[a]);
- }
- }, t.prototype.hasState = function() {
- return this.currentStates.length > 0;
- }, t.prototype.getState = function(e) {
- return this.states[e];
- }, t.prototype.ensureState = function(e) {
- var n = this.states;
- return n[e] || (n[e] = {}), n[e];
- }, t.prototype.clearStates = function(e) {
- this.useState(QE, !1, e);
- }, t.prototype.useState = function(e, n, r, i) {
- var a = e === QE, o = this.hasState();
- if (!(!o && a)) {
- var s = this.currentStates, l = this.stateTransition;
- if (!(St(s, e) >= 0 && (n || s.length === 1))) {
- var u;
- if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
- qo("State " + e + " not exists.");
- return;
- }
- a || this.saveCurrentToNormalState(u);
- var c = !!(u && u.hoverLayer || i);
- c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
- var f = this._textContent, d = this._textGuide;
- return f && f.useState(e, n, r, c), d && d.useState(e, n, r, c), a ? (this.currentStates = [], this._normalState = {}) : n ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~to), u;
- }
- }
- }, t.prototype.useStates = function(e, n, r) {
- if (!e.length)
- this.clearStates();
- else {
- var i = [], a = this.currentStates, o = e.length, s = o === a.length;
- if (s) {
- for (var l = 0; l < o; l++)
- if (e[l] !== a[l]) {
- s = !1;
- break;
- }
- }
- if (s)
- return;
- for (var l = 0; l < o; l++) {
- var u = e[l], c = void 0;
- this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
- }
- var f = i[o - 1], d = !!(f && f.hoverLayer || r);
- d && this._toggleHoverLayerFlag(!0);
- var h = this._mergeStates(i), p = this.stateTransition;
- this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
- var v = this._textContent, g = this._textGuide;
- v && v.useStates(e, n, d), g && g.useStates(e, n, d), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !d && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~to);
- }
- }, t.prototype.isSilent = function() {
- for (var e = this.silent, n = this.parent; !e && n; ) {
- if (n.silent) {
- e = !0;
- break;
- }
- n = n.parent;
- }
- return e;
- }, t.prototype._updateAnimationTargets = function() {
- for (var e = 0; e < this.animators.length; e++) {
- var n = this.animators[e];
- n.targetName && n.changeTarget(this[n.targetName]);
- }
- }, t.prototype.removeState = function(e) {
- var n = St(this.currentStates, e);
- if (n >= 0) {
- var r = this.currentStates.slice();
- r.splice(n, 1), this.useStates(r);
- }
- }, t.prototype.replaceState = function(e, n, r) {
- var i = this.currentStates.slice(), a = St(i, e), o = St(i, n) >= 0;
- a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
- }, t.prototype.toggleState = function(e, n) {
- n ? this.useState(e, !0) : this.removeState(e);
- }, t.prototype._mergeStates = function(e) {
- for (var n = {}, r, i = 0; i < e.length; i++) {
- var a = e[i];
- _e(n, a), a.textConfig && (r = r || {}, _e(r, a.textConfig));
- }
- return r && (n.textConfig = r), n;
- }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
- var s = !(n && i);
- n && n.textConfig ? (this.textConfig = _e({}, i ? this.textConfig : r.textConfig), _e(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
- for (var l = {}, u = !1, c = 0; c < HE.length; c++) {
- var f = HE[c], d = a && DGe[f];
- n && n[f] != null ? d ? (u = !0, l[f] = n[f]) : this[f] = n[f] : s && r[f] != null && (d ? (u = !0, l[f] = r[f]) : this[f] = r[f]);
- }
- if (!a)
- for (var c = 0; c < this.animators.length; c++) {
- var h = this.animators[c], p = h.targetName;
- h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
- }
- u && this._transitionState(e, l, o);
- }, t.prototype._attachComponent = function(e) {
- if (e.__zr && !e.__hostTarget) {
- if (process.env.NODE_ENV !== "production")
- throw new Error("Text element has been added to zrender.");
- return;
- }
- if (e === this) {
- if (process.env.NODE_ENV !== "production")
- throw new Error("Recursive component attachment.");
- return;
- }
- var n = this.__zr;
- n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
- }, t.prototype._detachComponent = function(e) {
- e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
- }, t.prototype.getClipPath = function() {
- return this._clipPath;
- }, t.prototype.setClipPath = function(e) {
- this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
- }, t.prototype.removeClipPath = function() {
- var e = this._clipPath;
- e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
- }, t.prototype.getTextContent = function() {
- return this._textContent;
- }, t.prototype.setTextContent = function(e) {
- var n = this._textContent;
- if (n !== e) {
- if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
- throw new Error("Text element has been added to zrender.");
- e.innerTransformable = new Pu(), this._attachComponent(e), this._textContent = e, this.markRedraw();
- }
- }, t.prototype.setTextConfig = function(e) {
- this.textConfig || (this.textConfig = {}), _e(this.textConfig, e), this.markRedraw();
- }, t.prototype.removeTextConfig = function() {
- this.textConfig = null, this.markRedraw();
- }, t.prototype.removeTextContent = function() {
- var e = this._textContent;
- e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
- }, t.prototype.getTextGuideLine = function() {
- return this._textGuide;
- }, t.prototype.setTextGuideLine = function(e) {
- this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
- }, t.prototype.removeTextGuideLine = function() {
- var e = this._textGuide;
- e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
- }, t.prototype.markRedraw = function() {
- this.__dirty |= to;
- var e = this.__zr;
- e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
- }, t.prototype.dirty = function() {
- this.markRedraw();
- }, t.prototype._toggleHoverLayerFlag = function(e) {
- this.__inHover = e;
- var n = this._textContent, r = this._textGuide;
- n && (n.__inHover = e), r && (r.__inHover = e);
- }, t.prototype.addSelfToZr = function(e) {
- if (this.__zr !== e) {
- this.__zr = e;
- var n = this.animators;
- if (n)
- for (var r = 0; r < n.length; r++)
- e.animation.addAnimator(n[r]);
- this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
- }
- }, t.prototype.removeSelfFromZr = function(e) {
- if (this.__zr) {
- this.__zr = null;
- var n = this.animators;
- if (n)
- for (var r = 0; r < n.length; r++)
- e.animation.removeAnimator(n[r]);
- this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
- }
- }, t.prototype.animate = function(e, n, r) {
- var i = e ? this[e] : this;
- if (process.env.NODE_ENV !== "production" && !i) {
- qo('Property "' + e + '" is not existed in element ' + this.id);
- return;
- }
- var a = new C5(i, n, r);
- return e && (a.targetName = e), this.addAnimator(a, e), a;
- }, t.prototype.addAnimator = function(e, n) {
- var r = this.__zr, i = this;
- e.during(function() {
- i.updateDuringAnimation(n);
- }).done(function() {
- var a = i.animators, o = St(a, e);
- o >= 0 && a.splice(o, 1);
- }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
- }, t.prototype.updateDuringAnimation = function(e) {
- this.markRedraw();
- }, t.prototype.stopAnimation = function(e, n) {
- for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
- var s = r[o];
- !e || e === s.scope ? s.stop(n) : a.push(s);
- }
- return this.animators = a, this;
- }, t.prototype.animateTo = function(e, n, r) {
- GE(this, e, n, r);
- }, t.prototype.animateFrom = function(e, n, r) {
- GE(this, e, n, r, !0);
- }, t.prototype._transitionState = function(e, n, r, i) {
- for (var a = GE(this, n, r, i), o = 0; o < a.length; o++)
- a[o].__fromStateTransition = e;
- }, t.prototype.getBoundingRect = function() {
- return null;
- }, t.prototype.getPaintRect = function() {
- return null;
- }, t.initDefaultProps = function() {
- var e = t.prototype;
- e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = to;
- var n = {};
- function r(a, o, s) {
- n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
- }
- function i(a, o, s, l) {
- Object.defineProperty(e, a, {
- get: function() {
- if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
- var c = this[o] = [];
- u(this, c);
- }
- return this[o];
- },
- set: function(c) {
- process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
- }
- });
- function u(c, f) {
- Object.defineProperty(f, 0, {
- get: function() {
- return c[s];
- },
- set: function(d) {
- c[s] = d;
- }
- }), Object.defineProperty(f, 1, {
- get: function() {
- return c[l];
- },
- set: function(d) {
- c[l] = d;
- }
- });
- }
- }
- Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
- }(), t;
- }();
- vr(dP, fs);
- vr(dP, Pu);
- function GE(t, e, n, r, i) {
- n = n || {};
- var a = [];
- Cse(t, "", t, e, n, r, a, i);
- var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
- s = !0, o--, o <= 0 && (s ? l && l() : u && u());
- }, f = function() {
- o--, o <= 0 && (s ? l && l() : u && u());
- };
- o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
- n.during(v);
- });
- for (var d = 0; d < a.length; d++) {
- var h = a[d];
- c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
- }
- return a;
- }
- function jE(t, e, n) {
- for (var r = 0; r < n; r++)
- t[r] = e[r];
- }
- function kGe(t) {
- return Pi(t[0]);
- }
- function LGe(t, e, n) {
- if (Pi(e[n]))
- if (Pi(t[n]) || (t[n] = []), Qi(e[n])) {
- var r = e[n].length;
- t[n].length !== r && (t[n] = new e[n].constructor(r), jE(t[n], e[n], r));
- } else {
- var i = e[n], a = t[n], o = i.length;
- if (kGe(i))
- for (var s = i[0].length, l = 0; l < o; l++)
- a[l] ? jE(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
- else
- jE(a, i, o);
- a.length = i.length;
- }
- else
- t[n] = e[n];
- }
- function NGe(t, e) {
- return t === e || Pi(t) && Pi(e) && BGe(t, e);
- }
- function BGe(t, e) {
- var n = t.length;
- if (n !== e.length)
- return !1;
- for (var r = 0; r < n; r++)
- if (t[r] !== e[r])
- return !1;
- return !0;
- }
- function Cse(t, e, n, r, i, a, o, s) {
- for (var l = kt(r), u = i.duration, c = i.delay, f = i.additive, d = i.setToFinal, h = !nt(a), p = t.animators, v = [], g = 0; g < l.length; g++) {
- var m = l[g], y = r[m];
- if (y != null && n[m] != null && (h || a[m]))
- if (nt(y) && !Pi(y) && !n1(y)) {
- if (e) {
- s || (n[m] = y, t.updateDuringAnimation(e));
- continue;
- }
- Cse(t, m, n[m], y, i, a && a[m], o, s);
- } else
- v.push(m);
- else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
- }
- var _ = v.length;
- if (!f && _)
- for (var O = 0; O < p.length; O++) {
- var S = p[O];
- if (S.targetName === e) {
- var x = S.stopTracks(v);
- if (x) {
- var C = St(p, S);
- p.splice(C, 1);
- }
- }
- }
- if (i.force || (v = yn(v, function(E) {
- return !NGe(r[E], n[E]);
- }), _ = v.length), _ > 0 || i.force && !o.length) {
- var P = void 0, $ = void 0, T = void 0;
- if (s) {
- $ = {}, d && (P = {});
- for (var O = 0; O < _; O++) {
- var m = v[O];
- $[m] = n[m], d ? P[m] = r[m] : n[m] = r[m];
- }
- } else if (d) {
- T = {};
- for (var O = 0; O < _; O++) {
- var m = v[O];
- T[m] = Jy(n[m]), LGe(n, r, m);
- }
- }
- var S = new C5(n, !1, !1, f ? yn(p, function(M) {
- return M.targetName === e;
- }) : null);
- S.targetName = e, i.scope && (S.scope = i.scope), d && P && S.whenWithKeys(0, P, v), T && S.whenWithKeys(0, T, v), S.whenWithKeys(u ?? 500, s ? $ : r, v).delay(c || 0), t.addAnimator(S, e), o.push(S);
- }
- }
- var Tse = function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- return r.isGroup = !0, r._children = [], r.attr(n), r;
- }
- return e.prototype.childrenRef = function() {
- return this._children;
- }, e.prototype.children = function() {
- return this._children.slice();
- }, e.prototype.childAt = function(n) {
- return this._children[n];
- }, e.prototype.childOfName = function(n) {
- for (var r = this._children, i = 0; i < r.length; i++)
- if (r[i].name === n)
- return r[i];
- }, e.prototype.childCount = function() {
- return this._children.length;
- }, e.prototype.add = function(n) {
- if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
- throw "This elemenet has been used as an attachment";
- return this;
- }, e.prototype.addBefore = function(n, r) {
- if (n && n !== this && n.parent !== this && r && r.parent === this) {
- var i = this._children, a = i.indexOf(r);
- a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
- }
- return this;
- }, e.prototype.replace = function(n, r) {
- var i = St(this._children, n);
- return i >= 0 && this.replaceAt(r, i), this;
- }, e.prototype.replaceAt = function(n, r) {
- var i = this._children, a = i[r];
- if (n && n !== this && n.parent !== this && n !== a) {
- i[r] = n, a.parent = null;
- var o = this.__zr;
- o && a.removeSelfFromZr(o), this._doAdd(n);
- }
- return this;
- }, e.prototype._doAdd = function(n) {
- n.parent && n.parent.remove(n), n.parent = this;
- var r = this.__zr;
- r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
- }, e.prototype.remove = function(n) {
- var r = this.__zr, i = this._children, a = St(i, n);
- return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
- }, e.prototype.removeAll = function() {
- for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
- var a = n[i];
- r && a.removeSelfFromZr(r), a.parent = null;
- }
- return n.length = 0, this;
- }, e.prototype.eachChild = function(n, r) {
- for (var i = this._children, a = 0; a < i.length; a++) {
- var o = i[a];
- n.call(r, o, a);
- }
- return this;
- }, e.prototype.traverse = function(n, r) {
- for (var i = 0; i < this._children.length; i++) {
- var a = this._children[i], o = n.call(r, a);
- a.isGroup && !o && a.traverse(n, r);
- }
- return this;
- }, e.prototype.addSelfToZr = function(n) {
- t.prototype.addSelfToZr.call(this, n);
- for (var r = 0; r < this._children.length; r++) {
- var i = this._children[r];
- i.addSelfToZr(n);
- }
- }, e.prototype.removeSelfFromZr = function(n) {
- t.prototype.removeSelfFromZr.call(this, n);
- for (var r = 0; r < this._children.length; r++) {
- var i = this._children[r];
- i.removeSelfFromZr(n);
- }
- }, e.prototype.getBoundingRect = function(n) {
- for (var r = new bt(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
- var l = i[s];
- if (!(l.ignore || l.invisible)) {
- var u = l.getBoundingRect(), c = l.getLocalTransform(a);
- c ? (bt.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
- }
- }
- return o || r;
- }, e;
- }(dP);
- Tse.prototype.type = "group";
- const ct = Tse;
- /*!
- * ZRender, a high performance 2d drawing library.
- *
- * Copyright (c) 2013, Baidu Inc.
- * All rights reserved.
- *
- * LICENSE
- * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
- */
- var gy = {}, rh = {};
- function zGe(t) {
- delete rh[t];
- }
- function VGe(t) {
- if (!t)
- return !1;
- if (typeof t == "string")
- return jb(t, 1) < gk;
- if (t.colorStops) {
- for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
- n += jb(e[i].color, 1);
- return n /= r, n < gk;
- }
- return !1;
- }
- var FGe = function() {
- function t(e, n, r) {
- var i = this;
- this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
- var a = new qHe(), o = r.renderer || "canvas";
- if (gy[o] || (o = kt(gy)[0]), process.env.NODE_ENV !== "production" && !gy[o])
- throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
- r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
- var s = new gy[o](n, a, r, e), l = r.ssr || s.ssrOnly;
- this.storage = a, this.painter = s;
- var u = !Gt.node && !Gt.worker && !l ? new EGe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? Gt.touchEventsSupported : !!c, d = 44, h;
- f && (h = dt(r.pointerSize, d)), this.handler = new ise(a, s, u, s.root, h), this.animation = new xGe({
- stage: {
- update: l ? null : function() {
- return i._flush(!0);
- }
- }
- }), l || this.animation.start();
- }
- return t.prototype.add = function(e) {
- this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
- }, t.prototype.remove = function(e) {
- this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
- }, t.prototype.configLayer = function(e, n) {
- this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
- }, t.prototype.setBackgroundColor = function(e) {
- this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = VGe(e));
- }, t.prototype.getBackgroundColor = function() {
- return this._backgroundColor;
- }, t.prototype.setDarkMode = function(e) {
- this._darkMode = e;
- }, t.prototype.isDarkMode = function() {
- return this._darkMode;
- }, t.prototype.refreshImmediately = function(e) {
- this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
- }, t.prototype.refresh = function() {
- this._disposed || (this._needsRefresh = !0, this.animation.start());
- }, t.prototype.flush = function() {
- this._disposed || this._flush(!1);
- }, t.prototype._flush = function(e) {
- var n, r = Iv();
- this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
- var i = Iv();
- n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
- elapsedTime: i - r
- })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
- }, t.prototype.setSleepAfterStill = function(e) {
- this._sleepAfterStill = e;
- }, t.prototype.wakeUp = function() {
- this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
- }, t.prototype.refreshHover = function() {
- this._needsRefreshHover = !0;
- }, t.prototype.refreshHoverImmediately = function() {
- this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
- }, t.prototype.resize = function(e) {
- this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
- }, t.prototype.clearAnimation = function() {
- this._disposed || this.animation.clear();
- }, t.prototype.getWidth = function() {
- if (!this._disposed)
- return this.painter.getWidth();
- }, t.prototype.getHeight = function() {
- if (!this._disposed)
- return this.painter.getHeight();
- }, t.prototype.setCursorStyle = function(e) {
- this._disposed || this.handler.setCursorStyle(e);
- }, t.prototype.findHover = function(e, n) {
- if (!this._disposed)
- return this.handler.findHover(e, n);
- }, t.prototype.on = function(e, n, r) {
- return this._disposed || this.handler.on(e, n, r), this;
- }, t.prototype.off = function(e, n) {
- this._disposed || this.handler.off(e, n);
- }, t.prototype.trigger = function(e, n) {
- this._disposed || this.handler.trigger(e, n);
- }, t.prototype.clear = function() {
- if (!this._disposed) {
- for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
- e[n] instanceof ct && e[n].removeSelfFromZr(this);
- this.storage.delAllRoots(), this.painter.clear();
- }
- }, t.prototype.dispose = function() {
- this._disposed || (this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, this._disposed = !0, zGe(this.id));
- }, t;
- }();
- function bk(t, e) {
- var n = new FGe(g5(), t, e);
- return rh[n.id] = n, n;
- }
- function WGe(t) {
- t.dispose();
- }
- function QGe() {
- for (var t in rh)
- rh.hasOwnProperty(t) && rh[t].dispose();
- rh = {};
- }
- function HGe(t) {
- return rh[t];
- }
- function Pse(t, e) {
- gy[t] = e;
- }
- var _k;
- function $se(t) {
- if (typeof _k == "function")
- return _k(t);
- }
- function Ase(t) {
- _k = t;
- }
- var GGe = "5.6.0";
- const jGe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- dispose: WGe,
- disposeAll: QGe,
- getElementSSRData: $se,
- getInstance: HGe,
- init: bk,
- registerPainter: Pse,
- registerSSRDataGetter: Ase,
- version: GGe
- }, Symbol.toStringTag, { value: "Module" }));
- var VH = 1e-4, Ese = 20;
- function ZGe(t) {
- return t.replace(/^\s+|\s+$/g, "");
- }
- function gn(t, e, n, r) {
- var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
- if (l === 0)
- return u === 0 ? o : (o + s) / 2;
- if (r)
- if (l > 0) {
- if (t <= i)
- return o;
- if (t >= a)
- return s;
- } else {
- if (t >= i)
- return o;
- if (t <= a)
- return s;
- }
- else {
- if (t === i)
- return o;
- if (t === a)
- return s;
- }
- return (t - i) / l * u + o;
- }
- function ze(t, e) {
- switch (t) {
- case "center":
- case "middle":
- t = "50%";
- break;
- case "left":
- case "top":
- t = "0%";
- break;
- case "right":
- case "bottom":
- t = "100%";
- break;
- }
- return Ve(t) ? ZGe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
- }
- function sr(t, e, n) {
- return e == null && (e = 10), e = Math.min(Math.max(0, e), Ese), t = (+t).toFixed(e), n ? t : +t;
- }
- function ao(t) {
- return t.sort(function(e, n) {
- return e - n;
- }), t;
- }
- function Ms(t) {
- if (t = +t, isNaN(t))
- return 0;
- if (t > 1e-14) {
- for (var e = 1, n = 0; n < 15; n++, e *= 10)
- if (Math.round(t * e) / e === t)
- return n;
- }
- return EC(t);
- }
- function EC(t) {
- var e = t.toString().toLowerCase(), n = e.indexOf("e"), r = n > 0 ? +e.slice(n + 1) : 0, i = n > 0 ? n : e.length, a = e.indexOf("."), o = a < 0 ? 0 : i - 1 - a;
- return Math.max(0, o - r);
- }
- function T5(t, e) {
- var n = Math.log, r = Math.LN10, i = Math.floor(n(t[1] - t[0]) / r), a = Math.round(n(Math.abs(e[1] - e[0])) / r), o = Math.min(Math.max(-i + a, 0), 20);
- return isFinite(o) ? o : 20;
- }
- function UGe(t, e, n) {
- if (!t[e])
- return 0;
- var r = Mse(t, n);
- return r[e] || 0;
- }
- function Mse(t, e) {
- var n = os(t, function(h, p) {
- return h + (isNaN(p) ? 0 : p);
- }, 0);
- if (n === 0)
- return [];
- for (var r = Math.pow(10, e), i = Ce(t, function(h) {
- return (isNaN(h) ? 0 : h) / n * r * 100;
- }), a = r * 100, o = Ce(i, function(h) {
- return Math.floor(h);
- }), s = os(o, function(h, p) {
- return h + p;
- }, 0), l = Ce(i, function(h, p) {
- return h - o[p];
- }); s < a; ) {
- for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
- l[f] > u && (u = l[f], c = f);
- ++o[c], l[c] = 0, ++s;
- }
- return Ce(o, function(h) {
- return h / r;
- });
- }
- function XGe(t, e) {
- var n = Math.max(Ms(t), Ms(e)), r = t + e;
- return n > Ese ? r : sr(r, n);
- }
- var Ok = 9007199254740991;
- function P5(t) {
- var e = Math.PI * 2;
- return (t % e + e) % e;
- }
- function Vg(t) {
- return t > -VH && t < VH;
- }
- var YGe = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
- function go(t) {
- if (t instanceof Date)
- return t;
- if (Ve(t)) {
- var e = YGe.exec(t);
- if (!e)
- return /* @__PURE__ */ new Date(NaN);
- if (e[8]) {
- var n = +e[4] || 0;
- return e[8].toUpperCase() !== "Z" && (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));
- } else
- 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);
- } else if (t == null)
- return /* @__PURE__ */ new Date(NaN);
- return new Date(Math.round(t));
- }
- function Ise(t) {
- return Math.pow(10, s1(t));
- }
- function s1(t) {
- if (t === 0)
- return 0;
- var e = Math.floor(Math.log(t) / Math.LN10);
- return t / Math.pow(10, e) >= 10 && e++, e;
- }
- function $5(t, e) {
- var n = s1(t), r = Math.pow(10, n), i = t / r, a;
- return e ? i < 1.5 ? a = 1 : i < 2.5 ? a = 2 : i < 4 ? a = 3 : i < 7 ? a = 5 : a = 10 : i < 1 ? a = 1 : i < 2 ? a = 2 : i < 3 ? a = 3 : i < 5 ? a = 5 : a = 10, t = a * r, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t;
- }
- function uw(t, e) {
- var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
- return a ? i + a * (t[r] - i) : i;
- }
- function Sk(t) {
- t.sort(function(l, u) {
- return s(l, u, 0) ? -1 : 1;
- });
- for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
- for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
- i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
- i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
- }
- return t;
- function s(l, u, c) {
- return l.interval[c] < u.interval[c] || l.interval[c] === u.interval[c] && (l.close[c] - u.close[c] === (c ? -1 : 1) || !c && s(l, u, 1));
- }
- }
- function Gl(t) {
- var e = parseFloat(t);
- return e == t && (e !== 0 || !Ve(t) || t.indexOf("x") <= 0) ? e : NaN;
- }
- function hP(t) {
- return !isNaN(Gl(t));
- }
- function Dse() {
- return Math.round(Math.random() * 9);
- }
- function Rse(t, e) {
- return e === 0 ? t : Rse(e, t % e);
- }
- function FH(t, e) {
- return t == null ? e : e == null ? t : t * e / Rse(t, e);
- }
- var qGe = "[ECharts] ", WH = {}, KGe = typeof console < "u" && console.warn && console.log;
- function pP(t, e, n) {
- if (KGe) {
- if (n) {
- if (WH[e])
- return;
- WH[e] = !0;
- }
- console[t](qGe + e);
- }
- }
- function JGe(t, e) {
- pP("log", t, e);
- }
- function nr(t, e) {
- pP("warn", t, e);
- }
- function $i(t, e) {
- pP("error", t, e);
- }
- function ss(t) {
- process.env.NODE_ENV !== "production" && pP("warn", "DEPRECATED: " + t, !0);
- }
- function _r(t, e, n) {
- process.env.NODE_ENV !== "production" && ss((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
- }
- function fa() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var n = "";
- if (process.env.NODE_ENV !== "production") {
- var r = function(i) {
- return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : mf(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : qe(i) ? "function () { ... }" : y5(i) ? i + "" : null;
- };
- n = Ce(t, function(i) {
- if (Ve(i))
- return i;
- var a = r(i);
- if (a != null)
- return a;
- if (typeof JSON < "u" && JSON.stringify)
- try {
- return JSON.stringify(i, function(o, s) {
- var l = r(s);
- return l ?? s;
- });
- } catch {
- return "?";
- }
- else
- return "?";
- }).join(" ");
- }
- return n;
- }
- function fn(t) {
- throw new Error(t);
- }
- function QH(t, e, n) {
- return (e - t) * n + t;
- }
- var kse = "series\0", Lse = "\0_ec_\0";
- function Cn(t) {
- return t instanceof Array ? t : t == null ? [] : [t];
- }
- function Hh(t, e, n) {
- if (t) {
- t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
- for (var r = 0, i = n.length; r < i; r++) {
- var a = n[r];
- !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
- }
- }
- }
- var HH = ["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"];
- function ym(t) {
- return nt(t) && !Se(t) && !(t instanceof Date) ? t.value : t;
- }
- function eje(t) {
- return nt(t) && !(t instanceof Array);
- }
- function Nse(t, e, n) {
- var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
- t = t || [], e = (e || []).slice();
- var o = Ze();
- F(e, function(l, u) {
- if (!nt(l)) {
- e[u] = null;
- return;
- }
- process.env.NODE_ENV !== "production" && (l.id != null && !jH(l.id) && GH(l.id), l.name != null && !jH(l.name) && GH(l.name));
- });
- var s = tje(t, o, n);
- return (r || i) && nje(s, t, o, e), r && rje(s, e), r || i ? ije(s, e, i) : a && aje(s, e), oje(s), s;
- }
- function tje(t, e, n) {
- var r = [];
- if (n === "replaceAll")
- return r;
- for (var i = 0; i < t.length; i++) {
- var a = t[i];
- a && a.id != null && e.set(a.id, i), r.push({
- existing: n === "replaceMerge" || Fg(a) ? null : a,
- newOption: null,
- keyInfo: null,
- brandNew: null
- });
- }
- return r;
- }
- function nje(t, e, n, r) {
- F(r, function(i, a) {
- if (!(!i || i.id == null)) {
- var o = eb(i.id), s = n.get(o);
- if (s != null) {
- var l = t[s];
- at(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
- }
- }
- });
- }
- function rje(t, e) {
- F(e, function(n, r) {
- if (!(!n || n.name == null))
- for (var i = 0; i < t.length; i++) {
- var a = t[i].existing;
- if (!t[i].newOption && a && (a.id == null || n.id == null) && !Fg(n) && !Fg(a) && Bse("name", a, n)) {
- t[i].newOption = n, e[r] = null;
- return;
- }
- }
- });
- }
- function ije(t, e, n) {
- F(e, function(r) {
- if (r) {
- for (
- var i, a = 0;
- // Be `!resultItem` only when `nextIdx >= result.length`.
- (i = t[a]) && (i.newOption || Fg(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
- i.existing && r.id != null && !Bse("id", r, i.existing));
- )
- a++;
- i ? (i.newOption = r, i.brandNew = n) : t.push({
- newOption: r,
- brandNew: n,
- existing: null,
- keyInfo: null
- }), a++;
- }
- });
- }
- function aje(t, e) {
- F(e, function(n) {
- t.push({
- newOption: n,
- brandNew: !0,
- existing: null,
- keyInfo: null
- });
- });
- }
- function oje(t) {
- var e = Ze();
- F(t, function(n) {
- var r = n.existing;
- r && e.set(r.id, n);
- }), F(t, function(n) {
- var r = n.newOption;
- at(!r || r.id == null || !e.get(r.id) || e.get(r.id) === n, "id duplicates: " + (r && r.id)), r && r.id != null && e.set(r.id, n), !n.keyInfo && (n.keyInfo = {});
- }), F(t, function(n, r) {
- var i = n.existing, a = n.newOption, o = n.keyInfo;
- if (nt(a)) {
- if (o.name = a.name != null ? eb(a.name) : i ? i.name : kse + r, i)
- o.id = eb(i.id);
- else if (a.id != null)
- o.id = eb(a.id);
- else {
- var s = 0;
- do
- o.id = "\0" + o.name + "\0" + s++;
- while (e.get(o.id));
- }
- e.set(o.id, n);
- }
- });
- }
- function Bse(t, e, n) {
- var r = Br(e[t], null), i = Br(n[t], null);
- return r != null && i != null && r === i;
- }
- function eb(t) {
- if (process.env.NODE_ENV !== "production" && t == null)
- throw new Error();
- return Br(t, "");
- }
- function Br(t, e) {
- return t == null ? e : Ve(t) ? t : Kt(t) || zb(t) ? t + "" : e;
- }
- function GH(t) {
- process.env.NODE_ENV !== "production" && nr("`" + t + "` is invalid id or name. Must be a string or number.");
- }
- function jH(t) {
- return zb(t) || hP(t);
- }
- function A5(t) {
- var e = t.name;
- return !!(e && e.indexOf(kse));
- }
- function Fg(t) {
- return t && t.id != null && eb(t.id).indexOf(Lse) === 0;
- }
- function sje(t) {
- return Lse + t;
- }
- function lje(t, e, n) {
- F(t, function(r) {
- var i = r.newOption;
- nt(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = uje(e, i, r.existing, n));
- });
- }
- function uje(t, e, n, r) {
- var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
- return i;
- }
- function cje(t, e) {
- var n = {}, r = {};
- return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
- function i(o, s, l) {
- for (var u = 0, c = o.length; u < c; u++) {
- var f = Br(o[u].seriesId, null);
- if (f == null)
- return;
- for (var d = Cn(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
- var g = d[p];
- h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
- }
- }
- }
- function a(o, s) {
- var l = [];
- for (var u in o)
- if (o.hasOwnProperty(u) && o[u] != null)
- if (s)
- l.push(+u);
- else {
- var c = a(o[u], !0);
- c.length && l.push({
- seriesId: u,
- dataIndex: c
- });
- }
- return l;
- }
- }
- function Gh(t, e) {
- if (e.dataIndexInside != null)
- return e.dataIndexInside;
- if (e.dataIndex != null)
- return Se(e.dataIndex) ? Ce(e.dataIndex, function(n) {
- return t.indexOfRawIndex(n);
- }) : t.indexOfRawIndex(e.dataIndex);
- if (e.name != null)
- return Se(e.name) ? Ce(e.name, function(n) {
- return t.indexOfName(n);
- }) : t.indexOfName(e.name);
- }
- function Ut() {
- var t = "__ec_inner_" + fje++;
- return function(e) {
- return e[t] || (e[t] = {});
- };
- }
- var fje = Dse();
- function tb(t, e, n) {
- var r = E5(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
- return !i && l && a.set(l, {}), a.each(function(u, c) {
- var f = l1(t, c, u, {
- useDefault: l === c,
- enableAll: n && n.enableAll != null ? n.enableAll : !0,
- enableNone: n && n.enableNone != null ? n.enableNone : !0
- });
- s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
- }), s;
- }
- function E5(t, e) {
- var n;
- if (Ve(t)) {
- var r = {};
- r[t + "Index"] = 0, n = r;
- } else
- n = t;
- var i = Ze(), a = {}, o = !1;
- return F(n, function(s, l) {
- if (l === "dataIndex" || l === "dataIndexInside") {
- a[l] = s;
- return;
- }
- var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
- if (!(!c || !f || e && e.includeMainTypes && St(e.includeMainTypes, c) < 0)) {
- o = o || !!c;
- var d = i.get(c) || i.set(c, {});
- d[f] = s;
- }
- }), {
- mainTypeSpecified: o,
- queryOptionMap: i,
- others: a
- };
- }
- var Er = {
- useDefault: !0,
- enableAll: !1,
- enableNone: !1
- }, dje = {
- useDefault: !1,
- enableAll: !0,
- enableNone: !0
- };
- function l1(t, e, n, r) {
- r = r || Er;
- var i = n.index, a = n.id, o = n.name, s = {
- models: null,
- specified: i != null || a != null || o != null
- };
- if (!s.specified) {
- var l = void 0;
- return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
- }
- return i === "none" || i === !1 ? (at(r.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (at(r.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = t.queryComponents({
- mainType: e,
- index: i,
- id: a,
- name: o
- }), s);
- }
- function zse(t, e, n) {
- t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
- }
- function hje(t, e) {
- return t.getAttribute ? t.getAttribute(e) : t[e];
- }
- function pje(t) {
- return t === "auto" ? Gt.domSupported ? "html" : "richText" : t || "html";
- }
- function xk(t, e) {
- var n = Ze(), r = [];
- return F(t, function(i) {
- var a = e(i);
- (n.get(a) || (r.push(a), n.set(a, []))).push(i);
- }), {
- keys: r,
- buckets: n
- };
- }
- function Vse(t, e, n, r, i) {
- var a = e == null || e === "auto";
- if (r == null)
- return r;
- if (Kt(r)) {
- var o = QH(n || 0, r, i);
- return sr(o, a ? Math.max(Ms(n || 0), Ms(r)) : e);
- } else {
- if (Ve(r))
- return i < 1 ? n : r;
- for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
- var d = t.getDimensionInfo(f);
- if (d && d.type === "ordinal")
- s[f] = (i < 1 && l ? l : u)[f];
- else {
- var h = l && l[f] ? l[f] : 0, p = u[f], o = QH(h, p, i);
- s[f] = sr(o, a ? Math.max(Ms(h), Ms(p)) : e);
- }
- }
- return s;
- }
- }
- var vje = ".", pd = "___EC__COMPONENT__CONTAINER___", Fse = "___EC__EXTENDED_CLASS___";
- function $l(t) {
- var e = {
- main: "",
- sub: ""
- };
- if (t) {
- var n = t.split(vje);
- e.main = n[0] || "", e.sub = n[1] || "";
- }
- return e;
- }
- function gje(t) {
- at(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
- }
- function mje(t) {
- return !!(t && t[Fse]);
- }
- function M5(t, e) {
- t.$constructor = t, t.extend = function(n) {
- process.env.NODE_ENV !== "production" && F(e, function(a) {
- n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
- });
- var r = this, i;
- return yje(r) ? i = /** @class */
- function(a) {
- le(o, a);
- function o() {
- return a.apply(this, arguments) || this;
- }
- return o;
- }(r) : (i = function() {
- (n.$constructor || r).apply(this, arguments);
- }, m5(i, this)), _e(i.prototype, n), i[Fse] = !0, i.extend = this.extend, i.superCall = Oje, i.superApply = Sje, i.superClass = r, i;
- };
- }
- function yje(t) {
- return qe(t) && /^class\s/.test(Function.prototype.toString.call(t));
- }
- function Wse(t, e) {
- t.extend = e.extend;
- }
- var bje = Math.round(Math.random() * 10);
- function _je(t) {
- var e = ["__\0is_clz", bje++].join("_");
- t.prototype[e] = !0, process.env.NODE_ENV !== "production" && at(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
- return !!(n && n[e]);
- };
- }
- function Oje(t, e) {
- for (var n = [], r = 2; r < arguments.length; r++)
- n[r - 2] = arguments[r];
- return this.superClass.prototype[e].apply(t, n);
- }
- function Sje(t, e, n) {
- return this.superClass.prototype[e].apply(t, n);
- }
- function vP(t) {
- var e = {};
- t.registerClass = function(r) {
- var i = r.type || r.prototype.type;
- if (i) {
- gje(i), r.prototype.type = i;
- var a = $l(i);
- if (!a.sub)
- process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
- else if (a.sub !== pd) {
- var o = n(a);
- o[a.sub] = r;
- }
- }
- return r;
- }, t.getClass = function(r, i, a) {
- var o = e[r];
- if (o && o[pd] && (o = i ? o[i] : null), a && !o)
- throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
- return o;
- }, t.getClassesByMainType = function(r) {
- var i = $l(r), a = [], o = e[i.main];
- return o && o[pd] ? F(o, function(s, l) {
- l !== pd && a.push(s);
- }) : a.push(o), a;
- }, t.hasClass = function(r) {
- var i = $l(r);
- return !!e[i.main];
- }, t.getAllClassMainTypes = function() {
- var r = [];
- return F(e, function(i, a) {
- r.push(a);
- }), r;
- }, t.hasSubTypes = function(r) {
- var i = $l(r), a = e[i.main];
- return a && a[pd];
- };
- function n(r) {
- var i = e[r.main];
- return (!i || !i[pd]) && (i = e[r.main] = {}, i[pd] = !0), i;
- }
- }
- function jh(t, e) {
- for (var n = 0; n < t.length; n++)
- t[n][1] || (t[n][1] = t[n][0]);
- return e = e || !1, function(r, i, a) {
- for (var o = {}, s = 0; s < t.length; s++) {
- var l = t[s][1];
- if (!(i && St(i, l) >= 0 || a && St(a, l) < 0)) {
- var u = r.getShallow(l, e);
- u != null && (o[t[s][0]] = u);
- }
- }
- return o;
- };
- }
- var xje = [
- ["fill", "color"],
- ["shadowBlur"],
- ["shadowOffsetX"],
- ["shadowOffsetY"],
- ["opacity"],
- ["shadowColor"]
- // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
- // So do not transfer decal directly.
- ], wje = jh(xje), Cje = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getAreaStyle = function(e, n) {
- return wje(this, e, n);
- }, t;
- }()
- ), wk = new a1(50);
- function Tje(t) {
- if (typeof t == "string") {
- var e = wk.get(t);
- return e && e.image;
- } else
- return t;
- }
- function I5(t, e, n, r, i) {
- if (t)
- if (typeof t == "string") {
- if (e && e.__zrImageSrc === t || !n)
- return e;
- var a = wk.get(t), o = { hostEl: n, cb: r, cbPayload: i };
- return a ? (e = a.image, !gP(e) && a.pending.push(o)) : (e = Hs.loadImage(t, ZH, ZH), e.__zrImageSrc = t, wk.put(t, e.__cachedImgObj = {
- image: e,
- pending: [o]
- })), e;
- } else
- return t;
- else return e;
- }
- function ZH() {
- var t = this.__cachedImgObj;
- this.onload = this.onerror = this.__cachedImgObj = null;
- for (var e = 0; e < t.pending.length; e++) {
- var n = t.pending[e], r = n.cb;
- r && r(this, n.cbPayload), n.hostEl.dirty();
- }
- t.pending.length = 0;
- }
- function gP(t) {
- return t && t.width && t.height;
- }
- var ZE = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
- function Qse(t, e, n, r, i) {
- if (!e)
- return "";
- var a = (t + "").split(`
- `);
- i = Hse(e, n, r, i);
- for (var o = 0, s = a.length; o < s; o++)
- a[o] = Gse(a[o], i);
- return a.join(`
- `);
- }
- function Hse(t, e, n, r) {
- r = r || {};
- var i = _e({}, r);
- i.font = e, n = dt(n, "..."), i.maxIterations = dt(r.maxIterations, 2);
- var a = i.minChar = dt(r.minChar, 0);
- i.cnCharWidth = fo("国", e);
- var o = i.ascCharWidth = fo("a", e);
- i.placeholder = dt(r.placeholder, "");
- for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
- s -= o;
- var u = fo(n, e);
- return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
- }
- function Gse(t, e) {
- var n = e.containerWidth, r = e.font, i = e.contentWidth;
- if (!n)
- return "";
- var a = fo(t, r);
- if (a <= n)
- return t;
- for (var o = 0; ; o++) {
- if (a <= i || o >= e.maxIterations) {
- t += e.ellipsis;
- break;
- }
- var s = o === 0 ? Pje(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
- t = t.substr(0, s), a = fo(t, r);
- }
- return t === "" && (t = e.placeholder), t;
- }
- function Pje(t, e, n, r) {
- for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
- var s = t.charCodeAt(a);
- i += 0 <= s && s <= 127 ? n : r;
- }
- return a;
- }
- function $je(t, e) {
- t != null && (t += "");
- var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = fP(i), s = dt(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
- c != null && (n === "break" || n === "breakAll") ? f = t ? jse(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
- `) : [];
- var d = f.length * s, h = dt(e.height, d);
- if (d > h && u) {
- var p = Math.floor(h / s);
- f = f.slice(0, p);
- }
- if (t && a && c != null)
- for (var v = Hse(c, i, e.ellipsis, {
- minChar: e.truncateMinChar,
- placeholder: e.placeholder
- }), g = 0; g < f.length; g++)
- f[g] = Gse(f[g], v);
- for (var m = h, y = 0, g = 0; g < f.length; g++)
- y = Math.max(fo(f[g], i), y);
- c == null && (c = y);
- var _ = y;
- return r && (m += r[0] + r[2], _ += r[1] + r[3], c += r[1] + r[3]), l && (_ = c), {
- lines: f,
- height: h,
- outerWidth: _,
- outerHeight: m,
- lineHeight: s,
- calculatedLineHeight: o,
- contentWidth: y,
- contentHeight: d,
- width: c
- };
- }
- var Aje = /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }(), UH = /* @__PURE__ */ function() {
- function t(e) {
- this.tokens = [], e && (this.tokens = e);
- }
- return t;
- }(), Eje = /* @__PURE__ */ function() {
- function t() {
- this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
- }
- return t;
- }();
- function Mje(t, e) {
- var n = new Eje();
- if (t != null && (t += ""), !t)
- return n;
- for (var r = e.width, i = e.height, a = e.overflow, o = (a === "break" || a === "breakAll") && r != null ? { width: r, accumWidth: 0, breakAll: a === "breakAll" } : null, s = ZE.lastIndex = 0, l; (l = ZE.exec(t)) != null; ) {
- var u = l.index;
- u > s && UE(n, t.substring(s, u), e, o), UE(n, l[2], e, o, l[1]), s = ZE.lastIndex;
- }
- s < t.length && UE(n, t.substring(s, t.length), e, o);
- var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
- function g(W, H, U) {
- W.width = H, W.lineHeight = U, f += U, d = Math.max(d, H);
- }
- e: for (var m = 0; m < n.lines.length; m++) {
- for (var y = n.lines[m], _ = 0, O = 0, S = 0; S < y.tokens.length; S++) {
- var x = y.tokens[S], C = x.styleName && e.rich[x.styleName] || {}, P = x.textPadding = C.padding, $ = P ? P[1] + P[3] : 0, T = x.font = C.font || e.font;
- x.contentHeight = fP(T);
- var E = dt(C.height, x.contentHeight);
- if (x.innerHeight = E, P && (E += P[0] + P[2]), x.height = E, x.lineHeight = co(C.lineHeight, e.lineHeight, E), x.align = C && C.align || e.align, x.verticalAlign = C && C.verticalAlign || "middle", v && i != null && f + x.lineHeight > i) {
- S > 0 ? (y.tokens = y.tokens.slice(0, S), g(y, O, _), n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m);
- break e;
- }
- var M = C.width, R = M == null || M === "auto";
- if (typeof M == "string" && M.charAt(M.length - 1) === "%")
- x.percentWidth = M, c.push(x), x.contentWidth = fo(x.text, T);
- else {
- if (R) {
- var N = C.backgroundColor, I = N && N.image;
- I && (I = Tje(I), gP(I) && (x.width = Math.max(x.width, I.width * E / I.height)));
- }
- var B = p && r != null ? r - O : null;
- B != null && B < x.width ? !R || B < $ ? (x.text = "", x.width = x.contentWidth = 0) : (x.text = Qse(x.text, B - $, T, e.ellipsis, { minChar: e.truncateMinChar }), x.width = x.contentWidth = fo(x.text, T)) : x.contentWidth = fo(x.text, T);
- }
- x.width += $, O += x.width, C && (_ = Math.max(_, x.lineHeight));
- }
- g(y, O, _);
- }
- n.outerWidth = n.width = dt(r, d), n.outerHeight = n.height = dt(i, f), n.contentHeight = f, n.contentWidth = d, h && (n.outerWidth += h[1] + h[3], n.outerHeight += h[0] + h[2]);
- for (var m = 0; m < c.length; m++) {
- var x = c[m], Q = x.percentWidth;
- x.width = parseInt(Q, 10) / 100 * n.width;
- }
- return n;
- }
- function UE(t, e, n, r, i) {
- var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
- if (r) {
- var d = o.padding, h = d ? d[1] + d[3] : 0;
- if (o.width != null && o.width !== "auto") {
- var p = js(o.width, r.width) + h;
- s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
- `), u = !0), r.accumWidth = p;
- } else {
- var v = jse(e, l, r.width, r.breakAll, r.accumWidth);
- r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
- }
- } else
- c = e.split(`
- `);
- for (var g = 0; g < c.length; g++) {
- var m = c[g], y = new Aje();
- if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : fo(m, l), !g && !u) {
- var _ = (s[s.length - 1] || (s[0] = new UH())).tokens, O = _.length;
- O === 1 && _[0].isLineHolder ? _[0] = y : (m || !O || a) && _.push(y);
- } else
- s.push(new UH([y]));
- }
- }
- function Ije(t) {
- var e = t.charCodeAt(0);
- return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
- }
- var Dje = os(",&?/;] ".split(""), function(t, e) {
- return t[e] = !0, t;
- }, {});
- function Rje(t) {
- return Ije(t) ? !!Dje[t] : !0;
- }
- function jse(t, e, n, r, i) {
- for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
- var d = t.charAt(f);
- if (d === `
- `) {
- l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
- continue;
- }
- var h = fo(d, e), p = r ? !1 : !Rje(d);
- if (a.length ? c + h > n : i + c + h > n) {
- c ? (s || l) && (p ? (s || (s = l, l = "", u = 0, c = u), a.push(s), o.push(c - u), l += d, u += h, s = "", c = u) : (l && (s += l, l = "", u = 0), a.push(s), o.push(c), s = d, c = h)) : p ? (a.push(l), o.push(u), l = d, u = h) : (a.push(d), o.push(h));
- continue;
- }
- c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
- }
- return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
- accumWidth: c,
- lines: a,
- linesWidths: o
- };
- }
- var Ck = "__zr_style_" + Math.round(Math.random() * 10), wh = {
- shadowBlur: 0,
- shadowOffsetX: 0,
- shadowOffsetY: 0,
- shadowColor: "#000",
- opacity: 1,
- blend: "source-over"
- }, mP = {
- style: {
- shadowBlur: !0,
- shadowOffsetX: !0,
- shadowOffsetY: !0,
- shadowColor: !0,
- opacity: !0
- }
- };
- wh[Ck] = !0;
- var XH = ["z", "z2", "invisible"], kje = ["invisible"], Lje = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype._init = function(n) {
- for (var r = kt(n), i = 0; i < r.length; i++) {
- var a = r[i];
- a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
- }
- this.style || this.useStyle({});
- }, e.prototype.beforeBrush = function() {
- }, e.prototype.afterBrush = function() {
- }, e.prototype.innerBeforeBrush = function() {
- }, e.prototype.innerAfterBrush = function() {
- }, e.prototype.shouldBePainted = function(n, r, i, a) {
- var o = this.transform;
- if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && Nje(this, n, r) || o && !o[0] && !o[3])
- return !1;
- if (i && this.__clipPaths) {
- for (var s = 0; s < this.__clipPaths.length; ++s)
- if (this.__clipPaths[s].isZeroArea())
- return !1;
- }
- if (a && this.parent)
- for (var l = this.parent; l; ) {
- if (l.ignore)
- return !1;
- l = l.parent;
- }
- return !0;
- }, e.prototype.contain = function(n, r) {
- return this.rectContain(n, r);
- }, e.prototype.traverse = function(n, r) {
- n.call(r, this);
- }, e.prototype.rectContain = function(n, r) {
- var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
- return a.contain(i[0], i[1]);
- }, e.prototype.getPaintRect = function() {
- var n = this._paintRect;
- if (!this._paintRect || this.__dirty) {
- var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
- n = this._paintRect || (this._paintRect = new bt(0, 0, 0, 0)), r ? bt.applyTransform(n, i, r) : n.copy(i), (o || s || l) && (n.width += o * 2 + Math.abs(s), n.height += o * 2 + Math.abs(l), n.x = Math.min(n.x, n.x + s - o), n.y = Math.min(n.y, n.y + l - o));
- var u = this.dirtyRectTolerance;
- n.isZero() || (n.x = Math.floor(n.x - u), n.y = Math.floor(n.y - u), n.width = Math.ceil(n.width + 1 + u * 2), n.height = Math.ceil(n.height + 1 + u * 2));
- }
- return n;
- }, e.prototype.setPrevPaintRect = function(n) {
- n ? (this._prevPaintRect = this._prevPaintRect || new bt(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
- }, e.prototype.getPrevPaintRect = function() {
- return this._prevPaintRect;
- }, e.prototype.animateStyle = function(n) {
- return this.animate("style", n);
- }, e.prototype.updateDuringAnimation = function(n) {
- n === "style" ? this.dirtyStyle() : this.markRedraw();
- }, e.prototype.attrKV = function(n, r) {
- n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
- }, e.prototype.setStyle = function(n, r) {
- return typeof n == "string" ? this.style[n] = r : _e(this.style, n), this.dirtyStyle(), this;
- }, e.prototype.dirtyStyle = function(n) {
- n || this.markRedraw(), this.__dirty |= hy, this._rect && (this._rect = null);
- }, e.prototype.dirty = function() {
- this.dirtyStyle();
- }, e.prototype.styleChanged = function() {
- return !!(this.__dirty & hy);
- }, e.prototype.styleUpdated = function() {
- this.__dirty &= ~hy;
- }, e.prototype.createStyle = function(n) {
- return r1(wh, n);
- }, e.prototype.useStyle = function(n) {
- n[Ck] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
- }, e.prototype.isStyleObject = function(n) {
- return n[Ck];
- }, e.prototype._innerSaveToNormal = function(n) {
- t.prototype._innerSaveToNormal.call(this, n);
- var r = this._normalState;
- n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, XH);
- }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
- t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
- var l = !(r && a), u;
- if (r && r.style ? o ? a ? u = r.style : (u = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(u, r.style)) : (u = this._mergeStyle(this.createStyle(), a ? this.style : i.style), this._mergeStyle(u, r.style)) : l && (u = i.style), u)
- if (o) {
- var c = this.style;
- if (this.style = this.createStyle(l ? {} : c), l)
- for (var f = kt(c), d = 0; d < f.length; d++) {
- var h = f[d];
- h in u && (u[h] = u[h], this.style[h] = c[h]);
- }
- for (var p = kt(u), d = 0; d < p.length; d++) {
- var h = p[d];
- this.style[h] = this.style[h];
- }
- this._transitionState(n, {
- style: u
- }, s, this.getAnimationStyleProps());
- } else
- this.useStyle(u);
- for (var v = this.__inHover ? kje : XH, d = 0; d < v.length; d++) {
- var h = v[d];
- r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
- }
- }, e.prototype._mergeStates = function(n) {
- for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
- var o = n[a];
- o.style && (i = i || {}, this._mergeStyle(i, o.style));
- }
- return i && (r.style = i), r;
- }, e.prototype._mergeStyle = function(n, r) {
- return _e(n, r), n;
- }, e.prototype.getAnimationStyleProps = function() {
- return mP;
- }, e.initDefaultProps = function() {
- var n = e.prototype;
- n.type = "displayable", n.invisible = !1, n.z = 0, n.z2 = 0, n.zlevel = 0, n.culling = !1, n.cursor = "pointer", n.rectHover = !1, n.incremental = !1, n._rect = null, n.dirtyRectTolerance = 0, n.__dirty = to | hy;
- }(), e;
- }(dP), XE = new bt(0, 0, 0, 0), YE = new bt(0, 0, 0, 0);
- function Nje(t, e, n) {
- return XE.copy(t.getBoundingRect()), t.transform && XE.applyTransform(t.transform), YE.width = e, YE.height = n, !XE.intersect(YE);
- }
- const ls = Lje;
- var Pa = Math.min, $a = Math.max, qE = Math.sin, KE = Math.cos, vd = Math.PI * 2, dS = kf(), hS = kf(), pS = kf();
- function yP(t, e, n) {
- if (t.length !== 0) {
- for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
- r = t[l], i = Pa(i, r[0]), a = $a(a, r[0]), o = Pa(o, r[1]), s = $a(s, r[1]);
- e[0] = i, e[1] = o, n[0] = a, n[1] = s;
- }
- }
- function YH(t, e, n, r, i, a) {
- i[0] = Pa(t, n), i[1] = Pa(e, r), a[0] = $a(t, n), a[1] = $a(e, r);
- }
- var qH = [], KH = [];
- function Bje(t, e, n, r, i, a, o, s, l, u) {
- var c = use, f = jr, d = c(t, n, i, o, qH);
- l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
- for (var h = 0; h < d; h++) {
- var p = f(t, n, i, o, qH[h]);
- l[0] = Pa(p, l[0]), u[0] = $a(p, u[0]);
- }
- d = c(e, r, a, s, KH);
- for (var h = 0; h < d; h++) {
- var v = f(e, r, a, s, KH[h]);
- l[1] = Pa(v, l[1]), u[1] = $a(v, u[1]);
- }
- l[0] = Pa(t, l[0]), u[0] = $a(t, u[0]), l[0] = Pa(o, l[0]), u[0] = $a(o, u[0]), l[1] = Pa(e, l[1]), u[1] = $a(e, u[1]), l[1] = Pa(s, l[1]), u[1] = $a(s, u[1]);
- }
- function zje(t, e, n, r, i, a, o, s) {
- var l = fse, u = ii, c = $a(Pa(l(t, n, i), 1), 0), f = $a(Pa(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
- o[0] = Pa(t, i, d), o[1] = Pa(e, a, h), s[0] = $a(t, i, d), s[1] = $a(e, a, h);
- }
- function Vje(t, e, n, r, i, a, o, s, l) {
- var u = Cu, c = Tu, f = Math.abs(i - a);
- if (f % vd < 1e-4 && f > 1e-4) {
- s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
- return;
- }
- if (dS[0] = KE(i) * n + t, dS[1] = qE(i) * r + e, hS[0] = KE(a) * n + t, hS[1] = qE(a) * r + e, u(s, dS, hS), c(l, dS, hS), i = i % vd, i < 0 && (i = i + vd), a = a % vd, a < 0 && (a = a + vd), i > a && !o ? a += vd : i < a && o && (i += vd), o) {
- var d = a;
- a = i, i = d;
- }
- for (var h = 0; h < a; h += Math.PI / 2)
- h > i && (pS[0] = KE(h) * n + t, pS[1] = qE(h) * r + e, u(s, pS, s), c(l, pS, l));
- }
- var En = {
- M: 1,
- L: 2,
- C: 3,
- Q: 4,
- A: 5,
- Z: 6,
- R: 7
- }, gd = [], md = [], sl = [], bc = [], ll = [], ul = [], JE = Math.min, eM = Math.max, yd = Math.cos, bd = Math.sin, pu = Math.abs, Tk = Math.PI, Ac = Tk * 2, tM = typeof Float32Array < "u", A0 = [];
- function nM(t) {
- var e = Math.round(t / Tk * 1e8) / 1e8;
- return e % 2 * Tk;
- }
- function D5(t, e) {
- var n = nM(t[0]);
- n < 0 && (n += Ac);
- var r = n - t[0], i = t[1];
- i += r, !e && i - n >= Ac ? i = n + Ac : e && n - i >= Ac ? i = n - Ac : !e && n > i ? i = n + (Ac - nM(n - i)) : e && n < i && (i = n - (Ac - nM(i - n))), t[0] = n, t[1] = i;
- }
- var jl = function() {
- function t(e) {
- this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []);
- }
- return t.prototype.increaseVersion = function() {
- this._version++;
- }, t.prototype.getVersion = function() {
- return this._version;
- }, t.prototype.setScale = function(e, n, r) {
- r = r || 0, r > 0 && (this._ux = pu(r / $C / e) || 0, this._uy = pu(r / $C / n) || 0);
- }, t.prototype.setDPR = function(e) {
- this.dpr = e;
- }, t.prototype.setContext = function(e) {
- this._ctx = e;
- }, t.prototype.getContext = function() {
- return this._ctx;
- }, t.prototype.beginPath = function() {
- return this._ctx && this._ctx.beginPath(), this.reset(), this;
- }, t.prototype.reset = function() {
- this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
- }, t.prototype.moveTo = function(e, n) {
- return this._drawPendingPt(), this.addData(En.M, e, n), this._ctx && this._ctx.moveTo(e, n), this._x0 = e, this._y0 = n, this._xi = e, this._yi = n, this;
- }, t.prototype.lineTo = function(e, n) {
- var r = pu(e - this._xi), i = pu(n - this._yi), a = r > this._ux || i > this._uy;
- if (this.addData(En.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
- this._xi = e, this._yi = n, this._pendingPtDist = 0;
- else {
- var o = r * r + i * i;
- o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
- }
- return this;
- }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
- return this._drawPendingPt(), this.addData(En.C, e, n, r, i, a, o), this._ctx && this._ctx.bezierCurveTo(e, n, r, i, a, o), this._xi = a, this._yi = o, this;
- }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
- return this._drawPendingPt(), this.addData(En.Q, e, n, r, i), this._ctx && this._ctx.quadraticCurveTo(e, n, r, i), this._xi = r, this._yi = i, this;
- }, t.prototype.arc = function(e, n, r, i, a, o) {
- this._drawPendingPt(), A0[0] = i, A0[1] = a, D5(A0, o), i = A0[0], a = A0[1];
- var s = a - i;
- return this.addData(En.A, e, n, r, r, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, n, r, i, a, o), this._xi = yd(a) * r + e, this._yi = bd(a) * r + n, this;
- }, t.prototype.arcTo = function(e, n, r, i, a) {
- return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
- }, t.prototype.rect = function(e, n, r, i) {
- return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(En.R, e, n, r, i), this;
- }, t.prototype.closePath = function() {
- this._drawPendingPt(), this.addData(En.Z);
- var e = this._ctx, n = this._x0, r = this._y0;
- return e && e.closePath(), this._xi = n, this._yi = r, this;
- }, t.prototype.fill = function(e) {
- e && e.fill(), this.toStatic();
- }, t.prototype.stroke = function(e) {
- e && e.stroke(), this.toStatic();
- }, t.prototype.len = function() {
- return this._len;
- }, t.prototype.setData = function(e) {
- var n = e.length;
- !(this.data && this.data.length === n) && tM && (this.data = new Float32Array(n));
- for (var r = 0; r < n; r++)
- this.data[r] = e[r];
- this._len = n;
- }, t.prototype.appendPath = function(e) {
- e instanceof Array || (e = [e]);
- for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
- r += e[a].len();
- tM && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
- for (var a = 0; a < n; a++)
- for (var o = e[a].data, s = 0; s < o.length; s++)
- this.data[i++] = o[s];
- this._len = i;
- }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
- if (this._saveData) {
- var c = this.data;
- this._len + arguments.length > c.length && (this._expandData(), c = this.data);
- for (var f = 0; f < arguments.length; f++)
- c[this._len++] = arguments[f];
- }
- }, t.prototype._drawPendingPt = function() {
- this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
- }, t.prototype._expandData = function() {
- if (!(this.data instanceof Array)) {
- for (var e = [], n = 0; n < this._len; n++)
- e[n] = this.data[n];
- this.data = e;
- }
- }, t.prototype.toStatic = function() {
- if (this._saveData) {
- this._drawPendingPt();
- var e = this.data;
- e instanceof Array && (e.length = this._len, tM && this._len > 11 && (this.data = new Float32Array(e)));
- }
- }, t.prototype.getBoundingRect = function() {
- sl[0] = sl[1] = ll[0] = ll[1] = Number.MAX_VALUE, bc[0] = bc[1] = ul[0] = ul[1] = -Number.MAX_VALUE;
- var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
- for (o = 0; o < this._len; ) {
- var s = e[o++], l = o === 1;
- switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
- case En.M:
- n = i = e[o++], r = a = e[o++], ll[0] = i, ll[1] = a, ul[0] = i, ul[1] = a;
- break;
- case En.L:
- YH(n, r, e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
- break;
- case En.C:
- Bje(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
- break;
- case En.Q:
- zje(n, r, e[o++], e[o++], e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
- break;
- case En.A:
- var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
- o += 1;
- var v = !e[o++];
- l && (i = yd(h) * f + u, a = bd(h) * d + c), Vje(u, c, f, d, h, p, v, ll, ul), n = yd(p) * f + u, r = bd(p) * d + c;
- break;
- case En.R:
- i = n = e[o++], a = r = e[o++];
- var g = e[o++], m = e[o++];
- YH(i, a, i + g, a + m, ll, ul);
- break;
- case En.Z:
- n = i, r = a;
- break;
- }
- Cu(sl, sl, ll), Tu(bc, bc, ul);
- }
- return o === 0 && (sl[0] = sl[1] = bc[0] = bc[1] = 0), new bt(sl[0], sl[1], bc[0] - sl[0], bc[1] - sl[1]);
- }, t.prototype._calculateLength = function() {
- var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
- this._pathSegLen || (this._pathSegLen = []);
- for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
- var h = e[d++], p = d === 1;
- p && (a = e[d], o = e[d + 1], s = a, l = o);
- var v = -1;
- switch (h) {
- case En.M:
- a = s = e[d++], o = l = e[d++];
- break;
- case En.L: {
- var g = e[d++], m = e[d++], y = g - a, _ = m - o;
- (pu(y) > r || pu(_) > i || d === n - 1) && (v = Math.sqrt(y * y + _ * _), a = g, o = m);
- break;
- }
- case En.C: {
- var O = e[d++], S = e[d++], g = e[d++], m = e[d++], x = e[d++], C = e[d++];
- v = KHe(a, o, O, S, g, m, x, C, 10), a = x, o = C;
- break;
- }
- case En.Q: {
- var O = e[d++], S = e[d++], g = e[d++], m = e[d++];
- v = eGe(a, o, O, S, g, m, 10), a = g, o = m;
- break;
- }
- case En.A:
- var P = e[d++], $ = e[d++], T = e[d++], E = e[d++], M = e[d++], R = e[d++], N = R + M;
- d += 1, p && (s = yd(M) * T + P, l = bd(M) * E + $), v = eM(T, E) * JE(Ac, Math.abs(R)), a = yd(N) * T + P, o = bd(N) * E + $;
- break;
- case En.R: {
- s = a = e[d++], l = o = e[d++];
- var I = e[d++], B = e[d++];
- v = I * 2 + B * 2;
- break;
- }
- case En.Z: {
- var y = s - a, _ = l - o;
- v = Math.sqrt(y * y + _ * _), a = s, o = l;
- break;
- }
- }
- v >= 0 && (u[f++] = v, c += v);
- }
- return this._pathLen = c, c;
- }, t.prototype.rebuildPath = function(e, n) {
- var r = this.data, i = this._ux, a = this._uy, o = this._len, s, l, u, c, f, d, h = n < 1, p, v, g = 0, m = 0, y, _ = 0, O, S;
- if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
- e: for (var x = 0; x < o; ) {
- var C = r[x++], P = x === 1;
- switch (P && (u = r[x], c = r[x + 1], s = u, l = c), C !== En.L && _ > 0 && (e.lineTo(O, S), _ = 0), C) {
- case En.M:
- s = u = r[x++], l = c = r[x++], e.moveTo(u, c);
- break;
- case En.L: {
- f = r[x++], d = r[x++];
- var $ = pu(f - u), T = pu(d - c);
- if ($ > i || T > a) {
- if (h) {
- var E = p[m++];
- if (g + E > y) {
- var M = (y - g) / E;
- e.lineTo(u * (1 - M) + f * M, c * (1 - M) + d * M);
- break e;
- }
- g += E;
- }
- e.lineTo(f, d), u = f, c = d, _ = 0;
- } else {
- var R = $ * $ + T * T;
- R > _ && (O = f, S = d, _ = R);
- }
- break;
- }
- case En.C: {
- var N = r[x++], I = r[x++], B = r[x++], Q = r[x++], W = r[x++], H = r[x++];
- if (h) {
- var E = p[m++];
- if (g + E > y) {
- var M = (y - g) / E;
- yf(u, N, B, W, M, gd), yf(c, I, Q, H, M, md), e.bezierCurveTo(gd[1], md[1], gd[2], md[2], gd[3], md[3]);
- break e;
- }
- g += E;
- }
- e.bezierCurveTo(N, I, B, Q, W, H), u = W, c = H;
- break;
- }
- case En.Q: {
- var N = r[x++], I = r[x++], B = r[x++], Q = r[x++];
- if (h) {
- var E = p[m++];
- if (g + E > y) {
- var M = (y - g) / E;
- Qb(u, N, B, M, gd), Qb(c, I, Q, M, md), e.quadraticCurveTo(gd[1], md[1], gd[2], md[2]);
- break e;
- }
- g += E;
- }
- e.quadraticCurveTo(N, I, B, Q), u = B, c = Q;
- break;
- }
- case En.A:
- var U = r[x++], j = r[x++], Y = r[x++], ne = r[x++], fe = r[x++], ue = r[x++], ye = r[x++], se = !r[x++], he = Y > ne ? Y : ne, re = pu(Y - ne) > 1e-3, q = fe + ue, K = !1;
- if (h) {
- var E = p[m++];
- g + E > y && (q = fe + ue * (y - g) / E, K = !0), g += E;
- }
- if (re && e.ellipse ? e.ellipse(U, j, Y, ne, ye, fe, q, se) : e.arc(U, j, he, fe, q, se), K)
- break e;
- P && (s = yd(fe) * Y + U, l = bd(fe) * ne + j), u = yd(q) * Y + U, c = bd(q) * ne + j;
- break;
- case En.R:
- s = u = r[x], l = c = r[x + 1], f = r[x++], d = r[x++];
- var de = r[x++], xe = r[x++];
- if (h) {
- var E = p[m++];
- if (g + E > y) {
- var we = y - g;
- e.moveTo(f, d), e.lineTo(f + JE(we, de), d), we -= de, we > 0 && e.lineTo(f + de, d + JE(we, xe)), we -= xe, we > 0 && e.lineTo(f + eM(de - we, 0), d + xe), we -= de, we > 0 && e.lineTo(f, d + eM(xe - we, 0));
- break e;
- }
- g += E;
- }
- e.rect(f, d, de, xe);
- break;
- case En.Z:
- if (h) {
- var E = p[m++];
- if (g + E > y) {
- var M = (y - g) / E;
- e.lineTo(u * (1 - M) + s * M, c * (1 - M) + l * M);
- break e;
- }
- g += E;
- }
- e.closePath(), u = s, c = l;
- }
- }
- }, t.prototype.clone = function() {
- var e = new t(), n = this.data;
- return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
- }, t.CMD = En, t.initDefaultProps = function() {
- var e = t.prototype;
- e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
- }(), t;
- }();
- function Mc(t, e, n, r, i, a, o) {
- if (i === 0)
- return !1;
- var s = i, l = 0, u = t;
- if (o > e + s && o > r + s || o < e - s && o < r - s || a > t + s && a > n + s || a < t - s && a < n - s)
- return !1;
- if (t !== n)
- l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
- else
- return Math.abs(a - t) <= s / 2;
- var c = l * a - o + u, f = c * c / (l * l + 1);
- return f <= s / 2 * s / 2;
- }
- function Fje(t, e, n, r, i, a, o, s, l, u, c) {
- if (l === 0)
- return !1;
- var f = l;
- if (c > e + f && c > r + f && c > a + f && c > s + f || c < e - f && c < r - f && c < a - f && c < s - f || u > t + f && u > n + f && u > i + f && u > o + f || u < t - f && u < n - f && u < i - f && u < o - f)
- return !1;
- var d = cse(t, e, n, r, i, a, o, s, u, c, null);
- return d <= f / 2;
- }
- function Zse(t, e, n, r, i, a, o, s, l) {
- if (o === 0)
- return !1;
- var u = o;
- if (l > e + u && l > r + u && l > a + u || l < e - u && l < r - u && l < a - u || s > t + u && s > n + u && s > i + u || s < t - u && s < n - u && s < i - u)
- return !1;
- var c = dse(t, e, n, r, i, a, s, l, null);
- return c <= u / 2;
- }
- var JH = Math.PI * 2;
- function oo(t) {
- return t %= JH, t < 0 && (t += JH), t;
- }
- var E0 = Math.PI * 2;
- function Wje(t, e, n, r, i, a, o, s, l) {
- if (o === 0)
- return !1;
- var u = o;
- s -= t, l -= e;
- var c = Math.sqrt(s * s + l * l);
- if (c - u > n || c + u < n)
- return !1;
- if (Math.abs(r - i) % E0 < 1e-4)
- return !0;
- if (a) {
- var f = r;
- r = oo(i), i = oo(f);
- } else
- r = oo(r), i = oo(i);
- r > i && (i += E0);
- var d = Math.atan2(l, s);
- return d < 0 && (d += E0), d >= r && d <= i || d + E0 >= r && d + E0 <= i;
- }
- function bu(t, e, n, r, i, a) {
- if (a > e && a > r || a < e && a < r || r === e)
- return 0;
- var o = (a - e) / (r - e), s = r < e ? 1 : -1;
- (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
- var l = o * (n - t) + t;
- return l === i ? 1 / 0 : l > i ? s : 0;
- }
- var _c = jl.CMD, _d = Math.PI * 2, Qje = 1e-4;
- function Hje(t, e) {
- return Math.abs(t - e) < Qje;
- }
- var Ki = [-1, -1, -1], zo = [-1, -1];
- function Gje() {
- var t = zo[0];
- zo[0] = zo[1], zo[1] = t;
- }
- function jje(t, e, n, r, i, a, o, s, l, u) {
- if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
- return 0;
- var c = wC(e, r, a, s, u, Ki);
- if (c === 0)
- return 0;
- for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
- var g = Ki[v], m = g === 0 || g === 1 ? 0.5 : 1, y = jr(t, n, i, o, g);
- y < l || (d < 0 && (d = use(e, r, a, s, zo), zo[1] < zo[0] && d > 1 && Gje(), h = jr(e, r, a, s, zo[0]), d > 1 && (p = jr(e, r, a, s, zo[1]))), d === 2 ? g < zo[0] ? f += h < e ? m : -m : g < zo[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < zo[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
- }
- return f;
- }
- function Zje(t, e, n, r, i, a, o, s) {
- if (s > e && s > r && s > a || s < e && s < r && s < a)
- return 0;
- var l = JHe(e, r, a, s, Ki);
- if (l === 0)
- return 0;
- var u = fse(e, r, a);
- if (u >= 0 && u <= 1) {
- for (var c = 0, f = ii(e, r, a, u), d = 0; d < l; d++) {
- var h = Ki[d] === 0 || Ki[d] === 1 ? 0.5 : 1, p = ii(t, n, i, Ki[d]);
- p < o || (Ki[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
- }
- return c;
- } else {
- var h = Ki[0] === 0 || Ki[0] === 1 ? 0.5 : 1, p = ii(t, n, i, Ki[0]);
- return p < o ? 0 : a < e ? h : -h;
- }
- }
- function Uje(t, e, n, r, i, a, o, s) {
- if (s -= e, s > n || s < -n)
- return 0;
- var l = Math.sqrt(n * n - s * s);
- Ki[0] = -l, Ki[1] = l;
- var u = Math.abs(r - i);
- if (u < 1e-4)
- return 0;
- if (u >= _d - 1e-4) {
- r = 0, i = _d;
- var c = a ? 1 : -1;
- return o >= Ki[0] + t && o <= Ki[1] + t ? c : 0;
- }
- if (r > i) {
- var f = r;
- r = i, i = f;
- }
- r < 0 && (r += _d, i += _d);
- for (var d = 0, h = 0; h < 2; h++) {
- var p = Ki[h];
- if (p + t > o) {
- var v = Math.atan2(s, p), c = a ? 1 : -1;
- v < 0 && (v = _d + v), (v >= r && v <= i || v + _d >= r && v + _d <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), d += c);
- }
- }
- return d;
- }
- function Use(t, e, n, r, i) {
- for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
- var v = a[p++], g = p === 1;
- switch (v === _c.M && p > 1 && (n || (s += bu(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
- case _c.M:
- c = a[p++], f = a[p++], l = c, u = f;
- break;
- case _c.L:
- if (n) {
- if (Mc(l, u, a[p], a[p + 1], e, r, i))
- return !0;
- } else
- s += bu(l, u, a[p], a[p + 1], r, i) || 0;
- l = a[p++], u = a[p++];
- break;
- case _c.C:
- if (n) {
- if (Fje(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
- return !0;
- } else
- s += jje(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
- l = a[p++], u = a[p++];
- break;
- case _c.Q:
- if (n) {
- if (Zse(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
- return !0;
- } else
- s += Zje(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
- l = a[p++], u = a[p++];
- break;
- case _c.A:
- var m = a[p++], y = a[p++], _ = a[p++], O = a[p++], S = a[p++], x = a[p++];
- p += 1;
- var C = !!(1 - a[p++]);
- d = Math.cos(S) * _ + m, h = Math.sin(S) * O + y, g ? (c = d, f = h) : s += bu(l, u, d, h, r, i);
- var P = (r - m) * O / _ + m;
- if (n) {
- if (Wje(m, y, O, S, S + x, C, e, P, i))
- return !0;
- } else
- s += Uje(m, y, O, S, S + x, C, P, i);
- l = Math.cos(S + x) * _ + m, u = Math.sin(S + x) * O + y;
- break;
- case _c.R:
- c = l = a[p++], f = u = a[p++];
- var $ = a[p++], T = a[p++];
- if (d = c + $, h = f + T, n) {
- if (Mc(c, f, d, f, e, r, i) || Mc(d, f, d, h, e, r, i) || Mc(d, h, c, h, e, r, i) || Mc(c, h, c, f, e, r, i))
- return !0;
- } else
- s += bu(d, f, d, h, r, i), s += bu(c, h, c, f, r, i);
- break;
- case _c.Z:
- if (n) {
- if (Mc(l, u, c, f, e, r, i))
- return !0;
- } else
- s += bu(l, u, c, f, r, i);
- l = c, u = f;
- break;
- }
- }
- return !n && !Hje(u, f) && (s += bu(l, u, c, f, r, i) || 0), s !== 0;
- }
- function Xje(t, e, n) {
- return Use(t, 0, !1, e, n);
- }
- function Yje(t, e, n, r) {
- return Use(t, e, !0, n, r);
- }
- var MC = it({
- fill: "#000",
- stroke: null,
- strokePercent: 1,
- fillOpacity: 1,
- strokeOpacity: 1,
- lineDashOffset: 0,
- lineWidth: 1,
- lineCap: "butt",
- miterLimit: 10,
- strokeNoScale: !1,
- strokeFirst: !1
- }, wh), qje = {
- style: it({
- fill: !0,
- stroke: !0,
- strokePercent: !0,
- fillOpacity: !0,
- strokeOpacity: !0,
- lineDashOffset: !0,
- lineWidth: !0,
- miterLimit: !0
- }, mP.style)
- }, rM = Hl.concat([
- "invisible",
- "culling",
- "z",
- "z2",
- "zlevel",
- "parent"
- ]), Dt = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.update = function() {
- var n = this;
- t.prototype.update.call(this);
- var r = this.style;
- if (r.decal) {
- var i = this._decalEl = this._decalEl || new e();
- i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
- n.buildPath(l, n.shape);
- }), i.silent = !0;
- var a = i.style;
- for (var o in r)
- a[o] !== r[o] && (a[o] = r[o]);
- a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
- for (var s = 0; s < rM.length; ++s)
- i[rM[s]] = this[rM[s]];
- i.__dirty |= to;
- } else this._decalEl && (this._decalEl = null);
- }, e.prototype.getDecalElement = function() {
- return this._decalEl;
- }, e.prototype._init = function(n) {
- var r = kt(n);
- this.shape = this.getDefaultShape();
- var i = this.getDefaultStyle();
- i && this.useStyle(i);
- for (var a = 0; a < r.length; a++) {
- var o = r[a], s = n[o];
- o === "style" ? this.style ? _e(this.style, s) : this.useStyle(s) : o === "shape" ? _e(this.shape, s) : t.prototype.attrKV.call(this, o, s);
- }
- this.style || this.useStyle({});
- }, e.prototype.getDefaultStyle = function() {
- return null;
- }, e.prototype.getDefaultShape = function() {
- return {};
- }, e.prototype.canBeInsideText = function() {
- return this.hasFill();
- }, e.prototype.getInsideTextFill = function() {
- var n = this.style.fill;
- if (n !== "none") {
- if (Ve(n)) {
- var r = jb(n, 0);
- return r > 0.5 ? mk : r > 0.2 ? MGe : yk;
- } else if (n)
- return yk;
- }
- return mk;
- }, e.prototype.getInsideTextStroke = function(n) {
- var r = this.style.fill;
- if (Ve(r)) {
- var i = this.__zr, a = !!(i && i.isDarkMode()), o = jb(n, 0) < gk;
- if (a === o)
- return r;
- }
- }, e.prototype.buildPath = function(n, r, i) {
- }, e.prototype.pathUpdated = function() {
- this.__dirty &= ~_v;
- }, e.prototype.getUpdatedPathProxy = function(n) {
- return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
- }, e.prototype.createPathProxy = function() {
- this.path = new jl(!1);
- }, e.prototype.hasStroke = function() {
- var n = this.style, r = n.stroke;
- return !(r == null || r === "none" || !(n.lineWidth > 0));
- }, e.prototype.hasFill = function() {
- var n = this.style, r = n.fill;
- return r != null && r !== "none";
- }, e.prototype.getBoundingRect = function() {
- var n = this._rect, r = this.style, i = !n;
- if (i) {
- var a = !1;
- this.path || (a = !0, this.createPathProxy());
- var o = this.path;
- (a || this.__dirty & _v) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
- }
- if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
- var s = this._rectStroke || (this._rectStroke = n.clone());
- if (this.__dirty || i) {
- s.copy(n);
- var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
- if (!this.hasFill()) {
- var c = this.strokeContainThreshold;
- u = Math.max(u, c ?? 4);
- }
- l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
- }
- return s;
- }
- return n;
- }, e.prototype.contain = function(n, r) {
- var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
- if (n = i[0], r = i[1], a.contain(n, r)) {
- var s = this.path;
- if (this.hasStroke()) {
- var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
- if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), Yje(s, l / u, n, r)))
- return !0;
- }
- if (this.hasFill())
- return Xje(s, n, r);
- }
- return !1;
- }, e.prototype.dirtyShape = function() {
- this.__dirty |= _v, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
- }, e.prototype.dirty = function() {
- this.dirtyStyle(), this.dirtyShape();
- }, e.prototype.animateShape = function(n) {
- return this.animate("shape", n);
- }, e.prototype.updateDuringAnimation = function(n) {
- n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
- }, e.prototype.attrKV = function(n, r) {
- n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
- }, e.prototype.setShape = function(n, r) {
- var i = this.shape;
- return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : _e(i, n), this.dirtyShape(), this;
- }, e.prototype.shapeChanged = function() {
- return !!(this.__dirty & _v);
- }, e.prototype.createStyle = function(n) {
- return r1(MC, n);
- }, e.prototype._innerSaveToNormal = function(n) {
- t.prototype._innerSaveToNormal.call(this, n);
- var r = this._normalState;
- n.shape && !r.shape && (r.shape = _e({}, this.shape));
- }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
- t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
- var l = !(r && a), u;
- if (r && r.shape ? o ? a ? u = r.shape : (u = _e({}, i.shape), _e(u, r.shape)) : (u = _e({}, a ? this.shape : i.shape), _e(u, r.shape)) : l && (u = i.shape), u)
- if (o) {
- this.shape = _e({}, this.shape);
- for (var c = {}, f = kt(u), d = 0; d < f.length; d++) {
- var h = f[d];
- typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
- }
- this._transitionState(n, {
- shape: c
- }, s);
- } else
- this.shape = u, this.dirtyShape();
- }, e.prototype._mergeStates = function(n) {
- for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
- var o = n[a];
- o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
- }
- return i && (r.shape = i), r;
- }, e.prototype.getAnimationStyleProps = function() {
- return qje;
- }, e.prototype.isZeroArea = function() {
- return !1;
- }, e.extend = function(n) {
- var r = function(a) {
- le(o, a);
- function o(s) {
- var l = a.call(this, s) || this;
- return n.init && n.init.call(l, s), l;
- }
- return o.prototype.getDefaultStyle = function() {
- return ot(n.style);
- }, o.prototype.getDefaultShape = function() {
- return ot(n.shape);
- }, o;
- }(e);
- for (var i in n)
- typeof n[i] == "function" && (r.prototype[i] = n[i]);
- return r;
- }, e.initDefaultProps = function() {
- var n = e.prototype;
- n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = to | hy | _v;
- }(), e;
- }(ls), Kje = it({
- strokeFirst: !0,
- font: vf,
- x: 0,
- y: 0,
- textAlign: "left",
- textBaseline: "top",
- miterLimit: 2
- }, MC), Wg = function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.hasStroke = function() {
- var n = this.style, r = n.stroke;
- return r != null && r !== "none" && n.lineWidth > 0;
- }, e.prototype.hasFill = function() {
- var n = this.style, r = n.fill;
- return r != null && r !== "none";
- }, e.prototype.createStyle = function(n) {
- return r1(Kje, n);
- }, e.prototype.setBoundingRect = function(n) {
- this._rect = n;
- }, e.prototype.getBoundingRect = function() {
- var n = this.style;
- if (!this._rect) {
- var r = n.text;
- r != null ? r += "" : r = "";
- var i = o1(r, n.font, n.textAlign, n.textBaseline);
- if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
- var a = n.lineWidth;
- i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
- }
- this._rect = i;
- }
- return this._rect;
- }, e.initDefaultProps = function() {
- var n = e.prototype;
- n.dirtyRectTolerance = 10;
- }(), e;
- }(ls);
- Wg.prototype.type = "tspan";
- var Jje = it({
- x: 0,
- y: 0
- }, wh), eZe = {
- style: it({
- x: !0,
- y: !0,
- width: !0,
- height: !0,
- sx: !0,
- sy: !0,
- sWidth: !0,
- sHeight: !0
- }, mP.style)
- };
- function tZe(t) {
- return !!(t && typeof t != "string" && t.width && t.height);
- }
- var Xse = function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.createStyle = function(n) {
- return r1(Jje, n);
- }, e.prototype._getSize = function(n) {
- var r = this.style, i = r[n];
- if (i != null)
- return i;
- var a = tZe(r.image) ? r.image : this.__image;
- if (!a)
- return 0;
- var o = n === "width" ? "height" : "width", s = r[o];
- return s == null ? a[n] : a[n] / a[o] * s;
- }, e.prototype.getWidth = function() {
- return this._getSize("width");
- }, e.prototype.getHeight = function() {
- return this._getSize("height");
- }, e.prototype.getAnimationStyleProps = function() {
- return eZe;
- }, e.prototype.getBoundingRect = function() {
- var n = this.style;
- return this._rect || (this._rect = new bt(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
- }, e;
- }(ls);
- Xse.prototype.type = "image";
- const ci = Xse;
- function nZe(t, e) {
- var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
- i < 0 && (n = n + i, i = -i), a < 0 && (r = r + a, a = -a), typeof o == "number" ? s = l = u = c = o : o instanceof Array ? o.length === 1 ? s = l = u = c = o[0] : o.length === 2 ? (s = u = o[0], l = c = o[1]) : o.length === 3 ? (s = o[0], l = c = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], c = o[3]) : s = l = u = c = 0;
- var f;
- s + l > i && (f = s + l, s *= i / f, l *= i / f), u + c > i && (f = u + c, u *= i / f, c *= i / f), l + u > a && (f = l + u, l *= a / f, u *= a / f), s + c > a && (f = s + c, s *= a / f, c *= a / f), t.moveTo(n + s, r), t.lineTo(n + i - l, r), l !== 0 && t.arc(n + i - l, r + l, l, -Math.PI / 2, 0), t.lineTo(n + i, r + a - u), u !== 0 && t.arc(n + i - u, r + a - u, u, 0, Math.PI / 2), t.lineTo(n + c, r + a), c !== 0 && t.arc(n + c, r + a - c, c, Math.PI / 2, Math.PI), t.lineTo(n, r + s), s !== 0 && t.arc(n + s, r + s, s, Math.PI, Math.PI * 1.5);
- }
- var Dv = Math.round;
- function Yse(t, e, n) {
- if (e) {
- var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
- t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
- var s = n && n.lineWidth;
- return s && (Dv(r * 2) === Dv(i * 2) && (t.x1 = t.x2 = ih(r, s, !0)), Dv(a * 2) === Dv(o * 2) && (t.y1 = t.y2 = ih(a, s, !0))), t;
- }
- }
- function qse(t, e, n) {
- if (e) {
- var r = e.x, i = e.y, a = e.width, o = e.height;
- t.x = r, t.y = i, t.width = a, t.height = o;
- var s = n && n.lineWidth;
- return s && (t.x = ih(r, s, !0), t.y = ih(i, s, !0), t.width = Math.max(ih(r + a, s, !1) - t.x, a === 0 ? 0 : 1), t.height = Math.max(ih(i + o, s, !1) - t.y, o === 0 ? 0 : 1)), t;
- }
- }
- function ih(t, e, n) {
- if (!e)
- return t;
- var r = Dv(t * 2);
- return (r + Dv(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
- }
- var rZe = /* @__PURE__ */ function() {
- function t() {
- this.x = 0, this.y = 0, this.width = 0, this.height = 0;
- }
- return t;
- }(), iZe = {}, Kse = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new rZe();
- }, e.prototype.buildPath = function(n, r) {
- var i, a, o, s;
- if (this.subPixelOptimize) {
- var l = qse(iZe, r, this.style);
- i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
- } else
- i = r.x, a = r.y, o = r.width, s = r.height;
- r.r ? nZe(n, r) : n.rect(i, a, o, s);
- }, e.prototype.isZeroArea = function() {
- return !this.shape.width || !this.shape.height;
- }, e;
- }(Dt);
- Kse.prototype.type = "rect";
- const Zt = Kse;
- var eG = {
- fill: "#000"
- }, tG = 2, aZe = {
- style: it({
- fill: !0,
- stroke: !0,
- fillOpacity: !0,
- strokeOpacity: !0,
- lineWidth: !0,
- fontSize: !0,
- lineHeight: !0,
- width: !0,
- height: !0,
- textShadowColor: !0,
- textShadowBlur: !0,
- textShadowOffsetX: !0,
- textShadowOffsetY: !0,
- backgroundColor: !0,
- padding: !0,
- borderColor: !0,
- borderWidth: !0,
- borderRadius: !0
- }, mP.style)
- }, Jse = function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- return r.type = "text", r._children = [], r._defaultStyle = eG, r.attr(n), r;
- }
- return e.prototype.childrenRef = function() {
- return this._children;
- }, e.prototype.update = function() {
- t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
- for (var n = 0; n < this._children.length; n++) {
- var r = this._children[n];
- r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
- }
- }, e.prototype.updateTransform = function() {
- var n = this.innerTransformable;
- n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
- }, e.prototype.getLocalTransform = function(n) {
- var r = this.innerTransformable;
- return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
- }, e.prototype.getComputedTransform = function() {
- return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
- }, e.prototype._updateSubTexts = function() {
- this._childCursor = 0, lZe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
- }, e.prototype.addSelfToZr = function(n) {
- t.prototype.addSelfToZr.call(this, n);
- for (var r = 0; r < this._children.length; r++)
- this._children[r].__zr = n;
- }, e.prototype.removeSelfFromZr = function(n) {
- t.prototype.removeSelfFromZr.call(this, n);
- for (var r = 0; r < this._children.length; r++)
- this._children[r].__zr = null;
- }, e.prototype.getBoundingRect = function() {
- if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
- for (var n = new bt(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
- var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
- u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
- }
- this._rect = a || n;
- }
- return this._rect;
- }, e.prototype.setDefaultTextStyle = function(n) {
- this._defaultStyle = n || eG;
- }, e.prototype.setTextContent = function(n) {
- if (process.env.NODE_ENV !== "production")
- throw new Error("Can't attach text on another text");
- }, e.prototype._mergeStyle = function(n, r) {
- if (!r)
- return n;
- var i = r.rich, a = n.rich || i && {};
- return _e(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
- }, e.prototype._mergeRich = function(n, r) {
- for (var i = kt(r), a = 0; a < i.length; a++) {
- var o = i[a];
- n[o] = n[o] || {}, _e(n[o], r[o]);
- }
- }, e.prototype.getAnimationStyleProps = function() {
- return aZe;
- }, e.prototype._getOrCreateChild = function(n) {
- var r = this._children[this._childCursor];
- return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
- }, e.prototype._updatePlainTexts = function() {
- var n = this.style, r = n.font || vf, i = n.padding, a = lG(n), o = $je(a, n), s = iM(n), l = !!n.backgroundColor, u = o.outerHeight, c = o.outerWidth, f = o.contentWidth, d = o.lines, h = o.lineHeight, p = this._defaultStyle, v = n.x || 0, g = n.y || 0, m = n.align || p.align || "left", y = n.verticalAlign || p.verticalAlign || "top", _ = v, O = Ov(g, o.contentHeight, y);
- if (s || i) {
- var S = vy(v, c, m), x = Ov(g, u, y);
- s && this._renderBackground(n, n, S, x, c, u);
- }
- O += h / 2, i && (_ = sG(v, m, i), y === "top" ? O += i[0] : y === "bottom" && (O -= i[2]));
- for (var C = 0, P = !1, $ = oG("fill" in n ? n.fill : (P = !0, p.fill)), T = aG("stroke" in n ? n.stroke : !l && (!p.autoStroke || P) ? (C = tG, p.stroke) : null), E = n.textShadowBlur > 0, M = n.width != null && (n.overflow === "truncate" || n.overflow === "break" || n.overflow === "breakAll"), R = o.calculatedLineHeight, N = 0; N < d.length; N++) {
- var I = this._getOrCreateChild(Wg), B = I.createStyle();
- I.useStyle(B), B.text = d[N], B.x = _, B.y = O, m && (B.textAlign = m), B.textBaseline = "middle", B.opacity = n.opacity, B.strokeFirst = !0, E && (B.shadowBlur = n.textShadowBlur || 0, B.shadowColor = n.textShadowColor || "transparent", B.shadowOffsetX = n.textShadowOffsetX || 0, B.shadowOffsetY = n.textShadowOffsetY || 0), B.stroke = T, B.fill = $, T && (B.lineWidth = n.lineWidth || C, B.lineDash = n.lineDash, B.lineDashOffset = n.lineDashOffset || 0), B.font = r, rG(B, n), O += h, M && I.setBoundingRect(new bt(vy(B.x, n.width, B.textAlign), Ov(B.y, R, B.textBaseline), f, R));
- }
- }, e.prototype._updateRichTexts = function() {
- var n = this.style, r = lG(n), i = Mje(r, n), a = i.width, o = i.outerWidth, s = i.outerHeight, l = n.padding, u = n.x || 0, c = n.y || 0, f = this._defaultStyle, d = n.align || f.align, h = n.verticalAlign || f.verticalAlign, p = vy(u, o, d), v = Ov(c, s, h), g = p, m = v;
- l && (g += l[3], m += l[0]);
- var y = g + a;
- iM(n) && this._renderBackground(n, n, p, v, o, s);
- for (var _ = !!n.backgroundColor, O = 0; O < i.lines.length; O++) {
- for (var S = i.lines[O], x = S.tokens, C = x.length, P = S.lineHeight, $ = S.width, T = 0, E = g, M = y, R = C - 1, N = void 0; T < C && (N = x[T], !N.align || N.align === "left"); )
- this._placeToken(N, n, P, m, E, "left", _), $ -= N.width, E += N.width, T++;
- for (; R >= 0 && (N = x[R], N.align === "right"); )
- this._placeToken(N, n, P, m, M, "right", _), $ -= N.width, M -= N.width, R--;
- for (E += (a - (E - g) - (y - M) - $) / 2; T <= R; )
- N = x[T], this._placeToken(N, n, P, m, E + N.width / 2, "center", _), E += N.width, T++;
- m += P;
- }
- }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
- var u = r.rich[n.styleName] || {};
- u.text = n.text;
- var c = n.verticalAlign, f = a + i / 2;
- c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
- var d = !n.isLineHolder && iM(u);
- d && this._renderBackground(u, r, s === "right" ? o - n.width : s === "center" ? o - n.width / 2 : o, f - n.height / 2, n.width, n.height);
- var h = !!u.backgroundColor, p = n.textPadding;
- p && (o = sG(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
- var v = this._getOrCreateChild(Wg), g = v.createStyle();
- v.useStyle(g);
- var m = this._defaultStyle, y = !1, _ = 0, O = oG("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), S = aG("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (_ = tG, m.stroke) : null), x = u.textShadowBlur > 0 || r.textShadowBlur > 0;
- g.text = n.text, g.x = o, g.y = f, x && (g.shadowBlur = u.textShadowBlur || r.textShadowBlur || 0, g.shadowColor = u.textShadowColor || r.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || r.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || r.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = n.font || vf, g.opacity = co(u.opacity, r.opacity, 1), rG(g, u), S && (g.lineWidth = co(u.lineWidth, r.lineWidth, _), g.lineDash = dt(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = S), O && (g.fill = O);
- var C = n.contentWidth, P = n.contentHeight;
- v.setBoundingRect(new bt(vy(g.x, C, g.textAlign), Ov(g.y, P, g.textBaseline), C, P));
- }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
- var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
- if (d || n.lineHeight || u && c) {
- v = this._getOrCreateChild(Zt), v.useStyle(v.createStyle()), v.style.fill = null;
- var m = v.shape;
- m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
- }
- if (d) {
- var y = v.style;
- y.fill = l || null, y.fillOpacity = dt(n.fillOpacity, 1);
- } else if (f) {
- g = this._getOrCreateChild(ci), g.onload = function() {
- p.dirtyStyle();
- };
- var _ = g.style;
- _.image = l.image, _.x = i, _.y = a, _.width = o, _.height = s;
- }
- if (u && c) {
- var y = v.style;
- y.lineWidth = u, y.stroke = c, y.strokeOpacity = dt(n.strokeOpacity, 1), y.lineDash = n.borderDash, y.lineDashOffset = n.borderDashOffset || 0, v.strokeContainThreshold = 0, v.hasFill() && v.hasStroke() && (y.strokeFirst = !0, y.lineWidth *= 2);
- }
- var O = (v || g).style;
- O.shadowBlur = n.shadowBlur || 0, O.shadowColor = n.shadowColor || "transparent", O.shadowOffsetX = n.shadowOffsetX || 0, O.shadowOffsetY = n.shadowOffsetY || 0, O.opacity = co(n.opacity, r.opacity, 1);
- }, e.makeFont = function(n) {
- var r = "";
- return tle(n) && (r = [
- n.fontStyle,
- n.fontWeight,
- ele(n.fontSize),
- n.fontFamily || "sans-serif"
- ].join(" ")), r && Zo(r) || n.textFont || n.font;
- }, e;
- }(ls), oZe = { left: !0, right: 1, center: 1 }, sZe = { top: 1, bottom: 1, middle: 1 }, nG = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
- function ele(t) {
- return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? h5 + "px" : t + "px";
- }
- function rG(t, e) {
- for (var n = 0; n < nG.length; n++) {
- var r = nG[n], i = e[r];
- i != null && (t[r] = i);
- }
- }
- function tle(t) {
- return t.fontSize != null || t.fontFamily || t.fontWeight;
- }
- function lZe(t) {
- return iG(t), F(t.rich, iG), t;
- }
- function iG(t) {
- if (t) {
- t.font = Jse.makeFont(t);
- var e = t.align;
- e === "middle" && (e = "center"), t.align = e == null || oZe[e] ? e : "left";
- var n = t.verticalAlign;
- n === "center" && (n = "middle"), t.verticalAlign = n == null || sZe[n] ? n : "top";
- var r = t.padding;
- r && (t.padding = sP(t.padding));
- }
- }
- function aG(t, e) {
- return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
- }
- function oG(t) {
- return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
- }
- function sG(t, e, n) {
- return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
- }
- function lG(t) {
- var e = t.text;
- return e != null && (e += ""), e;
- }
- function iM(t) {
- return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
- }
- const jt = Jse;
- var ft = Ut(), Pk = function(t, e, n, r) {
- if (r) {
- var i = ft(r);
- i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
- var o = ft(a);
- o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
- });
- }
- }, uG = 1, cG = {}, nle = Ut(), R5 = Ut(), k5 = 0, u1 = 1, bP = 2, da = ["emphasis", "blur", "select"], Ub = ["normal", "emphasis", "blur", "select"], bm = 10, uZe = 9, Ch = "highlight", cw = "downplay", nb = "select", fw = "unselect", rb = "toggleSelect";
- function Yp(t) {
- return t != null && t !== "none";
- }
- function _P(t, e, n) {
- t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
- }
- function rle(t) {
- _P(t, "emphasis", bP);
- }
- function ile(t) {
- t.hoverState === bP && _P(t, "normal", k5);
- }
- function L5(t) {
- _P(t, "blur", u1);
- }
- function ale(t) {
- t.hoverState === u1 && _P(t, "normal", k5);
- }
- function cZe(t) {
- t.selected = !0;
- }
- function fZe(t) {
- t.selected = !1;
- }
- function fG(t, e, n) {
- e(t, n);
- }
- function rc(t, e, n) {
- fG(t, e, n), t.isGroup && t.traverse(function(r) {
- fG(r, e, n);
- });
- }
- function IC(t, e) {
- switch (e) {
- case "emphasis":
- t.hoverState = bP;
- break;
- case "normal":
- t.hoverState = k5;
- break;
- case "blur":
- t.hoverState = u1;
- break;
- case "select":
- t.selected = !0;
- }
- }
- function dZe(t, e, n, r) {
- for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
- var s = e[o], l = i[s];
- a[s] = l ?? (r && r[s]);
- }
- for (var o = 0; o < t.animators.length; o++) {
- var u = t.animators[o];
- u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
- }
- return a;
- }
- function hZe(t, e, n, r) {
- var i = n && St(n, "select") >= 0, a = !1;
- if (t instanceof Dt) {
- var o = nle(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
- if (Yp(s) || Yp(l)) {
- r = r || {};
- var u = r.style || {};
- u.fill === "inherit" ? (a = !0, r = _e({}, r), u = _e({}, u), u.fill = s) : !Yp(u.fill) && Yp(s) ? (a = !0, r = _e({}, r), u = _e({}, u), u.fill = TC(s)) : !Yp(u.stroke) && Yp(l) && (a || (r = _e({}, r), u = _e({}, u)), u.stroke = TC(l)), r.style = u;
- }
- }
- if (r && r.z2 == null) {
- a || (r = _e({}, r));
- var c = t.z2EmphasisLift;
- r.z2 = t.z2 + (c ?? bm);
- }
- return r;
- }
- function pZe(t, e, n) {
- if (n && n.z2 == null) {
- n = _e({}, n);
- var r = t.z2SelectLift;
- n.z2 = t.z2 + (r ?? uZe);
- }
- return n;
- }
- function vZe(t, e, n) {
- var r = St(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : dZe(t, ["opacity"], e, {
- opacity: 1
- });
- n = n || {};
- var o = n.style || {};
- return o.opacity == null && (n = _e({}, n), o = _e({
- // Already being applied 'emphasis'. DON'T mul opacity multiple times.
- opacity: r ? i : a.opacity * 0.1
- }, o), n.style = o), n;
- }
- function aM(t, e) {
- var n = this.states[t];
- if (this.style) {
- if (t === "emphasis")
- return hZe(this, t, e, n);
- if (t === "blur")
- return vZe(this, t, n);
- if (t === "select")
- return pZe(this, t, n);
- }
- return n;
- }
- function Zh(t) {
- t.stateProxy = aM;
- var e = t.getTextContent(), n = t.getTextGuideLine();
- e && (e.stateProxy = aM), n && (n.stateProxy = aM);
- }
- function dG(t, e) {
- !ule(t, e) && !t.__highByOuter && rc(t, rle);
- }
- function hG(t, e) {
- !ule(t, e) && !t.__highByOuter && rc(t, ile);
- }
- function Fu(t, e) {
- t.__highByOuter |= 1 << (e || 0), rc(t, rle);
- }
- function Wu(t, e) {
- !(t.__highByOuter &= ~(1 << (e || 0))) && rc(t, ile);
- }
- function ole(t) {
- rc(t, L5);
- }
- function N5(t) {
- rc(t, ale);
- }
- function sle(t) {
- rc(t, cZe);
- }
- function lle(t) {
- rc(t, fZe);
- }
- function ule(t, e) {
- return t.__highDownSilentOnTouch && e.zrByTouch;
- }
- function cle(t) {
- var e = t.getModel(), n = [], r = [];
- e.eachComponent(function(i, a) {
- var o = R5(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
- !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
- ale(u);
- }), s && n.push(a)), o.isBlured = !1;
- }), F(r, function(i) {
- i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
- });
- }
- function $k(t, e, n, r) {
- var i = r.getModel();
- n = n || "coordinateSystem";
- function a(u, c) {
- for (var f = 0; f < c.length; f++) {
- var d = u.getItemGraphicEl(c[f]);
- d && N5(d);
- }
- }
- if (t != null && !(!e || e === "none")) {
- var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
- s && s.master && (s = s.master);
- var l = [];
- i.eachSeries(function(u) {
- var c = o === u, f = u.coordinateSystem;
- f && f.master && (f = f.master);
- var d = f && s ? f === s : c;
- if (!// Not blur other series if blurScope series
- (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
- var h = r.getViewOfSeriesModel(u);
- if (h.group.traverse(function(g) {
- g.__highByOuter && c && e === "self" || L5(g);
- }), Pi(e))
- a(u.getData(), e);
- else if (nt(e))
- for (var p = kt(e), v = 0; v < p.length; v++)
- a(u.getData(p[v]), e[p[v]]);
- l.push(u), R5(u).isBlured = !0;
- }
- }), i.eachComponent(function(u, c) {
- if (u !== "series") {
- var f = r.getViewOfComponentModel(c);
- f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
- }
- });
- }
- }
- function Ak(t, e, n) {
- if (!(t == null || e == null)) {
- var r = n.getModel().getComponent(t, e);
- if (r) {
- R5(r).isBlured = !0;
- var i = n.getViewOfComponentModel(r);
- !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
- L5(a);
- });
- }
- }
- }
- function gZe(t, e, n) {
- var r = t.seriesIndex, i = t.getData(e.dataType);
- if (!i) {
- process.env.NODE_ENV !== "production" && $i("Unknown dataType " + e.dataType);
- return;
- }
- var a = Gh(i, e);
- a = (Se(a) ? a[0] : a) || 0;
- var o = i.getItemGraphicEl(a);
- if (!o)
- for (var s = i.count(), l = 0; !o && l < s; )
- o = i.getItemGraphicEl(l++);
- if (o) {
- var u = ft(o);
- $k(r, u.focus, u.blurScope, n);
- } else {
- var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
- c != null && $k(r, c, f, n);
- }
- }
- function B5(t, e, n, r) {
- var i = {
- focusSelf: !1,
- dispatchers: null
- };
- if (t == null || t === "series" || e == null || n == null)
- return i;
- var a = r.getModel().getComponent(t, e);
- if (!a)
- return i;
- var o = r.getViewOfComponentModel(a);
- if (!o || !o.findHighDownDispatchers)
- return i;
- for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
- if (process.env.NODE_ENV !== "production" && !bf(s[u]) && $i("param should be highDownDispatcher"), ft(s[u]).focus === "self") {
- l = !0;
- break;
- }
- return {
- focusSelf: l,
- dispatchers: s
- };
- }
- function mZe(t, e, n) {
- process.env.NODE_ENV !== "production" && !bf(t) && $i("param should be highDownDispatcher");
- var r = ft(t), i = B5(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
- a ? (o && Ak(r.componentMainType, r.componentIndex, n), F(a, function(s) {
- return dG(s, e);
- })) : ($k(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && Ak(r.componentMainType, r.componentIndex, n), dG(t, e));
- }
- function yZe(t, e, n) {
- process.env.NODE_ENV !== "production" && !bf(t) && $i("param should be highDownDispatcher"), cle(n);
- var r = ft(t), i = B5(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
- i ? F(i, function(a) {
- return hG(a, e);
- }) : hG(t, e);
- }
- function bZe(t, e, n) {
- if (Mk(e)) {
- var r = e.dataType, i = t.getData(r), a = Gh(i, e);
- Se(a) || (a = [a]), t[e.type === rb ? "toggleSelect" : e.type === nb ? "select" : "unselect"](a, r);
- }
- }
- function pG(t) {
- var e = t.getAllData();
- F(e, function(n) {
- var r = n.data, i = n.type;
- r.eachItemGraphicEl(function(a, o) {
- t.isSelected(o, i) ? sle(a) : lle(a);
- });
- });
- }
- function _Ze(t) {
- var e = [];
- return t.eachSeries(function(n) {
- var r = n.getAllData();
- F(r, function(i) {
- i.data;
- var a = i.type, o = n.getSelectedDataIndices();
- if (o.length > 0) {
- var s = {
- dataIndex: o,
- seriesIndex: n.seriesIndex
- };
- a != null && (s.dataType = a), e.push(s);
- }
- });
- }), e;
- }
- function af(t, e, n) {
- ah(t, !0), rc(t, Zh), Ek(t, e, n);
- }
- function OZe(t) {
- ah(t, !1);
- }
- function ur(t, e, n, r) {
- r ? OZe(t) : af(t, e, n);
- }
- function Ek(t, e, n) {
- var r = ft(t);
- e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
- }
- var vG = ["emphasis", "blur", "select"], SZe = {
- itemStyle: "getItemStyle",
- lineStyle: "getLineStyle",
- areaStyle: "getAreaStyle"
- };
- function Ai(t, e, n, r) {
- n = n || "itemStyle";
- for (var i = 0; i < vG.length; i++) {
- var a = vG[i], o = e.getModel([a, n]), s = t.ensureState(a);
- s.style = r ? r(o) : o[SZe[n]]();
- }
- }
- function ah(t, e) {
- var n = e === !1, r = t;
- t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
- }
- function bf(t) {
- return !!(t && t.__highDownDispatcher);
- }
- function xZe(t, e, n) {
- var r = ft(t);
- r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
- }
- function wZe(t) {
- var e = cG[t];
- return e == null && uG <= 32 && (e = cG[t] = uG++), e;
- }
- function Mk(t) {
- var e = t.type;
- return e === nb || e === fw || e === rb;
- }
- function gG(t) {
- var e = t.type;
- return e === Ch || e === cw;
- }
- function CZe(t) {
- var e = nle(t);
- e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
- var n = t.states.select || {};
- e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
- }
- var qp = jl.CMD, TZe = [[], [], []], mG = Math.sqrt, PZe = Math.atan2;
- function fle(t, e) {
- if (e) {
- var n = t.data, r = t.len(), i, a, o, s, l, u, c = qp.M, f = qp.C, d = qp.L, h = qp.R, p = qp.A, v = qp.Q;
- for (o = 0, s = 0; o < r; ) {
- switch (i = n[o++], s = o, a = 0, i) {
- case c:
- a = 1;
- break;
- case d:
- a = 1;
- break;
- case f:
- a = 3;
- break;
- case v:
- a = 2;
- break;
- case p:
- var g = e[4], m = e[5], y = mG(e[0] * e[0] + e[1] * e[1]), _ = mG(e[2] * e[2] + e[3] * e[3]), O = PZe(-e[1] / _, e[0] / y);
- n[o] *= y, n[o++] += g, n[o] *= _, n[o++] += m, n[o++] *= y, n[o++] *= _, n[o++] += O, n[o++] += O, o += 2, s = o;
- break;
- case h:
- u[0] = n[o++], u[1] = n[o++], oi(u, u, e), n[s++] = u[0], n[s++] = u[1], u[0] += n[o++], u[1] += n[o++], oi(u, u, e), n[s++] = u[0], n[s++] = u[1];
- }
- for (l = 0; l < a; l++) {
- var S = TZe[l];
- S[0] = n[o++], S[1] = n[o++], oi(S, S, e), n[s++] = S[0], n[s++] = S[1];
- }
- }
- t.increaseVersion();
- }
- }
- var oM = Math.sqrt, vS = Math.sin, gS = Math.cos, M0 = Math.PI;
- function yG(t) {
- return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
- }
- function Ik(t, e) {
- return (t[0] * e[0] + t[1] * e[1]) / (yG(t) * yG(e));
- }
- function bG(t, e) {
- return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(Ik(t, e));
- }
- function _G(t, e, n, r, i, a, o, s, l, u, c) {
- var f = l * (M0 / 180), d = gS(f) * (t - n) / 2 + vS(f) * (e - r) / 2, h = -1 * vS(f) * (t - n) / 2 + gS(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
- p > 1 && (o *= oM(p), s *= oM(p));
- var v = (i === a ? -1 : 1) * oM((o * o * (s * s) - o * o * (h * h) - s * s * (d * d)) / (o * o * (h * h) + s * s * (d * d))) || 0, g = v * o * h / s, m = v * -s * d / o, y = (t + n) / 2 + gS(f) * g - vS(f) * m, _ = (e + r) / 2 + vS(f) * g + gS(f) * m, O = bG([1, 0], [(d - g) / o, (h - m) / s]), S = [(d - g) / o, (h - m) / s], x = [(-1 * d - g) / o, (-1 * h - m) / s], C = bG(S, x);
- if (Ik(S, x) <= -1 && (C = M0), Ik(S, x) >= 1 && (C = 0), C < 0) {
- var P = Math.round(C / M0 * 1e6) / 1e6;
- C = M0 * 2 + P % 2 * M0;
- }
- c.addData(u, y, _, o, s, O, C, f, a);
- }
- var $Ze = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, AZe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
- function EZe(t) {
- var e = new jl();
- if (!t)
- return e;
- var n = 0, r = 0, i = n, a = r, o, s = jl.CMD, l = t.match($Ze);
- if (!l)
- return e;
- for (var u = 0; u < l.length; u++) {
- for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(AZe) || [], p = h.length, v = 0; v < p; v++)
- h[v] = parseFloat(h[v]);
- for (var g = 0; g < p; ) {
- var m = void 0, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, P = n, $ = r, T = void 0, E = void 0;
- switch (f) {
- case "l":
- n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "L":
- n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "m":
- n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
- break;
- case "M":
- n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
- break;
- case "h":
- n += h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "H":
- n = h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "v":
- r += h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "V":
- r = h[g++], d = s.L, e.addData(d, n, r);
- break;
- case "C":
- d = s.C, e.addData(d, h[g++], h[g++], h[g++], h[g++], h[g++], h[g++]), n = h[g - 2], r = h[g - 1];
- break;
- case "c":
- d = s.C, e.addData(d, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r), n += h[g - 2], r += h[g - 1];
- break;
- case "S":
- m = n, y = r, T = e.len(), E = e.data, o === s.C && (m += n - E[T - 4], y += r - E[T - 3]), d = s.C, P = h[g++], $ = h[g++], n = h[g++], r = h[g++], e.addData(d, m, y, P, $, n, r);
- break;
- case "s":
- m = n, y = r, T = e.len(), E = e.data, o === s.C && (m += n - E[T - 4], y += r - E[T - 3]), d = s.C, P = n + h[g++], $ = r + h[g++], n += h[g++], r += h[g++], e.addData(d, m, y, P, $, n, r);
- break;
- case "Q":
- P = h[g++], $ = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, P, $, n, r);
- break;
- case "q":
- P = h[g++] + n, $ = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, P, $, n, r);
- break;
- case "T":
- m = n, y = r, T = e.len(), E = e.data, o === s.Q && (m += n - E[T - 4], y += r - E[T - 3]), n = h[g++], r = h[g++], d = s.Q, e.addData(d, m, y, n, r);
- break;
- case "t":
- m = n, y = r, T = e.len(), E = e.data, o === s.Q && (m += n - E[T - 4], y += r - E[T - 3]), n += h[g++], r += h[g++], d = s.Q, e.addData(d, m, y, n, r);
- break;
- case "A":
- _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = h[g++], P = n, $ = r, n = h[g++], r = h[g++], d = s.A, _G(P, $, n, r, x, C, _, O, S, d, e);
- break;
- case "a":
- _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = h[g++], P = n, $ = r, n += h[g++], r += h[g++], d = s.A, _G(P, $, n, r, x, C, _, O, S, d, e);
- break;
- }
- }
- (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
- }
- return e.toStatic(), e;
- }
- var dle = function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.applyTransform = function(n) {
- }, e;
- }(Dt);
- function hle(t) {
- return t.setData != null;
- }
- function ple(t, e) {
- var n = EZe(t), r = _e({}, e);
- return r.buildPath = function(i) {
- if (hle(i)) {
- i.setData(n.data);
- var a = i.getContext();
- a && i.rebuildPath(a, 1);
- } else {
- var a = i;
- n.rebuildPath(a, 1);
- }
- }, r.applyTransform = function(i) {
- fle(n, i), this.dirtyShape();
- }, r;
- }
- function vle(t, e) {
- return new dle(ple(t, e));
- }
- function MZe(t, e) {
- var n = ple(t, e), r = function(i) {
- le(a, i);
- function a(o) {
- var s = i.call(this, o) || this;
- return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
- }
- return a;
- }(dle);
- return r;
- }
- function IZe(t, e) {
- for (var n = [], r = t.length, i = 0; i < r; i++) {
- var a = t[i];
- n.push(a.getUpdatedPathProxy(!0));
- }
- var o = new Dt(e);
- return o.createPathProxy(), o.buildPath = function(s) {
- if (hle(s)) {
- s.appendPath(n);
- var l = s.getContext();
- l && s.rebuildPath(l, 1);
- }
- }, o;
- }
- function z5(t, e) {
- e = e || {};
- var n = new Dt();
- return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? fle(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;
- }
- var DZe = /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.r = 0;
- }
- return t;
- }(), gle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new DZe();
- }, e.prototype.buildPath = function(n, r) {
- n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
- }, e;
- }(Dt);
- gle.prototype.type = "circle";
- const ic = gle;
- var RZe = /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
- }
- return t;
- }(), mle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new RZe();
- }, e.prototype.buildPath = function(n, r) {
- var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
- n.moveTo(a - s, o), n.bezierCurveTo(a - s, o - c, a - u, o - l, a, o - l), n.bezierCurveTo(a + u, o - l, a + s, o - c, a + s, o), n.bezierCurveTo(a + s, o + c, a + u, o + l, a, o + l), n.bezierCurveTo(a - u, o + l, a - s, o + c, a - s, o), n.closePath();
- }, e;
- }(Dt);
- mle.prototype.type = "ellipse";
- const OP = mle;
- var yle = Math.PI, sM = yle * 2, Od = Math.sin, Kp = Math.cos, kZe = Math.acos, Di = Math.atan2, OG = Math.abs, ib = Math.sqrt, my = Math.max, cl = Math.min, ws = 1e-4;
- function LZe(t, e, n, r, i, a, o, s) {
- var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
- if (!(d * d < ws))
- return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
- }
- function mS(t, e, n, r, i, a, o) {
- var s = t - n, l = e - r, u = (o ? a : -a) / ib(s * s + l * l), c = u * l, f = -u * s, d = t + c, h = e + f, p = n + c, v = r + f, g = (d + p) / 2, m = (h + v) / 2, y = p - d, _ = v - h, O = y * y + _ * _, S = i - a, x = d * v - p * h, C = (_ < 0 ? -1 : 1) * ib(my(0, S * S * O - x * x)), P = (x * _ - y * C) / O, $ = (-x * y - _ * C) / O, T = (x * _ + y * C) / O, E = (-x * y + _ * C) / O, M = P - g, R = $ - m, N = T - g, I = E - m;
- return M * M + R * R > N * N + I * I && (P = T, $ = E), {
- cx: P,
- cy: $,
- x0: -c,
- y0: -f,
- x1: P * (i / S - 1),
- y1: $ * (i / S - 1)
- };
- }
- function NZe(t) {
- var e;
- if (Se(t)) {
- var n = t.length;
- if (!n)
- return t;
- n === 1 ? e = [t[0], t[0], 0, 0] : n === 2 ? e = [t[0], t[0], t[1], t[1]] : n === 3 ? e = t.concat(t[2]) : e = t;
- } else
- e = [t, t, t, t];
- return e;
- }
- function BZe(t, e) {
- var n, r = my(e.r, 0), i = my(e.r0 || 0, 0), a = r > 0, o = i > 0;
- if (!(!a && !o)) {
- if (a || (r = i, i = 0), i > r) {
- var s = r;
- r = i, i = s;
- }
- var l = e.startAngle, u = e.endAngle;
- if (!(isNaN(l) || isNaN(u))) {
- var c = e.cx, f = e.cy, d = !!e.clockwise, h = OG(u - l), p = h > sM && h % sM;
- if (p > ws && (h = p), !(r > ws))
- t.moveTo(c, f);
- else if (h > sM - ws)
- t.moveTo(c + r * Kp(l), f + r * Od(l)), t.arc(c, f, r, l, u, !d), i > ws && (t.moveTo(c + i * Kp(u), f + i * Od(u)), t.arc(c, f, i, u, l, d));
- else {
- var v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, P = void 0, $ = void 0, T = void 0, E = void 0, M = void 0, R = void 0, N = void 0, I = r * Kp(l), B = r * Od(l), Q = i * Kp(u), W = i * Od(u), H = h > ws;
- if (H) {
- var U = e.cornerRadius;
- U && (n = NZe(U), v = n[0], g = n[1], m = n[2], y = n[3]);
- var j = OG(r - i) / 2;
- if (_ = cl(j, m), O = cl(j, y), S = cl(j, v), x = cl(j, g), $ = C = my(_, O), T = P = my(S, x), (C > ws || P > ws) && (E = r * Kp(u), M = r * Od(u), R = i * Kp(l), N = i * Od(l), h < yle)) {
- var Y = LZe(I, B, R, N, E, M, Q, W);
- if (Y) {
- var ne = I - Y[0], fe = B - Y[1], ue = E - Y[0], ye = M - Y[1], se = 1 / Od(kZe((ne * ue + fe * ye) / (ib(ne * ne + fe * fe) * ib(ue * ue + ye * ye))) / 2), he = ib(Y[0] * Y[0] + Y[1] * Y[1]);
- $ = cl(C, (r - he) / (se + 1)), T = cl(P, (i - he) / (se - 1));
- }
- }
- }
- if (!H)
- t.moveTo(c + I, f + B);
- else if ($ > ws) {
- var re = cl(m, $), q = cl(y, $), K = mS(R, N, I, B, r, re, d), de = mS(E, M, Q, W, r, q, d);
- t.moveTo(c + K.cx + K.x0, f + K.cy + K.y0), $ < C && re === q ? t.arc(c + K.cx, f + K.cy, $, Di(K.y0, K.x0), Di(de.y0, de.x0), !d) : (re > 0 && t.arc(c + K.cx, f + K.cy, re, Di(K.y0, K.x0), Di(K.y1, K.x1), !d), t.arc(c, f, r, Di(K.cy + K.y1, K.cx + K.x1), Di(de.cy + de.y1, de.cx + de.x1), !d), q > 0 && t.arc(c + de.cx, f + de.cy, q, Di(de.y1, de.x1), Di(de.y0, de.x0), !d));
- } else
- t.moveTo(c + I, f + B), t.arc(c, f, r, l, u, !d);
- if (!(i > ws) || !H)
- t.lineTo(c + Q, f + W);
- else if (T > ws) {
- var re = cl(v, T), q = cl(g, T), K = mS(Q, W, E, M, i, -q, d), de = mS(I, B, R, N, i, -re, d);
- t.lineTo(c + K.cx + K.x0, f + K.cy + K.y0), T < P && re === q ? t.arc(c + K.cx, f + K.cy, T, Di(K.y0, K.x0), Di(de.y0, de.x0), !d) : (q > 0 && t.arc(c + K.cx, f + K.cy, q, Di(K.y0, K.x0), Di(K.y1, K.x1), !d), t.arc(c, f, i, Di(K.cy + K.y1, K.cx + K.x1), Di(de.cy + de.y1, de.cx + de.x1), d), re > 0 && t.arc(c + de.cx, f + de.cy, re, Di(de.y1, de.x1), Di(de.y0, de.x0), !d));
- } else
- t.lineTo(c + Q, f + W), t.arc(c, f, i, u, l, d);
- }
- t.closePath();
- }
- }
- }
- var zZe = /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0;
- }
- return t;
- }(), ble = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new zZe();
- }, e.prototype.buildPath = function(n, r) {
- BZe(n, r);
- }, e.prototype.isZeroArea = function() {
- return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
- }, e;
- }(Dt);
- ble.prototype.type = "sector";
- const ha = ble;
- var VZe = /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
- }
- return t;
- }(), _le = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new VZe();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.cx, a = r.cy, o = Math.PI * 2;
- n.moveTo(i + r.r, a), n.arc(i, a, r.r, 0, o, !1), n.moveTo(i + r.r0, a), n.arc(i, a, r.r0, 0, o, !0);
- }, e;
- }(Dt);
- _le.prototype.type = "ring";
- const c1 = _le;
- function FZe(t, e, n, r) {
- var i = [], a = [], o = [], s = [], l, u, c, f;
- if (r) {
- c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
- for (var d = 0, h = t.length; d < h; d++)
- Cu(c, c, t[d]), Tu(f, f, t[d]);
- Cu(c, c, r[0]), Tu(f, f, r[1]);
- }
- for (var d = 0, h = t.length; d < h; d++) {
- var p = t[d];
- if (n)
- l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
- else if (d === 0 || d === h - 1) {
- i.push(kl(t[d]));
- continue;
- } else
- l = t[d - 1], u = t[d + 1];
- Wc(a, u, l), Xy(a, a, e);
- var v = OC(p, l), g = OC(p, u), m = v + g;
- m !== 0 && (v /= m, g /= m), Xy(o, a, -v), Xy(s, a, g);
- var y = nk([], p, o), _ = nk([], p, s);
- r && (Tu(y, y, c), Cu(y, y, f), Tu(_, _, c), Cu(_, _, f)), i.push(y), i.push(_);
- }
- return n && i.push(i.shift()), i;
- }
- function Ole(t, e, n) {
- var r = e.smooth, i = e.points;
- if (i && i.length >= 2) {
- if (r) {
- var a = FZe(i, r, n, e.smoothConstraint);
- t.moveTo(i[0][0], i[0][1]);
- for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
- var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
- t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
- }
- } else {
- t.moveTo(i[0][0], i[0][1]);
- for (var s = 1, f = i.length; s < f; s++)
- t.lineTo(i[s][0], i[s][1]);
- }
- n && t.closePath();
- }
- }
- var WZe = /* @__PURE__ */ function() {
- function t() {
- this.points = null, this.smooth = 0, this.smoothConstraint = null;
- }
- return t;
- }(), Sle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new WZe();
- }, e.prototype.buildPath = function(n, r) {
- Ole(n, r, !0);
- }, e;
- }(Dt);
- Sle.prototype.type = "polygon";
- const pa = Sle;
- var QZe = /* @__PURE__ */ function() {
- function t() {
- this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
- }
- return t;
- }(), xle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new QZe();
- }, e.prototype.buildPath = function(n, r) {
- Ole(n, r, !1);
- }, e;
- }(Dt);
- xle.prototype.type = "polyline";
- const va = xle;
- var HZe = {}, GZe = /* @__PURE__ */ function() {
- function t() {
- this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
- }
- return t;
- }(), wle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new GZe();
- }, e.prototype.buildPath = function(n, r) {
- var i, a, o, s;
- if (this.subPixelOptimize) {
- var l = Yse(HZe, r, this.style);
- i = l.x1, a = l.y1, o = l.x2, s = l.y2;
- } else
- i = r.x1, a = r.y1, o = r.x2, s = r.y2;
- var u = r.percent;
- u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
- }, e.prototype.pointAt = function(n) {
- var r = this.shape;
- return [
- r.x1 * (1 - n) + r.x2 * n,
- r.y1 * (1 - n) + r.y2 * n
- ];
- }, e;
- }(Dt);
- wle.prototype.type = "line";
- const Xr = wle;
- var _a = [], jZe = /* @__PURE__ */ function() {
- function t() {
- this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
- }
- return t;
- }();
- function SG(t, e, n) {
- var r = t.cpx2, i = t.cpy2;
- return r != null || i != null ? [
- (n ? TH : jr)(t.x1, t.cpx1, t.cpx2, t.x2, e),
- (n ? TH : jr)(t.y1, t.cpy1, t.cpy2, t.y2, e)
- ] : [
- (n ? sk : ii)(t.x1, t.cpx1, t.x2, e),
- (n ? sk : ii)(t.y1, t.cpy1, t.y2, e)
- ];
- }
- var Cle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new jZe();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.x1, a = r.y1, o = r.x2, s = r.y2, l = r.cpx1, u = r.cpy1, c = r.cpx2, f = r.cpy2, d = r.percent;
- d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (Qb(i, l, o, d, _a), l = _a[1], o = _a[2], Qb(a, u, s, d, _a), u = _a[1], s = _a[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (yf(i, l, c, o, d, _a), l = _a[1], c = _a[2], o = _a[3], yf(a, u, f, s, d, _a), u = _a[1], f = _a[2], s = _a[3]), n.bezierCurveTo(l, u, c, f, o, s)));
- }, e.prototype.pointAt = function(n) {
- return SG(this.shape, n, !1);
- }, e.prototype.tangentAt = function(n) {
- var r = SG(this.shape, n, !0);
- return fp(r, r);
- }, e;
- }(Dt);
- Cle.prototype.type = "bezier-curve";
- const f1 = Cle;
- var ZZe = /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
- }
- return t;
- }(), Tle = function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new ZZe();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.cx, a = r.cy, o = Math.max(r.r, 0), s = r.startAngle, l = r.endAngle, u = r.clockwise, c = Math.cos(s), f = Math.sin(s);
- n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
- }, e;
- }(Dt);
- Tle.prototype.type = "arc";
- const SP = Tle;
- var UZe = function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "compound", n;
- }
- return e.prototype._updatePathDirty = function() {
- for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
- r = r || n[i].shapeChanged();
- r && this.dirtyShape();
- }, e.prototype.beforeBrush = function() {
- this._updatePathDirty();
- for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
- n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
- }, e.prototype.buildPath = function(n, r) {
- for (var i = r.paths || [], a = 0; a < i.length; a++)
- i[a].buildPath(n, i[a].shape, !0);
- }, e.prototype.afterBrush = function() {
- for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
- n[r].pathUpdated();
- }, e.prototype.getBoundingRect = function() {
- return this._updatePathDirty.call(this), Dt.prototype.getBoundingRect.call(this);
- }, e;
- }(Dt);
- const xP = UZe;
- var Ple = function() {
- function t(e) {
- this.colorStops = e || [];
- }
- return t.prototype.addColorStop = function(e, n) {
- this.colorStops.push({
- offset: e,
- color: n
- });
- }, t;
- }(), XZe = function(t) {
- le(e, t);
- function e(n, r, i, a, o, s) {
- var l = t.call(this, o) || this;
- return l.x = n ?? 0, l.y = r ?? 0, l.x2 = i ?? 1, l.y2 = a ?? 0, l.type = "linear", l.global = s || !1, l;
- }
- return e;
- }(Ple);
- const _m = XZe;
- var YZe = function(t) {
- le(e, t);
- function e(n, r, i, a, o) {
- var s = t.call(this, a) || this;
- return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
- }
- return e;
- }(Ple);
- const V5 = YZe;
- var Sd = [0, 0], xd = [0, 0], yS = new yt(), bS = new yt(), qZe = function() {
- function t(e, n) {
- this._corners = [], this._axes = [], this._origin = [0, 0];
- for (var r = 0; r < 4; r++)
- this._corners[r] = new yt();
- for (var r = 0; r < 2; r++)
- this._axes[r] = new yt();
- e && this.fromBoundingRect(e, n);
- }
- return t.prototype.fromBoundingRect = function(e, n) {
- var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
- if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
- for (var u = 0; u < 4; u++)
- r[u].transform(n);
- yt.sub(i[0], r[1], r[0]), yt.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
- for (var u = 0; u < 2; u++)
- this._origin[u] = i[u].dot(r[0]);
- }, t.prototype.intersect = function(e, n) {
- var r = !0, i = !n;
- return yS.set(1 / 0, 1 / 0), bS.set(0, 0), !this._intersectCheckOneSide(this, e, yS, bS, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, yS, bS, i, -1) && (r = !1, i) || i || yt.copy(n, r ? yS : bS), r;
- }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
- for (var s = !0, l = 0; l < 2; l++) {
- var u = this._axes[l];
- if (this._getProjMinMaxOnAxis(l, e._corners, Sd), this._getProjMinMaxOnAxis(l, n._corners, xd), Sd[1] < xd[0] || Sd[0] > xd[1]) {
- if (s = !1, a)
- return s;
- var c = Math.abs(xd[0] - Sd[1]), f = Math.abs(Sd[0] - xd[1]);
- Math.min(c, f) > i.len() && (c < f ? yt.scale(i, u, -c * o) : yt.scale(i, u, f * o));
- } else if (r) {
- var c = Math.abs(xd[0] - Sd[1]), f = Math.abs(Sd[0] - xd[1]);
- Math.min(c, f) < r.len() && (c < f ? yt.scale(r, u, c * o) : yt.scale(r, u, -f * o));
- }
- }
- return s;
- }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
- for (var i = this._axes[e], a = this._origin, o = n[0].dot(i) + a[e], s = o, l = o, u = 1; u < n.length; u++) {
- var c = n[u].dot(i) + a[e];
- s = Math.min(c, s), l = Math.max(c, l);
- }
- r[0] = s, r[1] = l;
- }, t;
- }();
- const DC = qZe;
- var KZe = [], JZe = function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
- }
- return e.prototype.traverse = function(n, r) {
- n.call(r, this);
- }, e.prototype.useStyle = function() {
- this.style = {};
- }, e.prototype.getCursor = function() {
- return this._cursor;
- }, e.prototype.innerAfterBrush = function() {
- this._cursor = this._displayables.length;
- }, e.prototype.clearDisplaybles = function() {
- this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
- }, e.prototype.clearTemporalDisplayables = function() {
- this._temporaryDisplayables = [];
- }, e.prototype.addDisplayable = function(n, r) {
- r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
- }, e.prototype.addDisplayables = function(n, r) {
- r = r || !1;
- for (var i = 0; i < n.length; i++)
- this.addDisplayable(n[i], r);
- }, e.prototype.getDisplayables = function() {
- return this._displayables;
- }, e.prototype.getTemporalDisplayables = function() {
- return this._temporaryDisplayables;
- }, e.prototype.eachPendingDisplayable = function(n) {
- for (var r = this._cursor; r < this._displayables.length; r++)
- n && n(this._displayables[r]);
- for (var r = 0; r < this._temporaryDisplayables.length; r++)
- n && n(this._temporaryDisplayables[r]);
- }, e.prototype.update = function() {
- this.updateTransform();
- for (var n = this._cursor; n < this._displayables.length; n++) {
- var r = this._displayables[n];
- r.parent = this, r.update(), r.parent = null;
- }
- for (var n = 0; n < this._temporaryDisplayables.length; n++) {
- var r = this._temporaryDisplayables[n];
- r.parent = this, r.update(), r.parent = null;
- }
- }, e.prototype.getBoundingRect = function() {
- if (!this._rect) {
- for (var n = new bt(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
- var i = this._displayables[r], a = i.getBoundingRect().clone();
- i.needLocalTransform() && a.applyTransform(i.getLocalTransform(KZe)), n.union(a);
- }
- this._rect = n;
- }
- return this._rect;
- }, e.prototype.contain = function(n, r) {
- var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
- if (a.contain(i[0], i[1]))
- for (var o = 0; o < this._displayables.length; o++) {
- var s = this._displayables[o];
- if (s.contain(n, r))
- return !0;
- }
- return !1;
- }, e;
- }(ls);
- const $le = JZe;
- var Ale = Ut();
- function Om(t, e, n, r, i) {
- var a;
- if (e && e.ecModel) {
- var o = e.ecModel.getUpdatePayload();
- a = o && o.animation;
- }
- var s = e && e.isAnimationEnabled(), l = t === "update";
- if (s) {
- var u = void 0, c = void 0, f = void 0;
- r ? (u = dt(r.duration, 200), c = dt(r.easing, "cubicOut"), f = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), c = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), f = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), a && (a.duration != null && (u = a.duration), a.easing != null && (c = a.easing), a.delay != null && (f = a.delay)), qe(f) && (f = f(n, i)), qe(u) && (u = u(n));
- var d = {
- duration: u || 0,
- delay: f,
- easing: c
- };
- return d;
- } else
- return null;
- }
- function F5(t, e, n, r, i, a, o) {
- var s = !1, l;
- qe(i) ? (o = a, a = i, i = null) : nt(i) && (a = i.cb, o = i.during, s = i.isFrom, l = i.removeOpt, i = i.dataIndex);
- var u = t === "leave";
- u || e.stopAnimation("leave");
- var c = Om(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
- if (c && c.duration > 0) {
- var f = c.duration, d = c.delay, h = c.easing, p = {
- duration: f,
- delay: d || 0,
- easing: h,
- done: a,
- force: !!a || !!o,
- // Set to final state in update/init animation.
- // So the post processing based on the path shape can be done correctly.
- setToFinal: !u,
- scope: t,
- during: o
- };
- s ? e.animateFrom(n, p) : e.animateTo(n, p);
- } else
- e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
- }
- function tn(t, e, n, r, i, a) {
- F5("update", t, e, n, r, i, a);
- }
- function Vn(t, e, n, r, i, a) {
- F5("enter", t, e, n, r, i, a);
- }
- function qv(t) {
- if (!t.__zr)
- return !0;
- for (var e = 0; e < t.animators.length; e++) {
- var n = t.animators[e];
- if (n.scope === "leave")
- return !0;
- }
- return !1;
- }
- function _f(t, e, n, r, i, a) {
- qv(t) || F5("leave", t, e, n, r, i, a);
- }
- function xG(t, e, n, r) {
- t.removeTextContent(), t.removeTextGuideLine(), _f(t, {
- style: {
- opacity: 0
- }
- }, e, n, r);
- }
- function Xb(t, e, n) {
- function r() {
- t.parent && t.parent.remove(t);
- }
- t.isGroup ? t.traverse(function(i) {
- i.isGroup || xG(i, e, n, r);
- }) : xG(t, e, n, r);
- }
- function Zs(t) {
- Ale(t).oldStyle = t.style;
- }
- function eUe(t) {
- return Ale(t).oldStyle;
- }
- var RC = Math.max, kC = Math.min, Dk = {};
- function Ele(t) {
- return Dt.extend(t);
- }
- var tUe = MZe;
- function Mle(t, e) {
- return tUe(t, e);
- }
- function ds(t, e) {
- Dk[t] = e;
- }
- function wP(t) {
- if (Dk.hasOwnProperty(t))
- return Dk[t];
- }
- function d1(t, e, n, r) {
- var i = vle(t, e);
- return n && (r === "center" && (n = Ile(n, i.getBoundingRect())), Q5(i, n)), i;
- }
- function W5(t, e, n) {
- var r = new ci({
- style: {
- image: t,
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height
- },
- onload: function(i) {
- if (n === "center") {
- var a = {
- width: i.width,
- height: i.height
- };
- r.setStyle(Ile(e, a));
- }
- }
- });
- return r;
- }
- function Ile(t, e) {
- var n = e.width / e.height, r = t.height * n, i;
- r <= t.width ? i = t.height : (r = t.width, i = r / n);
- var a = t.x + t.width / 2, o = t.y + t.height / 2;
- return {
- x: a - r / 2,
- y: o - i / 2,
- width: r,
- height: i
- };
- }
- var no = IZe;
- function Q5(t, e) {
- if (t.applyTransform) {
- var n = t.getBoundingRect(), r = n.calculateTransform(e);
- t.applyTransform(r);
- }
- }
- function Qg(t, e) {
- return Yse(t, t, {
- lineWidth: e
- }), t;
- }
- function nUe(t) {
- return qse(t.shape, t.shape, t.style), t;
- }
- var dw = ih;
- function of(t, e) {
- for (var n = i1([]); t && t !== e; )
- Ll(n, t.getLocalTransform(), n), t = t.parent;
- return n;
- }
- function zs(t, e, n) {
- return e && !Pi(e) && (e = Pu.getLocalTransform(e)), n && (e = dp([], e)), oi([], t, e);
- }
- function CP(t, e, n) {
- var r = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), i = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), a = [t === "left" ? -r : t === "right" ? r : 0, t === "top" ? -i : t === "bottom" ? i : 0];
- return a = zs(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
- }
- function wG(t) {
- return !t.isGroup;
- }
- function rUe(t) {
- return t.shape != null;
- }
- function h1(t, e, n) {
- if (!t || !e)
- return;
- function r(o) {
- var s = {};
- return o.traverse(function(l) {
- wG(l) && l.anid && (s[l.anid] = l);
- }), s;
- }
- function i(o) {
- var s = {
- x: o.x,
- y: o.y,
- rotation: o.rotation
- };
- return rUe(o) && (s.shape = _e({}, o.shape)), s;
- }
- var a = r(t);
- e.traverse(function(o) {
- if (wG(o) && o.anid) {
- var s = a[o.anid];
- if (s) {
- var l = i(o);
- o.attr(i(s)), tn(o, l, n, ft(o).dataIndex);
- }
- }
- });
- }
- function H5(t, e) {
- return Ce(t, function(n) {
- var r = n[0];
- r = RC(r, e.x), r = kC(r, e.x + e.width);
- var i = n[1];
- return i = RC(i, e.y), i = kC(i, e.y + e.height), [r, i];
- });
- }
- function Dle(t, e) {
- var n = RC(t.x, e.x), r = kC(t.x + t.width, e.x + e.width), i = RC(t.y, e.y), a = kC(t.y + t.height, e.y + e.height);
- if (r >= n && a >= i)
- return {
- x: n,
- y: i,
- width: r - n,
- height: a - i
- };
- }
- function Sm(t, e, n) {
- var r = _e({
- rectHover: !0
- }, e), i = r.style = {
- strokeNoScale: !0
- };
- if (n = n || {
- x: -1,
- y: -1,
- width: 2,
- height: 2
- }, t)
- return t.indexOf("image://") === 0 ? (i.image = t.slice(8), it(i, n), new ci(r)) : d1(t.replace("path://", ""), r, n, "center");
- }
- function yy(t, e, n, r, i) {
- for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
- var s = i[a];
- if (Rle(t, e, n, r, s[0], s[1], o[0], o[1]))
- return !0;
- o = s;
- }
- }
- function Rle(t, e, n, r, i, a, o, s) {
- var l = n - t, u = r - e, c = o - i, f = s - a, d = lM(c, f, l, u);
- if (iUe(d))
- return !1;
- var h = t - i, p = e - a, v = lM(h, p, l, u) / d;
- if (v < 0 || v > 1)
- return !1;
- var g = lM(h, p, c, f) / d;
- return !(g < 0 || g > 1);
- }
- function lM(t, e, n, r) {
- return t * r - n * e;
- }
- function iUe(t) {
- return t <= 1e-6 && t >= -1e-6;
- }
- function xm(t) {
- var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Ve(e) ? {
- formatter: e
- } : e, a = n.mainType, o = n.componentIndex, s = {
- componentType: a,
- name: r,
- $vars: ["name"]
- };
- s[a + "Index"] = o;
- var l = t.formatterParamsExtra;
- l && F(kt(l), function(c) {
- Qe(s, c) || (s[c] = l[c], s.$vars.push(c));
- });
- var u = ft(t.el);
- u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
- name: r,
- option: it({
- content: r,
- encodeHTMLContent: !0,
- formatterParams: s
- }, i)
- };
- }
- function CG(t, e) {
- var n;
- t.isGroup && (n = e(t)), n || t.traverse(e);
- }
- function Nf(t, e) {
- if (t)
- if (Se(t))
- for (var n = 0; n < t.length; n++)
- CG(t[n], e);
- else
- CG(t, e);
- }
- ds("circle", ic);
- ds("ellipse", OP);
- ds("sector", ha);
- ds("ring", c1);
- ds("polygon", pa);
- ds("polyline", va);
- ds("rect", Zt);
- ds("line", Xr);
- ds("bezierCurve", f1);
- ds("arc", SP);
- const hp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Arc: SP,
- BezierCurve: f1,
- BoundingRect: bt,
- Circle: ic,
- CompoundPath: xP,
- Ellipse: OP,
- Group: ct,
- Image: ci,
- IncrementalDisplayable: $le,
- Line: Xr,
- LinearGradient: _m,
- OrientedBoundingRect: DC,
- Path: Dt,
- Point: yt,
- Polygon: pa,
- Polyline: va,
- RadialGradient: V5,
- Rect: Zt,
- Ring: c1,
- Sector: ha,
- Text: jt,
- applyTransform: zs,
- clipPointsByRect: H5,
- clipRectByRect: Dle,
- createIcon: Sm,
- extendPath: Mle,
- extendShape: Ele,
- getShapeClass: wP,
- getTransform: of,
- groupTransition: h1,
- initProps: Vn,
- isElementRemoved: qv,
- lineLineIntersect: Rle,
- linePolygonIntersect: yy,
- makeImage: W5,
- makePath: d1,
- mergePath: no,
- registerShape: ds,
- removeElement: _f,
- removeElementWithFadeOut: Xb,
- resizePath: Q5,
- setTooltipConfig: xm,
- subPixelOptimize: dw,
- subPixelOptimizeLine: Qg,
- subPixelOptimizeRect: nUe,
- transformDirection: CP,
- traverseElements: Nf,
- updateProps: tn
- }, Symbol.toStringTag, { value: "Module" }));
- var TP = {};
- function kle(t, e) {
- for (var n = 0; n < da.length; n++) {
- var r = da[n], i = e[r], a = t.ensureState(r);
- a.style = a.style || {}, a.style.text = i;
- }
- var o = t.currentStates.slice();
- t.clearStates(!0), t.setStyle({
- text: e.normal
- }), t.useStates(o, !0);
- }
- function Rk(t, e, n) {
- var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
- r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
- interpolatedValue: n
- } : null)), s == null && (s = qe(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
- for (var l = {
- normal: s
- }, u = 0; u < da.length; u++) {
- var c = da[u], f = e[c];
- l[c] = dt(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
- }
- return l;
- }
- function Ei(t, e, n, r) {
- n = n || TP;
- for (var i = t instanceof jt, a = !1, o = 0; o < Ub.length; o++) {
- var s = e[Ub[o]];
- if (s && s.getShallow("show")) {
- a = !0;
- break;
- }
- }
- var l = i ? t : t.getTextContent();
- if (a) {
- i || (l || (l = new jt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
- var u = Rk(n, e), c = e.normal, f = !!c.getShallow("show"), d = Mn(c, r && r.normal, n, !1, !i);
- d.text = u.normal, i || t.setTextConfig(LC(c, n, !1));
- for (var o = 0; o < da.length; o++) {
- var h = da[o], s = e[h];
- if (s) {
- var p = l.ensureState(h), v = !!dt(s.getShallow("show"), f);
- if (v !== f && (p.ignore = !v), p.style = Mn(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
- var g = t.ensureState(h);
- g.textConfig = LC(s, n, !0);
- }
- }
- }
- l.silent = !!c.getShallow("silent"), l.style.x != null && (d.x = l.style.x), l.style.y != null && (d.y = l.style.y), l.ignore = !f, l.useStyle(d), l.dirty(), n.enableTextSetter && (wm(l).setLabelText = function(m) {
- var y = Rk(n, e, m);
- kle(l, y);
- });
- } else l && (l.ignore = !0);
- t.dirty();
- }
- function ei(t, e) {
- e = e || "label";
- for (var n = {
- normal: t.getModel(e)
- }, r = 0; r < da.length; r++) {
- var i = da[r];
- n[i] = t.getModel([i, e]);
- }
- return n;
- }
- function Mn(t, e, n, r, i) {
- var a = {};
- return aUe(a, t, n, r, i), e && _e(a, e), a;
- }
- function LC(t, e, n) {
- e = e || {};
- var r = {}, i, a = t.getShallow("rotate"), o = dt(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
- return i = t.getShallow("position") || (n ? null : "inside"), i === "outside" && (i = e.defaultOutsidePosition || "top"), i != null && (r.position = i), s != null && (r.offset = s), a != null && (a *= Math.PI / 180, r.rotation = a), o != null && (r.distance = o), r.outsideFill = t.get("color") === "inherit" ? e.inheritColor || null : "auto", r;
- }
- function aUe(t, e, n, r, i) {
- n = n || TP;
- var a = e.ecModel, o = a && a.option.textStyle, s = oUe(e), l;
- if (s) {
- l = {};
- for (var u in s)
- if (s.hasOwnProperty(u)) {
- var c = e.getModel(["rich", u]);
- AG(l[u] = {}, c, o, n, r, i, !1, !0);
- }
- }
- l && (t.rich = l);
- var f = e.get("overflow");
- f && (t.overflow = f);
- var d = e.get("minMargin");
- d != null && (t.margin = d), AG(t, e, o, n, r, i, !0, !1);
- }
- function oUe(t) {
- for (var e; t && t !== t.ecModel; ) {
- var n = (t.option || TP).rich;
- if (n) {
- e = e || {};
- for (var r = kt(n), i = 0; i < r.length; i++) {
- var a = r[i];
- e[a] = 1;
- }
- }
- t = t.parentModel;
- }
- return e;
- }
- var TG = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], PG = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], $G = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
- function AG(t, e, n, r, i, a, o, s) {
- n = !i && n || TP;
- var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = dt(e.getShallow("opacity"), n.opacity);
- (u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && _r("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && _r("color: 'auto'", "color: 'inherit'"), l ? c = l : c = null), a || (u = u || n.color, c = c || n.textBorderColor), u != null && (t.fill = u), c != null && (t.stroke = c);
- var d = dt(e.getShallow("textBorderWidth"), n.textBorderWidth);
- d != null && (t.lineWidth = d);
- var h = dt(e.getShallow("textBorderType"), n.textBorderType);
- h != null && (t.lineDash = h);
- var p = dt(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
- p != null && (t.lineDashOffset = p), !i && f == null && !s && (f = r && r.defaultOpacity), f != null && (t.opacity = f), !i && !a && t.fill == null && r.inheritColor && (t.fill = r.inheritColor);
- for (var v = 0; v < TG.length; v++) {
- var g = TG[v], m = dt(e.getShallow(g), n[g]);
- m != null && (t[g] = m);
- }
- for (var v = 0; v < PG.length; v++) {
- var g = PG[v], m = e.getShallow(g);
- m != null && (t[g] = m);
- }
- if (t.verticalAlign == null) {
- var y = e.getShallow("baseline");
- y != null && (t.verticalAlign = y);
- }
- if (!o || !r.disableBox) {
- for (var v = 0; v < $G.length; v++) {
- var g = $G[v], m = e.getShallow(g);
- m != null && (t[g] = m);
- }
- var _ = e.getShallow("borderType");
- _ != null && (t.borderDash = _), (t.backgroundColor === "auto" || t.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.backgroundColor === "auto" && _r("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), t.backgroundColor = l), (t.borderColor === "auto" || t.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.borderColor === "auto" && _r("borderColor: 'auto'", "borderColor: 'inherit'"), t.borderColor = l);
- }
- }
- function G5(t, e) {
- var n = e && e.getModel("textStyle");
- return Zo([
- // FIXME in node-canvas fontWeight is before fontStyle
- 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(" "));
- }
- var wm = Ut();
- function Lle(t, e, n, r) {
- if (t) {
- var i = wm(t);
- i.prevValue = i.value, i.value = n;
- var a = e.normal;
- i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
- }
- }
- function Nle(t, e, n, r, i) {
- var a = wm(t);
- if (!a.valueAnimation || a.prevValue === a.value)
- return;
- var o = a.defaultInterpolatedText, s = dt(a.interpolatedValue, a.prevValue), l = a.value;
- function u(c) {
- var f = Vse(n, a.precision, s, l, c);
- a.interpolatedValue = c === 1 ? null : f;
- var d = Rk({
- labelDataIndex: e,
- labelFetcher: i,
- defaultText: o ? o(f) : f + ""
- }, a.statesModels, f);
- kle(t, d);
- }
- t.percent = 0, (a.prevValue == null ? Vn : tn)(t, {
- // percent is used to prevent animation from being aborted #15916
- percent: 1
- }, r, e, null, u);
- }
- var sUe = ["textStyle", "color"], uM = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], cM = new jt(), lUe = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getTextColor = function(e) {
- var n = this.ecModel;
- return this.getShallow("color") || (!e && n ? n.get(sUe) : null);
- }, t.prototype.getFont = function() {
- return G5({
- fontStyle: this.getShallow("fontStyle"),
- fontWeight: this.getShallow("fontWeight"),
- fontSize: this.getShallow("fontSize"),
- fontFamily: this.getShallow("fontFamily")
- }, this.ecModel);
- }, t.prototype.getTextRect = function(e) {
- for (var n = {
- text: e,
- verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
- }, r = 0; r < uM.length; r++)
- n[uM[r]] = this.getShallow(uM[r]);
- return cM.useStyle(n), cM.update(), cM.getBoundingRect();
- }, t;
- }()
- ), Ble = [
- ["lineWidth", "width"],
- ["stroke", "color"],
- ["opacity"],
- ["shadowBlur"],
- ["shadowOffsetX"],
- ["shadowOffsetY"],
- ["shadowColor"],
- ["lineDash", "type"],
- ["lineDashOffset", "dashOffset"],
- ["lineCap", "cap"],
- ["lineJoin", "join"],
- ["miterLimit"]
- // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
- // So do not transfer decal directly.
- ], uUe = jh(Ble), cUe = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getLineStyle = function(e) {
- return uUe(this, e);
- }, t;
- }()
- ), zle = [
- ["fill", "color"],
- ["stroke", "borderColor"],
- ["lineWidth", "borderWidth"],
- ["opacity"],
- ["shadowBlur"],
- ["shadowOffsetX"],
- ["shadowOffsetY"],
- ["shadowColor"],
- ["lineDash", "borderType"],
- ["lineDashOffset", "borderDashOffset"],
- ["lineCap", "borderCap"],
- ["lineJoin", "borderJoin"],
- ["miterLimit", "borderMiterLimit"]
- // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
- // So do not transfer decal directly.
- ], fUe = jh(zle), dUe = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getItemStyle = function(e, n) {
- return fUe(this, e, n);
- }, t;
- }()
- ), pp = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.parentModel = n, this.ecModel = r, this.option = e;
- }
- return t.prototype.init = function(e, n, r) {
- }, t.prototype.mergeOption = function(e, n) {
- mt(this.option, e, !0);
- }, t.prototype.get = function(e, n) {
- return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
- }, t.prototype.getShallow = function(e, n) {
- var r = this.option, i = r == null ? r : r[e];
- if (i == null && !n) {
- var a = this.parentModel;
- a && (i = a.getShallow(e));
- }
- return i;
- }, t.prototype.getModel = function(e, n) {
- var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
- return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
- }, t.prototype.isEmpty = function() {
- return this.option == null;
- }, t.prototype.restoreData = function() {
- }, t.prototype.clone = function() {
- var e = this.constructor;
- return new e(ot(this.option));
- }, t.prototype.parsePath = function(e) {
- return typeof e == "string" ? e.split(".") : e;
- }, t.prototype.resolveParentPath = function(e) {
- return e;
- }, t.prototype.isAnimationEnabled = function() {
- if (!Gt.node && this.option) {
- if (this.option.animation != null)
- return !!this.option.animation;
- if (this.parentModel)
- return this.parentModel.isAnimationEnabled();
- }
- }, t.prototype._doGet = function(e, n) {
- var r = this.option;
- if (!e)
- return r;
- for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
- ;
- return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
- }, t;
- }()
- );
- M5(pp);
- _je(pp);
- vr(pp, cUe);
- vr(pp, dUe);
- vr(pp, Cje);
- vr(pp, lUe);
- const wn = pp;
- var hUe = Math.round(Math.random() * 10);
- function Cm(t) {
- return [t || "", hUe++].join("_");
- }
- function pUe(t) {
- var e = {};
- t.registerSubTypeDefaulter = function(n, r) {
- var i = $l(n);
- e[i.main] = r;
- }, t.determineSubType = function(n, r) {
- var i = r.type;
- if (!i) {
- var a = $l(n).main;
- t.hasSubTypes(n) && e[a] && (i = e[a](r));
- }
- return i;
- };
- }
- function vUe(t, e) {
- t.topologicalTravel = function(a, o, s, l) {
- if (!a.length)
- return;
- var u = n(o), c = u.graph, f = u.noEntryList, d = {};
- for (F(a, function(y) {
- d[y] = !0;
- }); f.length; ) {
- var h = f.pop(), p = c[h], v = !!d[h];
- v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), F(p.successor, v ? m : g);
- }
- F(d, function() {
- var y = "";
- throw process.env.NODE_ENV !== "production" && (y = fa("Circular dependency may exists: ", d, a, o)), new Error(y);
- });
- function g(y) {
- c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
- }
- function m(y) {
- d[y] = !0, g(y);
- }
- };
- function n(a) {
- var o = {}, s = [];
- return F(a, function(l) {
- var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
- u.entryCount = f.length, u.entryCount === 0 && s.push(l), F(f, function(d) {
- St(u.predecessor, d) < 0 && u.predecessor.push(d);
- var h = r(o, d);
- St(h.successor, d) < 0 && h.successor.push(l);
- });
- }), {
- graph: o,
- noEntryList: s
- };
- }
- function r(a, o) {
- return a[o] || (a[o] = {
- predecessor: [],
- successor: []
- }), a[o];
- }
- function i(a, o) {
- var s = [];
- return F(a, function(l) {
- St(o, l) >= 0 && s.push(l);
- }), s;
- }
- }
- function Bf(t, e) {
- return mt(mt({}, t, !0), e, !0);
- }
- const gUe = {
- time: {
- month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
- monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
- dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
- dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
- },
- legend: {
- selector: {
- all: "All",
- inverse: "Inv"
- }
- },
- toolbox: {
- brush: {
- title: {
- rect: "Box Select",
- polygon: "Lasso Select",
- lineX: "Horizontally Select",
- lineY: "Vertically Select",
- keep: "Keep Selections",
- clear: "Clear Selections"
- }
- },
- dataView: {
- title: "Data View",
- lang: ["Data View", "Close", "Refresh"]
- },
- dataZoom: {
- title: {
- zoom: "Zoom",
- back: "Zoom Reset"
- }
- },
- magicType: {
- title: {
- line: "Switch to Line Chart",
- bar: "Switch to Bar Chart",
- stack: "Stack",
- tiled: "Tile"
- }
- },
- restore: {
- title: "Restore"
- },
- saveAsImage: {
- title: "Save as Image",
- lang: ["Right Click to Save Image"]
- }
- },
- series: {
- typeNames: {
- pie: "Pie chart",
- bar: "Bar chart",
- line: "Line chart",
- scatter: "Scatter plot",
- effectScatter: "Ripple scatter plot",
- radar: "Radar chart",
- tree: "Tree",
- treemap: "Treemap",
- boxplot: "Boxplot",
- candlestick: "Candlestick",
- k: "K line chart",
- heatmap: "Heat map",
- map: "Map",
- parallel: "Parallel coordinate map",
- lines: "Line graph",
- graph: "Relationship graph",
- sankey: "Sankey diagram",
- funnel: "Funnel chart",
- gauge: "Gauge",
- pictorialBar: "Pictorial bar",
- themeRiver: "Theme River Map",
- sunburst: "Sunburst",
- custom: "Custom chart",
- chart: "Chart"
- }
- },
- aria: {
- general: {
- withTitle: 'This is a chart about "{title}"',
- withoutTitle: "This is a chart"
- },
- series: {
- single: {
- prefix: "",
- withName: " with type {seriesType} named {seriesName}.",
- withoutName: " with type {seriesType}."
- },
- multiple: {
- prefix: ". It consists of {seriesCount} series count.",
- withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
- withoutName: " The {seriesId} series is a {seriesType}.",
- separator: {
- middle: "",
- end: ""
- }
- }
- },
- data: {
- allData: "The data is as follows: ",
- partialData: "The first {displayCnt} items are: ",
- withName: "the data for {name} is {value}",
- withoutName: "{value}",
- separator: {
- middle: ", ",
- end: ". "
- }
- }
- }
- }, mUe = {
- time: {
- month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
- monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
- },
- legend: {
- selector: {
- all: "全选",
- inverse: "反选"
- }
- },
- toolbox: {
- brush: {
- title: {
- rect: "矩形选择",
- polygon: "圈选",
- lineX: "横向选择",
- lineY: "纵向选择",
- keep: "保持选择",
- clear: "清除选择"
- }
- },
- dataView: {
- title: "数据视图",
- lang: ["数据视图", "关闭", "刷新"]
- },
- dataZoom: {
- title: {
- zoom: "区域缩放",
- back: "区域缩放还原"
- }
- },
- magicType: {
- title: {
- line: "切换为折线图",
- bar: "切换为柱状图",
- stack: "切换为堆叠",
- tiled: "切换为平铺"
- }
- },
- restore: {
- title: "还原"
- },
- saveAsImage: {
- title: "保存为图片",
- lang: ["右键另存为图片"]
- }
- },
- series: {
- typeNames: {
- pie: "饼图",
- bar: "柱状图",
- line: "折线图",
- scatter: "散点图",
- effectScatter: "涟漪散点图",
- radar: "雷达图",
- tree: "树图",
- treemap: "矩形树图",
- boxplot: "箱型图",
- candlestick: "K线图",
- k: "K线图",
- heatmap: "热力图",
- map: "地图",
- parallel: "平行坐标图",
- lines: "线图",
- graph: "关系图",
- sankey: "桑基图",
- funnel: "漏斗图",
- gauge: "仪表盘图",
- pictorialBar: "象形柱图",
- themeRiver: "主题河流图",
- sunburst: "旭日图",
- custom: "自定义图表",
- chart: "图表"
- }
- },
- aria: {
- general: {
- withTitle: "这是一个关于“{title}”的图表。",
- withoutTitle: "这是一个图表,"
- },
- series: {
- single: {
- prefix: "",
- withName: "图表类型是{seriesType},表示{seriesName}。",
- withoutName: "图表类型是{seriesType}。"
- },
- multiple: {
- prefix: "它由{seriesCount}个图表系列组成。",
- withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
- withoutName: "第{seriesId}个系列是一个{seriesType},",
- separator: {
- middle: ";",
- end: "。"
- }
- }
- },
- data: {
- allData: "其数据是——",
- partialData: "其中,前{displayCnt}项是——",
- withName: "{name}的数据是{value}",
- withoutName: "{value}",
- separator: {
- middle: ",",
- end: ""
- }
- }
- }
- };
- var NC = "ZH", j5 = "EN", Kv = j5, hw = {}, Z5 = {}, Vle = Gt.domSupported ? function() {
- var t = (
- /* eslint-disable-next-line */
- (document.documentElement.lang || navigator.language || navigator.browserLanguage || Kv).toUpperCase()
- );
- return t.indexOf(NC) > -1 ? NC : Kv;
- }() : Kv;
- function U5(t, e) {
- t = t.toUpperCase(), Z5[t] = new wn(e), hw[t] = e;
- }
- function yUe(t) {
- if (Ve(t)) {
- var e = hw[t.toUpperCase()] || {};
- return t === NC || t === j5 ? ot(e) : mt(ot(e), ot(hw[Kv]), !1);
- } else
- return mt(ot(t), ot(hw[Kv]), !1);
- }
- function kk(t) {
- return Z5[t];
- }
- function bUe() {
- return Z5[Kv];
- }
- U5(j5, gUe);
- U5(NC, mUe);
- var X5 = 1e3, Y5 = X5 * 60, ab = Y5 * 60, Go = ab * 24, EG = Go * 365, by = {
- year: "{yyyy}",
- month: "{MMM}",
- day: "{d}",
- hour: "{HH}:{mm}",
- minute: "{HH}:{mm}",
- second: "{HH}:{mm}:{ss}",
- millisecond: "{HH}:{mm}:{ss} {SSS}",
- none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
- }, _S = "{yyyy}-{MM}-{dd}", MG = {
- year: "{yyyy}",
- month: "{yyyy}-{MM}",
- day: _S,
- hour: _S + " " + by.hour,
- minute: _S + " " + by.minute,
- second: _S + " " + by.second,
- millisecond: by.none
- }, fM = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Fle = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
- function Ji(t, e) {
- return t += "", "0000".substr(0, e - t.length) + t;
- }
- function Jv(t) {
- switch (t) {
- case "half-year":
- case "quarter":
- return "month";
- case "week":
- case "half-week":
- return "day";
- case "half-day":
- case "quarter-day":
- return "hour";
- default:
- return t;
- }
- }
- function _Ue(t) {
- return t === Jv(t);
- }
- function OUe(t) {
- switch (t) {
- case "year":
- case "month":
- return "day";
- case "millisecond":
- return "millisecond";
- default:
- return "second";
- }
- }
- function p1(t, e, n, r) {
- var i = go(t), a = i[q5(n)](), o = i[eg(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[PP(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Yb(n)](), f = (c - 1) % 12 + 1, d = i[$P(n)](), h = i[AP(n)](), p = i[EP(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof wn ? r : kk(r || Vle) || bUe(), y = m.getModel("time"), _ = y.get("month"), O = y.get("monthAbbr"), S = y.get("dayOfWeek"), x = y.get("dayOfWeekAbbr");
- return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Ji(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, _[o - 1]).replace(/{MMM}/g, O[o - 1]).replace(/{MM}/g, Ji(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Ji(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, S[u]).replace(/{ee}/g, x[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Ji(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Ji(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Ji(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Ji(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Ji(p, 3)).replace(/{S}/g, p + "");
- }
- function SUe(t, e, n, r, i) {
- var a = null;
- if (Ve(n))
- a = n;
- else if (qe(n))
- a = n(t.value, e, {
- level: t.level
- });
- else {
- var o = _e({}, by);
- if (t.level > 0)
- for (var s = 0; s < fM.length; ++s)
- o[fM[s]] = "{primary|" + o[fM[s]] + "}";
- var l = n ? n.inherit === !1 ? n : it(n, o) : o, u = Wle(t.value, i);
- if (l[u])
- a = l[u];
- else if (l.inherit) {
- for (var c = Fle.indexOf(u), s = c - 1; s >= 0; --s)
- if (l[u]) {
- a = l[u];
- break;
- }
- a = a || o.none;
- }
- if (Se(a)) {
- var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
- f = Math.min(f, a.length - 1), a = a[f];
- }
- }
- return p1(new Date(t.value), a, i, r);
- }
- function Wle(t, e) {
- var n = go(t), r = n[eg(e)]() + 1, i = n[PP(e)](), a = n[Yb(e)](), o = n[$P(e)](), s = n[AP(e)](), l = n[EP(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
- return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
- }
- function IG(t, e, n) {
- var r = Kt(t) ? go(t) : t;
- switch (e = e || Wle(t, n), e) {
- case "year":
- return r[q5(n)]();
- case "half-year":
- return r[eg(n)]() >= 6 ? 1 : 0;
- case "quarter":
- return Math.floor((r[eg(n)]() + 1) / 4);
- case "month":
- return r[eg(n)]();
- case "day":
- return r[PP(n)]();
- case "half-day":
- return r[Yb(n)]() / 24;
- case "hour":
- return r[Yb(n)]();
- case "minute":
- return r[$P(n)]();
- case "second":
- return r[AP(n)]();
- case "millisecond":
- return r[EP(n)]();
- }
- }
- function q5(t) {
- return t ? "getUTCFullYear" : "getFullYear";
- }
- function eg(t) {
- return t ? "getUTCMonth" : "getMonth";
- }
- function PP(t) {
- return t ? "getUTCDate" : "getDate";
- }
- function Yb(t) {
- return t ? "getUTCHours" : "getHours";
- }
- function $P(t) {
- return t ? "getUTCMinutes" : "getMinutes";
- }
- function AP(t) {
- return t ? "getUTCSeconds" : "getSeconds";
- }
- function EP(t) {
- return t ? "getUTCMilliseconds" : "getMilliseconds";
- }
- function xUe(t) {
- return t ? "setUTCFullYear" : "setFullYear";
- }
- function Qle(t) {
- return t ? "setUTCMonth" : "setMonth";
- }
- function Hle(t) {
- return t ? "setUTCDate" : "setDate";
- }
- function Gle(t) {
- return t ? "setUTCHours" : "setHours";
- }
- function jle(t) {
- return t ? "setUTCMinutes" : "setMinutes";
- }
- function Zle(t) {
- return t ? "setUTCSeconds" : "setSeconds";
- }
- function Ule(t) {
- return t ? "setUTCMilliseconds" : "setMilliseconds";
- }
- function wUe(t, e, n, r, i, a, o, s) {
- var l = new jt({
- style: {
- text: t,
- font: e,
- align: n,
- verticalAlign: r,
- padding: i,
- rich: a,
- overflow: o ? "truncate" : null,
- lineHeight: s
- }
- });
- return l.getBoundingRect();
- }
- function K5(t) {
- if (!hP(t))
- return Ve(t) ? t : "-";
- var e = (t + "").split(".");
- return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
- }
- function J5(t, e) {
- return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
- return r.toUpperCase();
- }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
- }
- var vp = sP;
- function Lk(t, e, n) {
- var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
- function i(c) {
- return c && Zo(c) ? c : "-";
- }
- function a(c) {
- return !!(c != null && !isNaN(c) && isFinite(c));
- }
- var o = e === "time", s = t instanceof Date;
- if (o || s) {
- var l = o ? go(t) : t;
- if (isNaN(+l)) {
- if (s)
- return "-";
- } else return p1(l, r, n);
- }
- if (e === "ordinal")
- return zb(t) ? i(t) : Kt(t) && a(t) ? t + "" : "-";
- var u = Gl(t);
- return a(u) ? K5(u) : zb(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
- }
- var DG = ["a", "b", "c", "d", "e", "f", "g"], dM = function(t, e) {
- return "{" + t + (e ?? "") + "}";
- };
- function e3(t, e, n) {
- Se(e) || (e = [e]);
- var r = e.length;
- if (!r)
- return "";
- for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
- var o = DG[a];
- t = t.replace(dM(o), dM(o, 0));
- }
- for (var s = 0; s < r; s++)
- for (var l = 0; l < i.length; l++) {
- var u = e[s][i[l]];
- t = t.replace(dM(DG[l], s), n ? ta(u) : u);
- }
- return t;
- }
- function CUe(t, e, n) {
- return F(e, function(r, i) {
- t = t.replace("{" + i + "}", r);
- }), t;
- }
- function Xle(t, e) {
- var n = Ve(t) ? {
- color: t,
- extraCssText: e
- } : t || {}, r = n.color, i = n.type;
- e = n.extraCssText;
- var a = n.renderMode || "html";
- if (!r)
- return "";
- if (a === "html")
- return i === "subItem" ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + ta(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + ta(r) + ";" + (e || "") + '"></span>';
- var o = n.markerId || "markerX";
- return {
- renderMode: a,
- content: "{" + o + "|} ",
- style: i === "subItem" ? {
- width: 4,
- height: 4,
- borderRadius: 2,
- backgroundColor: r
- } : {
- width: 10,
- height: 10,
- borderRadius: 5,
- backgroundColor: r
- }
- };
- }
- function TUe(t, e, n) {
- process.env.NODE_ENV !== "production" && _r("echarts.format.formatTime", "echarts.time.format"), (t === "week" || t === "month" || t === "quarter" || t === "half-year" || t === "year") && (t = `MM-dd
- yyyy`);
- var r = go(e), i = n ? "getUTC" : "get", a = r[i + "FullYear"](), o = r[i + "Month"]() + 1, s = r[i + "Date"](), l = r[i + "Hours"](), u = r[i + "Minutes"](), c = r[i + "Seconds"](), f = r[i + "Milliseconds"]();
- return t = t.replace("MM", Ji(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Ji(a % 100 + "", 2)).replace("dd", Ji(s, 2)).replace("d", s).replace("hh", Ji(l, 2)).replace("h", l).replace("mm", Ji(u, 2)).replace("m", u).replace("ss", Ji(c, 2)).replace("s", c).replace("SSS", Ji(f, 3)), t;
- }
- function PUe(t) {
- return t && t.charAt(0).toUpperCase() + t.substr(1);
- }
- function Uh(t, e) {
- return e = e || "transparent", Ve(t) ? t : nt(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
- }
- function BC(t, e) {
- if (e === "_blank" || e === "blank") {
- var n = window.open();
- n.opener = null, n.location.href = t;
- } else
- window.open(t, e);
- }
- var pw = F, Yle = ["left", "right", "top", "bottom", "width", "height"], oh = [["width", "left", "right"], ["height", "top", "bottom"]];
- function t3(t, e, n, r, i) {
- var a = 0, o = 0;
- r == null && (r = 1 / 0), i == null && (i = 1 / 0);
- var s = 0;
- e.eachChild(function(l, u) {
- var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
- if (t === "horizontal") {
- var v = c.width + (d ? -d.x + c.x : 0);
- h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
- } else {
- var g = c.height + (d ? -d.y + c.y : 0);
- p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
- }
- l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
- });
- }
- var Th = t3;
- vt(t3, "vertical");
- vt(t3, "horizontal");
- function $Ue(t, e, n) {
- var r = e.width, i = e.height, a = ze(t.left, r), o = ze(t.top, i), s = ze(t.right, r), l = ze(t.bottom, i);
- return (isNaN(a) || isNaN(parseFloat(t.left))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.right))) && (s = r), (isNaN(o) || isNaN(parseFloat(t.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(t.bottom))) && (l = i), n = vp(n || 0), {
- width: Math.max(s - a - n[1] - n[3], 0),
- height: Math.max(l - o - n[0] - n[2], 0)
- };
- }
- function Mr(t, e, n) {
- n = vp(n || 0);
- var r = e.width, i = e.height, a = ze(t.left, r), o = ze(t.top, i), s = ze(t.right, r), l = ze(t.bottom, i), u = ze(t.width, r), c = ze(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
- switch (isNaN(u) && (u = r - s - d - a), isNaN(c) && (c = i - l - f - o), h != null && (isNaN(u) && isNaN(c) && (h > r / i ? u = r * 0.8 : c = i * 0.8), isNaN(u) && (u = h * c), isNaN(c) && (c = u / h)), isNaN(a) && (a = r - s - u - d), isNaN(o) && (o = i - l - c - f), t.left || t.right) {
- case "center":
- a = r / 2 - u / 2 - n[3];
- break;
- case "right":
- a = r - u - d;
- break;
- }
- switch (t.top || t.bottom) {
- case "middle":
- case "center":
- o = i / 2 - c / 2 - n[0];
- break;
- case "bottom":
- o = i - c - f;
- break;
- }
- a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
- var p = new bt(a + n[3], o + n[0], u, c);
- return p.margin = n, p;
- }
- function MP(t, e, n, r, i, a) {
- var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
- if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
- return !1;
- var u;
- if (l === "raw")
- u = t.type === "group" ? new bt(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
- else if (u = t.getBoundingRect(), t.needLocalTransform()) {
- var c = t.getLocalTransform();
- u = u.clone(), u.applyTransform(c);
- }
- var f = Mr(it({
- width: u.width,
- height: u.height
- }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
- return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
- }
- function AUe(t, e) {
- return t[oh[e][0]] != null || t[oh[e][1]] != null && t[oh[e][2]] != null;
- }
- function qb(t) {
- var e = t.layoutMode || t.constructor.layoutMode;
- return nt(e) ? e : e ? {
- type: e
- } : null;
- }
- function Of(t, e, n) {
- var r = n && n.ignoreSize;
- !Se(r) && (r = [r, r]);
- var i = o(oh[0], 0), a = o(oh[1], 1);
- u(oh[0], t, i), u(oh[1], t, a);
- function o(c, f) {
- var d = {}, h = 0, p = {}, v = 0, g = 2;
- if (pw(c, function(_) {
- p[_] = t[_];
- }), pw(c, function(_) {
- s(e, _) && (d[_] = p[_] = e[_]), l(d, _) && h++, l(p, _) && v++;
- }), r[f])
- return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
- if (v === g || !h)
- return p;
- if (h >= g)
- return d;
- for (var m = 0; m < c.length; m++) {
- var y = c[m];
- if (!s(d, y) && s(t, y)) {
- d[y] = t[y];
- break;
- }
- }
- return d;
- }
- function s(c, f) {
- return c.hasOwnProperty(f);
- }
- function l(c, f) {
- return c[f] != null && c[f] !== "auto";
- }
- function u(c, f, d) {
- pw(c, function(h) {
- f[h] = d[h];
- });
- }
- }
- function Tm(t) {
- return qle({}, t);
- }
- function qle(t, e) {
- return e && t && pw(Yle, function(n) {
- e.hasOwnProperty(n) && (t[n] = e[n]);
- }), t;
- }
- var EUe = Ut(), At = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this, n, r, i) || this;
- return a.uid = Cm("ec_cpt_model"), a;
- }
- return e.prototype.init = function(n, r, i) {
- this.mergeDefaultAndTheme(n, i);
- }, e.prototype.mergeDefaultAndTheme = function(n, r) {
- var i = qb(this), a = i ? Tm(n) : {}, o = r.getTheme();
- mt(n, o.get(this.mainType)), mt(n, this.getDefaultOption()), i && Of(n, a, i);
- }, e.prototype.mergeOption = function(n, r) {
- mt(this.option, n, !0);
- var i = qb(this);
- i && Of(this.option, n, i);
- }, e.prototype.optionUpdated = function(n, r) {
- }, e.prototype.getDefaultOption = function() {
- var n = this.constructor;
- if (!mje(n))
- return n.defaultOption;
- var r = EUe(this);
- if (!r.defaultOption) {
- for (var i = [], a = n; a; ) {
- var o = a.prototype.defaultOption;
- o && i.push(o), a = a.superClass;
- }
- for (var s = {}, l = i.length - 1; l >= 0; l--)
- s = mt(s, i[l], !0);
- r.defaultOption = s;
- }
- return r.defaultOption;
- }, e.prototype.getReferringComponents = function(n, r) {
- var i = n + "Index", a = n + "Id";
- return l1(this.ecModel, n, {
- index: this.get(i, !0),
- id: this.get(a, !0)
- }, r);
- }, e.prototype.getBoxLayoutParams = function() {
- var n = this;
- return {
- left: n.get("left"),
- top: n.get("top"),
- right: n.get("right"),
- bottom: n.get("bottom"),
- width: n.get("width"),
- height: n.get("height")
- };
- }, e.prototype.getZLevelKey = function() {
- return "";
- }, e.prototype.setZLevel = function(n) {
- this.option.zlevel = n;
- }, e.protoInitialize = function() {
- var n = e.prototype;
- n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
- }(), e;
- }(wn)
- );
- Wse(At, wn);
- vP(At);
- pUe(At);
- vUe(At, MUe);
- function MUe(t) {
- var e = [];
- return F(At.getClassesByMainType(t), function(n) {
- e = e.concat(n.dependencies || n.prototype.dependencies || []);
- }), e = Ce(e, function(n) {
- return $l(n).main;
- }), t !== "dataset" && St(e, "dataset") <= 0 && e.unshift("dataset"), e;
- }
- var Kle = "";
- typeof navigator < "u" && (Kle = navigator.platform || "");
- var Jp = "rgba(0, 0, 0, 0.2)";
- const IUe = {
- darkMode: "auto",
- // backgroundColor: 'rgba(0,0,0,0)',
- colorBy: "series",
- color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
- gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
- aria: {
- decal: {
- decals: [{
- color: Jp,
- dashArrayX: [1, 0],
- dashArrayY: [2, 5],
- symbolSize: 1,
- rotation: Math.PI / 6
- }, {
- color: Jp,
- symbol: "circle",
- dashArrayX: [[8, 8], [0, 8, 8, 0]],
- dashArrayY: [6, 0],
- symbolSize: 0.8
- }, {
- color: Jp,
- dashArrayX: [1, 0],
- dashArrayY: [4, 3],
- rotation: -Math.PI / 4
- }, {
- color: Jp,
- dashArrayX: [[6, 6], [0, 6, 6, 0]],
- dashArrayY: [6, 0]
- }, {
- color: Jp,
- dashArrayX: [[1, 0], [1, 6]],
- dashArrayY: [1, 0, 6, 0],
- rotation: Math.PI / 4
- }, {
- color: Jp,
- symbol: "triangle",
- dashArrayX: [[9, 9], [0, 9, 9, 0]],
- dashArrayY: [7, 2],
- symbolSize: 0.75
- }]
- }
- },
- // If xAxis and yAxis declared, grid is created by default.
- // grid: {},
- textStyle: {
- // color: '#000',
- // decoration: 'none',
- // PENDING
- fontFamily: Kle.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
- // fontFamily: 'Arial, Verdana, sans-serif',
- fontSize: 12,
- fontStyle: "normal",
- fontWeight: "normal"
- },
- // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
- // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
- // Default is source-over
- blendMode: null,
- stateAnimation: {
- duration: 300,
- easing: "cubicOut"
- },
- animation: "auto",
- animationDuration: 1e3,
- animationDurationUpdate: 500,
- animationEasing: "cubicInOut",
- animationEasingUpdate: "cubicInOut",
- animationThreshold: 2e3,
- // Configuration for progressive/incremental rendering
- progressiveThreshold: 3e3,
- progressive: 400,
- // Threshold of if use single hover layer to optimize.
- // It is recommended that `hoverLayerThreshold` is equivalent to or less than
- // `progressiveThreshold`, otherwise hover will cause restart of progressive,
- // which is unexpected.
- // see example <echarts/test/heatmap-large.html>.
- hoverLayerThreshold: 3e3,
- // See: module:echarts/scale/Time
- useUTC: !1
- };
- var Nk = Ze(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), hs = "original", Hi = "arrayRows", ps = "objectRows", Xl = "keyedColumns", Mu = "typedArray", Jle = "unknown", Nl = "column", Pm = "row", pi = {
- Must: 1,
- Might: 2,
- Not: 3
- // Other cases
- }, eue = Ut();
- function DUe(t) {
- eue(t).datasetMap = Ze();
- }
- function tue(t, e, n) {
- var r = {}, i = r3(e);
- if (!i || !t)
- return r;
- var a = [], o = [], s = e.ecModel, l = eue(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
- t = t.slice(), F(t, function(v, g) {
- var m = nt(v) ? v : t[g] = {
- name: v
- };
- m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
- });
- var d = l.get(u) || l.set(u, {
- categoryWayDim: f,
- valueWayDim: 0
- });
- F(t, function(v, g) {
- var m = v.name, y = p(v);
- if (c == null) {
- var _ = d.valueWayDim;
- h(r[m], _, y), h(o, _, y), d.valueWayDim += y;
- } else if (c === g)
- h(r[m], 0, y), h(a, 0, y);
- else {
- var _ = d.categoryWayDim;
- h(r[m], _, y), h(o, _, y), d.categoryWayDim += y;
- }
- });
- function h(v, g, m) {
- for (var y = 0; y < m; y++)
- v.push(g + y);
- }
- function p(v) {
- var g = v.dimsDef;
- return g ? g.length : 1;
- }
- return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
- }
- function n3(t, e, n) {
- var r = {}, i = r3(t);
- if (!i)
- return r;
- var a = e.sourceFormat, o = e.dimensionsDefine, s;
- (a === ps || a === Xl) && F(o, function(c, f) {
- (nt(c) ? c.name : c) === "name" && (s = f);
- });
- var l = function() {
- for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
- var v = rue(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
- d.push(v);
- var g = v === pi.Not;
- if (g && c.v == null && h !== s && (c.v = h), (c.n == null || c.n === c.v || !g && d[c.n] === pi.Not) && (c.n = h), m(c) && d[c.n] !== pi.Not)
- return c;
- g || (v === pi.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
- }
- function m(y) {
- return y.v != null && y.n != null;
- }
- return m(c) ? c : m(f) ? f : null;
- }();
- if (l) {
- r.value = [l.v];
- var u = s ?? l.n;
- r.itemName = [u], r.seriesName = [u];
- }
- return r;
- }
- function r3(t) {
- var e = t.get("data", !0);
- if (!e)
- return l1(t.ecModel, "dataset", {
- index: t.get("datasetIndex", !0),
- id: t.get("datasetId", !0)
- }, Er).models[0];
- }
- function RUe(t) {
- return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : l1(t.ecModel, "dataset", {
- index: t.get("fromDatasetIndex", !0),
- id: t.get("fromDatasetId", !0)
- }, Er).models;
- }
- function nue(t, e) {
- return rue(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
- }
- function rue(t, e, n, r, i, a) {
- var o, s = 5;
- if (Qi(t))
- return pi.Not;
- var l, u;
- if (r) {
- var c = r[a];
- nt(c) ? (l = c.name, u = c.type) : Ve(c) && (l = c);
- }
- if (u != null)
- return u === "ordinal" ? pi.Must : pi.Not;
- if (e === Hi) {
- var f = t;
- if (n === Pm) {
- for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
- if ((o = O(d[i + h])) != null)
- return o;
- } else
- for (var h = 0; h < f.length && h < s; h++) {
- var p = f[i + h];
- if (p && (o = O(p[a])) != null)
- return o;
- }
- } else if (e === ps) {
- var v = t;
- if (!l)
- return pi.Not;
- for (var h = 0; h < v.length && h < s; h++) {
- var g = v[h];
- if (g && (o = O(g[l])) != null)
- return o;
- }
- } else if (e === Xl) {
- var m = t;
- if (!l)
- return pi.Not;
- var d = m[l];
- if (!d || Qi(d))
- return pi.Not;
- for (var h = 0; h < d.length && h < s; h++)
- if ((o = O(d[h])) != null)
- return o;
- } else if (e === hs)
- for (var y = t, h = 0; h < y.length && h < s; h++) {
- var g = y[h], _ = ym(g);
- if (!Se(_))
- return pi.Not;
- if ((o = O(_[a])) != null)
- return o;
- }
- function O(S) {
- var x = Ve(S);
- if (S != null && Number.isFinite(Number(S)) && S !== "")
- return x ? pi.Might : pi.Not;
- if (x && S !== "-")
- return pi.Must;
- }
- return pi.Not;
- }
- var Bk = Ze();
- function kUe(t, e) {
- at(Bk.get(t) == null && e), Bk.set(t, e);
- }
- function LUe(t, e, n) {
- var r = Bk.get(e);
- if (!r)
- return n;
- var i = r(t);
- if (!i)
- return n;
- if (process.env.NODE_ENV !== "production")
- for (var a = 0; a < i.length; a++)
- at(Fg(i[a]));
- return n.concat(i);
- }
- var RG = Ut(), NUe = Ut(), i3 = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getColorFromPalette = function(e, n, r) {
- var i = Cn(this.get("color", !0)), a = this.get("colorLayer", !0);
- return iue(this, RG, i, a, e, n, r);
- }, t.prototype.clearColorPalette = function() {
- zUe(this, RG);
- }, t;
- }()
- );
- function zk(t, e, n, r) {
- var i = Cn(t.get(["aria", "decal", "decals"]));
- return iue(t, NUe, i, null, e, n, r);
- }
- function BUe(t, e) {
- for (var n = t.length, r = 0; r < n; r++)
- if (t[r].length > e)
- return t[r];
- return t[n - 1];
- }
- function iue(t, e, n, r, i, a, o) {
- a = a || t;
- var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
- if (u.hasOwnProperty(i))
- return u[i];
- var c = o == null || !r ? n : BUe(r, o);
- if (c = c || n, !(!c || !c.length)) {
- var f = c[l];
- return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
- }
- }
- function zUe(t, e) {
- e(t).paletteIdx = 0, e(t).paletteNameMap = {};
- }
- var OS, I0, kG, hM = "\0_ec_inner", LG = 1, VUe = {
- grid: "GridComponent",
- polar: "PolarComponent",
- geo: "GeoComponent",
- singleAxis: "SingleAxisComponent",
- parallel: "ParallelComponent",
- calendar: "CalendarComponent",
- graphic: "GraphicComponent",
- toolbox: "ToolboxComponent",
- tooltip: "TooltipComponent",
- axisPointer: "AxisPointerComponent",
- brush: "BrushComponent",
- title: "TitleComponent",
- timeline: "TimelineComponent",
- markPoint: "MarkPointComponent",
- markLine: "MarkLineComponent",
- markArea: "MarkAreaComponent",
- legend: "LegendComponent",
- dataZoom: "DataZoomComponent",
- visualMap: "VisualMapComponent",
- // aria: 'AriaComponent',
- // dataset: 'DatasetComponent',
- // Dependencies
- xAxis: "GridComponent",
- yAxis: "GridComponent",
- angleAxis: "PolarComponent",
- radiusAxis: "PolarComponent"
- }, FUe = {
- line: "LineChart",
- bar: "BarChart",
- pie: "PieChart",
- scatter: "ScatterChart",
- radar: "RadarChart",
- map: "MapChart",
- tree: "TreeChart",
- treemap: "TreemapChart",
- graph: "GraphChart",
- gauge: "GaugeChart",
- funnel: "FunnelChart",
- parallel: "ParallelChart",
- sankey: "SankeyChart",
- boxplot: "BoxplotChart",
- candlestick: "CandlestickChart",
- effectScatter: "EffectScatterChart",
- lines: "LinesChart",
- heatmap: "HeatmapChart",
- pictorialBar: "PictorialBarChart",
- themeRiver: "ThemeRiverChart",
- sunburst: "SunburstChart",
- custom: "CustomChart"
- }, zC = {};
- function WUe(t) {
- F(t, function(e, n) {
- if (!At.hasClass(n)) {
- var r = VUe[n];
- r && !zC[r] && ($i("Component " + n + ` is used but not imported.
- import { ` + r + ` } from 'echarts/components';
- echarts.use([` + r + "]);"), zC[r] = !0);
- }
- });
- }
- var a3 = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.init = function(n, r, i, a, o, s) {
- a = a || {}, this.option = null, this._theme = new wn(a), this._locale = new wn(o), this._optionManager = s;
- }, e.prototype.setOption = function(n, r, i) {
- process.env.NODE_ENV !== "production" && (at(n != null, "option is null/undefined"), at(n[hM] !== LG, "please use chart.getOption()"));
- var a = zG(r);
- this._optionManager.setOption(n, i, a), this._resetOption(null, a);
- }, e.prototype.resetOption = function(n, r) {
- return this._resetOption(n, zG(r));
- }, e.prototype._resetOption = function(n, r) {
- var i = !1, a = this._optionManager;
- if (!n || n === "recreate") {
- var o = a.mountOption(n === "recreate");
- process.env.NODE_ENV !== "production" && WUe(o), !this.option || n === "recreate" ? kG(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
- }
- if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
- var s = a.getTimelineOption(this);
- s && (i = !0, this._mergeOption(s, r));
- }
- if (!n || n === "recreate" || n === "media") {
- var l = a.getMediaOption(this);
- l.length && F(l, function(u) {
- i = !0, this._mergeOption(u, r);
- }, this);
- }
- return i;
- }, e.prototype.mergeOption = function(n) {
- this._mergeOption(n, null);
- }, e.prototype._mergeOption = function(n, r) {
- var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Ze(), u = r && r.replaceMergeMainTypeMap;
- DUe(this), F(n, function(f, d) {
- f != null && (At.hasClass(d) ? d && (s.push(d), l.set(d, !0)) : i[d] = i[d] == null ? ot(f) : mt(i[d], f, !0));
- }), u && u.each(function(f, d) {
- At.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
- }), At.topologicalTravel(s, At.getAllClassMainTypes(), c, this);
- function c(f) {
- var d = LUe(this, f, Cn(n[f])), h = a.get(f), p = (
- // `!oldCmptList` means init. See the comment in `mappingToExists`
- h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
- ), v = Nse(h, d, p);
- lje(v, f, At), i[f] = null, a.set(f, null), o.set(f, 0);
- var g = [], m = [], y = 0, _, O;
- F(v, function(S, x) {
- var C = S.existing, P = S.newOption;
- if (!P)
- C && (C.mergeOption({}, this), C.optionUpdated({}, !1));
- else {
- var $ = f === "series", T = At.getClass(
- f,
- S.keyInfo.subType,
- !$
- // Give a more detailed warn later if series don't exists
- );
- if (!T) {
- if (process.env.NODE_ENV !== "production") {
- var E = S.keyInfo.subType, M = FUe[E];
- zC[E] || (zC[E] = !0, $i(M ? "Series " + E + ` is used but not imported.
- import { ` + M + ` } from 'echarts/charts';
- echarts.use([` + M + "]);" : "Unknown series " + E));
- }
- return;
- }
- if (f === "tooltip") {
- if (_) {
- process.env.NODE_ENV !== "production" && (O || (nr("Currently only one tooltip component is allowed."), O = !0));
- return;
- }
- _ = !0;
- }
- if (C && C.constructor === T)
- C.name = S.keyInfo.name, C.mergeOption(P, this), C.optionUpdated(P, !1);
- else {
- var R = _e({
- componentIndex: x
- }, S.keyInfo);
- C = new T(P, this, this, R), _e(C, R), S.brandNew && (C.__requireNewView = !0), C.init(P, this, this), C.optionUpdated(null, !0);
- }
- }
- C ? (g.push(C.option), m.push(C), y++) : (g.push(void 0), m.push(void 0));
- }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && OS(this);
- }
- this._seriesIndices || OS(this);
- }, e.prototype.getOption = function() {
- var n = ot(this.option);
- return F(n, function(r, i) {
- if (At.hasClass(i)) {
- for (var a = Cn(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
- a[l] && !Fg(a[l]) ? s = !0 : (a[l] = null, !s && o--);
- a.length = o, n[i] = a;
- }
- }), delete n[hM], n;
- }, e.prototype.getTheme = function() {
- return this._theme;
- }, e.prototype.getLocaleModel = function() {
- return this._locale;
- }, e.prototype.setUpdatePayload = function(n) {
- this._payload = n;
- }, e.prototype.getUpdatePayload = function() {
- return this._payload;
- }, e.prototype.getComponent = function(n, r) {
- var i = this._componentsMap.get(n);
- if (i) {
- var a = i[r || 0];
- if (a)
- return a;
- if (r == null) {
- for (var o = 0; o < i.length; o++)
- if (i[o])
- return i[o];
- }
- }
- }, e.prototype.queryComponents = function(n) {
- var r = n.mainType;
- if (!r)
- return [];
- var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
- if (!s || !s.length)
- return [];
- var l;
- return i != null ? (l = [], F(Cn(i), function(u) {
- s[u] && l.push(s[u]);
- })) : a != null ? l = NG("id", a, s) : o != null ? l = NG("name", o, s) : l = yn(s, function(u) {
- return !!u;
- }), BG(l, n);
- }, e.prototype.findComponents = function(n) {
- var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : yn(this._componentsMap.get(i), function(u) {
- return !!u;
- });
- return l(BG(o, n));
- function s(u) {
- var c = i + "Index", f = i + "Id", d = i + "Name";
- return u && (u[c] != null || u[f] != null || u[d] != null) ? {
- mainType: i,
- // subType will be filtered finally.
- index: u[c],
- id: u[f],
- name: u[d]
- } : null;
- }
- function l(u) {
- return n.filter ? yn(u, n.filter) : u;
- }
- }, e.prototype.eachComponent = function(n, r, i) {
- var a = this._componentsMap;
- if (qe(n)) {
- var o = r, s = n;
- a.each(function(f, d) {
- for (var h = 0; f && h < f.length; h++) {
- var p = f[h];
- p && s.call(o, d, p, p.componentIndex);
- }
- });
- } else
- for (var l = Ve(n) ? a.get(n) : nt(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
- var c = l[u];
- c && r.call(i, c, c.componentIndex);
- }
- }, e.prototype.getSeriesByName = function(n) {
- var r = Br(n, null);
- return yn(this._componentsMap.get("series"), function(i) {
- return !!i && r != null && i.name === r;
- });
- }, e.prototype.getSeriesByIndex = function(n) {
- return this._componentsMap.get("series")[n];
- }, e.prototype.getSeriesByType = function(n) {
- return yn(this._componentsMap.get("series"), function(r) {
- return !!r && r.subType === n;
- });
- }, e.prototype.getSeries = function() {
- return yn(this._componentsMap.get("series"), function(n) {
- return !!n;
- });
- }, e.prototype.getSeriesCount = function() {
- return this._componentsCount.get("series");
- }, e.prototype.eachSeries = function(n, r) {
- I0(this), F(this._seriesIndices, function(i) {
- var a = this._componentsMap.get("series")[i];
- n.call(r, a, i);
- }, this);
- }, e.prototype.eachRawSeries = function(n, r) {
- F(this._componentsMap.get("series"), function(i) {
- i && n.call(r, i, i.componentIndex);
- });
- }, e.prototype.eachSeriesByType = function(n, r, i) {
- I0(this), F(this._seriesIndices, function(a) {
- var o = this._componentsMap.get("series")[a];
- o.subType === n && r.call(i, o, a);
- }, this);
- }, e.prototype.eachRawSeriesByType = function(n, r, i) {
- return F(this.getSeriesByType(n), r, i);
- }, e.prototype.isSeriesFiltered = function(n) {
- return I0(this), this._seriesIndicesMap.get(n.componentIndex) == null;
- }, e.prototype.getCurrentSeriesIndices = function() {
- return (this._seriesIndices || []).slice();
- }, e.prototype.filterSeries = function(n, r) {
- I0(this);
- var i = [];
- F(this._seriesIndices, function(a) {
- var o = this._componentsMap.get("series")[a];
- n.call(r, o, a) && i.push(a);
- }, this), this._seriesIndices = i, this._seriesIndicesMap = Ze(i);
- }, e.prototype.restoreData = function(n) {
- OS(this);
- var r = this._componentsMap, i = [];
- r.each(function(a, o) {
- At.hasClass(o) && i.push(o);
- }), At.topologicalTravel(i, At.getAllClassMainTypes(), function(a) {
- F(r.get(a), function(o) {
- o && (a !== "series" || !QUe(o, n)) && o.restoreData();
- });
- });
- }, e.internalField = function() {
- OS = function(n) {
- var r = n._seriesIndices = [];
- F(n._componentsMap.get("series"), function(i) {
- i && r.push(i.componentIndex);
- }), n._seriesIndicesMap = Ze(r);
- }, I0 = function(n) {
- if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
- throw new Error("Option should contains series.");
- }, kG = function(n, r) {
- n.option = {}, n.option[hM] = LG, n._componentsMap = Ze({
- series: []
- }), n._componentsCount = Ze();
- var i = r.aria;
- nt(i) && i.enabled == null && (i.enabled = !0), HUe(r, n._theme.option), mt(r, IUe, !1), n._mergeOption(r, null);
- };
- }(), e;
- }(wn)
- );
- function QUe(t, e) {
- if (e) {
- var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
- return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
- }
- }
- function HUe(t, e) {
- var n = t.color && !t.colorLayer;
- F(e, function(r, i) {
- i === "colorLayer" && n || At.hasClass(i) || (typeof r == "object" ? t[i] = t[i] ? mt(t[i], r, !1) : ot(r) : t[i] == null && (t[i] = r));
- });
- }
- function NG(t, e, n) {
- if (Se(e)) {
- var r = Ze();
- return F(e, function(a) {
- if (a != null) {
- var o = Br(a, null);
- o != null && r.set(a, !0);
- }
- }), yn(n, function(a) {
- return a && r.get(a[t]);
- });
- } else {
- var i = Br(e, null);
- return yn(n, function(a) {
- return a && i != null && a[t] === i;
- });
- }
- }
- function BG(t, e) {
- return e.hasOwnProperty("subType") ? yn(t, function(n) {
- return n && n.subType === e.subType;
- }) : t;
- }
- function zG(t) {
- var e = Ze();
- return t && F(Cn(t.replaceMerge), function(n) {
- process.env.NODE_ENV !== "production" && at(At.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
- }), {
- replaceMergeMainTypeMap: e
- };
- }
- vr(a3, i3);
- var GUe = [
- "getDom",
- "getZr",
- "getWidth",
- "getHeight",
- "getDevicePixelRatio",
- "dispatchAction",
- "isSSR",
- "isDisposed",
- "on",
- "off",
- "getDataURL",
- "getConnectedDataURL",
- // 'getModel',
- "getOption",
- // 'getViewOfComponentModel',
- // 'getViewOfSeriesModel',
- "getId",
- "updateLabelLayout"
- ], aue = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- F(GUe, function(n) {
- this[n] = We(e[n], e);
- }, this);
- }
- return t;
- }()
- ), pM = {}, gp = (
- /** @class */
- function() {
- function t() {
- this._coordinateSystems = [];
- }
- return t.prototype.create = function(e, n) {
- var r = [];
- F(pM, function(i, a) {
- var o = i.create(e, n);
- r = r.concat(o || []);
- }), this._coordinateSystems = r;
- }, t.prototype.update = function(e, n) {
- F(this._coordinateSystems, function(r) {
- r.update && r.update(e, n);
- });
- }, t.prototype.getCoordinateSystems = function() {
- return this._coordinateSystems.slice();
- }, t.register = function(e, n) {
- pM[e] = n;
- }, t.get = function(e) {
- return pM[e];
- }, t;
- }()
- ), jUe = /^(min|max)?(.+)$/, ZUe = (
- /** @class */
- function() {
- function t(e) {
- this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
- }
- return t.prototype.setOption = function(e, n, r) {
- e && (F(Cn(e.series), function(o) {
- o && o.data && Qi(o.data) && Vb(o.data);
- }), F(Cn(e.dataset), function(o) {
- o && o.source && Qi(o.source) && Vb(o.source);
- })), e = ot(e);
- var i = this._optionBackup, a = UUe(e, n, !i);
- this._newBaseOption = a.baseOption, i ? (a.timelineOptions.length && (i.timelineOptions = a.timelineOptions), a.mediaList.length && (i.mediaList = a.mediaList), a.mediaDefault && (i.mediaDefault = a.mediaDefault)) : this._optionBackup = a;
- }, t.prototype.mountOption = function(e) {
- var n = this._optionBackup;
- return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], ot(e ? n.baseOption : this._newBaseOption);
- }, t.prototype.getTimelineOption = function(e) {
- var n, r = this._timelineOptions;
- if (r.length) {
- var i = e.getComponent("timeline");
- i && (n = ot(
- // FIXME:TS as TimelineModel or quivlant interface
- r[i.getCurrentIndex()]
- ));
- }
- return n;
- }, t.prototype.getMediaOption = function(e) {
- var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
- if (!i.length && !a)
- return s;
- for (var l = 0, u = i.length; l < u; l++)
- XUe(i[l].query, n, r) && o.push(l);
- return !o.length && a && (o = [-1]), o.length && !qUe(o, this._currentMediaIndices) && (s = Ce(o, function(c) {
- return ot(c === -1 ? a.option : i[c].option);
- })), this._currentMediaIndices = o, s;
- }, t;
- }()
- );
- function UUe(t, e, n) {
- var r = [], i, a, o = t.baseOption, s = t.timeline, l = t.options, u = t.media, c = !!t.media, f = !!(l || s || o && o.timeline);
- o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (Se(u) ? F(u, function(h) {
- process.env.NODE_ENV !== "production" && h && !h.option && nt(h.query) && nt(h.query.option) && $i("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), h && h.option && (h.query ? r.push(h) : i || (i = h));
- }) : process.env.NODE_ENV !== "production" && $i("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), F(l, function(h) {
- return d(h);
- }), F(r, function(h) {
- return d(h.option);
- });
- function d(h) {
- F(e, function(p) {
- p(h, n);
- });
- }
- return {
- baseOption: a,
- timelineOptions: l || [],
- mediaDefault: i,
- mediaList: r
- };
- }
- function XUe(t, e, n) {
- var r = {
- width: e,
- height: n,
- aspectratio: e / n
- // lower case for convenience.
- }, i = !0;
- return F(t, function(a, o) {
- var s = o.match(jUe);
- if (!(!s || !s[1] || !s[2])) {
- var l = s[1], u = s[2].toLowerCase();
- YUe(r[u], a, l) || (i = !1);
- }
- }), i;
- }
- function YUe(t, e, n) {
- return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
- }
- function qUe(t, e) {
- return t.join(",") === e.join(",");
- }
- var Eo = F, Kb = nt, VG = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
- function vM(t) {
- var e = t && t.itemStyle;
- if (e)
- for (var n = 0, r = VG.length; n < r; n++) {
- var i = VG[n], a = e.normal, o = e.emphasis;
- a && a[i] && (process.env.NODE_ENV !== "production" && _r("itemStyle.normal." + i, i), t[i] = t[i] || {}, t[i].normal ? mt(t[i].normal, a[i]) : t[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && _r("itemStyle.emphasis." + i, "emphasis." + i), t[i] = t[i] || {}, t[i].emphasis ? mt(t[i].emphasis, o[i]) : t[i].emphasis = o[i], o[i] = null);
- }
- }
- function Li(t, e, n) {
- if (t && t[e] && (t[e].normal || t[e].emphasis)) {
- var r = t[e].normal, i = t[e].emphasis;
- r && (process.env.NODE_ENV !== "production" && ss("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), n ? (t[e].normal = t[e].emphasis = null, it(t[e], r)) : t[e] = r), i && (process.env.NODE_ENV !== "production" && ss(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), t.emphasis = t.emphasis || {}, t.emphasis[e] = i, i.focus && (t.emphasis.focus = i.focus), i.blurScope && (t.emphasis.blurScope = i.blurScope));
- }
- }
- function _y(t) {
- Li(t, "itemStyle"), Li(t, "lineStyle"), Li(t, "areaStyle"), Li(t, "label"), Li(t, "labelLine"), Li(t, "upperLabel"), Li(t, "edgeLabel");
- }
- function Pr(t, e) {
- var n = Kb(t) && t[e], r = Kb(n) && n.textStyle;
- if (r) {
- process.env.NODE_ENV !== "production" && ss("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
- for (var i = 0, a = HH.length; i < a; i++) {
- var o = HH[i];
- r.hasOwnProperty(o) && (n[o] = r[o]);
- }
- }
- }
- function Bo(t) {
- t && (_y(t), Pr(t, "label"), t.emphasis && Pr(t.emphasis, "label"));
- }
- function KUe(t) {
- if (Kb(t)) {
- vM(t), _y(t), Pr(t, "label"), Pr(t, "upperLabel"), Pr(t, "edgeLabel"), t.emphasis && (Pr(t.emphasis, "label"), Pr(t.emphasis, "upperLabel"), Pr(t.emphasis, "edgeLabel"));
- var e = t.markPoint;
- e && (vM(e), Bo(e));
- var n = t.markLine;
- n && (vM(n), Bo(n));
- var r = t.markArea;
- r && Bo(r);
- var i = t.data;
- if (t.type === "graph") {
- i = i || t.nodes;
- var a = t.links || t.edges;
- if (a && !Qi(a))
- for (var o = 0; o < a.length; o++)
- Bo(a[o]);
- F(t.categories, function(u) {
- _y(u);
- });
- }
- if (i && !Qi(i))
- for (var o = 0; o < i.length; o++)
- Bo(i[o]);
- if (e = t.markPoint, e && e.data)
- for (var s = e.data, o = 0; o < s.length; o++)
- Bo(s[o]);
- if (n = t.markLine, n && n.data)
- for (var l = n.data, o = 0; o < l.length; o++)
- Se(l[o]) ? (Bo(l[o][0]), Bo(l[o][1])) : Bo(l[o]);
- t.type === "gauge" ? (Pr(t, "axisLabel"), Pr(t, "title"), Pr(t, "detail")) : t.type === "treemap" ? (Li(t.breadcrumb, "itemStyle"), F(t.levels, function(u) {
- _y(u);
- })) : t.type === "tree" && _y(t.leaves);
- }
- }
- function vu(t) {
- return Se(t) ? t : t ? [t] : [];
- }
- function FG(t) {
- return (Se(t) ? t[0] : t) || {};
- }
- function JUe(t, e) {
- Eo(vu(t.series), function(r) {
- Kb(r) && KUe(r);
- });
- var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
- e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Eo(n, function(r) {
- Eo(vu(t[r]), function(i) {
- i && (Pr(i, "axisLabel"), Pr(i.axisPointer, "label"));
- });
- }), Eo(vu(t.parallel), function(r) {
- var i = r && r.parallelAxisDefault;
- Pr(i, "axisLabel"), Pr(i && i.axisPointer, "label");
- }), Eo(vu(t.calendar), function(r) {
- Li(r, "itemStyle"), Pr(r, "dayLabel"), Pr(r, "monthLabel"), Pr(r, "yearLabel");
- }), Eo(vu(t.radar), function(r) {
- Pr(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && ss("name property in radar component has been changed to axisName")), r.nameGap != null && r.axisNameGap == null && (r.axisNameGap = r.nameGap, delete r.nameGap, process.env.NODE_ENV !== "production" && ss("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && Eo(r.indicator, function(i) {
- i.text && _r("text", "name", "radar.indicator");
- });
- }), Eo(vu(t.geo), function(r) {
- Kb(r) && (Bo(r), Eo(vu(r.regions), function(i) {
- Bo(i);
- }));
- }), Eo(vu(t.timeline), function(r) {
- Bo(r), Li(r, "label"), Li(r, "itemStyle"), Li(r, "controlStyle", !0);
- var i = r.data;
- Se(i) && F(i, function(a) {
- nt(a) && (Li(a, "label"), Li(a, "itemStyle"));
- });
- }), Eo(vu(t.toolbox), function(r) {
- Li(r, "iconStyle"), Eo(r.feature, function(i) {
- Li(i, "iconStyle");
- });
- }), Pr(FG(t.axisPointer), "label"), Pr(FG(t.tooltip).axisPointer, "label");
- }
- function eXe(t, e) {
- for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
- ;
- return r;
- }
- function tXe(t, e, n, r) {
- for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
- o = i[s], a[o] == null && (a[o] = {}), a = a[o];
- a[i[s]] == null && (a[i[s]] = n);
- }
- function WG(t) {
- t && F(nXe, function(e) {
- e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
- });
- }
- var nXe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], rXe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], gM = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
- function D0(t) {
- var e = t && t.itemStyle;
- if (e)
- for (var n = 0; n < gM.length; n++) {
- var r = gM[n][1], i = gM[n][0];
- e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && _r(r, i));
- }
- }
- function QG(t) {
- t && t.alignTo === "edge" && t.margin != null && t.edgeDistance == null && (process.env.NODE_ENV !== "production" && _r("label.margin", "label.edgeDistance", "pie"), t.edgeDistance = t.margin);
- }
- function HG(t) {
- t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && _r("downplay", "blur", "sunburst"));
- }
- function iXe(t) {
- t && t.focusNodeAdjacency != null && (t.emphasis = t.emphasis || {}, t.emphasis.focus == null && (process.env.NODE_ENV !== "production" && _r("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), t.emphasis.focus = "adjacency"));
- }
- function oue(t, e) {
- if (t)
- for (var n = 0; n < t.length; n++)
- e(t[n]), t[n] && oue(t[n].children, e);
- }
- function sue(t, e) {
- JUe(t, e), t.series = Cn(t.series), F(t.series, function(n) {
- if (nt(n)) {
- var r = n.type;
- if (r === "line")
- n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && _r("clipOverflow", "clip", "line"));
- else if (r === "pie" || r === "gauge") {
- n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && _r("clockWise", "clockwise")), QG(n.label);
- var i = n.data;
- if (i && !Qi(i))
- for (var a = 0; a < i.length; a++)
- QG(i[a]);
- n.hoverOffset != null && (n.emphasis = n.emphasis || {}, (n.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && _r("hoverOffset", "emphasis.scaleSize"), n.emphasis.scaleSize = n.hoverOffset));
- } else if (r === "gauge") {
- var o = eXe(n, "pointer.color");
- o != null && tXe(n, "itemStyle.color", o);
- } else if (r === "bar") {
- D0(n), D0(n.backgroundStyle), D0(n.emphasis);
- var i = n.data;
- if (i && !Qi(i))
- for (var a = 0; a < i.length; a++)
- typeof i[a] == "object" && (D0(i[a]), D0(i[a] && i[a].emphasis));
- } else if (r === "sunburst") {
- var s = n.highlightPolicy;
- s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && _r("highlightPolicy", "emphasis.focus", "sunburst"))), HG(n), oue(n.data, HG);
- } else r === "graph" || r === "sankey" ? iXe(n) : r === "map" && (n.mapType && !n.map && (process.env.NODE_ENV !== "production" && _r("mapType", "map", "map"), n.map = n.mapType), n.mapLocation && (process.env.NODE_ENV !== "production" && ss("`mapLocation` is not used anymore."), it(n, n.mapLocation)));
- n.hoverAnimation != null && (n.emphasis = n.emphasis || {}, n.emphasis && n.emphasis.scale == null && (process.env.NODE_ENV !== "production" && _r("hoverAnimation", "emphasis.scale"), n.emphasis.scale = n.hoverAnimation)), WG(n);
- }
- }), t.dataRange && (t.visualMap = t.dataRange), F(rXe, function(n) {
- var r = t[n];
- r && (Se(r) || (r = [r]), F(r, function(i) {
- WG(i);
- }));
- });
- }
- function aXe(t) {
- var e = Ze();
- t.eachSeries(function(n) {
- var r = n.get("stack");
- if (r) {
- var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
- // Used for calculate axis extent automatically.
- // TODO: Type getCalculationInfo return more specific type?
- stackResultDimension: a.getCalculationInfo("stackResultDimension"),
- stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
- stackedDimension: a.getCalculationInfo("stackedDimension"),
- stackedByDimension: a.getCalculationInfo("stackedByDimension"),
- isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
- data: a,
- seriesModel: n
- };
- if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
- return;
- i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
- }
- }), e.each(oXe);
- }
- function oXe(t) {
- F(t, function(e, n) {
- var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
- o.modify(a, function(u, c, f) {
- var d = o.get(e.stackedDimension, f);
- if (isNaN(d))
- return i;
- var h, p;
- s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
- for (var v = NaN, g = n - 1; g >= 0; g--) {
- var m = t[g];
- if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
- var y = m.data.getByRawIndex(m.stackResultDimension, p);
- if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
- d = XGe(d, y), v = y;
- break;
- }
- }
- }
- return r[0] = d, r[1] = v, r;
- });
- });
- }
- var IP = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- this.data = e.data || (e.sourceFormat === Xl ? {} : []), this.sourceFormat = e.sourceFormat || Jle, this.seriesLayoutBy = e.seriesLayoutBy || Nl, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
- var n = this.dimensionsDefine = e.dimensionsDefine;
- if (n)
- for (var r = 0; r < n.length; r++) {
- var i = n[r];
- i.type == null && nue(this, r) === pi.Must && (i.type = "ordinal");
- }
- }
- return t;
- }()
- );
- function o3(t) {
- return t instanceof IP;
- }
- function Vk(t, e, n) {
- n = n || lue(t);
- var r = e.seriesLayoutBy, i = lXe(t, n, r, e.sourceHeader, e.dimensions), a = new IP({
- data: t,
- sourceFormat: n,
- seriesLayoutBy: r,
- dimensionsDefine: i.dimensionsDefine,
- startIndex: i.startIndex,
- dimensionsDetectedCount: i.dimensionsDetectedCount,
- metaRawOption: ot(e)
- });
- return a;
- }
- function s3(t) {
- return new IP({
- data: t,
- sourceFormat: Qi(t) ? Mu : hs
- });
- }
- function sXe(t) {
- return new IP({
- data: t.data,
- sourceFormat: t.sourceFormat,
- seriesLayoutBy: t.seriesLayoutBy,
- dimensionsDefine: ot(t.dimensionsDefine),
- startIndex: t.startIndex,
- dimensionsDetectedCount: t.dimensionsDetectedCount
- });
- }
- function lue(t) {
- var e = Jle;
- if (Qi(t))
- e = Mu;
- else if (Se(t)) {
- t.length === 0 && (e = Hi);
- for (var n = 0, r = t.length; n < r; n++) {
- var i = t[n];
- if (i != null) {
- if (Se(i) || Qi(i)) {
- e = Hi;
- break;
- } else if (nt(i)) {
- e = ps;
- break;
- }
- }
- }
- } else if (nt(t)) {
- for (var a in t)
- if (Qe(t, a) && Pi(t[a])) {
- e = Xl;
- break;
- }
- }
- return e;
- }
- function lXe(t, e, n, r, i) {
- var a, o;
- if (!t)
- return {
- dimensionsDefine: GG(i),
- startIndex: o,
- dimensionsDetectedCount: a
- };
- if (e === Hi) {
- var s = t;
- r === "auto" || r == null ? jG(function(u) {
- u != null && u !== "-" && (Ve(u) ? o == null && (o = 1) : o = 0);
- }, n, s, 10) : o = Kt(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], jG(function(u, c) {
- i[c] = u != null ? u + "" : "";
- }, n, s, 1 / 0)), a = i ? i.length : n === Pm ? s.length : s[0] ? s[0].length : null;
- } else if (e === ps)
- i || (i = uXe(t));
- else if (e === Xl)
- i || (i = [], F(t, function(u, c) {
- i.push(c);
- }));
- else if (e === hs) {
- var l = ym(t[0]);
- a = Se(l) && l.length || 1;
- } else e === Mu && process.env.NODE_ENV !== "production" && at(!!i, "dimensions must be given if data is TypedArray.");
- return {
- startIndex: o,
- dimensionsDefine: GG(i),
- dimensionsDetectedCount: a
- };
- }
- function uXe(t) {
- for (var e = 0, n; e < t.length && !(n = t[e++]); )
- ;
- if (n)
- return kt(n);
- }
- function GG(t) {
- if (t) {
- var e = Ze();
- return Ce(t, function(n, r) {
- n = nt(n) ? n : {
- name: n
- };
- var i = {
- name: n.name,
- displayName: n.displayName,
- type: n.type
- };
- if (i.name == null)
- return i;
- i.name += "", i.displayName == null && (i.displayName = i.name);
- var a = e.get(i.name);
- return a ? i.name += "-" + a.count++ : e.set(i.name, {
- count: 1
- }), i;
- });
- }
- }
- function jG(t, e, n, r) {
- if (e === Pm)
- for (var i = 0; i < n.length && i < r; i++)
- t(n[i] ? n[i][0] : null, i);
- else
- for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
- t(a[i], i);
- }
- function uue(t) {
- var e = t.sourceFormat;
- return e === ps || e === Xl;
- }
- var wd, Cd, Td, ZG, UG, cue = (
- /** @class */
- function() {
- function t(e, n) {
- var r = o3(e) ? e : s3(e);
- this._source = r;
- var i = this._data = r.data;
- if (r.sourceFormat === Mu) {
- if (process.env.NODE_ENV !== "production" && n == null)
- throw new Error("Typed array data must specify dimension size");
- this._offset = 0, this._dimSize = n, this._data = i;
- }
- UG(this, i, r);
- }
- return t.prototype.getSource = function() {
- return this._source;
- }, t.prototype.count = function() {
- return 0;
- }, t.prototype.getItem = function(e, n) {
- }, t.prototype.appendData = function(e) {
- }, t.prototype.clean = function() {
- }, t.protoInitialize = function() {
- var e = t.prototype;
- e.pure = !1, e.persistent = !0;
- }(), t.internalField = function() {
- var e;
- UG = function(o, s, l) {
- var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = ZG[l3(u, c)];
- if (process.env.NODE_ENV !== "production" && at(h, "Invalide sourceFormat: " + u), _e(o, h), u === Mu)
- o.getItem = n, o.count = i, o.fillStorage = r;
- else {
- var p = fue(u, c);
- o.getItem = We(p, null, s, f, d);
- var v = due(u, c);
- o.count = We(v, null, s, f, d);
- }
- };
- var n = function(o, s) {
- o = o - this._offset, s = s || [];
- for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
- s[f] = l[c + f];
- return s;
- }, r = function(o, s, l, u) {
- for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
- for (var h = u[d], p = h[0] == null ? 1 / 0 : h[0], v = h[1] == null ? -1 / 0 : h[1], g = s - o, m = l[d], y = 0; y < g; y++) {
- var _ = c[y * f + d];
- m[o + y] = _, _ < p && (p = _), _ > v && (v = _);
- }
- h[0] = p, h[1] = v;
- }
- }, i = function() {
- return this._data ? this._data.length / this._dimSize : 0;
- };
- ZG = (e = {}, e[Hi + "_" + Nl] = {
- pure: !0,
- appendData: a
- }, e[Hi + "_" + Pm] = {
- pure: !0,
- appendData: function() {
- throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
- }
- }, e[ps] = {
- pure: !0,
- appendData: a
- }, e[Xl] = {
- pure: !0,
- appendData: function(o) {
- var s = this._data;
- F(o, function(l, u) {
- for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
- c.push(l[f]);
- });
- }
- }, e[hs] = {
- appendData: a
- }, e[Mu] = {
- persistent: !1,
- pure: !0,
- appendData: function(o) {
- process.env.NODE_ENV !== "production" && at(Qi(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
- },
- // Clean self if data is already used.
- clean: function() {
- this._offset += this.count(), this._data = null;
- }
- }, e);
- function a(o) {
- for (var s = 0; s < o.length; s++)
- this._data.push(o[s]);
- }
- }(), t;
- }()
- ), XG = function(t, e, n, r) {
- return t[r];
- }, cXe = (wd = {}, wd[Hi + "_" + Nl] = function(t, e, n, r) {
- return t[r + e];
- }, wd[Hi + "_" + Pm] = function(t, e, n, r, i) {
- r += e;
- for (var a = i || [], o = t, s = 0; s < o.length; s++) {
- var l = o[s];
- a[s] = l ? l[r] : null;
- }
- return a;
- }, wd[ps] = XG, wd[Xl] = function(t, e, n, r, i) {
- for (var a = i || [], o = 0; o < n.length; o++) {
- var s = n[o].name;
- if (process.env.NODE_ENV !== "production" && s == null)
- throw new Error();
- var l = t[s];
- a[o] = l ? l[r] : null;
- }
- return a;
- }, wd[hs] = XG, wd);
- function fue(t, e) {
- var n = cXe[l3(t, e)];
- return process.env.NODE_ENV !== "production" && at(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
- }
- var YG = function(t, e, n) {
- return t.length;
- }, fXe = (Cd = {}, Cd[Hi + "_" + Nl] = function(t, e, n) {
- return Math.max(0, t.length - e);
- }, Cd[Hi + "_" + Pm] = function(t, e, n) {
- var r = t[0];
- return r ? Math.max(0, r.length - e) : 0;
- }, Cd[ps] = YG, Cd[Xl] = function(t, e, n) {
- var r = n[0].name;
- if (process.env.NODE_ENV !== "production" && r == null)
- throw new Error();
- var i = t[r];
- return i ? i.length : 0;
- }, Cd[hs] = YG, Cd);
- function due(t, e) {
- var n = fXe[l3(t, e)];
- return process.env.NODE_ENV !== "production" && at(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
- }
- var mM = function(t, e, n) {
- return t[e];
- }, dXe = (Td = {}, Td[Hi] = mM, Td[ps] = function(t, e, n) {
- return t[n];
- }, Td[Xl] = mM, Td[hs] = function(t, e, n) {
- var r = ym(t);
- return r instanceof Array ? r[e] : r;
- }, Td[Mu] = mM, Td);
- function hue(t) {
- var e = dXe[t];
- return process.env.NODE_ENV !== "production" && at(e, 'Do not support get value on "' + t + '".'), e;
- }
- function l3(t, e) {
- return t === Hi ? t + "_" + e : t;
- }
- function Hg(t, e, n) {
- if (t) {
- var r = t.getRawDataItem(e);
- if (r != null) {
- var i = t.getStore(), a = i.getSource().sourceFormat;
- if (n != null) {
- var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
- return hue(a)(r, o, s);
- } else {
- var l = r;
- return a === hs && (l = ym(r)), l;
- }
- }
- }
- }
- var hXe = /\{@(.+?)\}/g, DP = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getDataParams = function(e, n) {
- var r = this.getData(n), i = this.getRawValue(e, n), a = r.getRawIndex(e), o = r.getName(e), s = r.getRawDataItem(e), l = r.getItemVisual(e, "style"), u = l && l[r.getItemVisual(e, "drawType") || "fill"], c = l && l.stroke, f = this.mainType, d = f === "series", h = r.userOutput && r.userOutput.get();
- return {
- componentType: f,
- componentSubType: this.subType,
- componentIndex: this.componentIndex,
- seriesType: d ? this.subType : null,
- seriesIndex: this.seriesIndex,
- seriesId: d ? this.id : null,
- seriesName: d ? this.name : null,
- name: o,
- dataIndex: a,
- data: s,
- dataType: n,
- value: i,
- color: u,
- borderColor: c,
- dimensionNames: h ? h.fullDimensions : null,
- encode: h ? h.encode : null,
- // Param name list for mapping `a`, `b`, `c`, `d`, `e`
- $vars: ["seriesName", "name", "value"]
- };
- }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
- n = n || "normal";
- var s = this.getData(r), l = this.getDataParams(e, r);
- if (o && (l.value = o.interpolatedValue), i != null && Se(l.value) && (l.value = l.value[i]), !a) {
- var u = s.getItemModel(e);
- a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
- }
- if (qe(a))
- return l.status = n, l.dimensionIndex = i, a(l);
- if (Ve(a)) {
- var c = e3(a, l);
- return c.replace(hXe, function(f, d) {
- var h = d.length, p = d;
- p.charAt(0) === "[" && p.charAt(h - 1) === "]" && (p = +p.slice(1, h - 1), process.env.NODE_ENV !== "production" && isNaN(p) && $i("Invalide label formatter: @" + d + ", only support @[0], @[1], @[2], ..."));
- var v = Hg(s, e, p);
- if (o && Se(o.interpolatedValue)) {
- var g = s.getDimensionIndex(p);
- g >= 0 && (v = o.interpolatedValue[g]);
- }
- return v != null ? v + "" : "";
- });
- }
- }, t.prototype.getRawValue = function(e, n) {
- return Hg(this.getData(n), e);
- }, t.prototype.formatTooltip = function(e, n, r) {
- }, t;
- }()
- );
- function qG(t) {
- var e, n;
- return nt(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + fa(t)) : e = t, {
- text: e,
- // markers: markers || markersExisting,
- frag: n
- };
- }
- function ob(t) {
- return new pXe(t);
- }
- var pXe = (
- /** @class */
- function() {
- function t(e) {
- e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
- }
- return t.prototype.perform = function(e) {
- var n = this._upstream, r = e && e.skip;
- if (this._dirty && n) {
- var i = this.context;
- i.data = i.outputData = n.context.outputData;
- }
- this.__pipeline && (this.__pipeline.currentTask = this);
- var a;
- this._plan && !r && (a = this._plan(this.context));
- var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
- (o !== l || s !== u) && (a = "reset");
- function c(y) {
- return !(y >= 1) && (y = 1), y;
- }
- var f;
- (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
- var d = e && e.step;
- if (n ? (process.env.NODE_ENV !== "production" && at(n._outputDueEnd != null), this._dueEnd = n._outputDueEnd) : (process.env.NODE_ENV !== "production" && at(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
- var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
- if (!r && (f || h < p)) {
- var v = this._progress;
- if (Se(v))
- for (var g = 0; g < v.length; g++)
- this._doProgress(v[g], h, p, l, u);
- else
- this._doProgress(v, h, p, l, u);
- }
- this._dueIndex = p;
- var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
- process.env.NODE_ENV !== "production" && at(m >= this._outputDueEnd), this._outputDueEnd = m;
- } else
- this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
- return this.unfinished();
- }, t.prototype.dirty = function() {
- this._dirty = !0, this._onDirty && this._onDirty(this.context);
- }, t.prototype._doProgress = function(e, n, r, i, a) {
- KG.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
- start: n,
- end: r,
- count: r - n,
- next: KG.next
- }, this.context);
- }, t.prototype._doReset = function(e) {
- this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
- var n, r;
- !e && this._reset && (n = this._reset(this.context), n && n.progress && (r = n.forceFirstProgress, n = n.progress), Se(n) && !n.length && (n = null)), this._progress = n, this._modBy = this._modDataCount = null;
- var i = this._downstream;
- return i && i.dirty(), r;
- }, t.prototype.unfinished = function() {
- return this._progress && this._dueIndex < this._dueEnd;
- }, t.prototype.pipe = function(e) {
- process.env.NODE_ENV !== "production" && at(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
- }, t.prototype.dispose = function() {
- this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
- }, t.prototype.getUpstream = function() {
- return this._upstream;
- }, t.prototype.getDownstream = function() {
- return this._downstream;
- }, t.prototype.setOutputEnd = function(e) {
- this._outputDueEnd = this._settedOutputEnd = e;
- }, t;
- }()
- ), KG = /* @__PURE__ */ function() {
- var t, e, n, r, i, a = {
- reset: function(l, u, c, f) {
- e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
- }
- };
- return a;
- function o() {
- return e < t ? e++ : null;
- }
- function s() {
- var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
- return e++, u;
- }
- }();
- function sf(t, e) {
- var n = e && e.type;
- return n === "ordinal" ? t : (n === "time" && !Kt(t) && t != null && t !== "-" && (t = +go(t)), t == null || t === "" ? NaN : Number(t));
- }
- var vXe = Ze({
- number: function(t) {
- return parseFloat(t);
- },
- time: function(t) {
- return +go(t);
- },
- trim: function(t) {
- return Ve(t) ? Zo(t) : t;
- }
- });
- function pue(t) {
- return vXe.get(t);
- }
- var vue = {
- lt: function(t, e) {
- return t < e;
- },
- lte: function(t, e) {
- return t <= e;
- },
- gt: function(t, e) {
- return t > e;
- },
- gte: function(t, e) {
- return t >= e;
- }
- }, gXe = (
- /** @class */
- function() {
- function t(e, n) {
- if (!Kt(n)) {
- var r = "";
- process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), fn(r);
- }
- this._opFn = vue[e], this._rvalFloat = Gl(n);
- }
- return t.prototype.evaluate = function(e) {
- return Kt(e) ? this._opFn(e, this._rvalFloat) : this._opFn(Gl(e), this._rvalFloat);
- }, t;
- }()
- ), gue = (
- /** @class */
- function() {
- function t(e, n) {
- var r = e === "desc";
- this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
- }
- return t.prototype.evaluate = function(e, n) {
- var r = Kt(e) ? e : Gl(e), i = Kt(n) ? n : Gl(n), a = isNaN(r), o = isNaN(i);
- if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
- var s = Ve(e), l = Ve(n);
- s && (r = l ? e : 0), l && (i = s ? n : 0);
- }
- return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
- }, t;
- }()
- ), mXe = (
- /** @class */
- function() {
- function t(e, n) {
- this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = Gl(n);
- }
- return t.prototype.evaluate = function(e) {
- var n = e === this._rval;
- if (!n) {
- var r = typeof e;
- r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = Gl(e) === this._rvalFloat);
- }
- return this._isEQ ? n : !n;
- }, t;
- }()
- );
- function yXe(t, e) {
- return t === "eq" || t === "ne" ? new mXe(t === "eq", e) : Qe(vue, t) ? new gXe(t, e) : null;
- }
- var bXe = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getRawData = function() {
- throw new Error("not supported");
- }, t.prototype.getRawDataItem = function(e) {
- throw new Error("not supported");
- }, t.prototype.cloneRawData = function() {
- }, t.prototype.getDimensionInfo = function(e) {
- }, t.prototype.cloneAllDimensionInfo = function() {
- }, t.prototype.count = function() {
- }, t.prototype.retrieveValue = function(e, n) {
- }, t.prototype.retrieveValueFromItem = function(e, n) {
- }, t.prototype.convertValue = function(e, n) {
- return sf(e, n);
- }, t;
- }()
- );
- function _Xe(t, e) {
- var n = new bXe(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
- t.seriesLayoutBy !== Nl && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), fn(o));
- var s = [], l = {}, u = t.dimensionsDefine;
- if (u)
- F(u, function(v, g) {
- var m = v.name, y = {
- index: g,
- name: m,
- displayName: v.displayName
- };
- if (s.push(y), m != null) {
- var _ = "";
- Qe(l, m) && (process.env.NODE_ENV !== "production" && (_ = 'dimension name "' + m + '" duplicated.'), fn(_)), l[m] = y;
- }
- });
- else
- for (var c = 0; c < t.dimensionsDetectedCount; c++)
- s.push({
- index: c
- });
- var f = fue(i, Nl);
- e.__isBuiltIn && (n.getRawDataItem = function(v) {
- return f(r, a, s, v);
- }, n.getRawData = We(OXe, null, t)), n.cloneRawData = We(SXe, null, t);
- var d = due(i, Nl);
- n.count = We(d, null, r, a, s);
- var h = hue(i);
- n.retrieveValue = function(v, g) {
- var m = f(r, a, s, v);
- return p(m, g);
- };
- var p = n.retrieveValueFromItem = function(v, g) {
- if (v != null) {
- var m = s[g];
- if (m)
- return h(v, g, m.name);
- }
- };
- return n.getDimensionInfo = We(xXe, null, s, l), n.cloneAllDimensionInfo = We(wXe, null, s), n;
- }
- function OXe(t) {
- var e = t.sourceFormat;
- if (!u3(e)) {
- var n = "";
- process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), fn(n);
- }
- return t.data;
- }
- function SXe(t) {
- var e = t.sourceFormat, n = t.data;
- if (!u3(e)) {
- var r = "";
- process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), fn(r);
- }
- if (e === Hi) {
- for (var i = [], a = 0, o = n.length; a < o; a++)
- i.push(n[a].slice());
- return i;
- } else if (e === ps) {
- for (var i = [], a = 0, o = n.length; a < o; a++)
- i.push(_e({}, n[a]));
- return i;
- }
- }
- function xXe(t, e, n) {
- if (n != null) {
- if (Kt(n) || !isNaN(n) && !Qe(e, n))
- return t[n];
- if (Qe(e, n))
- return e[n];
- }
- }
- function wXe(t) {
- return ot(t);
- }
- var mue = Ze();
- function CXe(t) {
- t = ot(t);
- var e = t.type, n = "";
- e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), fn(n));
- var r = e.split(":");
- r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), fn(n));
- var i = !1;
- r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, mue.set(e, t);
- }
- function TXe(t, e, n) {
- var r = Cn(t), i = r.length, a = "";
- i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), fn(a));
- for (var o = 0, s = i; o < s; o++) {
- var l = r[o];
- e = PXe(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
- }
- return e;
- }
- function PXe(t, e, n, r) {
- var i = "";
- e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), fn(i)), nt(t) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof t + "."), fn(i));
- var a = t.type, o = mue.get(a);
- o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), fn(i));
- var s = Ce(e, function(c) {
- return _Xe(c, o);
- }), l = Cn(o.transform({
- upstream: s[0],
- upstreamList: s,
- config: ot(t.config)
- }));
- if (process.env.NODE_ENV !== "production" && t.print) {
- var u = Ce(l, function(c) {
- var f = r != null ? " === pipe index: " + r : "";
- return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", fa(c.data), "- transform result dimensions:", fa(c.dimensions)].join(`
- `);
- }).join(`
- `);
- JGe(u);
- }
- return Ce(l, function(c, f) {
- var d = "";
- nt(c) || (process.env.NODE_ENV !== "production" && (d = "A transform should not return some empty results."), fn(d)), c.data || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be not be null or undefined"), fn(d));
- var h = lue(c.data);
- u3(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), fn(d));
- var p, v = e[0];
- if (v && f === 0 && !c.dimensions) {
- var g = v.startIndex;
- g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
- seriesLayoutBy: Nl,
- sourceHeader: g,
- dimensions: v.metaRawOption.dimensions
- };
- } else
- p = {
- seriesLayoutBy: Nl,
- sourceHeader: 0,
- dimensions: c.dimensions
- };
- return Vk(c.data, p, null);
- });
- }
- function u3(t) {
- return t === Hi || t === ps;
- }
- var RP = "undefined", $Xe = typeof Uint32Array === RP ? Array : Uint32Array, AXe = typeof Uint16Array === RP ? Array : Uint16Array, yue = typeof Int32Array === RP ? Array : Int32Array, JG = typeof Float64Array === RP ? Array : Float64Array, bue = {
- float: JG,
- int: yue,
- // Ordinal data type can be string or int
- ordinal: Array,
- number: Array,
- time: JG
- }, yM;
- function R0(t) {
- return t > 65535 ? $Xe : AXe;
- }
- function ev() {
- return [1 / 0, -1 / 0];
- }
- function EXe(t) {
- var e = t.constructor;
- return e === Array ? t.slice() : new e(t);
- }
- function ej(t, e, n, r, i) {
- var a = bue[n || "float"];
- if (i) {
- var o = t[e], s = o && o.length;
- if (s !== r) {
- for (var l = new a(r), u = 0; u < s; u++)
- l[u] = o[u];
- t[e] = l;
- }
- } else
- t[e] = new a(r);
- }
- var Fk = (
- /** @class */
- function() {
- function t() {
- this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Ze();
- }
- return t.prototype.initData = function(e, n, r) {
- process.env.NODE_ENV !== "production" && at(qe(e.getItem) && qe(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
- var i = e.getSource(), a = this.defaultDimValueGetter = yM[i.sourceFormat];
- this._dimValueGetter = r || a, this._rawExtent = [];
- var o = uue(i);
- this._dimensions = Ce(n, function(s) {
- return process.env.NODE_ENV !== "production" && o && at(s.property != null), {
- // Only pick these two props. Not leak other properties like orderMeta.
- type: s.type,
- property: s.property
- };
- }), this._initDataFromProvider(0, e.count());
- }, t.prototype.getProvider = function() {
- return this._provider;
- }, t.prototype.getSource = function() {
- return this._provider.getSource();
- }, t.prototype.ensureCalculationDimension = function(e, n) {
- var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
- if (a != null) {
- if (i[a].type === n)
- return a;
- } else
- a = i.length;
- return i[a] = {
- type: n
- }, r.set(e, a), this._chunks[a] = new bue[n || "float"](this._rawCount), this._rawExtent[a] = ev(), a;
- }, t.prototype.collectOrdinalMeta = function(e, n) {
- var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
- o === 0 && (a[e] = ev());
- for (var l = a[e], u = o; u < s; u++) {
- var c = r[u] = n.parseAndCollect(r[u]);
- isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
- }
- i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
- }, t.prototype.getOrdinalMeta = function(e) {
- var n = this._dimensions[e], r = n.ordinalMeta;
- return r;
- }, t.prototype.getDimensionProperty = function(e) {
- var n = this._dimensions[e];
- return n && n.property;
- }, t.prototype.appendData = function(e) {
- process.env.NODE_ENV !== "production" && at(!this._indices, "appendData can only be called on raw data.");
- var n = this._provider, r = this.count();
- n.appendData(e);
- var i = n.count();
- return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
- }, t.prototype.appendValues = function(e, n) {
- for (var r = this._chunks, i = this._dimensions, a = i.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, n || 0), u = 0; u < a; u++) {
- var c = i[u];
- ej(r, u, c.type, l, !0);
- }
- for (var f = [], d = s; d < l; d++)
- for (var h = d - s, p = 0; p < a; p++) {
- var c = i[p], v = yM.arrayRows.call(this, e[h] || f, c.property, h, p);
- r[p][d] = v;
- var g = o[p];
- v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
- }
- return this._rawCount = this._count = l, {
- start: s,
- end: l
- };
- }, t.prototype._initDataFromProvider = function(e, n, r) {
- for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = Ce(o, function(y) {
- return y.property;
- }), c = 0; c < s; c++) {
- var f = o[c];
- l[c] || (l[c] = ev()), ej(a, c, f.type, n, r);
- }
- if (i.fillStorage)
- i.fillStorage(e, n, a, l);
- else
- for (var d = [], h = e; h < n; h++) {
- d = i.getItem(h, d);
- for (var p = 0; p < s; p++) {
- var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
- v[h] = g;
- var m = l[p];
- g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
- }
- }
- !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
- }, t.prototype.count = function() {
- return this._count;
- }, t.prototype.get = function(e, n) {
- if (!(n >= 0 && n < this._count))
- return NaN;
- var r = this._chunks[e];
- return r ? r[this.getRawIndex(n)] : NaN;
- }, t.prototype.getValues = function(e, n) {
- var r = [], i = [];
- if (n == null) {
- n = e, e = [];
- for (var a = 0; a < this._dimensions.length; a++)
- i.push(a);
- } else
- i = e;
- for (var a = 0, o = i.length; a < o; a++)
- r.push(this.get(i[a], n));
- return r;
- }, t.prototype.getByRawIndex = function(e, n) {
- if (!(n >= 0 && n < this._rawCount))
- return NaN;
- var r = this._chunks[e];
- return r ? r[n] : NaN;
- }, t.prototype.getSum = function(e) {
- var n = this._chunks[e], r = 0;
- if (n)
- for (var i = 0, a = this.count(); i < a; i++) {
- var o = this.get(e, i);
- isNaN(o) || (r += o);
- }
- return r;
- }, t.prototype.getMedian = function(e) {
- var n = [];
- this.each([e], function(a) {
- isNaN(a) || n.push(a);
- });
- var r = n.sort(function(a, o) {
- return a - o;
- }), i = this.count();
- return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
- }, t.prototype.indexOfRawIndex = function(e) {
- if (e >= this._rawCount || e < 0)
- return -1;
- if (!this._indices)
- return e;
- var n = this._indices, r = n[e];
- if (r != null && r < this._count && r === e)
- return e;
- for (var i = 0, a = this._count - 1; i <= a; ) {
- var o = (i + a) / 2 | 0;
- if (n[o] < e)
- i = o + 1;
- else if (n[o] > e)
- a = o - 1;
- else
- return o;
- }
- return -1;
- }, t.prototype.indicesOfNearest = function(e, n, r) {
- var i = this._chunks, a = i[e], o = [];
- if (!a)
- return o;
- r == null && (r = 1 / 0);
- for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
- var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
- p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
- }
- return o.length = u, o;
- }, t.prototype.getIndices = function() {
- var e, n = this._indices;
- if (n) {
- var r = n.constructor, i = this._count;
- if (r === Array) {
- e = new r(i);
- for (var a = 0; a < i; a++)
- e[a] = n[a];
- } else
- e = new r(n.buffer, 0, i);
- } else {
- var r = R0(this._rawCount);
- e = new r(this.count());
- for (var a = 0; a < e.length; a++)
- e[a] = a;
- }
- return e;
- }, t.prototype.filter = function(e, n) {
- if (!this._count)
- return this;
- for (var r = this.clone(), i = r.count(), a = R0(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
- var h = void 0, p = r.getRawIndex(d);
- if (l === 0)
- h = n(d);
- else if (l === 1) {
- var v = f[c][p];
- h = n(v, d);
- } else {
- for (var g = 0; g < l; g++)
- s[g] = f[e[g]][p];
- s[g] = d, h = n.apply(null, s);
- }
- h && (o[u++] = p);
- }
- return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
- }, t.prototype.selectRange = function(e) {
- var n = this.clone(), r = n._count;
- if (!r)
- return this;
- var i = kt(e), a = i.length;
- if (!a)
- return this;
- var o = n.count(), s = R0(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
- if (!n._indices) {
- var v = 0;
- if (a === 1) {
- for (var g = h[i[0]], m = 0; m < r; m++) {
- var y = g[m];
- (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
- }
- p = !0;
- } else if (a === 2) {
- for (var g = h[i[0]], _ = h[i[1]], O = e[i[1]][0], S = e[i[1]][1], m = 0; m < r; m++) {
- var y = g[m], x = _[m];
- (y >= f && y <= d || isNaN(y)) && (x >= O && x <= S || isNaN(x)) && (l[u++] = v), v++;
- }
- p = !0;
- }
- }
- if (!p)
- if (a === 1)
- for (var m = 0; m < o; m++) {
- var C = n.getRawIndex(m), y = h[i[0]][C];
- (y >= f && y <= d || isNaN(y)) && (l[u++] = C);
- }
- else
- for (var m = 0; m < o; m++) {
- for (var P = !0, C = n.getRawIndex(m), $ = 0; $ < a; $++) {
- var T = i[$], y = h[T][C];
- (y < e[T][0] || y > e[T][1]) && (P = !1);
- }
- P && (l[u++] = n.getRawIndex(m));
- }
- return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
- }, t.prototype.map = function(e, n) {
- var r = this.clone(e);
- return this._updateDims(r, e, n), r;
- }, t.prototype.modify = function(e, n) {
- this._updateDims(this, e, n);
- }, t.prototype._updateDims = function(e, n, r) {
- for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
- u[n[c]] = ev();
- for (var f = 0; f < s; f++) {
- for (var d = e.getRawIndex(f), h = 0; h < o; h++)
- l[h] = i[n[h]][d];
- l[o] = f;
- var p = r && r.apply(null, l);
- if (p != null) {
- typeof p != "object" && (a[0] = p, p = a);
- for (var c = 0; c < p.length; c++) {
- var v = n[c], g = p[c], m = u[v], y = i[v];
- y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
- }
- }
- }
- }, t.prototype.lttbDownSample = function(e, n) {
- var r = this.clone([e], !0), i = r._chunks, a = i[e], o = this.count(), s = 0, l = Math.floor(1 / n), u = this.getRawIndex(0), c, f, d, h = new (R0(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
- h[s++] = u;
- for (var p = 1; p < o - 1; p += l) {
- for (var v = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), m = (g + v) / 2, y = 0, _ = v; _ < g; _++) {
- var O = this.getRawIndex(_), S = a[O];
- isNaN(S) || (y += S);
- }
- y /= g - v;
- var x = p, C = Math.min(p + l, o), P = p - 1, $ = a[u];
- c = -1, d = x;
- for (var T = -1, E = 0, _ = x; _ < C; _++) {
- var O = this.getRawIndex(_), S = a[O];
- if (isNaN(S)) {
- E++, T < 0 && (T = O);
- continue;
- }
- f = Math.abs((P - m) * (S - $) - (P - _) * (y - $)), f > c && (c = f, d = O);
- }
- E > 0 && E < C - x && (h[s++] = Math.min(T, d), d = Math.max(T, d)), h[s++] = d, u = d;
- }
- return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
- }, t.prototype.downSample = function(e, n, r, i) {
- for (var a = this.clone([e], !0), o = a._chunks, s = [], l = Math.floor(1 / n), u = o[e], c = this.count(), f = a._rawExtent[e] = ev(), d = new (R0(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
- l > c - p && (l = c - p, s.length = l);
- for (var v = 0; v < l; v++) {
- var g = this.getRawIndex(p + v);
- s[v] = u[g];
- }
- var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
- u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
- }
- return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
- }, t.prototype.each = function(e, n) {
- if (this._count)
- for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
- var s = this.getRawIndex(a);
- switch (r) {
- case 0:
- n(a);
- break;
- case 1:
- n(i[e[0]][s], a);
- break;
- case 2:
- n(i[e[0]][s], i[e[1]][s], a);
- break;
- default:
- for (var l = 0, u = []; l < r; l++)
- u[l] = i[e[l]][s];
- u[l] = a, n.apply(null, u);
- }
- }
- }, t.prototype.getDataExtent = function(e) {
- var n = this._chunks[e], r = ev();
- if (!n)
- return r;
- var i = this.count(), a = !this._indices, o;
- if (a)
- return this._rawExtent[e].slice();
- if (o = this._extent[e], o)
- return o.slice();
- o = r;
- for (var s = o[0], l = o[1], u = 0; u < i; u++) {
- var c = this.getRawIndex(u), f = n[c];
- f < s && (s = f), f > l && (l = f);
- }
- return o = [s, l], this._extent[e] = o, o;
- }, t.prototype.getRawDataItem = function(e) {
- var n = this.getRawIndex(e);
- if (this._provider.persistent)
- return this._provider.getItem(n);
- for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
- r.push(i[a][n]);
- return r;
- }, t.prototype.clone = function(e, n) {
- var r = new t(), i = this._chunks, a = e && os(e, function(s, l) {
- return s[l] = !0, s;
- }, {});
- if (a)
- for (var o = 0; o < i.length; o++)
- r._chunks[o] = a[o] ? EXe(i[o]) : i[o];
- else
- r._chunks = i;
- return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
- }, t.prototype._copyCommonProps = function(e) {
- e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = ot(this._extent), e._rawExtent = ot(this._rawExtent);
- }, t.prototype._cloneIndices = function() {
- if (this._indices) {
- var e = this._indices.constructor, n = void 0;
- if (e === Array) {
- var r = this._indices.length;
- n = new e(r);
- for (var i = 0; i < r; i++)
- n[i] = this._indices[i];
- } else
- n = new e(this._indices);
- return n;
- }
- return null;
- }, t.prototype._getRawIdxIdentity = function(e) {
- return e;
- }, t.prototype._getRawIdx = function(e) {
- return e < this._count && e >= 0 ? this._indices[e] : -1;
- }, t.prototype._updateGetRawIdx = function() {
- this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
- }, t.internalField = function() {
- function e(n, r, i, a) {
- return sf(n[a], this._dimensions[a]);
- }
- yM = {
- arrayRows: e,
- objectRows: function(n, r, i, a) {
- return sf(n[r], this._dimensions[a]);
- },
- keyedColumns: e,
- original: function(n, r, i, a) {
- var o = n && (n.value == null ? n : n.value);
- return sf(o instanceof Array ? o[a] : o, this._dimensions[a]);
- },
- typedArray: function(n, r, i, a) {
- return n[a];
- }
- };
- }(), t;
- }()
- ), _ue = (
- /** @class */
- function() {
- function t(e) {
- this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
- }
- return t.prototype.dirty = function() {
- this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
- }, t.prototype._setLocalSource = function(e, n) {
- this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
- }, t.prototype._getVersionSign = function() {
- return this._sourceHost.uid + "_" + this._versionSignBase;
- }, t.prototype.prepareSource = function() {
- this._isDirty() && (this._createSource(), this._dirty = !1);
- }, t.prototype._createSource = function() {
- this._setLocalSource([], []);
- var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
- if (k0(e)) {
- var o = e, s = void 0, l = void 0, u = void 0;
- if (r) {
- var c = n[0];
- c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
- } else
- s = o.get("data", !0), l = Qi(s) ? Mu : hs, a = [];
- var f = this._getSourceMetaRawOption() || {}, d = u && u.metaRawOption || {}, h = dt(f.seriesLayoutBy, d.seriesLayoutBy) || null, p = dt(f.sourceHeader, d.sourceHeader), v = dt(f.dimensions, d.dimensions), g = h !== d.seriesLayoutBy || !!p != !!d.sourceHeader || v;
- i = g ? [Vk(s, {
- seriesLayoutBy: h,
- sourceHeader: p,
- dimensions: v
- }, l)] : [];
- } else {
- var m = e;
- if (r) {
- var y = this._applyTransform(n);
- i = y.sourceList, a = y.upstreamSignList;
- } else {
- var _ = m.get("source", !0);
- i = [Vk(_, this._getSourceMetaRawOption(), null)], a = [];
- }
- }
- process.env.NODE_ENV !== "production" && at(i && a), this._setLocalSource(i, a);
- }, t.prototype._applyTransform = function(e) {
- var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
- if (process.env.NODE_ENV !== "production" && at(i != null || r != null), i != null) {
- var a = "";
- e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), nj(a));
- }
- var o, s = [], l = [];
- return F(e, function(u) {
- u.prepareSource();
- var c = u.getSource(i || 0), f = "";
- i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), nj(f)), s.push(c), l.push(u._getVersionSign());
- }), r ? o = TXe(r, s, {
- datasetIndex: n.componentIndex
- }) : i != null && (o = [sXe(s[0])]), {
- sourceList: o,
- upstreamSignList: l
- };
- }, t.prototype._isDirty = function() {
- if (this._dirty)
- return !0;
- for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
- var r = e[n];
- if (
- // Consider the case that there is ancestor diry, call it recursively.
- // The performance is probably not an issue because usually the chain is not long.
- r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
- )
- return !0;
- }
- }, t.prototype.getSource = function(e) {
- e = e || 0;
- var n = this._sourceList[e];
- if (!n) {
- var r = this._getUpstreamSourceManagers();
- return r[0] && r[0].getSource(e);
- }
- return n;
- }, t.prototype.getSharedDataStore = function(e) {
- process.env.NODE_ENV !== "production" && at(k0(this._sourceHost), "Can only call getDataStore on series source manager.");
- var n = e.makeStoreSchema();
- return this._innerGetDataStore(n.dimensions, e.source, n.hash);
- }, t.prototype._innerGetDataStore = function(e, n, r) {
- var i = 0, a = this._storeList, o = a[i];
- o || (o = a[i] = {});
- var s = o[r];
- if (!s) {
- var l = this._getUpstreamSourceManagers()[0];
- k0(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new Fk(), s.initData(new cue(n, e.length), e)), o[r] = s;
- }
- return s;
- }, t.prototype._getUpstreamSourceManagers = function() {
- var e = this._sourceHost;
- if (k0(e)) {
- var n = r3(e);
- return n ? [n.getSourceManager()] : [];
- } else
- return Ce(RUe(e), function(r) {
- return r.getSourceManager();
- });
- }, t.prototype._getSourceMetaRawOption = function() {
- var e = this._sourceHost, n, r, i;
- if (k0(e))
- n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
- else if (!this._getUpstreamSourceManagers().length) {
- var a = e;
- n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
- }
- return {
- seriesLayoutBy: n,
- sourceHeader: r,
- dimensions: i
- };
- }, t;
- }()
- );
- function tj(t) {
- var e = t.option.transform;
- e && Vb(t.option.transform);
- }
- function k0(t) {
- return t.mainType === "series";
- }
- function nj(t) {
- throw new Error(t);
- }
- var Oue = "line-height:1";
- function Sue(t, e) {
- var n = t.color || "#6e7079", r = t.fontSize || 12, i = t.fontWeight || "400", a = t.color || "#464646", o = t.fontSize || 14, s = t.fontWeight || "900";
- return e === "html" ? {
- // eslint-disable-next-line max-len
- nameStyle: "font-size:" + ta(r + "") + "px;color:" + ta(n) + ";font-weight:" + ta(i + ""),
- // eslint-disable-next-line max-len
- valueStyle: "font-size:" + ta(o + "") + "px;color:" + ta(a) + ";font-weight:" + ta(s + "")
- } : {
- nameStyle: {
- fontSize: r,
- fill: n,
- fontWeight: i
- },
- valueStyle: {
- fontSize: o,
- fill: a,
- fontWeight: s
- }
- };
- }
- var MXe = [0, 10, 20, 30], IXe = ["", `
- `, `
- `, `
- `];
- function ti(t, e) {
- return e.type = t, e;
- }
- function Wk(t) {
- return t.type === "section";
- }
- function xue(t) {
- return Wk(t) ? DXe : RXe;
- }
- function wue(t) {
- if (Wk(t)) {
- var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
- return F(t.blocks, function(i) {
- var a = wue(i);
- a >= e && (e = a + +(r && // 0 always can not be readable gap level.
- (!a || Wk(i) && !i.noHeader)));
- }), e;
- }
- return 0;
- }
- function DXe(t, e, n, r) {
- var i = e.noHeader, a = kXe(wue(e)), o = [], s = e.blocks || [];
- at(!s || Se(s)), s = s || [];
- var l = t.orderMode;
- if (e.sortBlocks && l) {
- s = s.slice();
- var u = {
- valueAsc: "asc",
- valueDesc: "desc"
- };
- if (Qe(u, l)) {
- var c = new gue(u[l], null);
- s.sort(function(p, v) {
- return c.evaluate(p.sortParam, v.sortParam);
- });
- } else l === "seriesDesc" && s.reverse();
- }
- F(s, function(p, v) {
- var g = e.valueFormatter, m = xue(p)(
- // Inherit valueFormatter
- g ? _e(_e({}, t), {
- valueFormatter: g
- }) : t,
- p,
- v > 0 ? a.html : 0,
- r
- );
- m != null && o.push(m);
- });
- var f = t.renderMode === "richText" ? o.join(a.richText) : Qk(o.join(""), i ? n : a.html);
- if (i)
- return f;
- var d = Lk(e.header, "ordinal", t.useUTC), h = Sue(r, t.renderMode).nameStyle;
- return t.renderMode === "richText" ? Cue(t, d, h) + a.richText + f : Qk('<div style="' + h + ";" + Oue + ';">' + ta(d) + "</div>" + f, n);
- }
- function RXe(t, e, n, r) {
- var i = t.renderMode, a = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = t.useUTC, c = e.valueFormatter || t.valueFormatter || function(O) {
- return O = Se(O) ? O : [O], Ce(O, function(S, x) {
- return Lk(S, Se(h) ? h[x] : h, u);
- });
- };
- if (!(a && o)) {
- var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : Lk(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = Sue(r, i), y = m.nameStyle, _ = m.valueStyle;
- return i === "richText" ? (s ? "" : f) + (a ? "" : Cue(t, d, y)) + (o ? "" : BXe(t, p, v, g, _)) : Qk((s ? "" : f) + (a ? "" : LXe(d, !s, y)) + (o ? "" : NXe(p, v, g, _)), n);
- }
- }
- function rj(t, e, n, r, i, a) {
- if (t) {
- var o = xue(t), s = {
- useUTC: i,
- renderMode: n,
- orderMode: r,
- markupStyleCreator: e,
- valueFormatter: t.valueFormatter
- };
- return o(s, t, 0, a);
- }
- }
- function kXe(t) {
- return {
- html: MXe[t],
- richText: IXe[t]
- };
- }
- function Qk(t, e) {
- var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
- return '<div style="' + r + ";" + Oue + ';">' + t + n + "</div>";
- }
- function LXe(t, e, n) {
- var r = e ? "margin-left:2px" : "";
- return '<span style="' + n + ";" + r + '">' + ta(t) + "</span>";
- }
- function NXe(t, e, n, r) {
- var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
- return t = Se(t) ? t : [t], '<span style="' + a + ";" + r + '">' + Ce(t, function(o) {
- return ta(o);
- }).join(" ") + "</span>";
- }
- function Cue(t, e, n) {
- return t.markupStyleCreator.wrapRichTextStyle(e, n);
- }
- function BXe(t, e, n, r, i) {
- var a = [i], o = r ? 10 : 20;
- return n && a.push({
- padding: [0, 0, 0, o],
- align: "right"
- }), t.markupStyleCreator.wrapRichTextStyle(Se(e) ? e.join(" ") : e, a);
- }
- function Tue(t, e) {
- var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
- return Uh(r);
- }
- function Pue(t, e) {
- var n = t.get("padding");
- return n ?? (e === "richText" ? [8, 10] : 10);
- }
- var bM = (
- /** @class */
- function() {
- function t() {
- this.richTextStyles = {}, this._nextStyleNameId = Dse();
- }
- return t.prototype._generateStyleName = function() {
- return "__EC_aUTo_" + this._nextStyleNameId++;
- }, t.prototype.makeTooltipMarker = function(e, n, r) {
- var i = r === "richText" ? this._generateStyleName() : null, a = Xle({
- color: n,
- type: e,
- renderMode: r,
- markerId: i
- });
- return Ve(a) ? a : (process.env.NODE_ENV !== "production" && at(i), this.richTextStyles[i] = a.style, a.content);
- }, t.prototype.wrapRichTextStyle = function(e, n) {
- var r = {};
- Se(n) ? F(n, function(a) {
- return _e(r, a);
- }) : _e(r, n);
- var i = this._generateStyleName();
- return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
- }, t;
- }()
- );
- function $ue(t) {
- var e = t.series, n = t.dataIndex, r = t.multipleSeries, i = e.getData(), a = i.mapDimensionsAll("defaultedTooltip"), o = a.length, s = e.getRawValue(n), l = Se(s), u = Tue(e, n), c, f, d, h;
- if (o > 1 || l && !o) {
- var p = zXe(s, e, n, a, u);
- c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
- } else if (o) {
- var v = i.getDimensionInfo(a[0]);
- h = c = Hg(i, n, a[0]), f = v.type;
- } else
- h = c = l ? s[0] : s;
- var g = A5(e), m = g && e.name || "", y = i.getName(n), _ = r ? m : y;
- return ti("section", {
- header: m,
- // When series name is not specified, do not show a header line with only '-'.
- // This case always happens in tooltip.trigger: 'item'.
- noHeader: r || !g,
- sortParam: h,
- blocks: [ti("nameValue", {
- markerType: "item",
- markerColor: u,
- // Do not mix display seriesName and itemName in one tooltip,
- // which might confuses users.
- name: _,
- // name dimension might be auto assigned, where the name might
- // be not readable. So we check trim here.
- noName: !Zo(_),
- value: c,
- valueType: f,
- dataIndex: n
- })].concat(d || [])
- });
- }
- function zXe(t, e, n, r, i) {
- var a = e.getData(), o = os(t, function(f, d, h) {
- var p = a.getDimensionInfo(h);
- return f = f || p && p.tooltip !== !1 && p.displayName != null;
- }, !1), s = [], l = [], u = [];
- r.length ? F(r, function(f) {
- c(Hg(a, n, f), f);
- }) : F(t, c);
- function c(f, d) {
- var h = a.getDimensionInfo(d);
- !h || h.otherDims.tooltip === !1 || (o ? u.push(ti("nameValue", {
- markerType: "subItem",
- markerColor: i,
- name: h.displayName,
- value: f,
- valueType: h.type
- })) : (s.push(f), l.push(h.type)));
- }
- return {
- inlineValues: s,
- inlineValueTypes: l,
- blocks: u
- };
- }
- var Oc = Ut();
- function SS(t, e) {
- return t.getName(e) || t.getId(e);
- }
- var vw = "__universalTransitionEnabled", Tn = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n._selectedDataIndicesMap = {}, n;
- }
- return e.prototype.init = function(n, r, i) {
- this.seriesIndex = this.componentIndex, this.dataTask = ob({
- count: FXe,
- reset: WXe
- }), this.dataTask.context = {
- model: this
- }, this.mergeDefaultAndTheme(n, i);
- var a = Oc(this).sourceManager = new _ue(this);
- a.prepareSource();
- var o = this.getInitialData(n, i);
- aj(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && at(o, "getInitialData returned invalid data."), Oc(this).dataBeforeProcessed = o, ij(this), this._initSelectedMapFromData(o);
- }, e.prototype.mergeDefaultAndTheme = function(n, r) {
- var i = qb(this), a = i ? Tm(n) : {}, o = this.subType;
- At.hasClass(o) && (o += "Series"), mt(n, r.getTheme().get(this.subType)), mt(n, this.getDefaultOption()), Hh(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && Of(n, a, i);
- }, e.prototype.mergeOption = function(n, r) {
- n = mt(this.option, n, !0), this.fillDataTextStyle(n.data);
- var i = qb(this);
- i && Of(this.option, n, i);
- var a = Oc(this).sourceManager;
- a.dirty(), a.prepareSource();
- var o = this.getInitialData(n, r);
- aj(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, Oc(this).dataBeforeProcessed = o, ij(this), this._initSelectedMapFromData(o);
- }, e.prototype.fillDataTextStyle = function(n) {
- if (n && !Qi(n))
- for (var r = ["show"], i = 0; i < n.length; i++)
- n[i] && n[i].label && Hh(n[i], "label", r);
- }, e.prototype.getInitialData = function(n, r) {
- }, e.prototype.appendData = function(n) {
- var r = this.getRawData();
- r.appendData(n.data);
- }, e.prototype.getData = function(n) {
- var r = Hk(this);
- if (r) {
- var i = r.context.data;
- return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
- } else
- return Oc(this).data;
- }, e.prototype.getAllData = function() {
- var n = this.getData();
- return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
- data: n
- }];
- }, e.prototype.setData = function(n) {
- var r = Hk(this);
- if (r) {
- var i = r.context;
- i.outputData = n, r !== this.dataTask && (i.data = n);
- }
- Oc(this).data = n;
- }, e.prototype.getEncode = function() {
- var n = this.get("encode", !0);
- if (n)
- return Ze(n);
- }, e.prototype.getSourceManager = function() {
- return Oc(this).sourceManager;
- }, e.prototype.getSource = function() {
- return this.getSourceManager().getSource();
- }, e.prototype.getRawData = function() {
- return Oc(this).dataBeforeProcessed;
- }, e.prototype.getColorBy = function() {
- var n = this.get("colorBy");
- return n || "series";
- }, e.prototype.isColorBySeries = function() {
- return this.getColorBy() === "series";
- }, e.prototype.getBaseAxis = function() {
- var n = this.coordinateSystem;
- return n && n.getBaseAxis && n.getBaseAxis();
- }, e.prototype.formatTooltip = function(n, r, i) {
- return $ue({
- series: this,
- dataIndex: n,
- multipleSeries: r
- });
- }, e.prototype.isAnimationEnabled = function() {
- var n = this.ecModel;
- if (Gt.node && !(n && n.ssr))
- return !1;
- var r = this.getShallow("animation");
- return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
- }, e.prototype.restoreData = function() {
- this.dataTask.dirty();
- }, e.prototype.getColorFromPalette = function(n, r, i) {
- var a = this.ecModel, o = i3.prototype.getColorFromPalette.call(this, n, r, i);
- return o || (o = a.getColorFromPalette(n, r, i)), o;
- }, e.prototype.coordDimToDataDim = function(n) {
- return this.getRawData().mapDimensionsAll(n);
- }, e.prototype.getProgressive = function() {
- return this.get("progressive");
- }, e.prototype.getProgressiveThreshold = function() {
- return this.get("progressiveThreshold");
- }, e.prototype.select = function(n, r) {
- this._innerSelect(this.getData(r), n);
- }, e.prototype.unselect = function(n, r) {
- var i = this.option.selectedMap;
- if (i) {
- var a = this.option.selectedMode, o = this.getData(r);
- if (a === "series" || i === "all") {
- this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
- return;
- }
- for (var s = 0; s < n.length; s++) {
- var l = n[s], u = SS(o, l);
- i[u] = !1, this._selectedDataIndicesMap[u] = -1;
- }
- }
- }, e.prototype.toggleSelect = function(n, r) {
- for (var i = [], a = 0; a < n.length; a++)
- i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
- }, e.prototype.getSelectedDataIndices = function() {
- if (this.option.selectedMap === "all")
- return [].slice.call(this.getData().getIndices());
- for (var n = this._selectedDataIndicesMap, r = kt(n), i = [], a = 0; a < r.length; a++) {
- var o = n[r[a]];
- o >= 0 && i.push(o);
- }
- return i;
- }, e.prototype.isSelected = function(n, r) {
- var i = this.option.selectedMap;
- if (!i)
- return !1;
- var a = this.getData(r);
- return (i === "all" || i[SS(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
- }, e.prototype.isUniversalTransitionEnabled = function() {
- if (this[vw])
- return !0;
- var n = this.option.universalTransition;
- return n ? n === !0 ? !0 : n && n.enabled : !1;
- }, e.prototype._innerSelect = function(n, r) {
- var i, a, o = this.option, s = o.selectedMode, l = r.length;
- if (!(!s || !l)) {
- if (s === "series")
- o.selectedMap = "all";
- else if (s === "multiple") {
- nt(o.selectedMap) || (o.selectedMap = {});
- for (var u = o.selectedMap, c = 0; c < l; c++) {
- var f = r[c], d = SS(n, f);
- u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
- }
- } else if (s === "single" || s === !0) {
- var h = r[l - 1], d = SS(n, h);
- o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
- }
- }
- }, e.prototype._initSelectedMapFromData = function(n) {
- if (!this.option.selectedMap) {
- var r = [];
- n.hasItemOption && n.each(function(i) {
- var a = n.getRawDataItem(i);
- a && a.selected && r.push(i);
- }), r.length > 0 && this._innerSelect(n, r);
- }
- }, e.registerClass = function(n) {
- return At.registerClass(n);
- }, e.protoInitialize = function() {
- var n = e.prototype;
- n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
- }(), e;
- }(At)
- );
- vr(Tn, DP);
- vr(Tn, i3);
- Wse(Tn, At);
- function ij(t) {
- var e = t.name;
- A5(t) || (t.name = VXe(t) || e);
- }
- function VXe(t) {
- var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
- return F(n, function(i) {
- var a = e.getDimensionInfo(i);
- a.displayName && r.push(a.displayName);
- }), r.join(" ");
- }
- function FXe(t) {
- return t.model.getRawData().count();
- }
- function WXe(t) {
- var e = t.model;
- return e.setData(e.getRawData().cloneShallow()), QXe;
- }
- function QXe(t, e) {
- e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
- }
- function aj(t, e) {
- F(Fb(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
- t.wrapMethod(n, vt(HXe, e));
- });
- }
- function HXe(t, e) {
- var n = Hk(t);
- return n && n.setOutputEnd((e || this).count()), e;
- }
- function Hk(t) {
- var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
- if (n) {
- var r = n.currentTask;
- if (r) {
- var i = r.agentStubMap;
- i && (r = i.get(t.uid));
- }
- return r;
- }
- }
- var Ln = (
- /** @class */
- function() {
- function t() {
- this.group = new ct(), this.uid = Cm("viewComponent");
- }
- return t.prototype.init = function(e, n) {
- }, t.prototype.render = function(e, n, r, i) {
- }, t.prototype.dispose = function(e, n) {
- }, t.prototype.updateView = function(e, n, r, i) {
- }, t.prototype.updateLayout = function(e, n, r, i) {
- }, t.prototype.updateVisual = function(e, n, r, i) {
- }, t.prototype.toggleBlurSeries = function(e, n, r) {
- }, t.prototype.eachRendered = function(e) {
- var n = this.group;
- n && n.traverse(e);
- }, t;
- }()
- );
- M5(Ln);
- vP(Ln);
- function $m() {
- var t = Ut();
- return function(e) {
- var n = t(e), r = e.pipelineContext, i = !!n.large, a = !!n.progressiveRender, o = n.large = !!(r && r.large), s = n.progressiveRender = !!(r && r.progressiveRender);
- return (i !== o || a !== s) && "reset";
- };
- }
- var Aue = Ut(), GXe = $m(), _n = (
- /** @class */
- function() {
- function t() {
- this.group = new ct(), this.uid = Cm("viewChart"), this.renderTask = ob({
- plan: jXe,
- reset: ZXe
- }), this.renderTask.context = {
- view: this
- };
- }
- return t.prototype.init = function(e, n) {
- }, t.prototype.render = function(e, n, r, i) {
- if (process.env.NODE_ENV !== "production")
- throw new Error("render method must been implemented");
- }, t.prototype.highlight = function(e, n, r, i) {
- var a = e.getData(i && i.dataType);
- if (!a) {
- process.env.NODE_ENV !== "production" && $i("Unknown dataType " + i.dataType);
- return;
- }
- sj(a, i, "emphasis");
- }, t.prototype.downplay = function(e, n, r, i) {
- var a = e.getData(i && i.dataType);
- if (!a) {
- process.env.NODE_ENV !== "production" && $i("Unknown dataType " + i.dataType);
- return;
- }
- sj(a, i, "normal");
- }, t.prototype.remove = function(e, n) {
- this.group.removeAll();
- }, t.prototype.dispose = function(e, n) {
- }, t.prototype.updateView = function(e, n, r, i) {
- this.render(e, n, r, i);
- }, t.prototype.updateLayout = function(e, n, r, i) {
- this.render(e, n, r, i);
- }, t.prototype.updateVisual = function(e, n, r, i) {
- this.render(e, n, r, i);
- }, t.prototype.eachRendered = function(e) {
- Nf(this.group, e);
- }, t.markUpdateMethod = function(e, n) {
- Aue(e).updateMethod = n;
- }, t.protoInitialize = function() {
- var e = t.prototype;
- e.type = "chart";
- }(), t;
- }()
- );
- function oj(t, e, n) {
- t && bf(t) && (e === "emphasis" ? Fu : Wu)(t, n);
- }
- function sj(t, e, n) {
- var r = Gh(t, e), i = e && e.highlightKey != null ? wZe(e.highlightKey) : null;
- r != null ? F(Cn(r), function(a) {
- oj(t.getItemGraphicEl(a), n, i);
- }) : t.eachItemGraphicEl(function(a) {
- oj(a, n, i);
- });
- }
- M5(_n, ["dispose"]);
- vP(_n);
- function jXe(t) {
- return GXe(t.model);
- }
- function ZXe(t) {
- var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && Aue(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
- return l !== "render" && o[l](e, n, r, i), UXe[l];
- }
- var UXe = {
- incrementalPrepareRender: {
- progress: function(t, e) {
- e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
- }
- },
- render: {
- // Put view.render in `progress` to support appendData. But in this case
- // view.render should not be called in reset, otherwise it will be called
- // twise. Use `forceFirstProgress` to make sure that view.render is called
- // in any cases.
- forceFirstProgress: !0,
- progress: function(t, e) {
- e.view.render(e.model, e.ecModel, e.api, e.payload);
- }
- }
- }, VC = "\0__throttleOriginMethod", lj = "\0__throttleRate", uj = "\0__throttleType";
- function kP(t, e, n) {
- var r, i = 0, a = 0, o = null, s, l, u, c;
- e = e || 0;
- function f() {
- a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
- }
- var d = function() {
- for (var h = [], p = 0; p < arguments.length; p++)
- h[p] = arguments[p];
- r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
- var v = c || e, g = c || n;
- c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
- };
- return d.clear = function() {
- o && (clearTimeout(o), o = null);
- }, d.debounceNextCall = function(h) {
- c = h;
- }, d;
- }
- function Am(t, e, n, r) {
- var i = t[e];
- if (i) {
- var a = i[VC] || i, o = i[uj], s = i[lj];
- if (s !== n || o !== r) {
- if (n == null || !r)
- return t[e] = a;
- i = t[e] = kP(a, n, r === "debounce"), i[VC] = a, i[uj] = r, i[lj] = n;
- }
- return i;
- }
- }
- function Jb(t, e) {
- var n = t[e];
- n && n[VC] && (n.clear && n.clear(), t[e] = n[VC]);
- }
- var cj = Ut(), fj = {
- itemStyle: jh(zle, !0),
- lineStyle: jh(Ble, !0)
- }, XXe = {
- lineStyle: "stroke",
- itemStyle: "fill"
- };
- function Eue(t, e) {
- var n = t.visualStyleMapper || fj[e];
- return n || (console.warn("Unknown style type '" + e + "'."), fj.itemStyle);
- }
- function Mue(t, e) {
- var n = t.visualDrawType || XXe[e];
- return n || (console.warn("Unknown style type '" + e + "'."), "fill");
- }
- var YXe = {
- createOnAllSeries: !0,
- performRawSeries: !0,
- reset: function(t, e) {
- var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = Eue(t, r), o = a(i), s = i.getShallow("decal");
- s && (n.setVisual("decal", s), s.dirty = !0);
- var l = Mue(t, r), u = o[l], c = qe(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
- if (!o[l] || c || f) {
- var d = t.getColorFromPalette(
- // TODO series count changed.
- t.name,
- null,
- e.getSeriesCount()
- );
- o[l] || (o[l] = d, n.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || qe(o.fill) ? d : o.fill, o.stroke = o.stroke === "auto" || qe(o.stroke) ? d : o.stroke;
- }
- if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
- return n.setVisual("colorFromPalette", !1), {
- dataEach: function(h, p) {
- var v = t.getDataParams(p), g = _e({}, o);
- g[l] = c(v), h.setItemVisual(p, "style", g);
- }
- };
- }
- }, L0 = new wn(), qXe = {
- createOnAllSeries: !0,
- performRawSeries: !0,
- reset: function(t, e) {
- if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
- var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = Eue(t, r), a = n.getVisual("drawType");
- return {
- dataEach: n.hasItemOption ? function(o, s) {
- var l = o.getRawDataItem(s);
- if (l && l[r]) {
- L0.option = l[r];
- var u = i(L0), c = o.ensureUniqueItemVisual(s, "style");
- _e(c, u), L0.option.decal && (o.setItemVisual(s, "decal", L0.option.decal), L0.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
- }
- } : null
- };
- }
- }
- }, KXe = {
- performRawSeries: !0,
- overallReset: function(t) {
- var e = Ze();
- t.eachSeries(function(n) {
- var r = n.getColorBy();
- if (!n.isColorBySeries()) {
- var i = n.type + "-" + r, a = e.get(i);
- a || (a = {}, e.set(i, a)), cj(n).scope = a;
- }
- }), t.eachSeries(function(n) {
- if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
- var r = n.getRawData(), i = {}, a = n.getData(), o = cj(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = Mue(n, s);
- a.each(function(u) {
- var c = a.getRawIndex(u);
- i[c] = u;
- }), r.each(function(u) {
- var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
- if (f) {
- var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
- d[l] = n.getColorFromPalette(h, o, p);
- }
- });
- }
- });
- }
- }, xS = Math.PI;
- function JXe(t, e) {
- e = e || {}, it(e, {
- text: "loading",
- textColor: "#000",
- fontSize: 12,
- fontWeight: "normal",
- fontStyle: "normal",
- fontFamily: "sans-serif",
- maskColor: "rgba(255, 255, 255, 0.8)",
- showSpinner: !0,
- color: "#5470c6",
- spinnerRadius: 10,
- lineWidth: 5,
- zlevel: 0
- });
- var n = new ct(), r = new Zt({
- style: {
- fill: e.maskColor
- },
- zlevel: e.zlevel,
- z: 1e4
- });
- n.add(r);
- var i = new jt({
- style: {
- text: e.text,
- fill: e.textColor,
- fontSize: e.fontSize,
- fontWeight: e.fontWeight,
- fontStyle: e.fontStyle,
- fontFamily: e.fontFamily
- },
- zlevel: e.zlevel,
- z: 10001
- }), a = new Zt({
- style: {
- fill: "none"
- },
- textContent: i,
- textConfig: {
- position: "right",
- distance: 10
- },
- zlevel: e.zlevel,
- z: 10001
- });
- n.add(a);
- var o;
- return e.showSpinner && (o = new SP({
- shape: {
- startAngle: -xS / 2,
- endAngle: -xS / 2 + 0.1,
- r: e.spinnerRadius
- },
- style: {
- stroke: e.color,
- lineCap: "round",
- lineWidth: e.lineWidth
- },
- zlevel: e.zlevel,
- z: 10001
- }), o.animateShape(!0).when(1e3, {
- endAngle: xS * 3 / 2
- }).start("circularInOut"), o.animateShape(!0).when(1e3, {
- startAngle: xS * 3 / 2
- }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
- var s = i.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (t.getWidth() - l * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : l), c = t.getHeight() / 2;
- e.showSpinner && o.setShape({
- cx: u,
- cy: c
- }), a.setShape({
- x: u - l,
- y: c - l,
- width: l * 2,
- height: l * 2
- }), r.setShape({
- x: 0,
- y: 0,
- width: t.getWidth(),
- height: t.getHeight()
- });
- }, n.resize(), n;
- }
- var Iue = (
- /** @class */
- function() {
- function t(e, n, r, i) {
- this._stageTaskMap = Ze(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
- }
- return t.prototype.restoreData = function(e, n) {
- e.restoreData(n), this._stageTaskMap.each(function(r) {
- var i = r.overallTask;
- i && i.dirty();
- });
- }, t.prototype.getPerformArgs = function(e, n) {
- if (e.__pipeline) {
- var r = this._pipelineMap.get(e.__pipeline.id), i = r.context, a = !n && r.progressiveEnabled && (!i || i.progressiveRender) && e.__idxInPipeline > r.blockIndex, o = a ? r.step : null, s = i && i.modDataCount, l = s != null ? Math.ceil(s / o) : null;
- return {
- step: o,
- modBy: l,
- modDataCount: s
- };
- }
- }, t.prototype.getPipeline = function(e) {
- return this._pipelineMap.get(e);
- }, t.prototype.updateStreamModes = function(e, n) {
- var r = this._pipelineMap.get(e.uid), i = e.getData(), a = i.count(), o = r.progressiveEnabled && n.incrementalPrepareRender && a >= r.threshold, s = e.get("large") && a >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? a : null;
- e.pipelineContext = r.context = {
- progressiveRender: o,
- modDataCount: l,
- large: s
- };
- }, t.prototype.restorePipelines = function(e) {
- var n = this, r = n._pipelineMap = Ze();
- e.eachSeries(function(i) {
- var a = i.getProgressive(), o = i.uid;
- r.set(o, {
- id: o,
- head: null,
- tail: null,
- threshold: i.getProgressiveThreshold(),
- progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
- blockIndex: -1,
- step: Math.round(a || 700),
- count: 0
- }), n._pipe(i, i.dataTask);
- });
- }, t.prototype.prepareStageTasks = function() {
- var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
- F(this._allHandlers, function(i) {
- var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
- process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), at(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, n, r), i.overallReset && this._createOverallStageTask(i, a, n, r);
- }, this);
- }, t.prototype.prepareView = function(e, n, r, i) {
- var a = e.renderTask, o = a.context;
- o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
- }, t.prototype.performDataProcessorTasks = function(e, n) {
- this._performStageTasks(this._dataProcessorHandlers, e, n, {
- block: !0
- });
- }, t.prototype.performVisualTasks = function(e, n, r) {
- this._performStageTasks(this._visualHandlers, e, n, r);
- }, t.prototype._performStageTasks = function(e, n, r, i) {
- i = i || {};
- var a = !1, o = this;
- F(e, function(l, u) {
- if (!(i.visualType && i.visualType !== l.visualType)) {
- var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
- if (d) {
- var h, p = d.agentStubMap;
- p.each(function(g) {
- s(i, g) && (g.dirty(), h = !0);
- }), h && d.dirty(), o.updatePayload(d, r);
- var v = o.getPerformArgs(d, i.block);
- p.each(function(g) {
- g.perform(v);
- }), d.perform(v) && (a = !0);
- } else f && f.each(function(g, m) {
- s(i, g) && g.dirty();
- var y = o.getPerformArgs(g, i.block);
- y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
- });
- }
- });
- function s(l, u) {
- return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
- }
- this.unfinished = a || this.unfinished;
- }, t.prototype.performSeriesTasks = function(e) {
- var n;
- e.eachSeries(function(r) {
- n = r.dataTask.perform() || n;
- }), this.unfinished = n || this.unfinished;
- }, t.prototype.plan = function() {
- this._pipelineMap.each(function(e) {
- var n = e.tail;
- do {
- if (n.__block) {
- e.blockIndex = n.__idxInPipeline;
- break;
- }
- n = n.getUpstream();
- } while (n);
- });
- }, t.prototype.updatePayload = function(e, n) {
- n !== "remain" && (e.context.payload = n);
- }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
- var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Ze(), l = e.seriesType, u = e.getTargetSeries;
- e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
- function c(f) {
- var d = f.uid, h = s.set(d, o && o.get(d) || ob({
- plan: iYe,
- reset: aYe,
- count: sYe
- }));
- h.context = {
- model: f,
- ecModel: r,
- api: i,
- // PENDING: `useClearVisual` not used?
- useClearVisual: e.isVisual && !e.isLayout,
- plan: e.plan,
- reset: e.reset,
- scheduler: a
- }, a._pipe(f, h);
- }
- }, t.prototype._createOverallStageTask = function(e, n, r, i) {
- var a = this, o = n.overallTask = n.overallTask || ob({
- reset: eYe
- });
- o.context = {
- ecModel: r,
- api: i,
- overallReset: e.overallReset,
- scheduler: a
- };
- var s = o.agentStubMap, l = o.agentStubMap = Ze(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
- process.env.NODE_ENV !== "production" && (h = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), at(!e.createOnAllSeries, h), u ? r.eachRawSeriesByType(u, p) : c ? c(r, i).each(p) : (f = !1, F(r.getSeries(), p));
- function p(v) {
- var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
- // should be set as dirty and re-performed.
- (d = !0, ob({
- reset: tYe,
- onDirty: rYe
- })));
- m.context = {
- model: v,
- overallProgress: f
- // FIXME:TS never used, so comment it
- // modifyOutputEnd: modifyOutputEnd
- }, m.agent = o, m.__block = f, a._pipe(v, m);
- }
- d && o.dirty();
- }, t.prototype._pipe = function(e, n) {
- var r = e.uid, i = this._pipelineMap.get(r);
- !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
- }, t.wrapStageHandler = function(e, n) {
- return qe(e) && (e = {
- overallReset: e,
- seriesType: lYe(e)
- }), e.uid = Cm("stageHandler"), n && (e.visualType = n), e;
- }, t;
- }()
- );
- function eYe(t) {
- t.overallReset(t.ecModel, t.api, t.payload);
- }
- function tYe(t) {
- return t.overallProgress && nYe;
- }
- function nYe() {
- this.agent.dirty(), this.getDownstream().dirty();
- }
- function rYe() {
- this.agent && this.agent.dirty();
- }
- function iYe(t) {
- return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
- }
- function aYe(t) {
- t.useClearVisual && t.data.clearAllVisual();
- var e = t.resetDefines = Cn(t.reset(t.model, t.ecModel, t.api, t.payload));
- return e.length > 1 ? Ce(e, function(n, r) {
- return Due(r);
- }) : oYe;
- }
- var oYe = Due(0);
- function Due(t) {
- return function(e, n) {
- var r = n.data, i = n.resetDefines[t];
- if (i && i.dataEach)
- for (var a = e.start; a < e.end; a++)
- i.dataEach(r, a);
- else i && i.progress && i.progress(e, r);
- };
- }
- function sYe(t) {
- return t.data.count();
- }
- function lYe(t) {
- FC = null;
- try {
- t(e_, Rue);
- } catch {
- }
- return FC;
- }
- var e_ = {}, Rue = {}, FC;
- kue(e_, a3);
- kue(Rue, aue);
- e_.eachSeriesByType = e_.eachRawSeriesByType = function(t) {
- FC = t;
- };
- e_.eachComponent = function(t) {
- t.mainType === "series" && t.subType && (FC = t.subType);
- };
- function kue(t, e) {
- for (var n in e.prototype)
- t[n] = fr;
- }
- var dj = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
- const uYe = {
- color: dj,
- colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], dj]
- };
- var qi = "#B9B8CE", hj = "#100C2A", wS = function() {
- return {
- axisLine: {
- lineStyle: {
- color: qi
- }
- },
- splitLine: {
- lineStyle: {
- color: "#484753"
- }
- },
- splitArea: {
- areaStyle: {
- color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
- }
- },
- minorSplitLine: {
- lineStyle: {
- color: "#20203B"
- }
- }
- };
- }, pj = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], Lue = {
- darkMode: !0,
- color: pj,
- backgroundColor: hj,
- axisPointer: {
- lineStyle: {
- color: "#817f91"
- },
- crossStyle: {
- color: "#817f91"
- },
- label: {
- // TODO Contrast of label backgorundColor
- color: "#fff"
- }
- },
- legend: {
- textStyle: {
- color: qi
- }
- },
- textStyle: {
- color: qi
- },
- title: {
- textStyle: {
- color: "#EEF1FA"
- },
- subtextStyle: {
- color: "#B9B8CE"
- }
- },
- toolbox: {
- iconStyle: {
- borderColor: qi
- }
- },
- dataZoom: {
- borderColor: "#71708A",
- textStyle: {
- color: qi
- },
- brushStyle: {
- color: "rgba(135,163,206,0.3)"
- },
- handleStyle: {
- color: "#353450",
- borderColor: "#C5CBE3"
- },
- moveHandleStyle: {
- color: "#B0B6C3",
- opacity: 0.3
- },
- fillerColor: "rgba(135,163,206,0.2)",
- emphasis: {
- handleStyle: {
- borderColor: "#91B7F2",
- color: "#4D587D"
- },
- moveHandleStyle: {
- color: "#636D9A",
- opacity: 0.7
- }
- },
- dataBackground: {
- lineStyle: {
- color: "#71708A",
- width: 1
- },
- areaStyle: {
- color: "#71708A"
- }
- },
- selectedDataBackground: {
- lineStyle: {
- color: "#87A3CE"
- },
- areaStyle: {
- color: "#87A3CE"
- }
- }
- },
- visualMap: {
- textStyle: {
- color: qi
- }
- },
- timeline: {
- lineStyle: {
- color: qi
- },
- label: {
- color: qi
- },
- controlStyle: {
- color: qi,
- borderColor: qi
- }
- },
- calendar: {
- itemStyle: {
- color: hj
- },
- dayLabel: {
- color: qi
- },
- monthLabel: {
- color: qi
- },
- yearLabel: {
- color: qi
- }
- },
- timeAxis: wS(),
- logAxis: wS(),
- valueAxis: wS(),
- categoryAxis: wS(),
- line: {
- symbol: "circle"
- },
- graph: {
- color: pj
- },
- gauge: {
- title: {
- color: qi
- },
- axisLine: {
- lineStyle: {
- color: [[1, "rgba(207,212,219,0.2)"]]
- }
- },
- axisLabel: {
- color: qi
- },
- detail: {
- color: "#EEF1FA"
- }
- },
- candlestick: {
- itemStyle: {
- color: "#f64e56",
- color0: "#54ea92",
- borderColor: "#f64e56",
- borderColor0: "#54ea92"
- // borderColor: '#ca2824',
- // borderColor0: '#09a443'
- }
- }
- };
- Lue.categoryAxis.splitLine.show = !1;
- var cYe = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.normalizeQuery = function(e) {
- var n = {}, r = {}, i = {};
- if (Ve(e)) {
- var a = $l(e);
- n.mainType = a.main || null, n.subType = a.sub || null;
- } else {
- var o = ["Index", "Name", "Id"], s = {
- name: 1,
- dataIndex: 1,
- dataType: 1
- };
- F(e, function(l, u) {
- for (var c = !1, f = 0; f < o.length; f++) {
- var d = o[f], h = u.lastIndexOf(d);
- if (h > 0 && h === u.length - d.length) {
- var p = u.slice(0, h);
- p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
- }
- }
- s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
- });
- }
- return {
- cptQuery: n,
- dataQuery: r,
- otherQuery: i
- };
- }, t.prototype.filter = function(e, n) {
- var r = this.eventInfo;
- if (!r)
- return !0;
- var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
- if (!o || !s)
- return !0;
- var l = n.cptQuery, u = n.dataQuery;
- return c(l, o, "mainType") && c(l, o, "subType") && c(l, o, "index", "componentIndex") && c(l, o, "name") && c(l, o, "id") && c(u, a, "name") && c(u, a, "dataIndex") && c(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, n.otherQuery, i, a));
- function c(f, d, h, p) {
- return f[h] == null || d[p || h] === f[h];
- }
- }, t.prototype.afterTrigger = function() {
- this.eventInfo = null;
- }, t;
- }()
- ), Gk = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], vj = Gk.concat(["symbolKeepAspect"]), fYe = {
- createOnAllSeries: !0,
- // For legend.
- performRawSeries: !0,
- reset: function(t, e) {
- var n = t.getData();
- if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
- return;
- for (var r = {}, i = {}, a = !1, o = 0; o < Gk.length; o++) {
- var s = Gk[o], l = t.get(s);
- qe(l) ? (a = !0, i[s] = l) : r[s] = l;
- }
- if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(_e({
- legendIcon: t.legendIcon || r.symbol,
- symbolKeepAspect: t.get("symbolKeepAspect")
- }, r)), e.isSeriesFiltered(t))
- return;
- var u = kt(i);
- function c(f, d) {
- for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
- var g = u[v];
- f.setItemVisual(d, g, i[g](h, p));
- }
- }
- return {
- dataEach: a ? c : null
- };
- }
- }, dYe = {
- createOnAllSeries: !0,
- // For legend.
- performRawSeries: !0,
- reset: function(t, e) {
- if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
- return;
- var n = t.getData();
- function r(i, a) {
- for (var o = i.getItemModel(a), s = 0; s < vj.length; s++) {
- var l = vj[s], u = o.getShallow(l, !0);
- u != null && i.setItemVisual(a, l, u);
- }
- }
- return {
- dataEach: n.hasItemOption ? r : null
- };
- }
- };
- function c3(t, e, n) {
- switch (n) {
- case "color":
- var r = t.getItemVisual(e, "style");
- return r[t.getVisual("drawType")];
- case "opacity":
- return t.getItemVisual(e, "style").opacity;
- case "symbol":
- case "symbolSize":
- case "liftZ":
- return t.getItemVisual(e, n);
- default:
- process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
- }
- }
- function v1(t, e) {
- switch (e) {
- case "color":
- var n = t.getVisual("style");
- return n[t.getVisual("drawType")];
- case "opacity":
- return t.getVisual("style").opacity;
- case "symbol":
- case "symbolSize":
- case "liftZ":
- return t.getVisual(e);
- default:
- process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
- }
- }
- function Nue(t, e, n, r) {
- switch (n) {
- case "color":
- var i = t.ensureUniqueItemVisual(e, "style");
- i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
- break;
- case "opacity":
- t.ensureUniqueItemVisual(e, "style").opacity = r;
- break;
- case "symbol":
- case "symbolSize":
- case "liftZ":
- t.setItemVisual(e, n, r);
- break;
- default:
- process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
- }
- }
- function Bue(t, e) {
- function n(r, i) {
- var a = [];
- return r.eachComponent({
- mainType: "series",
- subType: t,
- query: i
- }, function(o) {
- a.push(o.seriesIndex);
- }), a;
- }
- F([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
- e(r[0], function(i, a, o) {
- i = _e({}, i), process.env.NODE_ENV !== "production" && _r(i.type, r[1]), o.dispatchAction(_e(i, {
- type: r[1],
- seriesIndex: n(a, i)
- }));
- });
- });
- }
- function tv(t, e, n, r, i) {
- var a = t + e;
- n.isSilent(a) || (process.env.NODE_ENV !== "production" && ss("event " + a + " is deprecated."), r.eachComponent({
- mainType: "series",
- subType: "pie"
- }, function(o) {
- for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
- if (u[c].seriesIndex === s) {
- var f = o.getData(), d = Gh(f, i.fromActionPayload);
- n.trigger(a, {
- type: a,
- seriesId: o.id,
- name: Se(d) ? f.getName(d[0]) : f.getName(d),
- selected: Ve(l) ? l : _e({}, l)
- });
- }
- }));
- }
- function hYe(t, e, n) {
- t.on("selectchanged", function(r) {
- var i = n.getModel();
- r.isFromClick ? (tv("map", "selectchanged", e, i, r), tv("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (tv("map", "selected", e, i, r), tv("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (tv("map", "unselected", e, i, r), tv("pie", "unselected", e, i, r));
- });
- }
- function sh(t, e, n) {
- for (var r; t && !(e(t) && (r = t, n)); )
- t = t.__hostTarget || t.parent;
- return r;
- }
- var pYe = Math.round(Math.random() * 9), vYe = typeof Object.defineProperty == "function", gYe = function() {
- function t() {
- this._id = "__ec_inner_" + pYe++;
- }
- return t.prototype.get = function(e) {
- return this._guard(e)[this._id];
- }, t.prototype.set = function(e, n) {
- var r = this._guard(e);
- return vYe ? Object.defineProperty(r, this._id, {
- value: n,
- enumerable: !1,
- configurable: !0
- }) : r[this._id] = n, this;
- }, t.prototype.delete = function(e) {
- return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
- }, t.prototype.has = function(e) {
- return !!this._guard(e)[this._id];
- }, t.prototype._guard = function(e) {
- if (e !== Object(e))
- throw TypeError("Value of WeakMap is not a non-null object.");
- return e;
- }, t;
- }(), mYe = Dt.extend({
- type: "triangle",
- shape: {
- cx: 0,
- cy: 0,
- width: 0,
- height: 0
- },
- buildPath: function(t, e) {
- var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
- t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
- }
- }), yYe = Dt.extend({
- type: "diamond",
- shape: {
- cx: 0,
- cy: 0,
- width: 0,
- height: 0
- },
- buildPath: function(t, e) {
- var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
- t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
- }
- }), bYe = Dt.extend({
- type: "pin",
- shape: {
- // x, y on the cusp
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- buildPath: function(t, e) {
- var n = e.x, r = e.y, i = e.width / 5 * 3, a = Math.max(i, e.height), o = i / 2, s = o * o / (a - o), l = r - a + o + s, u = Math.asin(s / o), c = Math.cos(u) * o, f = Math.sin(u), d = Math.cos(u), h = o * 0.6, p = o * 0.7;
- t.moveTo(n - c, l + s), t.arc(n, l, o, Math.PI - u, Math.PI * 2 + u), t.bezierCurveTo(n + c - f * h, l + s + d * h, n, r - p, n, r), t.bezierCurveTo(n, r - p, n - c + f * h, l + s + d * h, n - c, l + s), t.closePath();
- }
- }), _Ye = Dt.extend({
- type: "arrow",
- shape: {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- buildPath: function(t, e) {
- var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
- t.moveTo(i, a), t.lineTo(i + o, a + n), t.lineTo(i, a + n / 4 * 3), t.lineTo(i - o, a + n), t.lineTo(i, a), t.closePath();
- }
- }), OYe = {
- line: Xr,
- rect: Zt,
- roundRect: Zt,
- square: Zt,
- circle: ic,
- diamond: yYe,
- pin: bYe,
- arrow: _Ye,
- triangle: mYe
- }, SYe = {
- line: function(t, e, n, r, i) {
- i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
- },
- rect: function(t, e, n, r, i) {
- i.x = t, i.y = e, i.width = n, i.height = r;
- },
- roundRect: function(t, e, n, r, i) {
- i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
- },
- square: function(t, e, n, r, i) {
- var a = Math.min(n, r);
- i.x = t, i.y = e, i.width = a, i.height = a;
- },
- circle: function(t, e, n, r, i) {
- i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
- },
- diamond: function(t, e, n, r, i) {
- i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
- },
- pin: function(t, e, n, r, i) {
- i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
- },
- arrow: function(t, e, n, r, i) {
- i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
- },
- triangle: function(t, e, n, r, i) {
- i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
- }
- }, WC = {};
- F(OYe, function(t, e) {
- WC[e] = new t();
- });
- var xYe = Dt.extend({
- type: "symbol",
- shape: {
- symbolType: "",
- x: 0,
- y: 0,
- width: 0,
- height: 0
- },
- calculateTextPosition: function(t, e, n) {
- var r = AC(t, e, n), i = this.shape;
- return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
- },
- buildPath: function(t, e, n) {
- var r = e.symbolType;
- if (r !== "none") {
- var i = WC[r];
- i || (r = "rect", i = WC[r]), SYe[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
- }
- }
- });
- function wYe(t, e) {
- if (this.type !== "image") {
- var n = this.style;
- this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
- }
- }
- function wr(t, e, n, r, i, a, o) {
- var s = t.indexOf("empty") === 0;
- s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
- var l;
- return t.indexOf("image://") === 0 ? l = W5(t.slice(8), new bt(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = d1(t.slice(7), {}, new bt(e, n, r, i), o ? "center" : "cover") : l = new xYe({
- shape: {
- symbolType: t,
- x: e,
- y: n,
- width: r,
- height: i
- }
- }), l.__isEmptyBrush = s, l.setColor = wYe, a && l.setColor(a), l;
- }
- function Em(t) {
- return Se(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
- }
- function mp(t, e) {
- if (t != null)
- return Se(t) || (t = [t, t]), [ze(t[0], e[0]) || 0, ze(dt(t[1], t[0]), e[1]) || 0];
- }
- function lh(t) {
- return isFinite(t);
- }
- function CYe(t, e, n) {
- var r = e.x == null ? 0 : e.x, i = e.x2 == null ? 1 : e.x2, a = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
- e.global || (r = r * n.width + n.x, i = i * n.width + n.x, a = a * n.height + n.y, o = o * n.height + n.y), r = lh(r) ? r : 0, i = lh(i) ? i : 1, a = lh(a) ? a : 0, o = lh(o) ? o : 0;
- var s = t.createLinearGradient(r, a, i, o);
- return s;
- }
- function TYe(t, e, n) {
- var r = n.width, i = n.height, a = Math.min(r, i), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, l = e.r == null ? 0.5 : e.r;
- e.global || (o = o * r + n.x, s = s * i + n.y, l = l * a), o = lh(o) ? o : 0.5, s = lh(s) ? s : 0.5, l = l >= 0 && lh(l) ? l : 0.5;
- var u = t.createRadialGradient(o, s, 0, o, s, l);
- return u;
- }
- function jk(t, e, n) {
- for (var r = e.type === "radial" ? TYe(t, e, n) : CYe(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
- r.addColorStop(i[a].offset, i[a].color);
- return r;
- }
- function PYe(t, e) {
- if (t === e || !t && !e)
- return !1;
- if (!t || !e || t.length !== e.length)
- return !0;
- for (var n = 0; n < t.length; n++)
- if (t[n] !== e[n])
- return !0;
- return !1;
- }
- function CS(t) {
- return parseInt(t, 10);
- }
- function Rv(t, e, n) {
- var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
- if (n[r] != null && n[r] !== "auto")
- return parseFloat(n[r]);
- var s = document.defaultView.getComputedStyle(t);
- return (t[i] || CS(s[r]) || CS(t.style[r])) - (CS(s[a]) || 0) - (CS(s[o]) || 0) | 0;
- }
- function $Ye(t, e) {
- return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : Kt(t) ? [t] : Se(t) ? t : null;
- }
- function f3(t) {
- var e = t.style, n = e.lineDash && e.lineWidth > 0 && $Ye(e.lineDash, e.lineWidth), r = e.lineDashOffset;
- if (n) {
- var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
- i && i !== 1 && (n = Ce(n, function(a) {
- return a / i;
- }), r /= i);
- }
- return [n, r];
- }
- var AYe = new jl(!0);
- function QC(t) {
- var e = t.stroke;
- return !(e == null || e === "none" || !(t.lineWidth > 0));
- }
- function gj(t) {
- return typeof t == "string" && t !== "none";
- }
- function HC(t) {
- var e = t.fill;
- return e != null && e !== "none";
- }
- function mj(t, e) {
- if (e.fillOpacity != null && e.fillOpacity !== 1) {
- var n = t.globalAlpha;
- t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
- } else
- t.fill();
- }
- function yj(t, e) {
- if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
- var n = t.globalAlpha;
- t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
- } else
- t.stroke();
- }
- function Zk(t, e, n) {
- var r = I5(e.image, e.__image, n);
- if (gP(r)) {
- var i = t.createPattern(r, e.repeat || "repeat");
- if (typeof DOMMatrix == "function" && i && i.setTransform) {
- var a = new DOMMatrix();
- a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Uy), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
- }
- return i;
- }
- }
- function EYe(t, e, n, r) {
- var i, a = QC(n), o = HC(n), s = n.strokePercent, l = s < 1, u = !e.path;
- (!e.silent || l) && u && e.createPathProxy();
- var c = e.path || AYe, f = e.__dirty;
- if (!r) {
- var d = n.fill, h = n.stroke, p = o && !!d.colorStops, v = a && !!h.colorStops, g = o && !!d.image, m = a && !!h.image, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0;
- (p || v) && (x = e.getBoundingRect()), p && (y = f ? jk(t, d, x) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (_ = f ? jk(t, h, x) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = _), g && (O = f || !e.__canvasFillPattern ? Zk(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = O), m && (S = f || !e.__canvasStrokePattern ? Zk(t, h, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = O), p ? t.fillStyle = y : g && (O ? t.fillStyle = O : o = !1), v ? t.strokeStyle = _ : m && (S ? t.strokeStyle = S : a = !1);
- }
- var C = e.getGlobalScale();
- c.setScale(C[0], C[1], e.segmentIgnoreThreshold);
- var P, $;
- t.setLineDash && n.lineDash && (i = f3(e), P = i[0], $ = i[1]);
- var T = !0;
- (u || f & _v) && (c.setDPR(t.dpr), l ? c.setContext(null) : (c.setContext(t), T = !1), c.reset(), e.buildPath(c, e.shape, r), c.toStatic(), e.pathUpdated()), T && c.rebuildPath(t, l ? s : 1), P && (t.setLineDash(P), t.lineDashOffset = $), r || (n.strokeFirst ? (a && yj(t, n), o && mj(t, n)) : (o && mj(t, n), a && yj(t, n))), P && t.setLineDash([]);
- }
- function MYe(t, e, n) {
- var r = e.__image = I5(n.image, e.__image, e, e.onload);
- if (!(!r || !gP(r))) {
- var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
- if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = r.width, s = r.height), n.sWidth && n.sHeight) {
- var u = n.sx || 0, c = n.sy || 0;
- t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
- } else if (n.sx && n.sy) {
- var u = n.sx, c = n.sy, f = o - u, d = s - c;
- t.drawImage(r, u, c, f, d, i, a, o, s);
- } else
- t.drawImage(r, i, a, o, s);
- }
- }
- function IYe(t, e, n) {
- var r, i = n.text;
- if (i != null && (i += ""), i) {
- t.font = n.font || vf, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
- var a = void 0, o = void 0;
- t.setLineDash && n.lineDash && (r = f3(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (QC(n) && t.strokeText(i, n.x, n.y), HC(n) && t.fillText(i, n.x, n.y)) : (HC(n) && t.fillText(i, n.x, n.y), QC(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
- }
- }
- var bj = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], _j = [
- ["lineCap", "butt"],
- ["lineJoin", "miter"],
- ["miterLimit", 10]
- ];
- function zue(t, e, n, r, i) {
- var a = !1;
- if (!r && (n = n || {}, e === n))
- return !1;
- if (r || e.opacity !== n.opacity) {
- Ma(t, i), a = !0;
- var o = Math.max(Math.min(e.opacity, 1), 0);
- t.globalAlpha = isNaN(o) ? wh.opacity : o;
- }
- (r || e.blend !== n.blend) && (a || (Ma(t, i), a = !0), t.globalCompositeOperation = e.blend || wh.blend);
- for (var s = 0; s < bj.length; s++) {
- var l = bj[s];
- (r || e[l] !== n[l]) && (a || (Ma(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
- }
- return (r || e.shadowColor !== n.shadowColor) && (a || (Ma(t, i), a = !0), t.shadowColor = e.shadowColor || wh.shadowColor), a;
- }
- function Oj(t, e, n, r, i) {
- var a = t_(e, i.inHover), o = r ? null : n && t_(n, i.inHover) || {};
- if (a === o)
- return !1;
- var s = zue(t, a, o, r, i);
- if ((r || a.fill !== o.fill) && (s || (Ma(t, i), s = !0), gj(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (Ma(t, i), s = !0), gj(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (Ma(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
- var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
- t.lineWidth !== u && (s || (Ma(t, i), s = !0), t.lineWidth = u);
- }
- for (var c = 0; c < _j.length; c++) {
- var f = _j[c], d = f[0];
- (r || a[d] !== o[d]) && (s || (Ma(t, i), s = !0), t[d] = a[d] || f[1]);
- }
- return s;
- }
- function DYe(t, e, n, r, i) {
- return zue(t, t_(e, i.inHover), n && t_(n, i.inHover), r, i);
- }
- function Vue(t, e) {
- var n = e.transform, r = t.dpr || 1;
- n ? t.setTransform(r * n[0], r * n[1], r * n[2], r * n[3], r * n[4], r * n[5]) : t.setTransform(r, 0, 0, r, 0, 0);
- }
- function RYe(t, e, n) {
- for (var r = !1, i = 0; i < t.length; i++) {
- var a = t[i];
- r = r || a.isZeroArea(), Vue(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
- }
- n.allClipped = r;
- }
- function kYe(t, e) {
- return t && e ? 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 && !e);
- }
- var Sj = 1, xj = 2, wj = 3, Cj = 4;
- function LYe(t) {
- var e = HC(t), n = QC(t);
- return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
- }
- function Ma(t, e) {
- e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
- }
- function t_(t, e) {
- return e && t.__hoverStyle || t.style;
- }
- function d3(t, e) {
- uh(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
- }
- function uh(t, e, n, r) {
- var i = e.transform;
- if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
- e.__dirty &= ~to, e.__isRendered = !1;
- return;
- }
- var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
- if ((!o || PYe(a, o)) && (o && o.length && (Ma(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (Ma(t, n), t.save(), RYe(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
- e.__isRendered = !1;
- return;
- }
- e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
- var u = n.prevEl;
- u || (l = s = !0);
- var c = e instanceof Dt && e.autoBatch && LYe(e.style);
- s || kYe(i, u.transform) ? (Ma(t, n), Vue(t, e)) : c || Ma(t, n);
- var f = t_(e, n.inHover);
- e instanceof Dt ? (n.lastDrawType !== Sj && (l = !0, n.lastDrawType = Sj), Oj(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), EYe(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Wg ? (n.lastDrawType !== wj && (l = !0, n.lastDrawType = wj), Oj(t, e, u, l, n), IYe(t, e, f)) : e instanceof ci ? (n.lastDrawType !== xj && (l = !0, n.lastDrawType = xj), DYe(t, e, u, l, n), MYe(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Cj && (l = !0, n.lastDrawType = Cj), NYe(t, e, n)), c && r && Ma(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
- }
- function NYe(t, e, n) {
- var r = e.getDisplayables(), i = e.getTemporalDisplayables();
- t.save();
- var a = {
- prevElClipPaths: null,
- prevEl: null,
- allClipped: !1,
- viewWidth: n.viewWidth,
- viewHeight: n.viewHeight,
- inHover: n.inHover
- }, o, s;
- for (o = e.getCursor(), s = r.length; o < s; o++) {
- var l = r[o];
- l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), uh(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
- }
- for (var u = 0, c = i.length; u < c; u++) {
- var l = i[u];
- l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), uh(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
- }
- e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
- }
- var _M = new gYe(), Tj = new a1(100), Pj = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
- function Gg(t, e) {
- if (t === "none")
- return null;
- var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
- t.dirty && _M.delete(t);
- var a = _M.get(t);
- if (a)
- return a;
- var o = it(t, {
- symbol: "rect",
- symbolSize: 1,
- symbolKeepAspect: !0,
- color: "rgba(0, 0, 0, 0.2)",
- backgroundColor: null,
- dashArrayX: 5,
- dashArrayY: 5,
- rotation: 0,
- maxTileWidth: 512,
- maxTileHeight: 512
- });
- o.backgroundColor === "none" && (o.backgroundColor = null);
- var s = {
- repeat: "repeat"
- };
- return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, _M.set(t, s), t.dirty = !1, s;
- function l(u) {
- for (var c = [n], f = !0, d = 0; d < Pj.length; ++d) {
- var h = o[Pj[d]];
- if (h != null && !Se(h) && !Ve(h) && !Kt(h) && typeof h != "boolean") {
- f = !1;
- break;
- }
- c.push(h);
- }
- var p;
- if (f) {
- p = c.join(",") + (i ? "-svg" : "");
- var v = Tj.get(p);
- v && (i ? u.svgElement = v : u.image = v);
- }
- var g = Wue(o.dashArrayX), m = BYe(o.dashArrayY), y = Fue(o.symbol), _ = zYe(g), O = Que(m), S = !i && Hs.createCanvas(), x = i && {
- tag: "g",
- attrs: {},
- key: "dcl",
- children: []
- }, C = $(), P;
- S && (S.width = C.width * n, S.height = C.height * n, P = S.getContext("2d")), T(), f && Tj.put(p, S || x), u.image = S, u.svgElement = x, u.svgWidth = C.width, u.svgHeight = C.height;
- function $() {
- for (var E = 1, M = 0, R = _.length; M < R; ++M)
- E = FH(E, _[M]);
- for (var N = 1, M = 0, R = y.length; M < R; ++M)
- N = FH(N, y[M].length);
- E *= N;
- var I = O * _.length * y.length;
- if (process.env.NODE_ENV !== "production") {
- var B = function(Q) {
- console.warn("Calculated decal size is greater than " + Q + " due to decal option settings so " + Q + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + Q + " to be larger to avoid incontinuity.");
- };
- E > o.maxTileWidth && B("maxTileWidth"), I > o.maxTileHeight && B("maxTileHeight");
- }
- return {
- width: Math.max(1, Math.min(E, o.maxTileWidth)),
- height: Math.max(1, Math.min(I, o.maxTileHeight))
- };
- }
- function T() {
- P && (P.clearRect(0, 0, S.width, S.height), o.backgroundColor && (P.fillStyle = o.backgroundColor, P.fillRect(0, 0, S.width, S.height)));
- for (var E = 0, M = 0; M < m.length; ++M)
- E += m[M];
- if (E <= 0)
- return;
- for (var R = -O, N = 0, I = 0, B = 0; R < C.height; ) {
- if (N % 2 === 0) {
- for (var Q = I / 2 % y.length, W = 0, H = 0, U = 0; W < C.width * 2; ) {
- for (var j = 0, M = 0; M < g[B].length; ++M)
- j += g[B][M];
- if (j <= 0)
- break;
- if (H % 2 === 0) {
- var Y = (1 - o.symbolSize) * 0.5, ne = W + g[B][H] * Y, fe = R + m[N] * Y, ue = g[B][H] * o.symbolSize, ye = m[N] * o.symbolSize, se = U / 2 % y[Q].length;
- he(ne, fe, ue, ye, y[Q][se]);
- }
- W += g[B][H], ++U, ++H, H === g[B].length && (H = 0);
- }
- ++B, B === g.length && (B = 0);
- }
- R += m[N], ++I, ++N, N === m.length && (N = 0);
- }
- function he(re, q, K, de, xe) {
- var we = i ? 1 : n, He = wr(xe, re * we, q * we, K * we, de * we, o.color, o.symbolKeepAspect);
- if (i) {
- var je = r.painter.renderOneToVNode(He);
- je && x.children.push(je);
- } else
- d3(P, He);
- }
- }
- }
- }
- function Fue(t) {
- if (!t || t.length === 0)
- return [["rect"]];
- if (Ve(t))
- return [[t]];
- for (var e = !0, n = 0; n < t.length; ++n)
- if (!Ve(t[n])) {
- e = !1;
- break;
- }
- if (e)
- return Fue([t]);
- for (var r = [], n = 0; n < t.length; ++n)
- Ve(t[n]) ? r.push([t[n]]) : r.push(t[n]);
- return r;
- }
- function Wue(t) {
- if (!t || t.length === 0)
- return [[0, 0]];
- if (Kt(t)) {
- var e = Math.ceil(t);
- return [[e, e]];
- }
- for (var n = !0, r = 0; r < t.length; ++r)
- if (!Kt(t[r])) {
- n = !1;
- break;
- }
- if (n)
- return Wue([t]);
- for (var i = [], r = 0; r < t.length; ++r)
- if (Kt(t[r])) {
- var e = Math.ceil(t[r]);
- i.push([e, e]);
- } else {
- var e = Ce(t[r], function(s) {
- return Math.ceil(s);
- });
- e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
- }
- return i;
- }
- function BYe(t) {
- if (!t || typeof t == "object" && t.length === 0)
- return [0, 0];
- if (Kt(t)) {
- var e = Math.ceil(t);
- return [e, e];
- }
- var n = Ce(t, function(r) {
- return Math.ceil(r);
- });
- return t.length % 2 ? n.concat(n) : n;
- }
- function zYe(t) {
- return Ce(t, function(e) {
- return Que(e);
- });
- }
- function Que(t) {
- for (var e = 0, n = 0; n < t.length; ++n)
- e += t[n];
- return t.length % 2 === 1 ? e * 2 : e;
- }
- function VYe(t, e) {
- t.eachRawSeries(function(n) {
- if (!t.isSeriesFiltered(n)) {
- var r = n.getData();
- r.hasItemVisual() && r.each(function(o) {
- var s = r.getItemVisual(o, "decal");
- if (s) {
- var l = r.ensureUniqueItemVisual(o, "style");
- l.decal = Gg(s, e);
- }
- });
- var i = r.getVisual("decal");
- if (i) {
- var a = r.getVisual("style");
- a.decal = Gg(i, e);
- }
- }
- });
- }
- var Ts = new fs(), GC = {};
- function FYe(t, e) {
- process.env.NODE_ENV !== "production" && GC[t] && $i("Already has an implementation of " + t + "."), GC[t] = e;
- }
- function Hue(t) {
- return process.env.NODE_ENV !== "production" && (GC[t] || $i("Implementation of " + t + " doesn't exists.")), GC[t];
- }
- var WYe = "5.5.1", QYe = {
- zrender: "5.6.0"
- }, HYe = 1, GYe = 800, jYe = 900, ZYe = 1e3, UYe = 2e3, XYe = 5e3, Gue = 1e3, YYe = 1100, h3 = 2e3, jue = 3e3, qYe = 4e3, LP = 4500, KYe = 4600, JYe = 5e3, eqe = 6e3, Zue = 7e3, Uue = {
- PROCESSOR: {
- FILTER: ZYe,
- SERIES_FILTER: GYe,
- STATISTIC: XYe
- },
- VISUAL: {
- LAYOUT: Gue,
- PROGRESSIVE_LAYOUT: YYe,
- GLOBAL: h3,
- CHART: jue,
- POST_CHART_LAYOUT: KYe,
- COMPONENT: qYe,
- BRUSH: JYe,
- CHART_ITEM: LP,
- ARIA: eqe,
- DECAL: Zue
- }
- }, Ri = "__flagInMainProcess", Oa = "__pendingUpdate", OM = "__needsUpdateStatus", $j = /^[a-zA-Z0-9_]+$/, SM = "__connectUpdateStatus", Aj = 0, tqe = 1, nqe = 2;
- function Xue(t) {
- return function() {
- for (var e = [], n = 0; n < arguments.length; n++)
- e[n] = arguments[n];
- if (this.isDisposed()) {
- Ja(this.id);
- return;
- }
- return que(this, t, e);
- };
- }
- function Yue(t) {
- return function() {
- for (var e = [], n = 0; n < arguments.length; n++)
- e[n] = arguments[n];
- return que(this, t, e);
- };
- }
- function que(t, e, n) {
- return n[0] = n[0] && n[0].toLowerCase(), fs.prototype[e].apply(t, n);
- }
- var Kue = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e;
- }(fs)
- ), Jue = Kue.prototype;
- Jue.on = Yue("on");
- Jue.off = Yue("off");
- var nv, xM, TS, Sc, wM, CM, TM, N0, B0, Ej, Mj, PM, Ij, PS, Dj, ece, Mo, Rj, jC = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this, new cYe()) || this;
- a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Ve(r) && (r = tce[r]), a._dom = n;
- var o = "canvas", s = "auto", l = !1;
- if (process.env.NODE_ENV !== "production") {
- var u = (
- /* eslint-disable-next-line */
- Gt.hasGlobalWindow ? window : global
- );
- u && (o = dt(u.__ECHARTS__DEFAULT__RENDERER__, o), s = dt(u.__ECHARTS__DEFAULT__COARSE_POINTER, s), l = dt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, l));
- }
- i.ssr && Ase(function(h) {
- var p = ft(h), v = p.dataIndex;
- if (v != null) {
- var g = Ze();
- return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
- }
- });
- var c = a._zr = bk(n, {
- renderer: i.renderer || o,
- devicePixelRatio: i.devicePixelRatio,
- width: i.width,
- height: i.height,
- ssr: i.ssr,
- useDirtyRect: dt(i.useDirtyRect, l),
- useCoarsePointer: dt(i.useCoarsePointer, s),
- pointerSize: i.pointerSize
- });
- a._ssr = i.ssr, a._throttledZrFlush = kP(We(c.flush, c), 17), r = ot(r), r && sue(r, !0), a._theme = r, a._locale = yUe(i.locale || Vle), a._coordSysMgr = new gp();
- var f = a._api = Dj(a);
- function d(h, p) {
- return h.__prio - p.__prio;
- }
- return aw(UC, d), aw(Uk, d), a._scheduler = new Iue(a, f, Uk, UC), a._messageCenter = new Kue(), a._initEvents(), a.resize = We(a.resize, a), c.animation.on("frame", a._onframe, a), Ej(c, a), Mj(c, a), Vb(a), a;
- }
- return e.prototype._onframe = function() {
- if (!this._disposed) {
- Rj(this);
- var n = this._scheduler;
- if (this[Oa]) {
- var r = this[Oa].silent;
- this[Ri] = !0;
- try {
- nv(this), Sc.update.call(this, null, this[Oa].updateParams);
- } catch (l) {
- throw this[Ri] = !1, this[Oa] = null, l;
- }
- this._zr.flush(), this[Ri] = !1, this[Oa] = null, N0.call(this, r), B0.call(this, r);
- } else if (n.unfinished) {
- var i = HYe, a = this._model, o = this._api;
- n.unfinished = !1;
- do {
- var s = +/* @__PURE__ */ new Date();
- n.performSeriesTasks(a), n.performDataProcessorTasks(a), CM(this, a), n.performVisualTasks(a), PS(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
- } while (i > 0 && n.unfinished);
- n.unfinished || this._zr.flush();
- }
- }
- }, e.prototype.getDom = function() {
- return this._dom;
- }, e.prototype.getId = function() {
- return this.id;
- }, e.prototype.getZr = function() {
- return this._zr;
- }, e.prototype.isSSR = function() {
- return this._ssr;
- }, e.prototype.setOption = function(n, r, i) {
- if (this[Ri]) {
- process.env.NODE_ENV !== "production" && $i("`setOption` should not be called during main process.");
- return;
- }
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- var a, o, s;
- if (nt(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Ri] = !0, !this._model || r) {
- var l = new ZUe(this._api), u = this._theme, c = this._model = new a3();
- c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
- }
- this._model.setOption(n, {
- replaceMerge: o
- }, Xk);
- var f = {
- seriesTransition: s,
- optionChanged: !0
- };
- if (i)
- this[Oa] = {
- silent: a,
- updateParams: f
- }, this[Ri] = !1, this.getZr().wakeUp();
- else {
- try {
- nv(this), Sc.update.call(this, null, f);
- } catch (d) {
- throw this[Oa] = null, this[Ri] = !1, d;
- }
- this._ssr || this._zr.flush(), this[Oa] = null, this[Ri] = !1, N0.call(this, a), B0.call(this, a);
- }
- }, e.prototype.setTheme = function() {
- ss("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
- }, e.prototype.getModel = function() {
- return this._model;
- }, e.prototype.getOption = function() {
- return this._model && this._model.getOption();
- }, e.prototype.getWidth = function() {
- return this._zr.getWidth();
- }, e.prototype.getHeight = function() {
- return this._zr.getHeight();
- }, e.prototype.getDevicePixelRatio = function() {
- return this._zr.painter.dpr || Gt.hasGlobalWindow && window.devicePixelRatio || 1;
- }, e.prototype.getRenderedCanvas = function(n) {
- return process.env.NODE_ENV !== "production" && _r("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
- }, e.prototype.renderToCanvas = function(n) {
- n = n || {};
- var r = this._zr.painter;
- if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
- throw new Error("renderToCanvas can only be used in the canvas renderer.");
- return r.getRenderedCanvas({
- backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
- pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
- });
- }, e.prototype.renderToSVGString = function(n) {
- n = n || {};
- var r = this._zr.painter;
- if (process.env.NODE_ENV !== "production" && r.type !== "svg")
- throw new Error("renderToSVGString can only be used in the svg renderer.");
- return r.renderToString({
- useViewBox: n.useViewBox
- });
- }, e.prototype.getSvgDataURL = function() {
- if (Gt.svgSupported) {
- var n = this._zr, r = n.storage.getDisplayList();
- return F(r, function(i) {
- i.stopAnimation(null, !0);
- }), n.painter.toDataURL();
- }
- }, e.prototype.getDataURL = function(n) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- n = n || {};
- var r = n.excludeComponents, i = this._model, a = [], o = this;
- F(r, function(l) {
- i.eachComponent({
- mainType: l
- }, function(u) {
- var c = o._componentsMap[u.__viewId];
- c.group.ignore || (a.push(c), c.group.ignore = !0);
- });
- });
- var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
- return F(a, function(l) {
- l.group.ignore = !1;
- }), s;
- }, e.prototype.getConnectedDataURL = function(n) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
- if (XC[i]) {
- var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
- F(Ph, function(_, O) {
- if (_.group === i) {
- var S = r ? _.getZr().painter.getSvgDom().innerHTML : _.renderToCanvas(ot(n)), x = _.getDom().getBoundingClientRect();
- l = a(x.left, l), u = a(x.top, u), c = o(x.right, c), f = o(x.bottom, f), d.push({
- dom: S,
- left: x.left,
- top: x.top
- });
- }
- }), l *= h, u *= h, c *= h, f *= h;
- var p = c - l, v = f - u, g = Hs.createCanvas(), m = bk(g, {
- renderer: r ? "svg" : "canvas"
- });
- if (m.resize({
- width: p,
- height: v
- }), r) {
- var y = "";
- return F(d, function(_) {
- var O = _.left - l, S = _.top - u;
- y += '<g transform="translate(' + O + "," + S + ')">' + _.dom + "</g>";
- }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
- } else
- return n.connectedBackgroundColor && m.add(new Zt({
- shape: {
- x: 0,
- y: 0,
- width: p,
- height: v
- },
- style: {
- fill: n.connectedBackgroundColor
- }
- })), F(d, function(_) {
- var O = new ci({
- style: {
- x: _.left * h - l,
- y: _.top * h - u,
- image: _.dom
- }
- });
- m.add(O);
- }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
- } else
- return this.getDataURL(n);
- }, e.prototype.convertToPixel = function(n, r) {
- return wM(this, "convertToPixel", n, r);
- }, e.prototype.convertFromPixel = function(n, r) {
- return wM(this, "convertFromPixel", n, r);
- }, e.prototype.containPixel = function(n, r) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- var i = this._model, a, o = tb(i, n);
- return F(o, function(s, l) {
- l.indexOf("Models") >= 0 && F(s, function(u) {
- var c = u.coordinateSystem;
- if (c && c.containPoint)
- a = a || !!c.containPoint(r);
- else if (l === "seriesModels") {
- var f = this._chartsMap[u.__viewId];
- f && f.containPoint ? a = a || f.containPoint(r, u) : process.env.NODE_ENV !== "production" && nr(l + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component."));
- } else
- process.env.NODE_ENV !== "production" && nr(l + ": containPoint is not supported");
- }, this);
- }, this), !!a;
- }, e.prototype.getVisual = function(n, r) {
- var i = this._model, a = tb(i, n, {
- defaultMainType: "series"
- }), o = a.seriesModel;
- process.env.NODE_ENV !== "production" && (o || nr("There is no specified series model"));
- var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
- return l != null ? c3(s, l, r) : v1(s, r);
- }, e.prototype.getViewOfComponentModel = function(n) {
- return this._componentsMap[n.__viewId];
- }, e.prototype.getViewOfSeriesModel = function(n) {
- return this._chartsMap[n.__viewId];
- }, e.prototype._initEvents = function() {
- var n = this;
- F(rqe, function(r) {
- var i = function(a) {
- var o = n.getModel(), s = a.target, l, u = r === "globalout";
- if (u ? l = {} : s && sh(s, function(p) {
- var v = ft(p);
- if (v && v.dataIndex != null) {
- var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
- return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
- } else if (v.eventData)
- return l = _e({}, v.eventData), !0;
- }, !0), l) {
- var c = l.componentType, f = l.componentIndex;
- (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
- var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
- process.env.NODE_ENV !== "production" && !u && !(d && h) && nr("model or view can not be found by params"), l.event = a, l.type = r, n._$eventProcessor.eventInfo = {
- targetEl: s,
- packedEvent: l,
- model: d,
- view: h
- }, n.trigger(r, l);
- }
- };
- i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
- }), F(sb, function(r, i) {
- n._messageCenter.on(i, function(a) {
- this.trigger(i, a);
- }, n);
- }), F(["selectchanged"], function(r) {
- n._messageCenter.on(r, function(i) {
- this.trigger(r, i);
- }, n);
- }), hYe(this._messageCenter, this, this._api);
- }, e.prototype.isDisposed = function() {
- return this._disposed;
- }, e.prototype.clear = function() {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- this.setOption({
- series: []
- }, !0);
- }, e.prototype.dispose = function() {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- this._disposed = !0;
- var n = this.getDom();
- n && zse(this.getDom(), v3, "");
- var r = this, i = r._api, a = r._model;
- F(r._componentsViews, function(o) {
- o.dispose(a, i);
- }), F(r._chartsViews, function(o) {
- o.dispose(a, i);
- }), r._zr.dispose(), r._dom = r._model = r._chartsMap = r._componentsMap = r._chartsViews = r._componentsViews = r._scheduler = r._api = r._zr = r._throttledZrFlush = r._theme = r._coordSysMgr = r._messageCenter = null, delete Ph[r.id];
- }, e.prototype.resize = function(n) {
- if (this[Ri]) {
- process.env.NODE_ENV !== "production" && $i("`resize` should not be called during main process.");
- return;
- }
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- this._zr.resize(n);
- var r = this._model;
- if (this._loadingFX && this._loadingFX.resize(), !!r) {
- var i = r.resetOption("media"), a = n && n.silent;
- this[Oa] && (a == null && (a = this[Oa].silent), i = !0, this[Oa] = null), this[Ri] = !0;
- try {
- i && nv(this), Sc.update.call(this, {
- type: "resize",
- animation: _e({
- // Disable animation
- duration: 0
- }, n && n.animation)
- });
- } catch (o) {
- throw this[Ri] = !1, o;
- }
- this[Ri] = !1, N0.call(this, a), B0.call(this, a);
- }
- }, e.prototype.showLoading = function(n, r) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- if (nt(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !Yk[n]) {
- process.env.NODE_ENV !== "production" && nr("Loading effects " + n + " not exists.");
- return;
- }
- var i = Yk[n](this._api, r), a = this._zr;
- this._loadingFX = i, a.add(i);
- }, e.prototype.hideLoading = function() {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
- }, e.prototype.makeActionFromEvent = function(n) {
- var r = _e({}, n);
- return r.type = sb[n.type], r;
- }, e.prototype.dispatchAction = function(n, r) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- if (nt(r) || (r = {
- silent: !!r
- }), !!ZC[n.type] && this._model) {
- if (this[Ri]) {
- this._pendingActions.push(n);
- return;
- }
- var i = r.silent;
- TM.call(this, n, i);
- var a = r.flush;
- a ? this._zr.flush() : a !== !1 && Gt.browser.weChat && this._throttledZrFlush(), N0.call(this, i), B0.call(this, i);
- }
- }, e.prototype.updateLabelLayout = function() {
- Ts.trigger("series:layoutlabels", this._model, this._api, {
- // Not adding series labels.
- // TODO
- updatedSeries: []
- });
- }, e.prototype.appendData = function(n) {
- if (this._disposed) {
- Ja(this.id);
- return;
- }
- var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
- process.env.NODE_ENV !== "production" && at(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
- }, e.internalField = function() {
- nv = function(f) {
- var d = f._scheduler;
- d.restorePipelines(f._model), d.prepareStageTasks(), xM(f, !0), xM(f, !1), d.plan();
- }, xM = function(f, d) {
- for (var h = f._model, p = f._scheduler, v = d ? f._componentsViews : f._chartsViews, g = d ? f._componentsMap : f._chartsMap, m = f._zr, y = f._api, _ = 0; _ < v.length; _++)
- v[_].__alive = !1;
- d ? h.eachComponent(function(x, C) {
- x !== "series" && O(C);
- }) : h.eachSeries(O);
- function O(x) {
- var C = x.__requireNewView;
- x.__requireNewView = !1;
- var P = "_ec_" + x.id + "_" + x.type, $ = !C && g[P];
- if (!$) {
- var T = $l(x.type), E = d ? Ln.getClass(T.main, T.sub) : (
- // FIXME:TS
- // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
- // For backward compat, still support a chart type declared as only subType
- // like "liquidfill", but recommend "series.liquidfill"
- // But need a base class to make a type series.
- _n.getClass(T.sub)
- );
- process.env.NODE_ENV !== "production" && at(E, T.sub + " does not exist."), $ = new E(), $.init(h, y), g[P] = $, v.push($), m.add($.group);
- }
- x.__viewId = $.__id = P, $.__alive = !0, $.__model = x, $.group.__ecComponentInfo = {
- mainType: x.mainType,
- index: x.componentIndex
- }, !d && p.prepareView($, x, h, y);
- }
- for (var _ = 0; _ < v.length; ) {
- var S = v[_];
- S.__alive ? _++ : (!d && S.renderTask.dispose(), m.remove(S.group), S.dispose(h, y), v.splice(_, 1), g[S.__id] === S && delete g[S.__id], S.__id = S.group.__ecComponentInfo = null);
- }
- }, TS = function(f, d, h, p, v) {
- var g = f._model;
- if (g.setUpdatePayload(h), !p) {
- F([].concat(f._componentsViews).concat(f._chartsViews), S);
- return;
- }
- var m = {};
- m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
- var y = {
- mainType: p,
- query: m
- };
- v && (y.subType = v);
- var _ = h.excludeSeriesId, O;
- _ != null && (O = Ze(), F(Cn(_), function(x) {
- var C = Br(x, null);
- C != null && O.set(C, !0);
- })), g && g.eachComponent(y, function(x) {
- var C = O && O.get(x.id) != null;
- if (!C)
- if (gG(h))
- if (x instanceof Tn)
- h.type === Ch && !h.notBlur && !x.get(["emphasis", "disabled"]) && gZe(x, h, f._api);
- else {
- var P = B5(x.mainType, x.componentIndex, h.name, f._api), $ = P.focusSelf, T = P.dispatchers;
- h.type === Ch && $ && !h.notBlur && Ak(x.mainType, x.componentIndex, f._api), T && F(T, function(E) {
- h.type === Ch ? Fu(E) : Wu(E);
- });
- }
- else Mk(h) && x instanceof Tn && (bZe(x, h, f._api), pG(x), Mo(f));
- }, f), g && g.eachComponent(y, function(x) {
- var C = O && O.get(x.id) != null;
- C || S(f[p === "series" ? "_chartsMap" : "_componentsMap"][x.__viewId]);
- }, f);
- function S(x) {
- x && x.__alive && x[d] && x[d](x.__model, g, f._api, h);
- }
- }, Sc = {
- prepareAndUpdate: function(f) {
- nv(this), Sc.update.call(this, f, {
- // Needs to mark option changed if newOption is given.
- // It's from MagicType.
- // TODO If use a separate flag optionChanged in payload?
- optionChanged: f.newOption != null
- });
- },
- update: function(f, d) {
- var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
- if (h) {
- h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), CM(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), PM(this, h, p, f, d);
- var y = h.get("backgroundColor") || "transparent", _ = h.get("darkMode");
- v.setBackgroundColor(y), _ != null && _ !== "auto" && v.setDarkMode(_), Ts.trigger("afterupdate", h, p);
- }
- },
- updateTransform: function(f) {
- var d = this, h = this._model, p = this._api;
- if (h) {
- h.setUpdatePayload(f);
- var v = [];
- h.eachComponent(function(m, y) {
- if (m !== "series") {
- var _ = d.getViewOfComponentModel(y);
- if (_ && _.__alive)
- if (_.updateTransform) {
- var O = _.updateTransform(y, h, p, f);
- O && O.update && v.push(_);
- } else
- v.push(_);
- }
- });
- var g = Ze();
- h.eachSeries(function(m) {
- var y = d._chartsMap[m.__viewId];
- if (y.updateTransform) {
- var _ = y.updateTransform(m, h, p, f);
- _ && _.update && g.set(m.uid, 1);
- } else
- g.set(m.uid, 1);
- }), n(h), this._scheduler.performVisualTasks(h, f, {
- setDirty: !0,
- dirtyMap: g
- }), PS(this, h, p, f, {}, g), Ts.trigger("afterupdate", h, p);
- }
- },
- updateView: function(f) {
- var d = this._model;
- d && (d.setUpdatePayload(f), _n.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
- setDirty: !0
- }), PM(this, d, this._api, f, {}), Ts.trigger("afterupdate", d, this._api));
- },
- updateVisual: function(f) {
- var d = this, h = this._model;
- h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
- p.getData().clearAllVisual();
- }), _n.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
- visualType: "visual",
- setDirty: !0
- }), h.eachComponent(function(p, v) {
- if (p !== "series") {
- var g = d.getViewOfComponentModel(v);
- g && g.__alive && g.updateVisual(v, h, d._api, f);
- }
- }), h.eachSeries(function(p) {
- var v = d._chartsMap[p.__viewId];
- v.updateVisual(p, h, d._api, f);
- }), Ts.trigger("afterupdate", h, this._api));
- },
- updateLayout: function(f) {
- Sc.update.call(this, f);
- }
- }, wM = function(f, d, h, p) {
- if (f._disposed) {
- Ja(f.id);
- return;
- }
- for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = tb(v, h), _ = 0; _ < g.length; _++) {
- var O = g[_];
- if (O[d] && (m = O[d](v, y, p)) != null)
- return m;
- }
- process.env.NODE_ENV !== "production" && nr("No coordinate system that supports " + d + " found by the given finder.");
- }, CM = function(f, d) {
- var h = f._chartsMap, p = f._scheduler;
- d.eachSeries(function(v) {
- p.updateStreamModes(v, h[v.__viewId]);
- });
- }, TM = function(f, d) {
- var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = ZC[v], y = m.actionInfo, _ = (y.update || "update").split(":"), O = _.pop(), S = _[0] != null && $l(_[0]);
- this[Ri] = !0;
- var x = [f], C = !1;
- f.batch && (C = !0, x = Ce(f.batch, function(N) {
- return N = it(_e({}, N), f), N.batch = null, N;
- }));
- var P = [], $, T = Mk(f), E = gG(f);
- if (E && cle(this._api), F(x, function(N) {
- if ($ = m.action(N, h._model, h._api), $ = $ || _e({}, N), $.type = y.event || $.type, P.push($), E) {
- var I = E5(f), B = I.queryOptionMap, Q = I.mainTypeSpecified, W = Q ? B.keys()[0] : "series";
- TS(h, O, N, W), Mo(h);
- } else T ? (TS(h, O, N, "series"), Mo(h)) : S && TS(h, O, N, S.main, S.sub);
- }), O !== "none" && !E && !T && !S)
- try {
- this[Oa] ? (nv(this), Sc.update.call(this, f), this[Oa] = null) : Sc[O].call(this, f);
- } catch (N) {
- throw this[Ri] = !1, N;
- }
- if (C ? $ = {
- type: y.event || v,
- escapeConnect: g,
- batch: P
- } : $ = P[0], this[Ri] = !1, !d) {
- var M = this._messageCenter;
- if (M.trigger($.type, $), T) {
- var R = {
- type: "selectchanged",
- escapeConnect: g,
- selected: _Ze(p),
- isFromClick: f.isFromClick || !1,
- fromAction: f.type,
- fromActionPayload: f
- };
- M.trigger(R.type, R);
- }
- }
- }, N0 = function(f) {
- for (var d = this._pendingActions; d.length; ) {
- var h = d.shift();
- TM.call(this, h, f);
- }
- }, B0 = function(f) {
- !f && this.trigger("updated");
- }, Ej = function(f, d) {
- f.on("rendered", function(h) {
- d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
- // and this checking is called on frame, we also check
- // animation finished for robustness.
- f.animation.isFinished() && !d[Oa] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
- });
- }, Mj = function(f, d) {
- f.on("mouseover", function(h) {
- var p = h.target, v = sh(p, bf);
- v && (mZe(v, h, d._api), Mo(d));
- }).on("mouseout", function(h) {
- var p = h.target, v = sh(p, bf);
- v && (yZe(v, h, d._api), Mo(d));
- }).on("click", function(h) {
- var p = h.target, v = sh(p, function(y) {
- return ft(y).dataIndex != null;
- }, !0);
- if (v) {
- var g = v.selected ? "unselect" : "select", m = ft(v);
- d._api.dispatchAction({
- type: g,
- dataType: m.dataType,
- dataIndexInside: m.dataIndex,
- seriesIndex: m.seriesIndex,
- isFromClick: !0
- });
- }
- });
- };
- function n(f) {
- f.clearColorPalette(), f.eachSeries(function(d) {
- d.clearColorPalette();
- });
- }
- function r(f) {
- var d = [], h = [], p = !1;
- if (f.eachComponent(function(y, _) {
- var O = _.get("zlevel") || 0, S = _.get("z") || 0, x = _.getZLevelKey();
- p = p || !!x, (y === "series" ? h : d).push({
- zlevel: O,
- z: S,
- idx: _.componentIndex,
- type: y,
- key: x
- });
- }), p) {
- var v = d.concat(h), g, m;
- aw(v, function(y, _) {
- return y.zlevel === _.zlevel ? y.z - _.z : y.zlevel - _.zlevel;
- }), F(v, function(y) {
- var _ = f.getComponent(y.type, y.idx), O = y.zlevel, S = y.key;
- g != null && (O = Math.max(g, O)), S ? (O === g && S !== m && O++, m = S) : m && (O === g && O++, m = ""), g = O, _.setZLevel(O);
- });
- }
- }
- PM = function(f, d, h, p, v) {
- r(d), Ij(f, d, h, p, v), F(f._chartsViews, function(g) {
- g.__alive = !1;
- }), PS(f, d, h, p, v), F(f._chartsViews, function(g) {
- g.__alive || g.remove(d, h);
- });
- }, Ij = function(f, d, h, p, v, g) {
- F(g || f._componentsViews, function(m) {
- var y = m.__model;
- u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
- });
- }, PS = function(f, d, h, p, v, g) {
- var m = f._scheduler;
- v = _e(v || {}, {
- updatedSeries: d.getSeries()
- }), Ts.trigger("series:beforeupdate", d, h, v);
- var y = !1;
- d.eachSeries(function(_) {
- var O = f._chartsMap[_.__viewId];
- O.__alive = !0;
- var S = O.renderTask;
- m.updatePayload(S, p), u(_, O), g && g.get(_.uid) && S.dirty(), S.perform(m.getPerformArgs(S)) && (y = !0), O.group.silent = !!_.get("silent"), o(_, O), pG(_);
- }), m.unfinished = y || m.unfinished, Ts.trigger("series:layoutlabels", d, h, v), Ts.trigger("series:transition", d, h, v), d.eachSeries(function(_) {
- var O = f._chartsMap[_.__viewId];
- s(_, O), c(_, O);
- }), a(f, d), Ts.trigger("series:afterupdate", d, h, v);
- }, Mo = function(f) {
- f[OM] = !0, f.getZr().wakeUp();
- }, Rj = function(f) {
- f[OM] && (f.getZr().storage.traverse(function(d) {
- qv(d) || i(d);
- }), f[OM] = !1);
- };
- function i(f) {
- for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
- var v = h[p];
- v === "emphasis" || v === "blur" || v === "select" || d.push(v);
- }
- f.selected && f.states.select && d.push("select"), f.hoverState === bP && f.states.emphasis ? d.push("emphasis") : f.hoverState === u1 && f.states.blur && d.push("blur"), f.useStates(d);
- }
- function a(f, d) {
- var h = f._zr, p = h.storage, v = 0;
- p.traverse(function(g) {
- g.isGroup || v++;
- }), v > d.get("hoverLayerThreshold") && !Gt.node && !Gt.worker && d.eachSeries(function(g) {
- if (!g.preventUsingHoverLayer) {
- var m = f._chartsMap[g.__viewId];
- m.__alive && m.eachRendered(function(y) {
- y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
- });
- }
- });
- }
- function o(f, d) {
- var h = f.get("blendMode") || null;
- d.eachRendered(function(p) {
- p.isGroup || (p.style.blend = h);
- });
- }
- function s(f, d) {
- if (!f.preventAutoZ) {
- var h = f.get("z") || 0, p = f.get("zlevel") || 0;
- d.eachRendered(function(v) {
- return l(v, h, p, -1 / 0), !0;
- });
- }
- }
- function l(f, d, h, p) {
- var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
- if (m)
- for (var y = f.childrenRef(), _ = 0; _ < y.length; _++)
- p = Math.max(l(y[_], d, h, p), p);
- else
- f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
- if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
- var O = f.textGuideLineConfig;
- g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (O && O.showAbove ? 1 : -1));
- }
- return p;
- }
- function u(f, d) {
- d.eachRendered(function(h) {
- if (!qv(h)) {
- var p = h.getTextContent(), v = h.getTextGuideLine();
- h.stateTransition && (h.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), v && v.stateTransition && (v.stateTransition = null), h.hasState() ? (h.prevStates = h.currentStates, h.clearStates()) : h.prevStates && (h.prevStates = null);
- }
- });
- }
- function c(f, d) {
- var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
- duration: v,
- delay: h.get("delay"),
- easing: h.get("easing")
- // additive: stateAnimationModel.get('additive')
- } : null;
- d.eachRendered(function(m) {
- if (m.states && m.states.emphasis) {
- if (qv(m))
- return;
- if (m instanceof Dt && CZe(m), m.__dirty) {
- var y = m.prevStates;
- y && m.useStates(y);
- }
- if (p) {
- m.stateTransition = g;
- var _ = m.getTextContent(), O = m.getTextGuideLine();
- _ && (_.stateTransition = g), O && (O.stateTransition = g);
- }
- m.__dirty && i(m);
- }
- });
- }
- Dj = function(f) {
- return new /** @class */
- (function(d) {
- le(h, d);
- function h() {
- return d !== null && d.apply(this, arguments) || this;
- }
- return h.prototype.getCoordinateSystems = function() {
- return f._coordSysMgr.getCoordinateSystems();
- }, h.prototype.getComponentByElement = function(p) {
- for (; p; ) {
- var v = p.__ecComponentInfo;
- if (v != null)
- return f._model.getComponent(v.mainType, v.index);
- p = p.parent;
- }
- }, h.prototype.enterEmphasis = function(p, v) {
- Fu(p, v), Mo(f);
- }, h.prototype.leaveEmphasis = function(p, v) {
- Wu(p, v), Mo(f);
- }, h.prototype.enterBlur = function(p) {
- ole(p), Mo(f);
- }, h.prototype.leaveBlur = function(p) {
- N5(p), Mo(f);
- }, h.prototype.enterSelect = function(p) {
- sle(p), Mo(f);
- }, h.prototype.leaveSelect = function(p) {
- lle(p), Mo(f);
- }, h.prototype.getModel = function() {
- return f.getModel();
- }, h.prototype.getViewOfComponentModel = function(p) {
- return f.getViewOfComponentModel(p);
- }, h.prototype.getViewOfSeriesModel = function(p) {
- return f.getViewOfSeriesModel(p);
- }, h;
- }(aue))(f);
- }, ece = function(f) {
- function d(h, p) {
- for (var v = 0; v < h.length; v++) {
- var g = h[v];
- g[SM] = p;
- }
- }
- F(sb, function(h, p) {
- f._messageCenter.on(p, function(v) {
- if (XC[f.group] && f[SM] !== Aj) {
- if (v && v.escapeConnect)
- return;
- var g = f.makeActionFromEvent(v), m = [];
- F(Ph, function(y) {
- y !== f && y.group === f.group && m.push(y);
- }), d(m, Aj), F(m, function(y) {
- y[SM] !== tqe && y.dispatchAction(g);
- }), d(m, nqe);
- }
- });
- });
- };
- }(), e;
- }(fs)
- ), p3 = jC.prototype;
- p3.on = Xue("on");
- p3.off = Xue("off");
- p3.one = function(t, e, n) {
- var r = this;
- ss("ECharts#one is deprecated.");
- function i() {
- for (var a = [], o = 0; o < arguments.length; o++)
- a[o] = arguments[o];
- e && e.apply && e.apply(this, a), r.off(t, i);
- }
- this.on.call(this, t, i, n);
- };
- var rqe = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
- function Ja(t) {
- process.env.NODE_ENV !== "production" && nr("Instance " + t + " has been disposed");
- }
- var ZC = {}, sb = {}, Uk = [], Xk = [], UC = [], tce = {}, Yk = {}, Ph = {}, XC = {}, iqe = +/* @__PURE__ */ new Date() - 0, aqe = +/* @__PURE__ */ new Date() - 0, v3 = "_echarts_instance_";
- function nce(t, e, n) {
- var r = !(n && n.ssr);
- if (r) {
- if (process.env.NODE_ENV !== "production" && !t)
- throw new Error("Initialize failed: invalid dom.");
- var i = g3(t);
- if (i)
- return process.env.NODE_ENV !== "production" && nr("There is a chart instance already initialized on the dom."), i;
- process.env.NODE_ENV !== "production" && gf(t) && t.nodeName.toUpperCase() !== "CANVAS" && (!t.clientWidth && (!n || n.width == null) || !t.clientHeight && (!n || n.height == null)) && nr("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");
- }
- var a = new jC(t, e, n);
- return a.id = "ec_" + iqe++, Ph[a.id] = a, r && zse(t, v3, a.id), ece(a), Ts.trigger("afterinit", a), a;
- }
- function oqe(t) {
- if (Se(t)) {
- var e = t;
- t = null, F(e, function(n) {
- n.group != null && (t = n.group);
- }), t = t || "g_" + aqe++, F(e, function(n) {
- n.group = t;
- });
- }
- return XC[t] = !0, t;
- }
- function rce(t) {
- XC[t] = !1;
- }
- var sqe = rce;
- function lqe(t) {
- Ve(t) ? t = Ph[t] : t instanceof jC || (t = g3(t)), t instanceof jC && !t.isDisposed() && t.dispose();
- }
- function g3(t) {
- return Ph[hje(t, v3)];
- }
- function uqe(t) {
- return Ph[t];
- }
- function m3(t, e) {
- tce[t] = e;
- }
- function y3(t) {
- St(Xk, t) < 0 && Xk.push(t);
- }
- function b3(t, e) {
- _3(Uk, t, e, UYe);
- }
- function ice(t) {
- NP("afterinit", t);
- }
- function ace(t) {
- NP("afterupdate", t);
- }
- function NP(t, e) {
- Ts.on(t, e);
- }
- function Js(t, e, n) {
- qe(e) && (n = e, e = "");
- var r = nt(t) ? t.type : [t, t = {
- event: e
- }][0];
- t.event = (t.event || r).toLowerCase(), e = t.event, !sb[e] && (at($j.test(r) && $j.test(e)), ZC[r] || (ZC[r] = {
- action: n,
- actionInfo: t
- }), sb[e] = r);
- }
- function oce(t, e) {
- gp.register(t, e);
- }
- function cqe(t) {
- var e = gp.get(t);
- if (e)
- return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
- }
- function sce(t, e) {
- _3(UC, t, e, Gue, "layout");
- }
- function zf(t, e) {
- _3(UC, t, e, jue, "visual");
- }
- var kj = [];
- function _3(t, e, n, r, i) {
- if ((qe(e) || nt(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
- if (isNaN(e) || e == null)
- throw new Error("Illegal priority");
- F(t, function(o) {
- at(o.__raw !== n);
- });
- }
- if (!(St(kj, n) >= 0)) {
- kj.push(n);
- var a = Iue.wrapStageHandler(n, i);
- a.__prio = e, a.__raw = n, t.push(a);
- }
- }
- function O3(t, e) {
- Yk[t] = e;
- }
- function fqe(t) {
- process.env.NODE_ENV !== "production" && ss("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Goe({
- createCanvas: t
- });
- }
- function lce(t, e, n) {
- var r = Hue("registerMap");
- r && r(t, e, n);
- }
- function dqe(t) {
- var e = Hue("getMap");
- return e && e(t);
- }
- var uce = CXe;
- zf(h3, YXe);
- zf(LP, qXe);
- zf(LP, KXe);
- zf(h3, fYe);
- zf(LP, dYe);
- zf(Zue, VYe);
- y3(sue);
- b3(jYe, aXe);
- O3("default", JXe);
- Js({
- type: Ch,
- event: Ch,
- update: Ch
- }, fr);
- Js({
- type: cw,
- event: cw,
- update: cw
- }, fr);
- Js({
- type: nb,
- event: nb,
- update: nb
- }, fr);
- Js({
- type: fw,
- event: fw,
- update: fw
- }, fr);
- Js({
- type: rb,
- event: rb,
- update: rb
- }, fr);
- m3("light", uYe);
- m3("dark", Lue);
- var hqe = {}, Lj = [], pqe = {
- registerPreprocessor: y3,
- registerProcessor: b3,
- registerPostInit: ice,
- registerPostUpdate: ace,
- registerUpdateLifecycle: NP,
- registerAction: Js,
- registerCoordinateSystem: oce,
- registerLayout: sce,
- registerVisual: zf,
- registerTransform: uce,
- registerLoading: O3,
- registerMap: lce,
- registerImpl: FYe,
- PRIORITY: Uue,
- ComponentModel: At,
- ComponentView: Ln,
- SeriesModel: Tn,
- ChartView: _n,
- // TODO Use ComponentModel and SeriesModel instead of Constructor
- registerComponentModel: function(t) {
- At.registerClass(t);
- },
- registerComponentView: function(t) {
- Ln.registerClass(t);
- },
- registerSeriesModel: function(t) {
- Tn.registerClass(t);
- },
- registerChartView: function(t) {
- _n.registerClass(t);
- },
- registerSubTypeDefaulter: function(t, e) {
- At.registerSubTypeDefaulter(t, e);
- },
- registerPainter: function(t, e) {
- Pse(t, e);
- }
- };
- function Mt(t) {
- if (Se(t)) {
- F(t, function(e) {
- Mt(e);
- });
- return;
- }
- St(Lj, t) >= 0 || (Lj.push(t), qe(t) && (t = {
- install: t
- }), t.install(pqe));
- }
- function z0(t) {
- return t == null ? 0 : t.length || 1;
- }
- function Nj(t) {
- return t;
- }
- var Qu = (
- /** @class */
- function() {
- function t(e, n, r, i, a, o) {
- this._old = e, this._new = n, this._oldKeyGetter = r || Nj, this._newKeyGetter = i || Nj, this.context = a, this._diffModeMultiple = o === "multiple";
- }
- return t.prototype.add = function(e) {
- return this._add = e, this;
- }, t.prototype.update = function(e) {
- return this._update = e, this;
- }, t.prototype.updateManyToOne = function(e) {
- return this._updateManyToOne = e, this;
- }, t.prototype.updateOneToMany = function(e) {
- return this._updateOneToMany = e, this;
- }, t.prototype.updateManyToMany = function(e) {
- return this._updateManyToMany = e, this;
- }, t.prototype.remove = function(e) {
- return this._remove = e, this;
- }, t.prototype.execute = function() {
- this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
- }, t.prototype._executeOneToOne = function() {
- var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
- this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
- for (var o = 0; o < e.length; o++) {
- var s = i[o], l = r[s], u = z0(l);
- if (u > 1) {
- var c = l.shift();
- l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
- } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
- }
- this._performRestAdd(a, r);
- }, t.prototype._executeMultiple = function() {
- var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
- this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
- for (var s = 0; s < a.length; s++) {
- var l = a[s], u = r[l], c = i[l], f = z0(u), d = z0(c);
- if (f > 1 && d === 1)
- this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
- else if (f === 1 && d > 1)
- this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
- else if (f === 1 && d === 1)
- this._update && this._update(c, u), i[l] = null;
- else if (f > 1 && d > 1)
- this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
- else if (f > 1)
- for (var h = 0; h < f; h++)
- this._remove && this._remove(u[h]);
- else
- this._remove && this._remove(u);
- }
- this._performRestAdd(o, i);
- }, t.prototype._performRestAdd = function(e, n) {
- for (var r = 0; r < e.length; r++) {
- var i = e[r], a = n[i], o = z0(a);
- if (o > 1)
- for (var s = 0; s < o; s++)
- this._add && this._add(a[s]);
- else o === 1 && this._add && this._add(a);
- n[i] = null;
- }
- }, t.prototype._initIndexMap = function(e, n, r, i) {
- for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
- var s = "_ec_" + this[i](e[o], o);
- if (a || (r[o] = s), !!n) {
- var l = n[s], u = z0(l);
- u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
- }
- }
- }, t;
- }()
- ), vqe = (
- /** @class */
- function() {
- function t(e, n) {
- this._encode = e, this._schema = n;
- }
- return t.prototype.get = function() {
- return {
- // Do not generate full dimension name until fist used.
- fullDimensions: this._getFullDimensionNames(),
- encode: this._encode
- };
- }, t.prototype._getFullDimensionNames = function() {
- return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
- }, t;
- }()
- );
- function gqe(t, e) {
- var n = {}, r = n.encode = {}, i = Ze(), a = [], o = [], s = {};
- F(t.dimensions, function(d) {
- var h = t.getDimensionInfo(d), p = h.coordDim;
- if (p) {
- process.env.NODE_ENV !== "production" && at(Nk.get(p) == null);
- var v = h.coordDimIndex;
- $M(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), mqe(h.type) && (a[0] = d), $M(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
- }
- Nk.each(function(g, m) {
- var y = $M(r, m), _ = h.otherDims[m];
- _ != null && _ !== !1 && (y[_] = h.name);
- });
- });
- var l = [], u = {};
- i.each(function(d, h) {
- var p = r[h];
- u[h] = p[0], l = l.concat(p);
- }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = Ce(l, function(d) {
- return t.getDimensionInfo(d).storeDimIndex;
- }), n.encodeFirstDimNotExtra = u;
- var c = r.label;
- c && c.length && (a = c.slice());
- var f = r.tooltip;
- return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new vqe(s, e), n;
- }
- function $M(t, e) {
- return t.hasOwnProperty(e) || (t[e] = []), t[e];
- }
- function YC(t) {
- return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
- }
- function mqe(t) {
- return !(t === "ordinal" || t === "time");
- }
- var gw = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- this.otherDims = {}, e != null && _e(this, e);
- }
- return t;
- }()
- ), yqe = Ut(), bqe = {
- float: "f",
- int: "i",
- ordinal: "o",
- number: "n",
- time: "t"
- }, cce = (
- /** @class */
- function() {
- function t(e) {
- this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
- }
- return t.prototype.isDimensionOmitted = function() {
- return this._dimOmitted;
- }, t.prototype._updateDimOmitted = function(e) {
- this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = hce(this.source)));
- }, t.prototype.getSourceDimensionIndex = function(e) {
- return dt(this._dimNameMap.get(e), -1);
- }, t.prototype.getSourceDimension = function(e) {
- var n = this.source.dimensionsDefine;
- if (n)
- return n[e];
- }, t.prototype.makeStoreSchema = function() {
- for (var e = this._fullDimCount, n = uue(this.source), r = !pce(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
- var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
- if (f && f.storeDimIndex === o)
- l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
- else {
- var d = this.getSourceDimension(o);
- d && (l = n ? d.name : null, u = d.type);
- }
- a.push({
- property: l,
- type: u,
- ordinalMeta: c
- }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += bqe[u] || "f", c && (i += c.uid), i += "$";
- }
- var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
- return {
- dimensions: a,
- hash: p
- };
- }, t.prototype.makeOutputDimensionNames = function() {
- for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
- var i = void 0, a = this.dimensions[r];
- if (a && a.storeDimIndex === n)
- a.isCalculationCoord || (i = a.name), r++;
- else {
- var o = this.getSourceDimension(n);
- o && (i = o.name);
- }
- e.push(i);
- }
- return e;
- }, t.prototype.appendCalculationDimension = function(e) {
- this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
- }, t;
- }()
- );
- function fce(t) {
- return t instanceof cce;
- }
- function dce(t) {
- for (var e = Ze(), n = 0; n < (t || []).length; n++) {
- var r = t[n], i = nt(r) ? r.name : r;
- i != null && e.get(i) == null && e.set(i, n);
- }
- return e;
- }
- function hce(t) {
- var e = yqe(t);
- return e.dimNameMap || (e.dimNameMap = dce(t.dimensionsDefine));
- }
- function pce(t) {
- return t > 30;
- }
- var V0 = nt, xc = Ce, _qe = typeof Int32Array > "u" ? Array : Int32Array, Oqe = "e\0\0", Bj = -1, Sqe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], xqe = ["_approximateExtent"], zj, $S, F0, rv, AM, AS, EM, wqe = (
- /** @class */
- function() {
- function t(e, n) {
- 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"];
- var r, i = !1;
- fce(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
- for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
- var f = r[c], d = Ve(f) ? new gw({
- name: f
- }) : f instanceof gw ? f : new gw(f), h = d.name;
- d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
- var p = d.otherDims = d.otherDims || {};
- o.push(h), a[h] = d, u[h] != null && (l = !0), d.createInvertedIndices && (s[h] = []), p.itemName === 0 && (this._nameDimIdx = c), p.itemId === 0 && (this._idDimIdx = c), process.env.NODE_ENV !== "production" && at(i || d.storeDimIndex >= 0), i && (d.storeDimIndex = c);
- }
- if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
- var v = this._dimIdxToName = Ze();
- F(o, function(g) {
- v.set(a[g].storeDimIndex, g);
- });
- }
- }
- return t.prototype.getDimension = function(e) {
- var n = this._recognizeDimIndex(e);
- if (n == null)
- return e;
- if (n = e, !this._dimOmitted)
- return this.dimensions[n];
- var r = this._dimIdxToName.get(n);
- if (r != null)
- return r;
- var i = this._schema.getSourceDimension(n);
- if (i)
- return i.name;
- }, t.prototype.getDimensionIndex = function(e) {
- var n = this._recognizeDimIndex(e);
- if (n != null)
- return n;
- if (e == null)
- return -1;
- var r = this._getDimInfo(e);
- return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
- }, t.prototype._recognizeDimIndex = function(e) {
- if (Kt(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
- return +e;
- }, t.prototype._getStoreDimIndex = function(e) {
- var n = this.getDimensionIndex(e);
- if (process.env.NODE_ENV !== "production" && n == null)
- throw new Error("Unknown dimension " + e);
- return n;
- }, t.prototype.getDimensionInfo = function(e) {
- return this._getDimInfo(this.getDimension(e));
- }, t.prototype._initGetDimensionInfo = function(e) {
- var n = this._dimInfos;
- this._getDimInfo = e ? function(r) {
- return n.hasOwnProperty(r) ? n[r] : void 0;
- } : function(r) {
- return n[r];
- };
- }, t.prototype.getDimensionsOnCoord = function() {
- return this._dimSummary.dataDimsOnCoord.slice();
- }, t.prototype.mapDimension = function(e, n) {
- var r = this._dimSummary;
- if (n == null)
- return r.encodeFirstDimNotExtra[e];
- var i = r.encode[e];
- return i ? i[n] : null;
- }, t.prototype.mapDimensionsAll = function(e) {
- var n = this._dimSummary, r = n.encode[e];
- return (r || []).slice();
- }, t.prototype.getStore = function() {
- return this._store;
- }, t.prototype.initData = function(e, n, r) {
- var i = this, a;
- if (e instanceof Fk && (a = e), !a) {
- var o = this.dimensions, s = o3(e) || Pi(e) ? new cue(e, o.length) : e;
- a = new Fk();
- var l = xc(o, function(u) {
- return {
- type: i._dimInfos[u].type,
- property: u
- };
- });
- a.initData(s, l, r);
- }
- this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = gqe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
- }, t.prototype.appendData = function(e) {
- var n = this._store.appendData(e);
- this._doInit(n[0], n[1]);
- }, t.prototype.appendValues = function(e, n) {
- var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
- if (this._updateOrdinalMeta(), n)
- for (var s = i; s < a; s++) {
- var l = s - i;
- this._nameList[s] = n[l], o && EM(this, s);
- }
- }, t.prototype._updateOrdinalMeta = function() {
- for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
- var i = this._dimInfos[n[r]];
- i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
- }
- }, t.prototype._shouldMakeIdFromName = function() {
- var e = this._store.getProvider();
- return this._idDimIdx == null && e.getSource().sourceFormat !== Mu && !e.fillStorage;
- }, t.prototype._doInit = function(e, n) {
- if (!(e >= n)) {
- var r = this._store, i = r.getProvider();
- this._updateOrdinalMeta();
- var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === hs;
- if (l && !i.pure)
- for (var u = [], c = e; c < n; c++) {
- var f = i.getItem(c, u);
- if (!this.hasItemOption && eje(f) && (this.hasItemOption = !0), f) {
- var d = f.name;
- a[c] == null && d != null && (a[c] = Br(d, null));
- var h = f.id;
- o[c] == null && h != null && (o[c] = Br(h, null));
- }
- }
- if (this._shouldMakeIdFromName())
- for (var c = e; c < n; c++)
- EM(this, c);
- zj(this);
- }
- }, t.prototype.getApproximateExtent = function(e) {
- return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
- }, t.prototype.setApproximateExtent = function(e, n) {
- n = this.getDimension(n), this._approximateExtent[n] = e.slice();
- }, t.prototype.getCalculationInfo = function(e) {
- return this._calculationInfo[e];
- }, t.prototype.setCalculationInfo = function(e, n) {
- V0(e) ? _e(this._calculationInfo, e) : this._calculationInfo[e] = n;
- }, t.prototype.getName = function(e) {
- var n = this.getRawIndex(e), r = this._nameList[n];
- return r == null && this._nameDimIdx != null && (r = F0(this, this._nameDimIdx, n)), r == null && (r = ""), r;
- }, t.prototype._getCategory = function(e, n) {
- var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
- return i ? i.categories[r] : r;
- }, t.prototype.getId = function(e) {
- return $S(this, this.getRawIndex(e));
- }, t.prototype.count = function() {
- return this._store.count();
- }, t.prototype.get = function(e, n) {
- var r = this._store, i = this._dimInfos[e];
- if (i)
- return r.get(i.storeDimIndex, n);
- }, t.prototype.getByRawIndex = function(e, n) {
- var r = this._store, i = this._dimInfos[e];
- if (i)
- return r.getByRawIndex(i.storeDimIndex, n);
- }, t.prototype.getIndices = function() {
- return this._store.getIndices();
- }, t.prototype.getDataExtent = function(e) {
- return this._store.getDataExtent(this._getStoreDimIndex(e));
- }, t.prototype.getSum = function(e) {
- return this._store.getSum(this._getStoreDimIndex(e));
- }, t.prototype.getMedian = function(e) {
- return this._store.getMedian(this._getStoreDimIndex(e));
- }, t.prototype.getValues = function(e, n) {
- var r = this, i = this._store;
- return Se(e) ? i.getValues(xc(e, function(a) {
- return r._getStoreDimIndex(a);
- }), n) : i.getValues(e);
- }, t.prototype.hasValue = function(e) {
- for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
- if (isNaN(this._store.get(n[r], e)))
- return !1;
- return !0;
- }, t.prototype.indexOfName = function(e) {
- for (var n = 0, r = this._store.count(); n < r; n++)
- if (this.getName(n) === e)
- return n;
- return -1;
- }, t.prototype.getRawIndex = function(e) {
- return this._store.getRawIndex(e);
- }, t.prototype.indexOfRawIndex = function(e) {
- return this._store.indexOfRawIndex(e);
- }, t.prototype.rawIndexOf = function(e, n) {
- var r = e && this._invertedIndicesMap[e];
- if (process.env.NODE_ENV !== "production" && !r)
- throw new Error("Do not supported yet");
- var i = r[n];
- return i == null || isNaN(i) ? Bj : i;
- }, t.prototype.indicesOfNearest = function(e, n, r) {
- return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
- }, t.prototype.each = function(e, n, r) {
- qe(e) && (r = n, n = e, e = []);
- var i = r || this, a = xc(rv(e), this._getStoreDimIndex, this);
- this._store.each(a, i ? We(n, i) : n);
- }, t.prototype.filterSelf = function(e, n, r) {
- qe(e) && (r = n, n = e, e = []);
- var i = r || this, a = xc(rv(e), this._getStoreDimIndex, this);
- return this._store = this._store.filter(a, i ? We(n, i) : n), this;
- }, t.prototype.selectRange = function(e) {
- var n = this, r = {}, i = kt(e);
- return F(i, function(a) {
- var o = n._getStoreDimIndex(a);
- r[o] = e[a];
- }), this._store = this._store.selectRange(r), this;
- }, t.prototype.mapArray = function(e, n, r) {
- qe(e) && (r = n, n = e, e = []), r = r || this;
- var i = [];
- return this.each(e, function() {
- i.push(n && n.apply(this, arguments));
- }, r), i;
- }, t.prototype.map = function(e, n, r, i) {
- var a = r || i || this, o = xc(rv(e), this._getStoreDimIndex, this), s = AS(this);
- return s._store = this._store.map(o, a ? We(n, a) : n), s;
- }, t.prototype.modify = function(e, n, r, i) {
- var a = this, o = r || i || this;
- process.env.NODE_ENV !== "production" && F(rv(e), function(l) {
- var u = a.getDimensionInfo(l);
- u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
- });
- var s = xc(rv(e), this._getStoreDimIndex, this);
- this._store.modify(s, o ? We(n, o) : n);
- }, t.prototype.downSample = function(e, n, r, i) {
- var a = AS(this);
- return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
- }, t.prototype.lttbDownSample = function(e, n) {
- var r = AS(this);
- return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
- }, t.prototype.getRawDataItem = function(e) {
- return this._store.getRawDataItem(e);
- }, t.prototype.getItemModel = function(e) {
- var n = this.hostModel, r = this.getRawDataItem(e);
- return new wn(r, n, n && n.ecModel);
- }, t.prototype.diff = function(e) {
- var n = this;
- return new Qu(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
- return $S(e, r);
- }, function(r) {
- return $S(n, r);
- });
- }, t.prototype.getVisual = function(e) {
- var n = this._visual;
- return n && n[e];
- }, t.prototype.setVisual = function(e, n) {
- this._visual = this._visual || {}, V0(e) ? _e(this._visual, e) : this._visual[e] = n;
- }, t.prototype.getItemVisual = function(e, n) {
- var r = this._itemVisuals[e], i = r && r[n];
- return i ?? this.getVisual(n);
- }, t.prototype.hasItemVisual = function() {
- return this._itemVisuals.length > 0;
- }, t.prototype.ensureUniqueItemVisual = function(e, n) {
- var r = this._itemVisuals, i = r[e];
- i || (i = r[e] = {});
- var a = i[n];
- return a == null && (a = this.getVisual(n), Se(a) ? a = a.slice() : V0(a) && (a = _e({}, a)), i[n] = a), a;
- }, t.prototype.setItemVisual = function(e, n, r) {
- var i = this._itemVisuals[e] || {};
- this._itemVisuals[e] = i, V0(n) ? _e(i, n) : i[n] = r;
- }, t.prototype.clearAllVisual = function() {
- this._visual = {}, this._itemVisuals = [];
- }, t.prototype.setLayout = function(e, n) {
- V0(e) ? _e(this._layout, e) : this._layout[e] = n;
- }, t.prototype.getLayout = function(e) {
- return this._layout[e];
- }, t.prototype.getItemLayout = function(e) {
- return this._itemLayouts[e];
- }, t.prototype.setItemLayout = function(e, n, r) {
- this._itemLayouts[e] = r ? _e(this._itemLayouts[e] || {}, n) : n;
- }, t.prototype.clearItemLayouts = function() {
- this._itemLayouts.length = 0;
- }, t.prototype.setItemGraphicEl = function(e, n) {
- var r = this.hostModel && this.hostModel.seriesIndex;
- Pk(r, this.dataType, e, n), this._graphicEls[e] = n;
- }, t.prototype.getItemGraphicEl = function(e) {
- return this._graphicEls[e];
- }, t.prototype.eachItemGraphicEl = function(e, n) {
- F(this._graphicEls, function(r, i) {
- r && e && e.call(n, r, i);
- });
- }, t.prototype.cloneShallow = function(e) {
- return e || (e = new t(this._schema ? this._schema : xc(this.dimensions, this._getDimInfo, this), this.hostModel)), AM(e, this), e._store = this._store, e;
- }, t.prototype.wrapMethod = function(e, n) {
- var r = this[e];
- qe(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
- var i = r.apply(this, arguments);
- return n.apply(this, [i].concat(oP(arguments)));
- });
- }, t.internalField = function() {
- zj = function(e) {
- var n = e._invertedIndicesMap;
- F(n, function(r, i) {
- var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
- if (o) {
- r = n[i] = new _qe(o.categories.length);
- for (var l = 0; l < r.length; l++)
- r[l] = Bj;
- for (var l = 0; l < s.count(); l++)
- r[s.get(a.storeDimIndex, l)] = l;
- }
- });
- }, F0 = function(e, n, r) {
- return Br(e._getCategory(n, r), null);
- }, $S = function(e, n) {
- var r = e._idList[n];
- return r == null && e._idDimIdx != null && (r = F0(e, e._idDimIdx, n)), r == null && (r = Oqe + n), r;
- }, rv = function(e) {
- return Se(e) || (e = e != null ? [e] : []), e;
- }, AS = function(e) {
- var n = new t(e._schema ? e._schema : xc(e.dimensions, e._getDimInfo, e), e.hostModel);
- return AM(n, e), n;
- }, AM = function(e, n) {
- F(Sqe.concat(n.__wrappedMethods || []), function(r) {
- n.hasOwnProperty(r) && (e[r] = n[r]);
- }), e.__wrappedMethods = n.__wrappedMethods, F(xqe, function(r) {
- e[r] = ot(n[r]);
- }), e._calculationInfo = _e({}, n._calculationInfo);
- }, EM = function(e, n) {
- var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
- if (s == null && a != null && (r[n] = s = F0(e, a, n)), l == null && o != null && (i[n] = l = F0(e, o, n)), l == null && s != null) {
- var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
- l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
- }
- };
- }(), t;
- }()
- );
- const Wi = wqe;
- function Cqe(t, e) {
- return Mm(t, e).dimensions;
- }
- function Mm(t, e) {
- o3(t) || (t = s3(t)), e = e || {};
- var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Ze(), a = [], o = Pqe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && pce(o), l = r === t.dimensionsDefine, u = l ? hce(t) : dce(r), c = e.encodeDefine;
- !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
- for (var f = Ze(c), d = new yue(o), h = 0; h < d.length; h++)
- d[h] = -1;
- function p($) {
- var T = d[$];
- if (T < 0) {
- var E = r[$], M = nt(E) ? E : {
- name: E
- }, R = new gw(), N = M.name;
- N != null && u.get(N) != null && (R.name = R.displayName = N), M.type != null && (R.type = M.type), M.displayName != null && (R.displayName = M.displayName);
- var I = a.length;
- return d[$] = I, R.storeDimIndex = $, a.push(R), R;
- }
- return a[T];
- }
- if (!s)
- for (var h = 0; h < o; h++)
- p(h);
- f.each(function($, T) {
- var E = Cn($).slice();
- if (E.length === 1 && !Ve(E[0]) && E[0] < 0) {
- f.set(T, !1);
- return;
- }
- var M = f.set(T, []);
- F(E, function(R, N) {
- var I = Ve(R) ? u.get(R) : R;
- I != null && I < o && (M[N] = I, g(p(I), T, N));
- });
- });
- var v = 0;
- F(n, function($) {
- var T, E, M, R;
- if (Ve($))
- T = $, R = {};
- else {
- R = $, T = R.name;
- var N = R.ordinalMeta;
- R.ordinalMeta = null, R = _e({}, R), R.ordinalMeta = N, E = R.dimsDef, M = R.otherDims, R.name = R.coordDim = R.coordDimIndex = R.dimsDef = R.otherDims = null;
- }
- var I = f.get(T);
- if (I !== !1) {
- if (I = Cn(I), !I.length)
- for (var B = 0; B < (E && E.length || 1); B++) {
- for (; v < o && p(v).coordDim != null; )
- v++;
- v < o && I.push(v++);
- }
- F(I, function(Q, W) {
- var H = p(Q);
- if (l && R.type != null && (H.type = R.type), g(it(H, R), T, W), H.name == null && E) {
- var U = E[W];
- !nt(U) && (U = {
- name: U
- }), H.name = H.displayName = U.name, H.defaultTooltip = U.defaultTooltip;
- }
- M && it(H.otherDims, M);
- });
- }
- });
- function g($, T, E) {
- Nk.get(T) != null ? $.otherDims[T] = E : ($.coordDim = T, $.coordDimIndex = E, i.set(T, !0));
- }
- var m = e.generateCoord, y = e.generateCoordCount, _ = y != null;
- y = m ? y || 1 : 0;
- var O = m || "value";
- function S($) {
- $.name == null && ($.name = $.coordDim);
- }
- if (s)
- F(a, function($) {
- S($);
- }), a.sort(function($, T) {
- return $.storeDimIndex - T.storeDimIndex;
- });
- else
- for (var x = 0; x < o; x++) {
- var C = p(x), P = C.coordDim;
- P == null && (C.coordDim = $qe(O, i, _), C.coordDimIndex = 0, (!m || y <= 0) && (C.isExtraCoord = !0), y--), S(C), C.type == null && (nue(t, x) === pi.Must || C.isExtraCoord && (C.otherDims.itemName != null || C.otherDims.seriesName != null)) && (C.type = "ordinal");
- }
- return Tqe(a), new cce({
- source: t,
- dimensions: a,
- fullDimensionCount: o,
- dimensionOmitted: s
- });
- }
- function Tqe(t) {
- for (var e = Ze(), n = 0; n < t.length; n++) {
- var r = t[n], i = r.name, a = e.get(i) || 0;
- a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
- }
- }
- function Pqe(t, e, n, r) {
- var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
- return F(e, function(a) {
- var o;
- nt(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
- }), i;
- }
- function $qe(t, e, n) {
- if (n || e.hasKey(t)) {
- for (var r = 0; e.hasKey(t + r); )
- r++;
- t += r;
- }
- return e.set(t, !0), t;
- }
- var Aqe = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- this.coordSysDims = [], this.axisMap = Ze(), this.categoryAxisMap = Ze(), this.coordSysName = e;
- }
- return t;
- }()
- );
- function Eqe(t) {
- var e = t.get("coordinateSystem"), n = new Aqe(e), r = Mqe[e];
- if (r)
- return r(t, n, n.axisMap, n.categoryAxisMap), n;
- }
- var Mqe = {
- cartesian2d: function(t, e, n, r) {
- var i = t.getReferringComponents("xAxis", Er).models[0], a = t.getReferringComponents("yAxis", Er).models[0];
- if (process.env.NODE_ENV !== "production") {
- if (!i)
- throw new Error('xAxis "' + Or(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
- if (!a)
- throw new Error('yAxis "' + Or(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
- }
- e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), iv(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), iv(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
- },
- singleAxis: function(t, e, n, r) {
- var i = t.getReferringComponents("singleAxis", Er).models[0];
- if (process.env.NODE_ENV !== "production" && !i)
- throw new Error("singleAxis should be specified.");
- e.coordSysDims = ["single"], n.set("single", i), iv(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
- },
- polar: function(t, e, n, r) {
- var i = t.getReferringComponents("polar", Er).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
- if (process.env.NODE_ENV !== "production") {
- if (!o)
- throw new Error("angleAxis option not found");
- if (!a)
- throw new Error("radiusAxis option not found");
- }
- e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), iv(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), iv(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
- },
- geo: function(t, e, n, r) {
- e.coordSysDims = ["lng", "lat"];
- },
- parallel: function(t, e, n, r) {
- var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
- F(a.parallelAxisIndex, function(s, l) {
- var u = i.getComponent("parallelAxis", s), c = o[l];
- n.set(c, u), iv(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
- });
- }
- };
- function iv(t) {
- return t.get("type") === "category";
- }
- function vce(t, e, n) {
- n = n || {};
- var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
- Iqe(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
- var l = !!(t && t.get("stack")), u, c, f, d;
- if (F(a, function(y, _) {
- Ve(y) && (a[_] = y = {
- name: y
- }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
- }), c && !r && !u && (r = !0), c) {
- f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
- var h = c.coordDim, p = c.type, v = 0;
- F(a, function(y) {
- y.coordDim === h && v++;
- });
- var g = {
- name: f,
- coordDim: h,
- coordDimIndex: v,
- type: p,
- isExtraCoord: !0,
- isCalculationCoord: !0,
- storeDimIndex: a.length
- }, m = {
- name: d,
- // This dimension contains stack base (generally, 0), so do not set it as
- // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
- coordDim: d,
- coordDimIndex: v + 1,
- type: p,
- isExtraCoord: !0,
- isCalculationCoord: !0,
- storeDimIndex: a.length + 1
- };
- o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(d, p), m.storeDimIndex = s.ensureCalculationDimension(f, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(m)) : (a.push(g), a.push(m));
- }
- return {
- stackedDimension: c && c.name,
- stackedByDimension: u && u.name,
- isStackedByIndex: r,
- stackedOverDimension: d,
- stackResultDimension: f
- };
- }
- function Iqe(t) {
- return !fce(t.schema);
- }
- function Hu(t, e) {
- return !!e && e === t.getCalculationInfo("stackedDimension");
- }
- function S3(t, e) {
- return Hu(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
- }
- function Dqe(t, e) {
- var n = t.get("coordinateSystem"), r = gp.get(n), i;
- return e && e.coordSysDims && (i = Ce(e.coordSysDims, function(a) {
- var o = {
- name: a
- }, s = e.axisMap.get(a);
- if (s) {
- var l = s.get("type");
- o.type = YC(l);
- }
- return o;
- })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
- }
- function Rqe(t, e, n) {
- var r, i;
- return n && F(t, function(a, o) {
- var s = a.coordDim, l = n.categoryAxisMap.get(s);
- l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
- }), !i && r != null && (t[r].otherDims.itemName = 0), r;
- }
- function Yl(t, e, n) {
- n = n || {};
- var r = e.getSourceManager(), i, a = !1;
- t ? (a = !0, i = s3(t)) : (i = r.getSource(), a = i.sourceFormat === hs);
- var o = Eqe(e), s = Dqe(e, o), l = n.useEncodeDefaulter, u = qe(l) ? l : l ? vt(tue, s, e) : null, c = {
- coordDimensions: s,
- generateCoord: n.generateCoord,
- encodeDefine: e.getEncode(),
- encodeDefaulter: u,
- canOmitUnusedDimensions: !a
- }, f = Mm(i, c), d = Rqe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = vce(e, {
- schema: f,
- store: h
- }), v = new Wi(f, e);
- v.setCalculationInfo(p);
- var g = d != null && kqe(i) ? function(m, y, _, O) {
- return O === d ? _ : this.defaultDimValueGetter(m, y, _, O);
- } : null;
- return v.hasItemOption = !1, v.initData(
- // Try to reuse the data store in sourceManager if using dataset.
- a ? i : h,
- null,
- g
- ), v;
- }
- function kqe(t) {
- if (t.sourceFormat === hs) {
- var e = Lqe(t.data || []);
- return !Se(ym(e));
- }
- }
- function Lqe(t) {
- for (var e = 0; e < t.length && t[e] == null; )
- e++;
- return t[e];
- }
- var ql = (
- /** @class */
- function() {
- function t(e) {
- this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
- }
- return t.prototype.getSetting = function(e) {
- return this._setting[e];
- }, t.prototype.unionExtent = function(e) {
- var n = this._extent;
- e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
- }, t.prototype.unionExtentFromData = function(e, n) {
- this.unionExtent(e.getApproximateExtent(n));
- }, t.prototype.getExtent = function() {
- return this._extent.slice();
- }, t.prototype.setExtent = function(e, n) {
- var r = this._extent;
- isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
- }, t.prototype.isInExtentRange = function(e) {
- return this._extent[0] <= e && this._extent[1] >= e;
- }, t.prototype.isBlank = function() {
- return this._isBlank;
- }, t.prototype.setBlank = function(e) {
- this._isBlank = e;
- }, t;
- }()
- );
- vP(ql);
- var Nqe = 0, qk = (
- /** @class */
- function() {
- function t(e) {
- this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++Nqe;
- }
- return t.createByAxisModel = function(e) {
- var n = e.option, r = n.data, i = r && Ce(r, Bqe);
- return new t({
- categories: i,
- needCollect: !i,
- // deduplication is default in axis.
- deduplication: n.dedplication !== !1
- });
- }, t.prototype.getOrdinal = function(e) {
- return this._getOrCreateMap().get(e);
- }, t.prototype.parseAndCollect = function(e) {
- var n, r = this._needCollect;
- if (!Ve(e) && !r)
- return e;
- if (r && !this._deduplication)
- return n = this.categories.length, this.categories[n] = e, n;
- var i = this._getOrCreateMap();
- return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
- }, t.prototype._getOrCreateMap = function() {
- return this._map || (this._map = Ze(this.categories));
- }, t;
- }()
- );
- function Bqe(t) {
- return nt(t) && t.value != null ? t.value : t + "";
- }
- function zqe(t) {
- var e = Math.pow(10, s1(Math.abs(t))), n = Math.abs(t / e);
- return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
- }
- function Kk(t) {
- return t.type === "interval" || t.type === "log";
- }
- function Vqe(t, e, n, r) {
- var i = {}, a = t[1] - t[0], o = i.interval = $5(a / e, !0);
- n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
- var s = i.intervalPrecision = gce(o), l = i.niceTickExtent = [sr(Math.ceil(t[0] / o) * o, s), sr(Math.floor(t[1] / o) * o, s)];
- return Fqe(l, t), i;
- }
- function MM(t) {
- var e = Math.pow(10, s1(t)), n = t / e;
- return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, sr(n * e);
- }
- function gce(t) {
- return Ms(t) + 2;
- }
- function Vj(t, e, n) {
- t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
- }
- function Fqe(t, e) {
- !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), Vj(t, 0, e), Vj(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
- }
- function BP(t, e) {
- return t >= e[0] && t <= e[1];
- }
- function zP(t, e) {
- return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
- }
- function VP(t, e) {
- return t * (e[1] - e[0]) + e[0];
- }
- var FP = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- r.type = "ordinal";
- var i = r.getSetting("ordinalMeta");
- return i || (i = new qk({})), Se(i) && (i = new qk({
- categories: Ce(i, function(a) {
- return nt(a) ? a.value : a;
- })
- })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
- }
- return e.prototype.parse = function(n) {
- return n == null ? NaN : Ve(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
- }, e.prototype.contain = function(n) {
- return n = this.parse(n), BP(n, this._extent) && this._ordinalMeta.categories[n] != null;
- }, e.prototype.normalize = function(n) {
- return n = this._getTickNumber(this.parse(n)), zP(n, this._extent);
- }, e.prototype.scale = function(n) {
- return n = Math.round(VP(n, this._extent)), this.getRawOrdinalNumber(n);
- }, e.prototype.getTicks = function() {
- for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
- n.push({
- value: i
- }), i++;
- return n;
- }, e.prototype.getMinorTicks = function(n) {
- }, e.prototype.setSortInfo = function(n) {
- if (n == null) {
- this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
- return;
- }
- for (var r = n.ordinalNumbers, i = this._ordinalNumbersByTick = [], a = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, r.length); o < l; ++o) {
- var u = r[o];
- i[o] = u, a[u] = o;
- }
- for (var c = 0; o < s; ++o) {
- for (; a[c] != null; )
- c++;
- i.push(c), a[c] = o;
- }
- }, e.prototype._getTickNumber = function(n) {
- var r = this._ticksByOrdinalNumber;
- return r && n >= 0 && n < r.length ? r[n] : n;
- }, e.prototype.getRawOrdinalNumber = function(n) {
- var r = this._ordinalNumbersByTick;
- return r && n >= 0 && n < r.length ? r[n] : n;
- }, e.prototype.getLabel = function(n) {
- if (!this.isBlank()) {
- var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
- return i == null ? "" : i + "";
- }
- }, e.prototype.count = function() {
- return this._extent[1] - this._extent[0] + 1;
- }, e.prototype.unionExtentFromData = function(n, r) {
- this.unionExtent(n.getApproximateExtent(r));
- }, e.prototype.isInExtentRange = function(n) {
- return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
- }, e.prototype.getOrdinalMeta = function() {
- return this._ordinalMeta;
- }, e.prototype.calcNiceTicks = function() {
- }, e.prototype.calcNiceExtent = function() {
- }, e.type = "ordinal", e;
- }(ql)
- );
- ql.registerClass(FP);
- var Pd = sr, Gu = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
- }
- return e.prototype.parse = function(n) {
- return n;
- }, e.prototype.contain = function(n) {
- return BP(n, this._extent);
- }, e.prototype.normalize = function(n) {
- return zP(n, this._extent);
- }, e.prototype.scale = function(n) {
- return VP(n, this._extent);
- }, e.prototype.setExtent = function(n, r) {
- var i = this._extent;
- isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
- }, e.prototype.unionExtent = function(n) {
- var r = this._extent;
- n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
- }, e.prototype.getInterval = function() {
- return this._interval;
- }, e.prototype.setInterval = function(n) {
- this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = gce(n);
- }, e.prototype.getTicks = function(n) {
- var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
- if (!r)
- return s;
- var l = 1e4;
- i[0] < a[0] && (n ? s.push({
- value: Pd(a[0] - r, o)
- }) : s.push({
- value: i[0]
- }));
- for (var u = a[0]; u <= a[1] && (s.push({
- value: u
- }), u = Pd(u + r, o), u !== s[s.length - 1].value); )
- if (s.length > l)
- return [];
- var c = s.length ? s[s.length - 1].value : a[1];
- return i[1] > c && (n ? s.push({
- value: Pd(c + r, o)
- }) : s.push({
- value: i[1]
- })), s;
- }, e.prototype.getMinorTicks = function(n) {
- for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
- for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
- var h = Pd(l.value + (u + 1) * d);
- h > a[0] && h < a[1] && c.push(h), u++;
- }
- i.push(c);
- }
- return i;
- }, e.prototype.getLabel = function(n, r) {
- if (n == null)
- return "";
- var i = r && r.precision;
- i == null ? i = Ms(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
- var a = Pd(n.value, i, !0);
- return K5(a);
- }, e.prototype.calcNiceTicks = function(n, r, i) {
- n = n || 5;
- var a = this._extent, o = a[1] - a[0];
- if (isFinite(o)) {
- o < 0 && (o = -o, a.reverse());
- var s = Vqe(a, n, r, i);
- this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
- }
- }, e.prototype.calcNiceExtent = function(n) {
- var r = this._extent;
- if (r[0] === r[1])
- if (r[0] !== 0) {
- var i = Math.abs(r[0]);
- n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
- } else
- r[1] = 1;
- var a = r[1] - r[0];
- isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
- var o = this._interval;
- n.fixMin || (r[0] = Pd(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = Pd(Math.ceil(r[1] / o) * o));
- }, e.prototype.setNiceExtent = function(n, r) {
- this._niceExtent = [n, r];
- }, e.type = "interval", e;
- }(ql)
- );
- ql.registerClass(Gu);
- var mce = typeof Float32Array < "u", Wqe = mce ? Float32Array : Array;
- function Al(t) {
- return Se(t) ? mce ? new Float32Array(t) : t : new Wqe(t);
- }
- var Jk = "__ec_stack_";
- function x3(t) {
- return t.get("stack") || Jk + t.seriesIndex;
- }
- function w3(t) {
- return t.dim + t.index;
- }
- function Qqe(t) {
- var e = [], n = t.axis, r = "axis0";
- if (n.type === "category") {
- for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
- e.push(it({
- bandWidth: i,
- axisKey: r,
- stackId: Jk + a
- }, t));
- for (var o = _ce(e), s = [], a = 0; a < t.count; a++) {
- var l = o[r][Jk + a];
- l.offsetCenter = l.offset + l.width / 2, s.push(l);
- }
- return s;
- }
- }
- function yce(t, e) {
- var n = [];
- return e.eachSeriesByType(t, function(r) {
- xce(r) && n.push(r);
- }), n;
- }
- function Hqe(t) {
- var e = {};
- F(t, function(l) {
- var u = l.coordinateSystem, c = u.getBaseAxis();
- if (!(c.type !== "time" && c.type !== "value"))
- for (var f = l.getData(), d = c.dim + "_" + c.index, h = f.getDimensionIndex(f.mapDimension(c.dim)), p = f.getStore(), v = 0, g = p.count(); v < g; ++v) {
- var m = p.get(h, v);
- e[d] ? e[d].push(m) : e[d] = [m];
- }
- });
- var n = {};
- for (var r in e)
- if (e.hasOwnProperty(r)) {
- var i = e[r];
- if (i) {
- i.sort(function(l, u) {
- return l - u;
- });
- for (var a = null, o = 1; o < i.length; ++o) {
- var s = i[o] - i[o - 1];
- s > 0 && (a = a === null ? s : Math.min(a, s));
- }
- n[r] = a;
- }
- }
- return n;
- }
- function bce(t) {
- var e = Hqe(t), n = [];
- return F(t, function(r) {
- var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
- if (a.type === "category")
- s = a.getBandWidth();
- else if (a.type === "value" || a.type === "time") {
- var l = a.dim + "_" + a.index, u = e[l], c = Math.abs(o[1] - o[0]), f = a.scale.getExtent(), d = Math.abs(f[1] - f[0]);
- s = u ? c / d * u : c;
- } else {
- var h = r.getData();
- s = Math.abs(o[1] - o[0]) / h.count();
- }
- var p = ze(r.get("barWidth"), s), v = ze(r.get("barMaxWidth"), s), g = ze(
- // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
- // the auto-calculated bar width might be less than 0.5 / 1.
- r.get("barMinWidth") || (wce(r) ? 0.5 : 1),
- s
- ), m = r.get("barGap"), y = r.get("barCategoryGap");
- n.push({
- bandWidth: s,
- barWidth: p,
- barMaxWidth: v,
- barMinWidth: g,
- barGap: m,
- barCategoryGap: y,
- axisKey: w3(a),
- stackId: x3(r)
- });
- }), _ce(n);
- }
- function _ce(t) {
- var e = {};
- F(t, function(r, i) {
- var a = r.axisKey, o = r.bandWidth, s = e[a] || {
- bandWidth: o,
- remainedWidth: o,
- autoWidthCount: 0,
- categoryGap: null,
- gap: "20%",
- stacks: {}
- }, l = s.stacks;
- e[a] = s;
- var u = r.stackId;
- l[u] || s.autoWidthCount++, l[u] = l[u] || {
- width: 0,
- maxWidth: 0
- };
- var c = r.barWidth;
- c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
- var f = r.barMaxWidth;
- f && (l[u].maxWidth = f);
- var d = r.barMinWidth;
- d && (l[u].minWidth = d);
- var h = r.barGap;
- h != null && (s.gap = h);
- var p = r.barCategoryGap;
- p != null && (s.categoryGap = p);
- });
- var n = {};
- return F(e, function(r, i) {
- n[i] = {};
- var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
- if (s == null) {
- var l = kt(a).length;
- s = Math.max(35 - l * 4, 15) + "%";
- }
- var u = ze(s, o), c = ze(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
- h = Math.max(h, 0), F(a, function(m) {
- var y = m.maxWidth, _ = m.minWidth;
- if (m.width) {
- var O = m.width;
- y && (O = Math.min(O, y)), _ && (O = Math.max(O, _)), m.width = O, f -= O + c * O, d--;
- } else {
- var O = h;
- y && y < O && (O = Math.min(y, f)), _ && _ > O && (O = _), O !== h && (m.width = O, f -= O + c * O, d--);
- }
- }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
- var p = 0, v;
- F(a, function(m, y) {
- m.width || (m.width = h), v = m, p += m.width * (1 + c);
- }), v && (p -= v.width * c);
- var g = -p / 2;
- F(a, function(m, y) {
- n[i][y] = n[i][y] || {
- bandWidth: o,
- offset: g,
- width: m.width
- }, g += m.width * (1 + c);
- });
- }), n;
- }
- function Gqe(t, e, n) {
- if (t && e) {
- var r = t[w3(e)];
- return r != null && n != null ? r[x3(n)] : r;
- }
- }
- function Oce(t, e) {
- var n = yce(t, e), r = bce(n);
- F(n, function(i) {
- var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = x3(i), u = r[w3(s)][l], c = u.offset, f = u.width;
- a.setLayout({
- bandWidth: u.bandWidth,
- offset: c,
- size: f
- });
- });
- }
- function Sce(t) {
- return {
- seriesType: t,
- plan: $m(),
- reset: function(e) {
- if (xce(e)) {
- var n = e.getData(), r = e.coordinateSystem, i = r.getBaseAxis(), a = r.getOtherAxis(i), o = n.getDimensionIndex(n.mapDimension(a.dim)), s = n.getDimensionIndex(n.mapDimension(i.dim)), l = e.get("showBackground", !0), u = n.mapDimension(a.dim), c = n.getCalculationInfo("stackResultDimension"), f = Hu(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = jqe(i, a), p = wce(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
- return {
- progress: function(_, O) {
- for (var S = _.count, x = p && Al(S * 3), C = p && l && Al(S * 3), P = p && Al(S), $ = r.master.getRect(), T = d ? $.width : $.height, E, M = O.getStore(), R = 0; (E = _.next()) != null; ) {
- var N = M.get(f ? g : o, E), I = M.get(s, E), B = h, Q = void 0;
- f && (Q = +N - M.get(o, E));
- var W = void 0, H = void 0, U = void 0, j = void 0;
- if (d) {
- var Y = r.dataToPoint([N, I]);
- if (f) {
- var ne = r.dataToPoint([Q, I]);
- B = ne[0];
- }
- W = B, H = Y[1] + y, U = Y[0] - B, j = m, Math.abs(U) < v && (U = (U < 0 ? -1 : 1) * v);
- } else {
- var Y = r.dataToPoint([I, N]);
- if (f) {
- var ne = r.dataToPoint([I, Q]);
- B = ne[1];
- }
- W = Y[0] + y, H = B, U = m, j = Y[1] - B, Math.abs(j) < v && (j = (j <= 0 ? -1 : 1) * v);
- }
- p ? (x[R] = W, x[R + 1] = H, x[R + 2] = d ? U : j, C && (C[R] = d ? $.x : W, C[R + 1] = d ? H : $.y, C[R + 2] = T), P[E] = E) : O.setItemLayout(E, {
- x: W,
- y: H,
- width: U,
- height: j
- }), R += 3;
- }
- p && O.setLayout({
- largePoints: x,
- largeDataIndices: P,
- largeBackgroundPoints: C,
- valueAxisHorizontal: d
- });
- }
- };
- }
- }
- };
- }
- function xce(t) {
- return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
- }
- function wce(t) {
- return t.pipelineContext && t.pipelineContext.large;
- }
- function jqe(t, e) {
- var n = e.model.get("startValue");
- return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
- }
- var Zqe = function(t, e, n, r) {
- for (; n < r; ) {
- var i = n + r >>> 1;
- t[i][1] < e ? n = i + 1 : r = i;
- }
- return n;
- }, C3 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "time", r;
- }
- return e.prototype.getLabel = function(n) {
- var r = this.getSetting("useUTC");
- return p1(n.value, MG[OUe(Jv(this._minLevelUnit))] || MG.second, r, this.getSetting("locale"));
- }, e.prototype.getFormattedLabel = function(n, r, i) {
- var a = this.getSetting("useUTC"), o = this.getSetting("locale");
- return SUe(n, r, i, o, a);
- }, e.prototype.getTicks = function() {
- var n = this._interval, r = this._extent, i = [];
- if (!n)
- return i;
- i.push({
- value: r[0],
- level: 0
- });
- var a = this.getSetting("useUTC"), o = eKe(this._minLevelUnit, this._approxInterval, a, r);
- return i = i.concat(o), i.push({
- value: r[1],
- level: 0
- }), i;
- }, e.prototype.calcNiceExtent = function(n) {
- var r = this._extent;
- if (r[0] === r[1] && (r[0] -= Go, r[1] += Go), r[1] === -1 / 0 && r[0] === 1 / 0) {
- var i = /* @__PURE__ */ new Date();
- r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - Go;
- }
- this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
- }, e.prototype.calcNiceTicks = function(n, r, i) {
- n = n || 10;
- var a = this._extent, o = a[1] - a[0];
- this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
- var s = ES.length, l = Math.min(Zqe(ES, this._approxInterval, 0, s), s - 1);
- this._interval = ES[l][1], this._minLevelUnit = ES[Math.max(l - 1, 0)][0];
- }, e.prototype.parse = function(n) {
- return Kt(n) ? n : +go(n);
- }, e.prototype.contain = function(n) {
- return BP(this.parse(n), this._extent);
- }, e.prototype.normalize = function(n) {
- return zP(this.parse(n), this._extent);
- }, e.prototype.scale = function(n) {
- return VP(n, this._extent);
- }, e.type = "time", e;
- }(Gu)
- ), ES = [
- // Format interval
- ["second", X5],
- ["minute", Y5],
- ["hour", ab],
- ["quarter-day", ab * 6],
- ["half-day", ab * 12],
- ["day", Go * 1.2],
- ["half-week", Go * 3.5],
- ["week", Go * 7],
- ["month", Go * 31],
- ["quarter", Go * 95],
- ["half-year", EG / 2],
- ["year", EG]
- // 1Y
- ];
- function Uqe(t, e, n, r) {
- var i = go(e), a = go(n), o = function(p) {
- return IG(i, p, r) === IG(a, p, r);
- }, s = function() {
- return o("year");
- }, l = function() {
- return s() && o("month");
- }, u = function() {
- return l() && o("day");
- }, c = function() {
- return u() && o("hour");
- }, f = function() {
- return c() && o("minute");
- }, d = function() {
- return f() && o("second");
- }, h = function() {
- return d() && o("millisecond");
- };
- switch (t) {
- case "year":
- return s();
- case "month":
- return l();
- case "day":
- return u();
- case "hour":
- return c();
- case "minute":
- return f();
- case "second":
- return d();
- case "millisecond":
- return h();
- }
- }
- function Xqe(t, e) {
- return t /= Go, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
- }
- function Yqe(t) {
- var e = 30 * Go;
- return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
- }
- function qqe(t) {
- return t /= ab, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
- }
- function Fj(t, e) {
- return t /= e ? Y5 : X5, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
- }
- function Kqe(t) {
- return $5(t, !0);
- }
- function Jqe(t, e, n) {
- var r = new Date(t);
- switch (Jv(e)) {
- case "year":
- case "month":
- r[Qle(n)](0);
- case "day":
- r[Hle(n)](1);
- case "hour":
- r[Gle(n)](0);
- case "minute":
- r[jle(n)](0);
- case "second":
- r[Zle(n)](0), r[Ule(n)](0);
- }
- return r.getTime();
- }
- function eKe(t, e, n, r) {
- var i = 1e4, a = Fle, o = 0;
- function s(T, E, M, R, N, I, B) {
- for (var Q = new Date(E), W = E, H = Q[R](); W < M && W <= r[1]; )
- B.push({
- value: W
- }), H += T, Q[N](H), W = Q.getTime();
- B.push({
- value: W,
- notAdd: !0
- });
- }
- function l(T, E, M) {
- var R = [], N = !E.length;
- if (!Uqe(Jv(T), r[0], r[1], n)) {
- N && (E = [{
- // TODO Optimize. Not include so may ticks.
- value: Jqe(new Date(r[0]), T, n)
- }, {
- value: r[1]
- }]);
- for (var I = 0; I < E.length - 1; I++) {
- var B = E[I].value, Q = E[I + 1].value;
- if (B !== Q) {
- var W = void 0, H = void 0, U = void 0, j = !1;
- switch (T) {
- case "year":
- W = Math.max(1, Math.round(e / Go / 365)), H = q5(n), U = xUe(n);
- break;
- case "half-year":
- case "quarter":
- case "month":
- W = Yqe(e), H = eg(n), U = Qle(n);
- break;
- case "week":
- case "half-week":
- case "day":
- W = Xqe(e), H = PP(n), U = Hle(n), j = !0;
- break;
- case "half-day":
- case "quarter-day":
- case "hour":
- W = qqe(e), H = Yb(n), U = Gle(n);
- break;
- case "minute":
- W = Fj(e, !0), H = $P(n), U = jle(n);
- break;
- case "second":
- W = Fj(e, !1), H = AP(n), U = Zle(n);
- break;
- case "millisecond":
- W = Kqe(e), H = EP(n), U = Ule(n);
- break;
- }
- s(W, B, Q, H, U, j, R), T === "year" && M.length > 1 && I === 0 && M.unshift({
- value: M[0].value - W
- });
- }
- }
- for (var I = 0; I < R.length; I++)
- M.push(R[I]);
- return R;
- }
- }
- for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
- var p = Jv(a[h]);
- if (_Ue(a[h])) {
- l(a[h], u[u.length - 1] || [], c);
- var v = a[h + 1] ? Jv(a[h + 1]) : null;
- if (p !== v) {
- if (c.length) {
- d = f, c.sort(function(T, E) {
- return T.value - E.value;
- });
- for (var g = [], m = 0; m < c.length; ++m) {
- var y = c[m].value;
- (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
- }
- var _ = (r[1] - r[0]) / e;
- if (f > _ * 1.5 && d > _ / 1.5 || (u.push(g), f > _ || t === a[h]))
- break;
- }
- c = [];
- }
- }
- }
- process.env.NODE_ENV !== "production" && o >= i && nr("Exceed safe limit.");
- for (var O = yn(Ce(u, function(T) {
- return yn(T, function(E) {
- return E.value >= r[0] && E.value <= r[1] && !E.notAdd;
- });
- }), function(T) {
- return T.length > 0;
- }), S = [], x = O.length - 1, h = 0; h < O.length; ++h)
- for (var C = O[h], P = 0; P < C.length; ++P)
- S.push({
- value: C[P].value,
- level: x - h
- });
- S.sort(function(T, E) {
- return T.value - E.value;
- });
- for (var $ = [], h = 0; h < S.length; ++h)
- (h === 0 || S[h].value !== S[h - 1].value) && $.push(S[h]);
- return $;
- }
- ql.registerClass(C3);
- var Wj = ql.prototype, lb = Gu.prototype, tKe = sr, nKe = Math.floor, rKe = Math.ceil, MS = Math.pow, Ss = Math.log, T3 = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "log", n.base = 10, n._originalScale = new Gu(), n._interval = 0, n;
- }
- return e.prototype.getTicks = function(n) {
- var r = this._originalScale, i = this._extent, a = r.getExtent(), o = lb.getTicks.call(this, n);
- return Ce(o, function(s) {
- var l = s.value, u = sr(MS(this.base, l));
- return u = l === i[0] && this._fixMin ? IS(u, a[0]) : u, u = l === i[1] && this._fixMax ? IS(u, a[1]) : u, {
- value: u
- };
- }, this);
- }, e.prototype.setExtent = function(n, r) {
- var i = Ss(this.base);
- n = Ss(Math.max(0, n)) / i, r = Ss(Math.max(0, r)) / i, lb.setExtent.call(this, n, r);
- }, e.prototype.getExtent = function() {
- var n = this.base, r = Wj.getExtent.call(this);
- r[0] = MS(n, r[0]), r[1] = MS(n, r[1]);
- var i = this._originalScale, a = i.getExtent();
- return this._fixMin && (r[0] = IS(r[0], a[0])), this._fixMax && (r[1] = IS(r[1], a[1])), r;
- }, e.prototype.unionExtent = function(n) {
- this._originalScale.unionExtent(n);
- var r = this.base;
- n[0] = Ss(n[0]) / Ss(r), n[1] = Ss(n[1]) / Ss(r), Wj.unionExtent.call(this, n);
- }, e.prototype.unionExtentFromData = function(n, r) {
- this.unionExtent(n.getApproximateExtent(r));
- }, e.prototype.calcNiceTicks = function(n) {
- n = n || 10;
- var r = this._extent, i = r[1] - r[0];
- if (!(i === 1 / 0 || i <= 0)) {
- var a = Ise(i), o = n / i * a;
- for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
- a *= 10;
- var s = [sr(rKe(r[0] / a) * a), sr(nKe(r[1] / a) * a)];
- this._interval = a, this._niceExtent = s;
- }
- }, e.prototype.calcNiceExtent = function(n) {
- lb.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
- }, e.prototype.parse = function(n) {
- return n;
- }, e.prototype.contain = function(n) {
- return n = Ss(n) / Ss(this.base), BP(n, this._extent);
- }, e.prototype.normalize = function(n) {
- return n = Ss(n) / Ss(this.base), zP(n, this._extent);
- }, e.prototype.scale = function(n) {
- return n = VP(n, this._extent), MS(this.base, n);
- }, e.type = "log", e;
- }(ql)
- ), Cce = T3.prototype;
- Cce.getMinorTicks = lb.getMinorTicks;
- Cce.getLabel = lb.getLabel;
- function IS(t, e) {
- return tKe(t, Ms(e));
- }
- ql.registerClass(T3);
- var iKe = (
- /** @class */
- function() {
- function t(e, n, r) {
- this._prepareParams(e, n, r);
- }
- return t.prototype._prepareParams = function(e, n, r) {
- r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
- var i = this._isOrdinal = e.type === "ordinal";
- this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
- var a = n.get("min", !0);
- a == null && (a = n.get("startValue", !0));
- var o = this._modelMinRaw = a;
- qe(o) ? this._modelMinNum = DS(e, o({
- min: r[0],
- max: r[1]
- })) : o !== "dataMin" && (this._modelMinNum = DS(e, o));
- var s = this._modelMaxRaw = n.get("max", !0);
- if (qe(s) ? this._modelMaxNum = DS(e, s({
- min: r[0],
- max: r[1]
- })) : s !== "dataMax" && (this._modelMaxNum = DS(e, s)), i)
- this._axisDataLen = n.getCategories().length;
- else {
- var l = n.get("boundaryGap"), u = Se(l) ? l : [l || 0, l || 0];
- typeof u[0] == "boolean" || typeof u[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [js(u[0], 1), js(u[1], 1)];
- }
- }, t.prototype.calculate = function() {
- var e = this._isOrdinal, n = this._dataMin, r = this._dataMax, i = this._axisDataLen, a = this._boundaryGapInner, o = e ? null : r - n || Math.abs(n), s = this._modelMinRaw === "dataMin" ? n : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? r : this._modelMaxNum, u = s != null, c = l != null;
- s == null && (s = e ? i ? 0 : NaN : n - a[0] * o), l == null && (l = e ? i ? i - 1 : NaN : r + a[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
- var f = mf(s) || mf(l) || e && !i;
- this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
- var d = this._determinedMin, h = this._determinedMax;
- return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
- min: s,
- max: l,
- minFixed: u,
- maxFixed: c,
- isBlank: f
- };
- }, t.prototype.modifyDataMinMax = function(e, n) {
- process.env.NODE_ENV !== "production" && at(!this.frozen), this[oKe[e]] = n;
- }, t.prototype.setDeterminedMinMax = function(e, n) {
- var r = aKe[e];
- process.env.NODE_ENV !== "production" && at(!this.frozen && this[r] == null), this[r] = n;
- }, t.prototype.freeze = function() {
- this.frozen = !0;
- }, t;
- }()
- ), aKe = {
- min: "_determinedMin",
- max: "_determinedMax"
- }, oKe = {
- min: "_dataMin",
- max: "_dataMax"
- };
- function Tce(t, e, n) {
- var r = t.rawExtentInfo;
- return r || (r = new iKe(t, e, n), t.rawExtentInfo = r, r);
- }
- function DS(t, e) {
- return e == null ? null : mf(e) ? NaN : t.parse(e);
- }
- function Pce(t, e) {
- var n = t.type, r = Tce(t, e, t.getExtent()).calculate();
- t.setBlank(r.isBlank);
- var i = r.min, a = r.max, o = e.ecModel;
- if (o && n === "time") {
- var s = yce("bar", o), l = !1;
- if (F(s, function(f) {
- l = l || f.getBaseAxis() === e.axis;
- }), l) {
- var u = bce(s), c = sKe(i, a, e, u);
- i = c.min, a = c.max;
- }
- }
- return {
- extent: [i, a],
- // "fix" means "fixed", the value should not be
- // changed in the subsequent steps.
- fixMin: r.minFixed,
- fixMax: r.maxFixed
- };
- }
- function sKe(t, e, n, r) {
- var i = n.axis.getExtent(), a = i[1] - i[0], o = Gqe(r, n.axis);
- if (o === void 0)
- return {
- min: t,
- max: e
- };
- var s = 1 / 0;
- F(o, function(h) {
- s = Math.min(h.offset, s);
- });
- var l = -1 / 0;
- F(o, function(h) {
- l = Math.max(h.offset + h.width, l);
- }), s = Math.abs(s), l = Math.abs(l);
- var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
- return e += d * (l / u), t -= d * (s / u), {
- min: t,
- max: e
- };
- }
- function Xh(t, e) {
- var n = e, r = Pce(t, n), i = r.extent, a = n.get("splitNumber");
- t instanceof T3 && (t.base = n.get("logBase"));
- var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
- t.setExtent(i[0], i[1]), t.calcNiceExtent({
- splitNumber: a,
- fixMin: r.fixMin,
- fixMax: r.fixMax,
- minInterval: l ? n.get("minInterval") : null,
- maxInterval: l ? n.get("maxInterval") : null
- }), s != null && t.setInterval && t.setInterval(s);
- }
- function g1(t, e) {
- if (e = e || t.get("type"), e)
- switch (e) {
- case "category":
- return new FP({
- ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
- extent: [1 / 0, -1 / 0]
- });
- case "time":
- return new C3({
- locale: t.ecModel.getLocaleModel(),
- useUTC: t.ecModel.get("useUTC")
- });
- default:
- return new (ql.getClass(e) || Gu)();
- }
- }
- function lKe(t) {
- var e = t.scale.getExtent(), n = e[0], r = e[1];
- return !(n > 0 && r > 0 || n < 0 && r < 0);
- }
- function Im(t) {
- var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
- return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
- return function(i, a) {
- return t.scale.getFormattedLabel(i, a, r);
- };
- }(e) : Ve(e) ? /* @__PURE__ */ function(r) {
- return function(i) {
- var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
- return o;
- };
- }(e) : qe(e) ? /* @__PURE__ */ function(r) {
- return function(i, a) {
- return n != null && (a = i.value - n), r(P3(t, i), a, i.level != null ? {
- level: i.level
- } : null);
- };
- }(e) : function(r) {
- return t.scale.getLabel(r);
- };
- }
- function P3(t, e) {
- return t.type === "category" ? t.scale.getLabel(e) : e.value;
- }
- function uKe(t) {
- var e = t.model, n = t.scale;
- if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
- var r, i, a = n.getExtent();
- n instanceof FP ? i = n.count() : (r = n.getTicks(), i = r.length);
- var o = t.getLabelModel(), s = Im(t), l, u = 1;
- i > 40 && (u = Math.ceil(i / 40));
- for (var c = 0; c < i; c += u) {
- var f = r ? r[c] : {
- value: a[0] + c
- }, d = s(f, c), h = o.getTextRect(d), p = cKe(h, o.get("rotate") || 0);
- l ? l.union(p) : l = p;
- }
- return l;
- }
- }
- function cKe(t, e) {
- var n = e * Math.PI / 180, r = t.width, i = t.height, a = r * Math.abs(Math.cos(n)) + Math.abs(i * Math.sin(n)), o = r * Math.abs(Math.sin(n)) + Math.abs(i * Math.cos(n)), s = new bt(t.x, t.y, a, o);
- return s;
- }
- function $3(t) {
- var e = t.get("interval");
- return e ?? "auto";
- }
- function $ce(t) {
- return t.type === "category" && $3(t.getLabelModel()) === 0;
- }
- function qC(t, e) {
- var n = {};
- return F(t.mapDimensionsAll(e), function(r) {
- n[S3(t, r)] = !0;
- }), kt(n);
- }
- function fKe(t, e, n) {
- e && F(qC(e, n), function(r) {
- var i = e.getApproximateExtent(r);
- i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
- });
- }
- var Dm = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getNeedCrossZero = function() {
- var e = this.option;
- return !e.scale;
- }, t.prototype.getCoordSysModel = function() {
- }, t;
- }()
- );
- function dKe(t) {
- return Yl(null, t);
- }
- var hKe = {
- isDimensionStacked: Hu,
- enableDataStack: vce,
- getStackedDimension: S3
- };
- function pKe(t, e) {
- var n = e;
- e instanceof wn || (n = new wn(e));
- var r = g1(n);
- return r.setExtent(t[0], t[1]), Xh(r, n), r;
- }
- function vKe(t) {
- vr(t, Dm);
- }
- function gKe(t, e) {
- return e = e || {}, Mn(t, null, null, e.state !== "normal");
- }
- const mKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- createDimensions: Cqe,
- createList: dKe,
- createScale: pKe,
- createSymbol: wr,
- createTextStyle: gKe,
- dataStack: hKe,
- enableHoverEmphasis: af,
- getECData: ft,
- getLayoutRect: Mr,
- mixinAxisModelCommonMethods: vKe
- }, Symbol.toStringTag, { value: "Module" }));
- var yKe = 1e-8;
- function Qj(t, e) {
- return Math.abs(t - e) < yKe;
- }
- function Gd(t, e, n) {
- var r = 0, i = t[0];
- if (!i)
- return !1;
- for (var a = 1; a < t.length; a++) {
- var o = t[a];
- r += bu(i[0], i[1], o[0], o[1], e, n), i = o;
- }
- var s = t[0];
- return (!Qj(i[0], s[0]) || !Qj(i[1], s[1])) && (r += bu(i[0], i[1], s[0], s[1], e, n)), r !== 0;
- }
- var bKe = [];
- function IM(t, e) {
- for (var n = 0; n < t.length; n++)
- oi(t[n], t[n], e);
- }
- function Hj(t, e, n, r) {
- for (var i = 0; i < t.length; i++) {
- var a = t[i];
- r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Cu(e, e, a), Tu(n, n, a));
- }
- }
- function _Ke(t) {
- for (var e = 0, n = 0, r = 0, i = t.length, a = t[i - 1][0], o = t[i - 1][1], s = 0; s < i; s++) {
- var l = t[s][0], u = t[s][1], c = a * u - l * o;
- e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
- }
- return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
- }
- var Ace = (
- /** @class */
- function() {
- function t(e) {
- this.name = e;
- }
- return t.prototype.setCenter = function(e) {
- this._center = e;
- }, t.prototype.getCenter = function() {
- var e = this._center;
- return e || (e = this._center = this.calcCenter()), e;
- }, t;
- }()
- ), Gj = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e, n) {
- this.type = "polygon", this.exterior = e, this.interiors = n;
- }
- return t;
- }()
- ), jj = (
- /** @class */
- /* @__PURE__ */ function() {
- function t(e) {
- this.type = "linestring", this.points = e;
- }
- return t;
- }()
- ), Ece = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this, n) || this;
- return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
- }
- return e.prototype.calcCenter = function() {
- for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
- var o = n[a], s = o.exterior, l = s && s.length;
- l > i && (r = o, i = l);
- }
- if (r)
- return _Ke(r.exterior);
- var u = this.getBoundingRect();
- return [u.x + u.width / 2, u.y + u.height / 2];
- }, e.prototype.getBoundingRect = function(n) {
- var r = this._rect;
- if (r && !n)
- return r;
- var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
- return F(o, function(s) {
- s.type === "polygon" ? Hj(s.exterior, i, a, n) : F(s.points, function(l) {
- Hj(l, i, a, n);
- });
- }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), r = new bt(i[0], i[1], a[0] - i[0], a[1] - i[1]), n || (this._rect = r), r;
- }, e.prototype.contain = function(n) {
- var r = this.getBoundingRect(), i = this.geometries;
- if (!r.contain(n[0], n[1]))
- return !1;
- e: for (var a = 0, o = i.length; a < o; a++) {
- var s = i[a];
- if (s.type === "polygon") {
- var l = s.exterior, u = s.interiors;
- if (Gd(l, n[0], n[1])) {
- for (var c = 0; c < (u ? u.length : 0); c++)
- if (Gd(u[c], n[0], n[1]))
- continue e;
- return !0;
- }
- }
- }
- return !1;
- }, e.prototype.transformTo = function(n, r, i, a) {
- var o = this.getBoundingRect(), s = o.width / o.height;
- i ? a || (a = i / s) : i = s * a;
- for (var l = new bt(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
- var d = c[f];
- d.type === "polygon" ? (IM(d.exterior, u), F(d.interiors, function(h) {
- IM(h, u);
- })) : F(d.points, function(h) {
- IM(h, u);
- });
- }
- o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
- }, e.prototype.cloneShallow = function(n) {
- n == null && (n = this.name);
- var r = new e(n, this.geometries, this._center);
- return r._rect = this._rect, r.transformTo = null, r;
- }, e;
- }(Ace)
- ), OKe = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r) {
- var i = t.call(this, n) || this;
- return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
- }
- return e.prototype.calcCenter = function() {
- for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = i1(bKe), o = n; o && !o.isGeoSVGGraphicRoot; )
- Ll(a, o.getLocalTransform(), a), o = o.parent;
- return dp(a, a), oi(i, i, a), i;
- }, e;
- }(Ace)
- );
- function SKe(t) {
- if (!t.UTF8Encoding)
- return t;
- var e = t, n = e.UTF8Scale;
- n == null && (n = 1024);
- var r = e.features;
- return F(r, function(i) {
- var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
- if (o)
- switch (a.type) {
- case "LineString":
- a.coordinates = Mce(s, o, n);
- break;
- case "Polygon":
- DM(s, o, n);
- break;
- case "MultiLineString":
- DM(s, o, n);
- break;
- case "MultiPolygon":
- F(s, function(l, u) {
- return DM(l, o[u], n);
- });
- }
- }), e.UTF8Encoding = !1, e;
- }
- function DM(t, e, n) {
- for (var r = 0; r < t.length; r++)
- t[r] = Mce(t[r], e[r], n);
- }
- function Mce(t, e, n) {
- for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
- var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
- s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
- }
- return r;
- }
- function eL(t, e) {
- return t = SKe(t), Ce(yn(t.features, function(n) {
- return n.geometry && n.properties && n.geometry.coordinates.length > 0;
- }), function(n) {
- var r = n.properties, i = n.geometry, a = [];
- switch (i.type) {
- case "Polygon":
- var o = i.coordinates;
- a.push(new Gj(o[0], o.slice(1)));
- break;
- case "MultiPolygon":
- F(i.coordinates, function(l) {
- l[0] && a.push(new Gj(l[0], l.slice(1)));
- });
- break;
- case "LineString":
- a.push(new jj([i.coordinates]));
- break;
- case "MultiLineString":
- a.push(new jj(i.coordinates));
- }
- var s = new Ece(r[e || "name"], a, r.cp);
- return s.properties = r, s;
- });
- }
- const xKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- MAX_SAFE_INTEGER: Ok,
- asc: ao,
- getPercentWithPrecision: UGe,
- getPixelPrecision: T5,
- getPrecision: Ms,
- getPrecisionSafe: EC,
- isNumeric: hP,
- isRadianAroundZero: Vg,
- linearMap: gn,
- nice: $5,
- numericToNumber: Gl,
- parseDate: go,
- quantile: uw,
- quantity: Ise,
- quantityExponent: s1,
- reformIntervals: Sk,
- remRadian: P5,
- round: sr
- }, Symbol.toStringTag, { value: "Module" })), wKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- format: p1,
- parse: go
- }, Symbol.toStringTag, { value: "Module" })), CKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Arc: SP,
- BezierCurve: f1,
- BoundingRect: bt,
- Circle: ic,
- CompoundPath: xP,
- Ellipse: OP,
- Group: ct,
- Image: ci,
- IncrementalDisplayable: $le,
- Line: Xr,
- LinearGradient: _m,
- Polygon: pa,
- Polyline: va,
- RadialGradient: V5,
- Rect: Zt,
- Ring: c1,
- Sector: ha,
- Text: jt,
- clipPointsByRect: H5,
- clipRectByRect: Dle,
- createIcon: Sm,
- extendPath: Mle,
- extendShape: Ele,
- getShapeClass: wP,
- getTransform: of,
- initProps: Vn,
- makeImage: W5,
- makePath: d1,
- mergePath: no,
- registerShape: ds,
- resizePath: Q5,
- updateProps: tn
- }, Symbol.toStringTag, { value: "Module" })), TKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- addCommas: K5,
- capitalFirst: PUe,
- encodeHTML: ta,
- formatTime: TUe,
- formatTpl: e3,
- getTextRect: wUe,
- getTooltipMarker: Xle,
- normalizeCssArray: vp,
- toCamelCase: J5,
- truncateText: Qse
- }, Symbol.toStringTag, { value: "Module" })), PKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- bind: We,
- clone: ot,
- curry: vt,
- defaults: it,
- each: F,
- extend: _e,
- filter: yn,
- indexOf: St,
- inherits: m5,
- isArray: Se,
- isFunction: qe,
- isObject: nt,
- isString: Ve,
- map: Ce,
- merge: mt,
- reduce: os
- }, Symbol.toStringTag, { value: "Module" }));
- var n_ = Ut();
- function Ice(t, e) {
- var n = Ce(e, function(r) {
- return t.scale.parse(r);
- });
- return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
- }
- function $Ke(t) {
- var e = t.getLabelModel().get("customValues");
- if (e) {
- var n = Im(t);
- return {
- labels: Ice(t, e).map(function(r) {
- var i = {
- value: r
- };
- return {
- formattedLabel: n(i),
- rawLabel: t.scale.getLabel(i),
- tickValue: r
- };
- })
- };
- }
- return t.type === "category" ? EKe(t) : IKe(t);
- }
- function AKe(t, e) {
- var n = t.getTickModel().get("customValues");
- return n ? {
- ticks: Ice(t, n)
- } : t.type === "category" ? MKe(t, e) : {
- ticks: Ce(t.scale.getTicks(), function(r) {
- return r.value;
- })
- };
- }
- function EKe(t) {
- var e = t.getLabelModel(), n = Dce(t, e);
- return !e.get("show") || t.scale.isBlank() ? {
- labels: [],
- labelCategoryInterval: n.labelCategoryInterval
- } : n;
- }
- function Dce(t, e) {
- var n = Rce(t, "labels"), r = $3(e), i = kce(n, r);
- if (i)
- return i;
- var a, o;
- return qe(r) ? a = Bce(t, r) : (o = r === "auto" ? DKe(t) : r, a = Nce(t, o)), Lce(n, r, {
- labels: a,
- labelCategoryInterval: o
- });
- }
- function MKe(t, e) {
- var n = Rce(t, "ticks"), r = $3(e), i = kce(n, r);
- if (i)
- return i;
- var a, o;
- if ((!e.get("show") || t.scale.isBlank()) && (a = []), qe(r))
- a = Bce(t, r, !0);
- else if (r === "auto") {
- var s = Dce(t, t.getLabelModel());
- o = s.labelCategoryInterval, a = Ce(s.labels, function(l) {
- return l.tickValue;
- });
- } else
- o = r, a = Nce(t, o, !0);
- return Lce(n, r, {
- ticks: a,
- tickCategoryInterval: o
- });
- }
- function IKe(t) {
- var e = t.scale.getTicks(), n = Im(t);
- return {
- labels: Ce(e, function(r, i) {
- return {
- level: r.level,
- formattedLabel: n(r, i),
- rawLabel: t.scale.getLabel(r),
- tickValue: r.value
- };
- })
- };
- }
- function Rce(t, e) {
- return n_(t)[e] || (n_(t)[e] = []);
- }
- function kce(t, e) {
- for (var n = 0; n < t.length; n++)
- if (t[n].key === e)
- return t[n].value;
- }
- function Lce(t, e, n) {
- return t.push({
- key: e,
- value: n
- }), n;
- }
- function DKe(t) {
- var e = n_(t).autoInterval;
- return e ?? (n_(t).autoInterval = t.calculateCategoryInterval());
- }
- function RKe(t) {
- var e = kKe(t), n = Im(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
- if (a[1] - a[0] < 1)
- return 0;
- var s = 1;
- o > 40 && (s = Math.max(1, Math.floor(o / 40)));
- for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), c = Math.abs(u * Math.cos(r)), f = Math.abs(u * Math.sin(r)), d = 0, h = 0; l <= a[1]; l += s) {
- var p = 0, v = 0, g = o1(n({
- value: l
- }), e.font, "center", "top");
- p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
- }
- var m = d / c, y = h / f;
- isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
- var _ = Math.max(0, Math.floor(Math.min(m, y))), O = n_(t.model), S = t.getExtent(), x = O.lastAutoInterval, C = O.lastTickCount;
- return x != null && C != null && Math.abs(x - _) <= 1 && Math.abs(C - o) <= 1 && x > _ && O.axisExtent0 === S[0] && O.axisExtent1 === S[1] ? _ = x : (O.lastTickCount = o, O.lastAutoInterval = _, O.axisExtent0 = S[0], O.axisExtent1 = S[1]), _;
- }
- function kKe(t) {
- var e = t.getLabelModel();
- return {
- axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
- labelRotate: e.get("rotate") || 0,
- font: e.getFont()
- };
- }
- function Nce(t, e, n) {
- var r = Im(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
- u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
- var f = $ce(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
- d && u !== a[0] && v(a[0]);
- for (var p = u; p <= a[1]; p += l)
- v(p);
- h && p - l !== a[1] && v(a[1]);
- function v(g) {
- var m = {
- value: g
- };
- s.push(n ? g : {
- formattedLabel: r(m),
- rawLabel: i.getLabel(m),
- tickValue: g
- });
- }
- return s;
- }
- function Bce(t, e, n) {
- var r = t.scale, i = Im(t), a = [];
- return F(r.getTicks(), function(o) {
- var s = r.getLabel(o), l = o.value;
- e(o.value, s) && a.push(n ? l : {
- formattedLabel: i(o),
- rawLabel: s,
- tickValue: l
- });
- }), a;
- }
- var Zj = [0, 1], LKe = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
- }
- return t.prototype.contain = function(e) {
- var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
- return e >= r && e <= i;
- }, t.prototype.containData = function(e) {
- return this.scale.contain(e);
- }, t.prototype.getExtent = function() {
- return this._extent.slice();
- }, t.prototype.getPixelPrecision = function(e) {
- return T5(e || this.scale.getExtent(), this._extent);
- }, t.prototype.setExtent = function(e, n) {
- var r = this._extent;
- r[0] = e, r[1] = n;
- }, t.prototype.dataToCoord = function(e, n) {
- var r = this._extent, i = this.scale;
- return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), Uj(r, i.count())), gn(e, Zj, r, n);
- }, t.prototype.coordToData = function(e, n) {
- var r = this._extent, i = this.scale;
- this.onBand && i.type === "ordinal" && (r = r.slice(), Uj(r, i.count()));
- var a = gn(e, r, Zj, n);
- return this.scale.scale(a);
- }, t.prototype.pointToData = function(e, n) {
- }, t.prototype.getTicksCoords = function(e) {
- e = e || {};
- var n = e.tickModel || this.getTickModel(), r = AKe(this, n), i = r.ticks, a = Ce(i, function(s) {
- return {
- coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
- tickValue: s
- };
- }, this), o = n.get("alignWithLabel");
- return NKe(this, a, o, e.clamp), a;
- }, t.prototype.getMinorTicksCoords = function() {
- if (this.scale.type === "ordinal")
- return [];
- var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
- n > 0 && n < 100 || (n = 5);
- var r = this.scale.getMinorTicks(n), i = Ce(r, function(a) {
- return Ce(a, function(o) {
- return {
- coord: this.dataToCoord(o),
- tickValue: o
- };
- }, this);
- }, this);
- return i;
- }, t.prototype.getViewLabels = function() {
- return $Ke(this).labels;
- }, t.prototype.getLabelModel = function() {
- return this.model.getModel("axisLabel");
- }, t.prototype.getTickModel = function() {
- return this.model.getModel("axisTick");
- }, t.prototype.getBandWidth = function() {
- var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
- r === 0 && (r = 1);
- var i = Math.abs(e[1] - e[0]);
- return Math.abs(i) / r;
- }, t.prototype.calculateCategoryInterval = function() {
- return RKe(this);
- }, t;
- }()
- );
- function Uj(t, e) {
- var n = t[1] - t[0], r = e, i = n / r / 2;
- t[0] += i, t[1] -= i;
- }
- function NKe(t, e, n, r) {
- var i = e.length;
- if (!t.onBand || n || !i)
- return;
- var a = t.getExtent(), o, s;
- if (i === 1)
- e[0].coord = a[0], o = e[1] = {
- coord: a[1]
- };
- else {
- var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
- F(e, function(h) {
- h.coord -= u / 2;
- });
- var c = t.scale.getExtent();
- s = 1 + c[1] - e[i - 1].tickValue, o = {
- coord: e[i - 1].coord + u * s
- }, e.push(o);
- }
- var f = a[0] > a[1];
- d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
- coord: a[0]
- }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
- coord: a[1]
- });
- function d(h, p) {
- return h = sr(h), p = sr(p), f ? h > p : h < p;
- }
- }
- const vs = LKe;
- function BKe(t) {
- var e = At.extend(t);
- return At.registerClass(e), e;
- }
- function zKe(t) {
- var e = Ln.extend(t);
- return Ln.registerClass(e), e;
- }
- function VKe(t) {
- var e = Tn.extend(t);
- return Tn.registerClass(e), e;
- }
- function FKe(t) {
- var e = _n.extend(t);
- return _n.registerClass(e), e;
- }
- var W0 = Math.PI * 2, $d = jl.CMD, WKe = ["top", "right", "bottom", "left"];
- function QKe(t, e, n, r, i) {
- var a = n.width, o = n.height;
- switch (t) {
- case "top":
- r.set(n.x + a / 2, n.y - e), i.set(0, -1);
- break;
- case "bottom":
- r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
- break;
- case "left":
- r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
- break;
- case "right":
- r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
- break;
- }
- }
- function HKe(t, e, n, r, i, a, o, s, l) {
- o -= t, s -= e;
- var u = Math.sqrt(o * o + s * s);
- o /= u, s /= u;
- var c = o * n + t, f = s * n + e;
- if (Math.abs(r - i) % W0 < 1e-4)
- return l[0] = c, l[1] = f, u - n;
- if (a) {
- var d = r;
- r = oo(i), i = oo(d);
- } else
- r = oo(r), i = oo(i);
- r > i && (i += W0);
- var h = Math.atan2(s, o);
- if (h < 0 && (h += W0), h >= r && h <= i || h + W0 >= r && h + W0 <= i)
- return l[0] = c, l[1] = f, u - n;
- var p = n * Math.cos(r) + t, v = n * Math.sin(r) + e, g = n * Math.cos(i) + t, m = n * Math.sin(i) + e, y = (p - o) * (p - o) + (v - s) * (v - s), _ = (g - o) * (g - o) + (m - s) * (m - s);
- return y < _ ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(_));
- }
- function KC(t, e, n, r, i, a, o, s) {
- var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
- c /= d, f /= d;
- var h = l * c + u * f, p = h / d;
- s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
- var v = o[0] = t + p * c, g = o[1] = e + p * f;
- return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
- }
- function zce(t, e, n, r, i, a, o) {
- n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
- var s = t + n, l = e + r, u = o[0] = Math.min(Math.max(i, t), s), c = o[1] = Math.min(Math.max(a, e), l);
- return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
- }
- var Ps = [];
- function GKe(t, e, n) {
- var r = zce(e.x, e.y, e.width, e.height, t.x, t.y, Ps);
- return n.set(Ps[0], Ps[1]), r;
- }
- function jKe(t, e, n) {
- for (var r = 0, i = 0, a = 0, o = 0, s, l, u = 1 / 0, c = e.data, f = t.x, d = t.y, h = 0; h < c.length; ) {
- var p = c[h++];
- h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
- var v = u;
- switch (p) {
- case $d.M:
- a = c[h++], o = c[h++], r = a, i = o;
- break;
- case $d.L:
- v = KC(r, i, c[h], c[h + 1], f, d, Ps, !0), r = c[h++], i = c[h++];
- break;
- case $d.C:
- v = cse(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Ps), r = c[h++], i = c[h++];
- break;
- case $d.Q:
- v = dse(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Ps), r = c[h++], i = c[h++];
- break;
- case $d.A:
- var g = c[h++], m = c[h++], y = c[h++], _ = c[h++], O = c[h++], S = c[h++];
- h += 1;
- var x = !!(1 - c[h++]);
- s = Math.cos(O) * y + g, l = Math.sin(O) * _ + m, h <= 1 && (a = s, o = l);
- var C = (f - g) * _ / y + g;
- v = HKe(g, m, _, O, O + S, x, C, d, Ps), r = Math.cos(O + S) * y + g, i = Math.sin(O + S) * _ + m;
- break;
- case $d.R:
- a = r = c[h++], o = i = c[h++];
- var P = c[h++], $ = c[h++];
- v = zce(a, o, P, $, f, d, Ps);
- break;
- case $d.Z:
- v = KC(r, i, a, o, f, d, Ps, !0), r = a, i = o;
- break;
- }
- v < u && (u = v, n.set(Ps[0], Ps[1]));
- }
- return u;
- }
- var Is = new yt(), kn = new yt(), yr = new yt(), El = new yt(), wl = new yt();
- function Xj(t, e) {
- if (t) {
- var n = t.getTextGuideLine(), r = t.getTextContent();
- if (r && n) {
- var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || WKe, s = r.getBoundingRect().clone();
- s.applyTransform(r.getComputedTransform());
- var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && dp([], c), d = e.get("length2") || 0;
- u && yr.copy(u);
- for (var h = 0; h < o.length; h++) {
- var p = o[h];
- QKe(p, 0, s, Is, El), yt.scaleAndAdd(kn, Is, El, d), kn.transform(f);
- var v = t.getBoundingRect(), g = u ? u.distance(kn) : t instanceof Dt ? jKe(kn, t.path, yr) : GKe(kn, v, yr);
- g < l && (l = g, kn.transform(c), yr.transform(c), yr.toArray(a[0]), kn.toArray(a[1]), Is.toArray(a[2]));
- }
- Vce(a, e.get("minTurnAngle")), n.setShape({
- points: a
- });
- }
- }
- }
- var JC = [], ea = new yt();
- function Vce(t, e) {
- if (e <= 180 && e > 0) {
- e = e / 180 * Math.PI, Is.fromArray(t[0]), kn.fromArray(t[1]), yr.fromArray(t[2]), yt.sub(El, Is, kn), yt.sub(wl, yr, kn);
- var n = El.len(), r = wl.len();
- if (!(n < 1e-3 || r < 1e-3)) {
- El.scale(1 / n), wl.scale(1 / r);
- var i = El.dot(wl), a = Math.cos(e);
- if (a < i) {
- var o = KC(kn.x, kn.y, yr.x, yr.y, Is.x, Is.y, JC, !1);
- ea.fromArray(JC), ea.scaleAndAdd(wl, o / Math.tan(Math.PI - e));
- var s = yr.x !== kn.x ? (ea.x - kn.x) / (yr.x - kn.x) : (ea.y - kn.y) / (yr.y - kn.y);
- if (isNaN(s))
- return;
- s < 0 ? yt.copy(ea, kn) : s > 1 && yt.copy(ea, yr), ea.toArray(t[1]);
- }
- }
- }
- }
- function ZKe(t, e, n) {
- if (n <= 180 && n > 0) {
- n = n / 180 * Math.PI, Is.fromArray(t[0]), kn.fromArray(t[1]), yr.fromArray(t[2]), yt.sub(El, kn, Is), yt.sub(wl, yr, kn);
- var r = El.len(), i = wl.len();
- if (!(r < 1e-3 || i < 1e-3)) {
- El.scale(1 / r), wl.scale(1 / i);
- var a = El.dot(e), o = Math.cos(n);
- if (a < o) {
- var s = KC(kn.x, kn.y, yr.x, yr.y, Is.x, Is.y, JC, !1);
- ea.fromArray(JC);
- var l = Math.PI / 2, u = Math.acos(wl.dot(e)), c = l + u - n;
- if (c >= l)
- yt.copy(ea, yr);
- else {
- ea.scaleAndAdd(wl, s / Math.tan(Math.PI / 2 - c));
- var f = yr.x !== kn.x ? (ea.x - kn.x) / (yr.x - kn.x) : (ea.y - kn.y) / (yr.y - kn.y);
- if (isNaN(f))
- return;
- f < 0 ? yt.copy(ea, kn) : f > 1 && yt.copy(ea, yr);
- }
- ea.toArray(t[1]);
- }
- }
- }
- }
- function RM(t, e, n, r) {
- var i = n === "normal", a = i ? t : t.ensureState(n);
- a.ignore = e;
- var o = r.get("smooth");
- o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
- var s = r.getModel("lineStyle").getLineStyle();
- i ? t.useStyle(s) : a.style = s;
- }
- function UKe(t, e) {
- var n = e.smooth, r = e.points;
- if (r)
- if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
- var i = wu(r[0], r[1]), a = wu(r[1], r[2]);
- if (!i || !a) {
- t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
- return;
- }
- var o = Math.min(i, a) * n, s = Yy([], r[1], r[0], o / i), l = Yy([], r[1], r[2], o / a), u = Yy([], s, l, 0.5);
- t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], r[2][0], r[2][1]);
- } else
- for (var c = 1; c < r.length; c++)
- t.lineTo(r[c][0], r[c][1]);
- }
- function A3(t, e, n) {
- var r = t.getTextGuideLine(), i = t.getTextContent();
- if (!i) {
- r && t.removeTextGuideLine();
- return;
- }
- for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < Ub.length; l++) {
- var u = Ub[l], c = e[u], f = u === "normal";
- if (c) {
- var d = c.get("show"), h = f ? s : dt(i.states[u] && i.states[u].ignore, s);
- if (h || !dt(d, o)) {
- var p = f ? r : r && r.states[u];
- p && (p.ignore = !0), r && RM(r, !0, u, c);
- continue;
- }
- r || (r = new va(), t.setTextGuideLine(r), !f && (s || !o) && RM(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), RM(r, !1, u, c);
- }
- }
- if (r) {
- it(r.style, n), r.style.fill = null;
- var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
- g.showAbove = v || !1, r.buildPath = UKe;
- }
- }
- function E3(t, e) {
- e = e || "labelLine";
- for (var n = {
- normal: t.getModel(e)
- }, r = 0; r < da.length; r++) {
- var i = da[r];
- n[i] = t.getModel([i, e]);
- }
- return n;
- }
- function Fce(t) {
- for (var e = [], n = 0; n < t.length; n++) {
- var r = t[n];
- if (!r.defaultAttr.ignore) {
- var i = r.label, a = i.getComputedTransform(), o = i.getBoundingRect(), s = !a || a[1] < 1e-5 && a[2] < 1e-5, l = i.style.margin || 0, u = o.clone();
- u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
- var c = s ? new DC(o, a) : null;
- e.push({
- label: i,
- labelLine: r.labelLine,
- rect: u,
- localRect: o,
- obb: c,
- priority: r.priority,
- defaultAttr: r.defaultAttr,
- layoutOption: r.computedLayoutOption,
- axisAligned: s,
- transform: a
- });
- }
- }
- return e;
- }
- function Wce(t, e, n, r, i, a) {
- var o = t.length;
- if (o < 2)
- return;
- t.sort(function(P, $) {
- return P.rect[e] - $.rect[e];
- });
- for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
- var d = t[f], h = d.rect;
- l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
- var p = Math.max(-l, 0);
- c += p, s = h[e] + h[n];
- }
- c > 0 && a && S(-c / o, 0, o);
- var v = t[0], g = t[o - 1], m, y;
- _(), m < 0 && x(-m, 0.8), y < 0 && x(y, 0.8), _(), O(m, y, 1), O(y, m, -1), _(), m < 0 && C(-m), y < 0 && C(y);
- function _() {
- m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
- }
- function O(P, $, T) {
- if (P < 0) {
- var E = Math.min($, -P);
- if (E > 0) {
- S(E * T, 0, o);
- var M = E + P;
- M < 0 && x(-M * T, 1);
- } else
- x(-P * T, 1);
- }
- }
- function S(P, $, T) {
- P !== 0 && (u = !0);
- for (var E = $; E < T; E++) {
- var M = t[E], R = M.rect;
- R[e] += P, M.label[e] += P;
- }
- }
- function x(P, $) {
- for (var T = [], E = 0, M = 1; M < o; M++) {
- var R = t[M - 1].rect, N = Math.max(t[M].rect[e] - R[e] - R[n], 0);
- T.push(N), E += N;
- }
- if (E) {
- var I = Math.min(Math.abs(P) / E, $);
- if (P > 0)
- for (var M = 0; M < o - 1; M++) {
- var B = T[M] * I;
- S(B, 0, M + 1);
- }
- else
- for (var M = o - 1; M > 0; M--) {
- var B = T[M - 1] * I;
- S(-B, M, o);
- }
- }
- }
- function C(P) {
- var $ = P < 0 ? -1 : 1;
- P = Math.abs(P);
- for (var T = Math.ceil(P / (o - 1)), E = 0; E < o - 1; E++)
- if ($ > 0 ? S(T, 0, E + 1) : S(-T, o - E - 1, o), P -= T, P <= 0)
- return;
- }
- return u;
- }
- function XKe(t, e, n, r) {
- return Wce(t, "x", "width", e, n, r);
- }
- function Qce(t, e, n, r) {
- return Wce(t, "y", "height", e, n, r);
- }
- function Hce(t) {
- var e = [];
- t.sort(function(v, g) {
- return g.priority - v.priority;
- });
- var n = new bt(0, 0, 0, 0);
- function r(v) {
- if (!v.ignore) {
- var g = v.ensureState("emphasis");
- g.ignore == null && (g.ignore = !1);
- }
- v.ignore = !0;
- }
- for (var i = 0; i < t.length; i++) {
- var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
- n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
- for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
- var p = e[h];
- if (n.intersect(p.rect)) {
- if (o && p.axisAligned) {
- d = !0;
- break;
- }
- if (p.obb || (p.obb = new DC(p.localRect, p.transform)), f || (f = new DC(s, l)), f.intersect(p.obb)) {
- d = !0;
- break;
- }
- }
- }
- d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
- }
- }
- function YKe(t) {
- if (t) {
- for (var e = [], n = 0; n < t.length; n++)
- e.push(t[n].slice());
- return e;
- }
- }
- function qKe(t, e) {
- var n = t.label, r = e && e.getTextGuideLine();
- return {
- dataIndex: t.dataIndex,
- dataType: t.dataType,
- seriesIndex: t.seriesModel.seriesIndex,
- text: t.label.style.text,
- rect: t.hostRect,
- labelRect: t.rect,
- // x: labelAttr.x,
- // y: labelAttr.y,
- align: n.style.align,
- verticalAlign: n.style.verticalAlign,
- labelLinePoints: YKe(r && r.shape.points)
- };
- }
- var Yj = ["align", "verticalAlign", "width", "height", "fontSize"], Yi = new Pu(), kM = Ut(), KKe = Ut();
- function RS(t, e, n) {
- for (var r = 0; r < n.length; r++) {
- var i = n[r];
- e[i] != null && (t[i] = e[i]);
- }
- }
- var kS = ["x", "y", "rotation"], JKe = (
- /** @class */
- function() {
- function t() {
- this._labelList = [], this._chartViewList = [];
- }
- return t.prototype.clearLabels = function() {
- this._labelList = [], this._chartViewList = [];
- }, t.prototype._addLabel = function(e, n, r, i, a) {
- var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
- bt.applyTransform(c, c, u), u ? Yi.setLocalTransform(u) : (Yi.x = Yi.y = Yi.rotation = Yi.originX = Yi.originY = 0, Yi.scaleX = Yi.scaleY = 1), Yi.rotation = oo(Yi.rotation);
- var f = i.__hostTarget, d;
- if (f) {
- d = f.getBoundingRect().plain();
- var h = f.getComputedTransform();
- bt.applyTransform(d, d, h);
- }
- var p = d && f.getTextGuideLine();
- this._labelList.push({
- label: i,
- labelLine: p,
- seriesModel: r,
- dataIndex: e,
- dataType: n,
- layoutOption: a,
- computedLayoutOption: null,
- rect: c,
- hostRect: d,
- // Label with lower priority will be hidden when overlapped
- // Use rect size as default priority
- priority: d ? d.width * d.height : 0,
- // Save default label attributes.
- // For restore if developers want get back to default value in callback.
- defaultAttr: {
- ignore: i.ignore,
- labelGuideIgnore: p && p.ignore,
- x: Yi.x,
- y: Yi.y,
- scaleX: Yi.scaleX,
- scaleY: Yi.scaleY,
- rotation: Yi.rotation,
- style: {
- x: o.x,
- y: o.y,
- align: o.align,
- verticalAlign: o.verticalAlign,
- width: o.width,
- height: o.height,
- fontSize: o.fontSize
- },
- cursor: i.cursor,
- attachedPos: l.position,
- attachedRot: l.rotation
- }
- });
- }, t.prototype.addLabelsOfSeries = function(e) {
- var n = this;
- this._chartViewList.push(e);
- var r = e.__model, i = r.get("labelLayout");
- (qe(i) || kt(i).length) && e.group.traverse(function(a) {
- if (a.ignore)
- return !0;
- var o = a.getTextContent(), s = ft(a);
- o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
- });
- }, t.prototype.updateLayoutConfig = function(e) {
- var n = e.getWidth(), r = e.getHeight();
- function i(_, O) {
- return function() {
- Xj(_, O);
- };
- }
- for (var a = 0; a < this._labelList.length; a++) {
- var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
- qe(o.layoutOption) ? c = o.layoutOption(qKe(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
- var f = Math.PI / 180;
- l && l.setTextConfig({
- // Force to set local false.
- local: !1,
- // Ignore position and rotation config on the host el if x or y is changed.
- position: c.x != null || c.y != null ? null : u.attachedPos,
- // Ignore rotation config on the host el if rotation is changed.
- rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
- offset: [c.dx || 0, c.dy || 0]
- });
- var d = !1;
- if (c.x != null ? (s.x = ze(c.x, n), s.setStyle("x", 0), d = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), c.y != null ? (s.y = ze(c.y, r), s.setStyle("y", 0), d = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), c.labelLinePoints) {
- var h = l.getTextGuideLine();
- h && (h.setShape({
- points: c.labelLinePoints
- }), d = !1);
- }
- var p = kM(s);
- p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
- for (var v = 0; v < Yj.length; v++) {
- var g = Yj[v];
- s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
- }
- if (c.draggable) {
- if (s.draggable = !0, s.cursor = "move", l) {
- var m = o.seriesModel;
- if (o.dataIndex != null) {
- var y = o.seriesModel.getData(o.dataType);
- m = y.getItemModel(o.dataIndex);
- }
- s.on("drag", i(l, m.getModel("labelLine")));
- }
- } else
- s.off("drag"), s.cursor = u.cursor;
- }
- }, t.prototype.layout = function(e) {
- var n = e.getWidth(), r = e.getHeight(), i = Fce(this._labelList), a = yn(i, function(l) {
- return l.layoutOption.moveOverlap === "shiftX";
- }), o = yn(i, function(l) {
- return l.layoutOption.moveOverlap === "shiftY";
- });
- XKe(a, 0, n), Qce(o, 0, r);
- var s = yn(i, function(l) {
- return l.layoutOption.hideOverlap;
- });
- Hce(s);
- }, t.prototype.processLabelsOverall = function() {
- var e = this;
- F(this._chartViewList, function(n) {
- var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
- n.group.traverse(function(o) {
- if (o.ignore && !o.forceLabelAnimation)
- return !0;
- var s = !i, l = o.getTextContent();
- !s && l && (s = kM(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
- });
- });
- }, t.prototype._updateLabelLine = function(e, n) {
- var r = e.getTextContent(), i = ft(e), a = i.dataIndex;
- if (r && a != null) {
- var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
- if (u) {
- var c = o.getVisual("drawType");
- l.stroke = u[c];
- }
- var f = s.getModel("labelLine");
- A3(e, E3(s), l), Xj(e, f);
- }
- }, t.prototype._animateLabels = function(e, n) {
- var r = e.getTextContent(), i = e.getTextGuideLine();
- if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !qv(e))) {
- var a = kM(r), o = a.oldLayout, s = ft(e), l = s.dataIndex, u = {
- x: r.x,
- y: r.y,
- rotation: r.rotation
- }, c = n.getData(s.dataType);
- if (o) {
- r.attr(o);
- var d = e.prevStates;
- d && (St(d, "select") >= 0 && r.attr(a.oldLayoutSelect), St(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), tn(r, u, n, l);
- } else if (r.attr(u), !wm(r).valueAnimation) {
- var f = dt(r.style.opacity, 1);
- r.style.opacity = 0, Vn(r, {
- style: {
- opacity: f
- }
- }, n, l);
- }
- if (a.oldLayout = u, r.states.select) {
- var h = a.oldLayoutSelect = {};
- RS(h, u, kS), RS(h, r.states.select, kS);
- }
- if (r.states.emphasis) {
- var p = a.oldLayoutEmphasis = {};
- RS(p, u, kS), RS(p, r.states.emphasis, kS);
- }
- Nle(r, l, c, n, n);
- }
- if (i && !i.ignore && !i.invisible) {
- var a = KKe(i), o = a.oldLayout, v = {
- points: i.shape.points
- };
- o ? (i.attr({
- shape: o
- }), tn(i, {
- shape: v
- }, n)) : (i.setShape(v), i.style.strokePercent = 0, Vn(i, {
- style: {
- strokePercent: 1
- }
- }, n)), a.oldLayout = v;
- }
- }, t;
- }()
- ), LM = Ut();
- function eJe(t) {
- t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
- var i = LM(n).labelManager;
- i || (i = LM(n).labelManager = new JKe()), i.clearLabels();
- }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
- var i = LM(n).labelManager;
- r.updatedSeries.forEach(function(a) {
- i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
- }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
- });
- }
- var NM = Math.sin, BM = Math.cos, Gce = Math.PI, Ad = Math.PI * 2, tJe = 180 / Gce, jce = function() {
- function t() {
- }
- return t.prototype.reset = function(e) {
- this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
- }, t.prototype.moveTo = function(e, n) {
- this._add("M", e, n);
- }, t.prototype.lineTo = function(e, n) {
- this._add("L", e, n);
- }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
- this._add("C", e, n, r, i, a, o);
- }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
- this._add("Q", e, n, r, i);
- }, t.prototype.arc = function(e, n, r, i, a, o) {
- this.ellipse(e, n, r, r, 0, i, a, o);
- }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
- var u = s - o, c = !l, f = Math.abs(u), d = Gc(f - Ad) || (c ? u >= Ad : -u >= Ad), h = u > 0 ? u % Ad : u % Ad + Ad, p = !1;
- d ? p = !0 : Gc(f) ? p = !1 : p = h >= Gce == !!c;
- var v = e + r * BM(o), g = n + i * NM(o);
- this._start && this._add("M", v, g);
- var m = Math.round(a * tJe);
- if (d) {
- var y = 1 / this._p, _ = (c ? 1 : -1) * (Ad - y);
- this._add("A", r, i, m, 1, +c, e + r * BM(o + _), n + i * NM(o + _)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
- } else {
- var O = e + r * BM(s), S = n + i * NM(s);
- this._add("A", r, i, m, +p, +c, O, S);
- }
- }, t.prototype.rect = function(e, n, r, i) {
- this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
- }, t.prototype.closePath = function() {
- this._d.length > 0 && this._add("Z");
- }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
- for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
- var h = arguments[d];
- if (isNaN(h)) {
- this._invalid = !0;
- return;
- }
- c.push(Math.round(h * f) / f);
- }
- this._d.push(e + c.join(" ")), this._start = e === "Z";
- }, t.prototype.generateStr = function() {
- this._str = this._invalid ? "" : this._d.join(""), this._d = [];
- }, t.prototype.getStr = function() {
- return this._str;
- }, t;
- }(), M3 = "none", nJe = Math.round;
- function rJe(t) {
- var e = t.fill;
- return e != null && e !== M3;
- }
- function iJe(t) {
- var e = t.stroke;
- return e != null && e !== M3;
- }
- var tL = ["lineCap", "miterLimit", "lineJoin"], aJe = Ce(tL, function(t) {
- return "stroke-" + t.toLowerCase();
- });
- function oJe(t, e, n, r) {
- var i = e.opacity == null ? 1 : e.opacity;
- if (n instanceof ci) {
- t("opacity", i);
- return;
- }
- if (rJe(e)) {
- var a = Zb(e.fill);
- t("fill", a.color);
- var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
- o < 1 && t("fill-opacity", o);
- } else
- t("fill", M3);
- if (iJe(e)) {
- var s = Zb(e.stroke);
- t("stroke", s.color);
- var l = e.strokeNoScale ? n.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, c = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * i : s.opacity * i, f = e.strokeFirst;
- if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
- var d = f3(n), h = d[0], p = d[1];
- h && (p = nJe(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
- }
- for (var v = 0; v < tL.length; v++) {
- var g = tL[v];
- if (e[g] !== MC[g]) {
- var m = e[g] || MC[g];
- m && t(aJe[v], m);
- }
- }
- }
- }
- var Zce = "http://www.w3.org/2000/svg", Uce = "http://www.w3.org/1999/xlink", sJe = "http://www.w3.org/2000/xmlns/", lJe = "http://www.w3.org/XML/1998/namespace", qj = "ecmeta_";
- function Xce(t) {
- return document.createElementNS(Zce, t);
- }
- function Yr(t, e, n, r, i) {
- return {
- tag: t,
- attrs: n || {},
- children: r,
- text: i,
- key: e
- };
- }
- function uJe(t, e) {
- var n = [];
- if (e)
- for (var r in e) {
- var i = e[r], a = r;
- i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
- }
- return "<" + t + " " + n.join(" ") + ">";
- }
- function cJe(t) {
- return "</" + t + ">";
- }
- function I3(t, e) {
- e = e || {};
- var n = e.newline ? `
- ` : "";
- function r(i) {
- var a = i.children, o = i.tag, s = i.attrs, l = i.text;
- return uJe(o, s) + (o !== "style" ? ta(l) : l || "") + (a ? "" + n + Ce(a, function(u) {
- return r(u);
- }).join(n) + n : "") + cJe(o);
- }
- return r(t);
- }
- function fJe(t, e, n) {
- n = n || {};
- var r = n.newline ? `
- ` : "", i = " {" + r, a = r + "}", o = Ce(kt(t), function(l) {
- return l + i + Ce(kt(t[l]), function(u) {
- return u + ":" + t[l][u] + ";";
- }).join(r) + a;
- }).join(r), s = Ce(kt(e), function(l) {
- return "@keyframes " + l + i + Ce(kt(e[l]), function(u) {
- return u + i + Ce(kt(e[l][u]), function(c) {
- var f = e[l][u][c];
- return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
- }).join(r) + a;
- }).join(r) + a;
- }).join(r);
- return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
- }
- function nL(t) {
- return {
- zrId: t,
- shadowCache: {},
- patternCache: {},
- gradientCache: {},
- clipPathCache: {},
- defs: {},
- cssNodes: {},
- cssAnims: {},
- cssStyleCache: {},
- cssAnimIdx: 0,
- shadowIdx: 0,
- gradientIdx: 0,
- patternIdx: 0,
- clipPathIdx: 0
- };
- }
- function Kj(t, e, n, r) {
- return Yr("svg", "root", {
- width: t,
- height: e,
- xmlns: Zce,
- "xmlns:xlink": Uce,
- version: "1.1",
- baseProfile: "full",
- viewBox: r ? "0 0 " + t + " " + e : !1
- }, n);
- }
- var dJe = 0;
- function Yce() {
- return dJe++;
- }
- var Jj = {
- cubicIn: "0.32,0,0.67,0",
- cubicOut: "0.33,1,0.68,1",
- cubicInOut: "0.65,0,0.35,1",
- quadraticIn: "0.11,0,0.5,0",
- quadraticOut: "0.5,1,0.89,1",
- quadraticInOut: "0.45,0,0.55,1",
- quarticIn: "0.5,0,0.75,0",
- quarticOut: "0.25,1,0.5,1",
- quarticInOut: "0.76,0,0.24,1",
- quinticIn: "0.64,0,0.78,0",
- quinticOut: "0.22,1,0.36,1",
- quinticInOut: "0.83,0,0.17,1",
- sinusoidalIn: "0.12,0,0.39,0",
- sinusoidalOut: "0.61,1,0.88,1",
- sinusoidalInOut: "0.37,0,0.63,1",
- exponentialIn: "0.7,0,0.84,0",
- exponentialOut: "0.16,1,0.3,1",
- exponentialInOut: "0.87,0,0.13,1",
- circularIn: "0.55,0,1,0.45",
- circularOut: "0,0.55,0.45,1",
- circularInOut: "0.85,0,0.15,1"
- }, kd = "transform-origin";
- function hJe(t, e, n) {
- var r = _e({}, t.shape);
- _e(r, e), t.buildPath(n, r);
- var i = new jce();
- return i.reset(bse(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
- }
- function pJe(t, e) {
- var n = e.originX, r = e.originY;
- (n || r) && (t[kd] = n + "px " + r + "px");
- }
- var vJe = {
- fill: "fill",
- opacity: "opacity",
- lineWidth: "stroke-width",
- lineDashOffset: "stroke-dashoffset"
- };
- function qce(t, e) {
- var n = e.zrId + "-ani-" + e.cssAnimIdx++;
- return e.cssAnims[n] = t, n;
- }
- function gJe(t, e, n) {
- var r = t.shape.paths, i = {}, a, o;
- if (F(r, function(l) {
- var u = nL(n.zrId);
- u.animation = !0, WP(l, {}, u, !0);
- var c = u.cssAnims, f = u.cssNodes, d = kt(c), h = d.length;
- if (h) {
- o = d[h - 1];
- var p = c[o];
- for (var v in p) {
- var g = p[v];
- i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
- }
- for (var m in f) {
- var y = f[m].animation;
- y.indexOf(o) >= 0 && (a = y);
- }
- }
- }), !!a) {
- e.d = !1;
- var s = qce(i, n);
- return a.replace(o, s);
- }
- }
- function eZ(t) {
- return Ve(t) ? Jj[t] ? "cubic-bezier(" + Jj[t] + ")" : S5(t) ? t : "" : "";
- }
- function WP(t, e, n, r) {
- var i = t.animators, a = i.length, o = [];
- if (t instanceof xP) {
- var s = gJe(t, e, n);
- if (s)
- o.push(s);
- else if (!a)
- return;
- } else if (!a)
- return;
- for (var l = {}, u = 0; u < a; u++) {
- var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = eZ(c.getClip().easing), h = c.getDelay();
- d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
- var p = f.join(" ");
- l[p] = l[p] || [p, []], l[p][1].push(c);
- }
- function v(y) {
- var _ = y[1], O = _.length, S = {}, x = {}, C = {}, P = "animation-timing-function";
- function $(he, re, q) {
- for (var K = he.getTracks(), de = he.getMaxTime(), xe = 0; xe < K.length; xe++) {
- var we = K[xe];
- if (we.needsAnimate()) {
- var He = we.keyframes, je = we.propName;
- if (q && (je = q(je)), je)
- for (var Be = 0; Be < He.length; Be++) {
- var Le = He[Be], Pe = Math.round(Le.time / de * 100) + "%", Fe = eZ(Le.easing), Ye = Le.rawValue;
- (Ve(Ye) || Kt(Ye)) && (re[Pe] = re[Pe] || {}, re[Pe][je] = Le.rawValue, Fe && (re[Pe][P] = Fe));
- }
- }
- }
- }
- for (var T = 0; T < O; T++) {
- var E = _[T], M = E.targetName;
- M ? M === "shape" && $(E, x) : !r && $(E, S);
- }
- for (var R in S) {
- var N = {};
- wse(N, t), _e(N, S[R]);
- var I = _se(N), B = S[R][P];
- C[R] = I ? {
- transform: I
- } : {}, pJe(C[R], N), B && (C[R][P] = B);
- }
- var Q, W = !0;
- for (var R in x) {
- C[R] = C[R] || {};
- var H = !Q, B = x[R][P];
- H && (Q = new jl());
- var U = Q.len();
- Q.reset(), C[R].d = hJe(t, x[R], Q);
- var j = Q.len();
- if (!H && U !== j) {
- W = !1;
- break;
- }
- B && (C[R][P] = B);
- }
- if (!W)
- for (var R in C)
- delete C[R].d;
- if (!r)
- for (var T = 0; T < O; T++) {
- var E = _[T], M = E.targetName;
- M === "style" && $(E, C, function(K) {
- return vJe[K];
- });
- }
- for (var Y = kt(C), ne = !0, fe, T = 1; T < Y.length; T++) {
- var ue = Y[T - 1], ye = Y[T];
- if (C[ue][kd] !== C[ye][kd]) {
- ne = !1;
- break;
- }
- fe = C[ue][kd];
- }
- if (ne && fe) {
- for (var R in C)
- C[R][kd] && delete C[R][kd];
- e[kd] = fe;
- }
- if (yn(Y, function(he) {
- return kt(C[he]).length > 0;
- }).length) {
- var se = qce(C, n);
- return se + " " + y[0] + " both";
- }
- }
- for (var g in l) {
- var s = v(l[g]);
- s && o.push(s);
- }
- if (o.length) {
- var m = n.zrId + "-cls-" + Yce();
- n.cssNodes["." + m] = {
- animation: o.join(",")
- }, e.class = m;
- }
- }
- function mJe(t, e, n) {
- if (!t.ignore)
- if (t.isSilent()) {
- var r = {
- "pointer-events": "none"
- };
- tZ(r, e, n);
- } else {
- var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
- if (!a) {
- var o = t.style && t.style.fill, s = t.states.select && t.states.select.style && t.states.select.style.fill, l = t.currentStates.indexOf("select") >= 0 && s || o;
- l && (a = TC(l));
- }
- var u = i.lineWidth;
- if (u) {
- var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
- u = u / c;
- }
- var r = {
- cursor: "pointer"
- };
- a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), tZ(r, e, n);
- }
- }
- function tZ(t, e, n, r) {
- var i = JSON.stringify(t), a = n.cssStyleCache[i];
- a || (a = n.zrId + "-cls-" + Yce(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
- }
- var r_ = Math.round;
- function Kce(t) {
- return t && Ve(t.src);
- }
- function Jce(t) {
- return t && qe(t.toDataURL);
- }
- function D3(t, e, n, r) {
- oJe(function(i, a) {
- var o = i === "fill" || i === "stroke";
- o && yse(a) ? tfe(e, t, i, r) : o && w5(a) ? nfe(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
- }, e, n, !1), wJe(n, t, r);
- }
- function R3(t, e) {
- var n = $se(e);
- n && (n.each(function(r, i) {
- r != null && (t[(qj + i).toLowerCase()] = r + "");
- }), e.isSilent() && (t[qj + "silent"] = "true"));
- }
- function nZ(t) {
- return Gc(t[0] - 1) && Gc(t[1]) && Gc(t[2]) && Gc(t[3] - 1);
- }
- function yJe(t) {
- return Gc(t[4]) && Gc(t[5]);
- }
- function k3(t, e, n) {
- if (e && !(yJe(e) && nZ(e))) {
- var r = 1e4;
- t.transform = nZ(e) ? "translate(" + r_(e[4] * r) / r + " " + r_(e[5] * r) / r + ")" : fGe(e);
- }
- }
- function rZ(t, e, n) {
- for (var r = t.points, i = [], a = 0; a < r.length; a++)
- i.push(r_(r[a][0] * n) / n), i.push(r_(r[a][1] * n) / n);
- e.points = i.join(" ");
- }
- function iZ(t) {
- return !t.smooth;
- }
- function bJe(t) {
- var e = Ce(t, function(n) {
- return typeof n == "string" ? [n, n] : n;
- });
- return function(n, r, i) {
- for (var a = 0; a < e.length; a++) {
- var o = e[a], s = n[o[0]];
- s != null && (r[o[1]] = r_(s * i) / i);
- }
- };
- }
- var _Je = {
- circle: [bJe(["cx", "cy", "r"])],
- polyline: [rZ, iZ],
- polygon: [rZ, iZ]
- };
- function OJe(t) {
- for (var e = t.animators, n = 0; n < e.length; n++)
- if (e[n].targetName === "shape")
- return !0;
- return !1;
- }
- function efe(t, e) {
- var n = t.style, r = t.shape, i = _Je[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && bse(t) || 4;
- if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && OJe(t)) && !(l < 1)) {
- s = t.type;
- var c = Math.pow(10, u);
- i[0](r, a, c);
- } else {
- var f = !t.path || t.shapeChanged();
- t.path || t.createPathProxy();
- var d = t.path;
- f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
- var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
- (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new jce()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
- }
- return k3(a, t.transform), D3(a, n, t, e), R3(a, t), e.animation && WP(t, a, e), e.emphasis && mJe(t, a, e), Yr(s, t.id + "", a);
- }
- function SJe(t, e) {
- var n = t.style, r = n.image;
- if (r && !Ve(r) && (Kce(r) ? r = r.src : Jce(r) && (r = r.toDataURL())), !!r) {
- var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
- href: r,
- width: o,
- height: s
- };
- return i && (l.x = i), a && (l.y = a), k3(l, t.transform), D3(l, n, t, e), R3(l, t), e.animation && WP(t, l, e), Yr("image", t.id + "", l);
- }
- }
- function xJe(t, e) {
- var n = t.style, r = n.text;
- if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
- var i = n.font || vf, a = n.x || 0, o = hGe(n.y || 0, fP(i), n.textBaseline), s = dGe[n.textAlign] || n.textAlign, l = {
- "dominant-baseline": "central",
- "text-anchor": s
- };
- if (tle(n)) {
- var u = "", c = n.fontStyle, f = ele(n.fontSize);
- if (!parseFloat(f))
- return;
- var d = n.fontFamily || Hoe, h = n.fontWeight;
- u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
- } else
- l.style = "font: " + i;
- return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), k3(l, t.transform), D3(l, n, t, e), R3(l, t), e.animation && WP(t, l, e), Yr("text", t.id + "", l, void 0, r);
- }
- }
- function aZ(t, e) {
- if (t instanceof Dt)
- return efe(t, e);
- if (t instanceof ci)
- return SJe(t, e);
- if (t instanceof Wg)
- return xJe(t, e);
- }
- function wJe(t, e, n) {
- var r = t.style;
- if (pGe(r)) {
- var i = vGe(t), a = n.shadowCache, o = a[i];
- if (!o) {
- var s = t.getGlobalScale(), l = s[0], u = s[1];
- if (!l || !u)
- return;
- var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Zb(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
- o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Yr("filter", o, {
- id: o,
- x: "-100%",
- y: "-100%",
- width: "300%",
- height: "300%"
- }, [
- Yr("feDropShadow", "", {
- dx: c / l,
- dy: f / u,
- stdDeviation: y,
- "flood-color": v,
- "flood-opacity": p
- })
- ]), a[i] = o;
- }
- e.filter = cP(o);
- }
- }
- function tfe(t, e, n, r) {
- var i = t[n], a, o = {
- gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
- };
- if (gse(i))
- a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
- else if (mse(i))
- a = "radialGradient", o.cx = dt(i.x, 0.5), o.cy = dt(i.y, 0.5), o.r = dt(i.r, 0.5);
- else {
- process.env.NODE_ENV !== "production" && qo("Illegal gradient type.");
- return;
- }
- for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
- var f = ck(s[u].offset) * 100 + "%", d = s[u].color, h = Zb(d), p = h.color, v = h.opacity, g = {
- offset: f
- };
- g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Yr("stop", u + "", g));
- }
- var m = Yr(a, "", o, l), y = I3(m), _ = r.gradientCache, O = _[y];
- O || (O = r.zrId + "-g" + r.gradientIdx++, _[y] = O, o.id = O, r.defs[O] = Yr(a, O, o, l)), e[n] = cP(O);
- }
- function nfe(t, e, n, r) {
- var i = t.style[n], a = t.getBoundingRect(), o = {}, s = i.repeat, l = s === "no-repeat", u = s === "repeat-x", c = s === "repeat-y", f;
- if (vse(i)) {
- var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
- if (Ve(v) ? p = v : Kce(v) ? p = v.src : Jce(v) && (p = v.toDataURL()), typeof Image > "u") {
- var g = "Image width/height must been given explictly in svg-ssr renderer.";
- at(d, g), at(h, g);
- } else if (d == null || h == null) {
- var m = function(T, E) {
- if (T) {
- var M = T.elm, R = d || E.width, N = h || E.height;
- T.tag === "pattern" && (u ? (N = 1, R /= a.width) : c && (R = 1, N /= a.height)), T.attrs.width = R, T.attrs.height = N, M && (M.setAttribute("width", R), M.setAttribute("height", N));
- }
- }, y = I5(p, null, t, function(T) {
- l || m(x, T), m(f, T);
- });
- y && y.width && y.height && (d = d || y.width, h = h || y.height);
- }
- f = Yr("image", "img", {
- href: p,
- width: d,
- height: h
- }), o.width = d, o.height = h;
- } else i.svgElement && (f = ot(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
- if (f) {
- var _, O;
- l ? _ = O = 1 : u ? (O = 1, _ = o.width / a.width) : c ? (_ = 1, O = o.height / a.height) : o.patternUnits = "userSpaceOnUse", _ != null && !isNaN(_) && (o.width = _), O != null && !isNaN(O) && (o.height = O);
- var S = _se(i);
- S && (o.patternTransform = S);
- var x = Yr("pattern", "", o, [f]), C = I3(x), P = r.patternCache, $ = P[C];
- $ || ($ = r.zrId + "-p" + r.patternIdx++, P[C] = $, o.id = $, x = r.defs[$] = Yr("pattern", $, o, [f])), e[n] = cP($);
- }
- }
- function CJe(t, e, n) {
- var r = n.clipPathCache, i = n.defs, a = r[t.id];
- if (!a) {
- a = n.zrId + "-c" + n.clipPathIdx++;
- var o = {
- id: a
- };
- r[t.id] = a, i[a] = Yr("clipPath", a, o, [efe(t, n)]);
- }
- e["clip-path"] = cP(a);
- }
- function oZ(t) {
- return document.createTextNode(t);
- }
- function jd(t, e, n) {
- t.insertBefore(e, n);
- }
- function sZ(t, e) {
- t.removeChild(e);
- }
- function lZ(t, e) {
- t.appendChild(e);
- }
- function rfe(t) {
- return t.parentNode;
- }
- function ife(t) {
- return t.nextSibling;
- }
- function zM(t, e) {
- t.textContent = e;
- }
- var uZ = 58, TJe = 120, PJe = Yr("", "");
- function rL(t) {
- return t === void 0;
- }
- function Ol(t) {
- return t !== void 0;
- }
- function $Je(t, e, n) {
- for (var r = {}, i = e; i <= n; ++i) {
- var a = t[i].key;
- a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
- }
- return r;
- }
- function Oy(t, e) {
- var n = t.key === e.key, r = t.tag === e.tag;
- return r && n;
- }
- function i_(t) {
- var e, n = t.children, r = t.tag;
- if (Ol(r)) {
- var i = t.elm = Xce(r);
- if (L3(PJe, t), Se(n))
- for (e = 0; e < n.length; ++e) {
- var a = n[e];
- a != null && lZ(i, i_(a));
- }
- else Ol(t.text) && !nt(t.text) && lZ(i, oZ(t.text));
- } else
- t.elm = oZ(t.text);
- return t.elm;
- }
- function afe(t, e, n, r, i) {
- for (; r <= i; ++r) {
- var a = n[r];
- a != null && jd(t, i_(a), e);
- }
- }
- function eT(t, e, n, r) {
- for (; n <= r; ++n) {
- var i = e[n];
- if (i != null)
- if (Ol(i.tag)) {
- var a = rfe(i.elm);
- sZ(a, i.elm);
- } else
- sZ(t, i.elm);
- }
- }
- function L3(t, e) {
- var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
- if (i !== a) {
- for (n in a) {
- var o = a[n], s = i[n];
- s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== TJe ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(sJe, n, o) : n.charCodeAt(3) === uZ ? r.setAttributeNS(lJe, n, o) : n.charCodeAt(5) === uZ ? r.setAttributeNS(Uce, n, o) : r.setAttribute(n, o));
- }
- for (n in i)
- n in a || r.removeAttribute(n);
- }
- }
- function AJe(t, e, n) {
- for (var r = 0, i = 0, a = e.length - 1, o = e[0], s = e[a], l = n.length - 1, u = n[0], c = n[l], f, d, h, p; r <= a && i <= l; )
- o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Oy(o, u) ? (Sv(o, u), o = e[++r], u = n[++i]) : Oy(s, c) ? (Sv(s, c), s = e[--a], c = n[--l]) : Oy(o, c) ? (Sv(o, c), jd(t, o.elm, ife(s.elm)), o = e[++r], c = n[--l]) : Oy(s, u) ? (Sv(s, u), jd(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (rL(f) && (f = $Je(e, r, a)), d = f[u.key], rL(d) ? jd(t, i_(u), o.elm) : (h = e[d], h.tag !== u.tag ? jd(t, i_(u), o.elm) : (Sv(h, u), e[d] = void 0, jd(t, h.elm, o.elm))), u = n[++i]);
- (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, afe(t, p, n, i, l)) : eT(t, e, r, a));
- }
- function Sv(t, e) {
- var n = e.elm = t.elm, r = t.children, i = e.children;
- t !== e && (L3(t, e), rL(e.text) ? Ol(r) && Ol(i) ? r !== i && AJe(n, r, i) : Ol(i) ? (Ol(t.text) && zM(n, ""), afe(n, null, i, 0, i.length - 1)) : Ol(r) ? eT(n, r, 0, r.length - 1) : Ol(t.text) && zM(n, "") : t.text !== e.text && (Ol(r) && eT(n, r, 0, r.length - 1), zM(n, e.text)));
- }
- function EJe(t, e) {
- if (Oy(t, e))
- Sv(t, e);
- else {
- var n = t.elm, r = rfe(n);
- i_(e), r !== null && (jd(r, e.elm, ife(n)), eT(r, [t], 0, 0));
- }
- return e;
- }
- var MJe = 0, IJe = function() {
- function t(e, n, r) {
- if (this.type = "svg", this.refreshHover = cZ("refreshHover"), this.configLayer = cZ("configLayer"), this.storage = n, this._opts = r = _e({}, r), this.root = e, this._id = "zr" + MJe++, this._oldVNode = Kj(r.width, r.height), e && !r.ssr) {
- var i = this._viewport = document.createElement("div");
- i.style.cssText = "position:relative;overflow:hidden";
- var a = this._svgDom = this._oldVNode.elm = Xce("svg");
- L3(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
- }
- this.resize(r.width, r.height);
- }
- return t.prototype.getType = function() {
- return this.type;
- }, t.prototype.getViewportRoot = function() {
- return this._viewport;
- }, t.prototype.getViewportRootOffset = function() {
- var e = this.getViewportRoot();
- if (e)
- return {
- offsetLeft: e.offsetLeft || 0,
- offsetTop: e.offsetTop || 0
- };
- }, t.prototype.getSvgDom = function() {
- return this._svgDom;
- }, t.prototype.refresh = function() {
- if (this.root) {
- var e = this.renderToVNode({
- willUpdate: !0
- });
- e.attrs.style = "position:absolute;left:0;top:0;user-select:none", EJe(this._oldVNode, e), this._oldVNode = e;
- }
- }, t.prototype.renderOneToVNode = function(e) {
- return aZ(e, nL(this._id));
- }, t.prototype.renderToVNode = function(e) {
- e = e || {};
- var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = nL(this._id);
- a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
- var o = [], s = this._bgVNode = DJe(r, i, this._backgroundColor, a);
- s && o.push(s);
- var l = e.compress ? null : this._mainVNode = Yr("g", "main", {}, []);
- this._paintList(n, a, l ? l.children : o), l && o.push(l);
- var u = Ce(kt(a.defs), function(d) {
- return a.defs[d];
- });
- if (u.length && o.push(Yr("defs", "defs", {}, u)), e.animation) {
- var c = fJe(a.cssNodes, a.cssAnims, { newline: !0 });
- if (c) {
- var f = Yr("style", "stl", {}, [], c);
- o.push(f);
- }
- }
- return Kj(r, i, o, e.useViewBox);
- }, t.prototype.renderToString = function(e) {
- return e = e || {}, I3(this.renderToVNode({
- animation: dt(e.cssAnimation, !0),
- emphasis: dt(e.cssEmphasis, !0),
- willUpdate: !1,
- compress: !0,
- useViewBox: dt(e.useViewBox, !0)
- }), { newline: !0 });
- }, t.prototype.setBackgroundColor = function(e) {
- this._backgroundColor = e;
- }, t.prototype.getSvgRoot = function() {
- return this._mainVNode && this._mainVNode.elm;
- }, t.prototype._paintList = function(e, n, r) {
- for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
- var f = e[c];
- if (!f.invisible) {
- var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
- for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
- ;
- for (var g = p - 1; g > v; g--)
- o--, s = a[o - 1];
- for (var m = v + 1; m < h; m++) {
- var y = {};
- CJe(d[m], y, n);
- var _ = Yr("g", "clip-g-" + u++, y, []);
- (s ? s.children : r).push(_), a[o++] = _, s = _;
- }
- l = d;
- var O = aZ(f, n);
- O && (s ? s.children : r).push(O);
- }
- }
- }, t.prototype.resize = function(e, n) {
- var r = this._opts, i = this.root, a = this._viewport;
- if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Rv(i, 0, r), n = Rv(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
- if (this._width = e, this._height = n, a) {
- var o = a.style;
- o.width = e + "px", o.height = n + "px";
- }
- if (w5(this._backgroundColor))
- this.refresh();
- else {
- var s = this._svgDom;
- s && (s.setAttribute("width", e), s.setAttribute("height", n));
- var l = this._bgVNode && this._bgVNode.elm;
- l && (l.setAttribute("width", e), l.setAttribute("height", n));
- }
- }
- }, t.prototype.getWidth = function() {
- return this._width;
- }, t.prototype.getHeight = function() {
- return this._height;
- }, t.prototype.dispose = function() {
- this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
- }, t.prototype.clear = function() {
- this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
- }, t.prototype.toDataURL = function(e) {
- var n = this.renderToString(), r = "data:image/svg+xml;";
- return e ? (n = mGe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
- }, t;
- }();
- function cZ(t) {
- return function() {
- process.env.NODE_ENV !== "production" && qo('In SVG mode painter not support method "' + t + '"');
- };
- }
- function DJe(t, e, n, r) {
- var i;
- if (n && n !== "none")
- if (i = Yr("rect", "bg", {
- width: t,
- height: e,
- x: "0",
- y: "0"
- }), yse(n))
- tfe({ fill: n }, i.attrs, "fill", r);
- else if (w5(n))
- nfe({
- style: {
- fill: n
- },
- dirty: fr,
- getBoundingRect: function() {
- return { width: t, height: e };
- }
- }, i.attrs, "fill", r);
- else {
- var a = Zb(n), o = a.color, s = a.opacity;
- i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
- }
- return i;
- }
- function RJe(t) {
- t.registerPainter("svg", IJe);
- }
- function fZ(t, e, n) {
- var r = Hs.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
- return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = i + "px", o.height = a + "px", r.setAttribute("data-zr-dom-id", t)), r.width = i * n, r.height = a * n, r;
- }
- var VM = function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this) || this;
- a.motionBlur = !1, a.lastFrameAlpha = 0.7, a.dpr = 1, a.virtual = !1, a.config = {}, a.incremental = !1, a.zlevel = 0, a.maxRepaintRectCount = 5, a.__dirty = !0, a.__firstTimePaint = !0, a.__used = !1, a.__drawIndex = 0, a.__startIndex = 0, a.__endIndex = 0, a.__prevStartIndex = null, a.__prevEndIndex = null;
- var o;
- i = i || $C, typeof n == "string" ? o = fZ(n, r, i) : nt(n) && (o = n, n = o.id), a.id = n, a.dom = o;
- var s = o.style;
- return s && (b5(o), o.onselectstart = function() {
- return !1;
- }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
- }
- return e.prototype.getElementCount = function() {
- return this.__endIndex - this.__startIndex;
- }, e.prototype.afterBrush = function() {
- this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
- }, e.prototype.initContext = function() {
- this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
- }, e.prototype.setUnpainted = function() {
- this.__firstTimePaint = !0;
- }, e.prototype.createBackBuffer = function() {
- var n = this.dpr;
- this.domBack = fZ("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
- }, e.prototype.createRepaintRects = function(n, r, i, a) {
- if (this.__firstTimePaint)
- return this.__firstTimePaint = !1, null;
- var o = [], s = this.maxRepaintRectCount, l = !1, u = new bt(0, 0, 0, 0);
- function c(y) {
- if (!(!y.isFinite() || y.isZero()))
- if (o.length === 0) {
- var _ = new bt(0, 0, 0, 0);
- _.copy(y), o.push(_);
- } else {
- for (var O = !1, S = 1 / 0, x = 0, C = 0; C < o.length; ++C) {
- var P = o[C];
- if (P.intersect(y)) {
- var $ = new bt(0, 0, 0, 0);
- $.copy(P), $.union(y), o[C] = $, O = !0;
- break;
- } else if (l) {
- u.copy(y), u.union(P);
- var T = y.width * y.height, E = P.width * P.height, M = u.width * u.height, R = M - T - E;
- R < S && (S = R, x = C);
- }
- }
- if (l && (o[x].union(y), O = !0), !O) {
- var _ = new bt(0, 0, 0, 0);
- _.copy(y), o.push(_);
- }
- l || (l = o.length >= s);
- }
- }
- for (var f = this.__startIndex; f < this.__endIndex; ++f) {
- var d = n[f];
- if (d) {
- var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & to || !h) ? d.getPrevPaintRect() : null;
- p && c(p);
- var v = h && (d.__dirty & to || !d.__isRendered) ? d.getPaintRect() : null;
- v && c(v);
- }
- }
- for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
- var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
- if (d && (!h || !d.__zr) && d.__isRendered) {
- var p = d.getPrevPaintRect();
- p && c(p);
- }
- }
- var g;
- do {
- g = !1;
- for (var f = 0; f < o.length; ) {
- if (o[f].isZero()) {
- o.splice(f, 1);
- continue;
- }
- for (var m = f + 1; m < o.length; )
- o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
- f++;
- }
- } while (g);
- return this._paintRects = o, o;
- }, e.prototype.debugGetPaintRects = function() {
- return (this._paintRects || []).slice();
- }, e.prototype.resize = function(n, r) {
- var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
- o && (o.width = n + "px", o.height = r + "px"), a.width = n * i, a.height = r * i, s && (s.width = n * i, s.height = r * i, i !== 1 && this.ctxBack.scale(i, i));
- }, e.prototype.clear = function(n, r, i) {
- var a = this.dom, o = this.ctx, s = a.width, l = a.height;
- r = r || this.clearColor;
- var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
- u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
- var h = this.domBack;
- function p(v, g, m, y) {
- if (o.clearRect(v, g, m, y), r && r !== "transparent") {
- var _ = void 0;
- if (n1(r)) {
- var O = r.global || r.__width === m && r.__height === y;
- _ = O && r.__canvasGradient || jk(o, r, {
- x: 0,
- y: 0,
- width: m,
- height: y
- }), r.__canvasGradient = _, r.__width = m, r.__height = y;
- } else Xoe(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, _ = Zk(o, r, {
- dirty: function() {
- d.setUnpainted(), d.painter.refresh();
- }
- }));
- o.save(), o.fillStyle = _ || r, o.fillRect(v, g, m, y), o.restore();
- }
- u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
- }
- !i || u ? p(0, 0, s, l) : i.length && F(i, function(v) {
- p(v.x * f, v.y * f, v.width * f, v.height * f);
- });
- }, e;
- }(fs), dZ = 1e5, Ed = 314159, LS = 0.01, kJe = 1e-3;
- function LJe(t) {
- return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
- }
- function NJe(t, e) {
- var n = document.createElement("div");
- return n.style.cssText = [
- "position:relative",
- "width:" + t + "px",
- "height:" + e + "px",
- "padding:0",
- "margin:0",
- "border-width:0"
- ].join(";") + ";", n;
- }
- var BJe = function() {
- function t(e, n, r, i) {
- this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
- var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
- this._opts = r = _e({}, r || {}), this.dpr = r.devicePixelRatio || $C, this._singleCanvas = a, this.root = e;
- var o = e.style;
- o && (b5(e), e.innerHTML = ""), this.storage = n;
- var s = this._zlevelList;
- this._prevDisplayList = [];
- var l = this._layers;
- if (a) {
- var c = e, f = c.width, d = c.height;
- r.width != null && (f = r.width), r.height != null && (d = r.height), this.dpr = r.devicePixelRatio || 1, c.width = f * this.dpr, c.height = d * this.dpr, this._width = f, this._height = d;
- var h = new VM(c, this, this.dpr);
- h.__builtin__ = !0, h.initContext(), l[Ed] = h, h.zlevel = Ed, s.push(Ed), this._domRoot = e;
- } else {
- this._width = Rv(e, 0, r), this._height = Rv(e, 1, r);
- var u = this._domRoot = NJe(this._width, this._height);
- e.appendChild(u);
- }
- }
- return t.prototype.getType = function() {
- return "canvas";
- }, t.prototype.isSingleCanvas = function() {
- return this._singleCanvas;
- }, t.prototype.getViewportRoot = function() {
- return this._domRoot;
- }, t.prototype.getViewportRootOffset = function() {
- var e = this.getViewportRoot();
- if (e)
- return {
- offsetLeft: e.offsetLeft || 0,
- offsetTop: e.offsetTop || 0
- };
- }, t.prototype.refresh = function(e) {
- var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
- this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
- for (var a = 0; a < i.length; a++) {
- var o = i[a], s = this._layers[o];
- if (!s.__builtin__ && s.refresh) {
- var l = a === 0 ? this._backgroundColor : null;
- s.refresh(l);
- }
- }
- return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
- }, t.prototype.refreshHover = function() {
- this._paintHoverList(this.storage.getDisplayList(!1));
- }, t.prototype._paintHoverList = function(e) {
- var n = e.length, r = this._hoverlayer;
- if (r && r.clear(), !!n) {
- for (var i = {
- inHover: !0,
- viewWidth: this._width,
- viewHeight: this._height
- }, a, o = 0; o < n; o++) {
- var s = e[o];
- s.__inHover && (r || (r = this._hoverlayer = this.getLayer(dZ)), a || (a = r.ctx, a.save()), uh(a, s, i, o === n - 1));
- }
- a && a.restore();
- }
- }, t.prototype.getHoverLayer = function() {
- return this.getLayer(dZ);
- }, t.prototype.paintOne = function(e, n) {
- d3(e, n);
- }, t.prototype._paintList = function(e, n, r, i) {
- if (this._redrawId === i) {
- r = r || !1, this._updateLayerStatus(e);
- var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
- if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
- this.eachLayer(function(u) {
- u.afterBrush && u.afterBrush();
- });
- else {
- var l = this;
- SC(function() {
- l._paintList(e, n, r, i);
- });
- }
- }
- }, t.prototype._compositeManually = function() {
- var e = this.getLayer(Ed).ctx, n = this._domRoot.width, r = this._domRoot.height;
- e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
- i.virtual && e.drawImage(i.dom, 0, 0, n, r);
- });
- }, t.prototype._doPaintList = function(e, n, r) {
- for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
- var l = this._zlevelList[s], u = this._layers[l];
- u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
- }
- for (var c = !0, f = !1, d = function(v) {
- var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, n, h._width, h._height), _ = r ? g.__startIndex : g.__drawIndex, O = !r && g.incremental && Date.now, S = O && Date.now(), x = g.zlevel === h._zlevelList[0] ? h._backgroundColor : null;
- if (g.__startIndex === g.__endIndex)
- g.clear(!1, x, y);
- else if (_ === g.__startIndex) {
- var C = e[_];
- (!C.incremental || !C.notClear || r) && g.clear(!1, x, y);
- }
- _ === -1 && (console.error("For some unknown reason. drawIndex is -1"), _ = g.__startIndex);
- var P, $ = function(R) {
- var N = {
- inHover: !1,
- allClipped: !1,
- prevEl: null,
- viewWidth: i._width,
- viewHeight: i._height
- };
- for (P = _; P < g.__endIndex; P++) {
- var I = e[P];
- if (I.__inHover && (f = !0), i._doPaintEl(I, g, o, R, N, P === g.__endIndex - 1), O) {
- var B = Date.now() - S;
- if (B > 15)
- break;
- }
- }
- N.prevElClipPaths && m.restore();
- };
- if (y)
- if (y.length === 0)
- P = g.__endIndex;
- else
- for (var T = h.dpr, E = 0; E < y.length; ++E) {
- var M = y[E];
- m.save(), m.beginPath(), m.rect(M.x * T, M.y * T, M.width * T, M.height * T), m.clip(), $(M), m.restore();
- }
- else
- m.save(), $(), m.restore();
- g.__drawIndex = P, g.__drawIndex < g.__endIndex && (c = !1);
- }, h = this, p = 0; p < a.length; p++)
- d(p);
- return Gt.wxa && F(this._layers, function(v) {
- v && v.ctx && v.ctx.draw && v.ctx.draw();
- }), {
- finished: c,
- needsRefreshHover: f
- };
- }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
- var s = n.ctx;
- if (r) {
- var l = e.getPaintRect();
- (!i || l && l.intersect(i)) && (uh(s, e, a, o), e.setPrevPaintRect(l));
- } else
- uh(s, e, a, o);
- }, t.prototype.getLayer = function(e, n) {
- this._singleCanvas && !this._needsManuallyCompositing && (e = Ed);
- var r = this._layers[e];
- return r || (r = new VM("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? mt(r, this._layerConfig[e], !0) : this._layerConfig[e - LS] && mt(r, this._layerConfig[e - LS], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
- }, t.prototype.insertLayer = function(e, n) {
- var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
- if (r[e]) {
- process.env.NODE_ENV !== "production" && qo("ZLevel " + e + " has been used already");
- return;
- }
- if (!LJe(n)) {
- process.env.NODE_ENV !== "production" && qo("Layer of zlevel " + e + " is not valid");
- return;
- }
- if (a > 0 && e > i[0]) {
- for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
- ;
- s = r[i[l]];
- }
- if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
- if (s) {
- var u = s.dom;
- u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
- } else
- o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
- n.painter || (n.painter = this);
- }, t.prototype.eachLayer = function(e, n) {
- for (var r = this._zlevelList, i = 0; i < r.length; i++) {
- var a = r[i];
- e.call(n, this._layers[a], a);
- }
- }, t.prototype.eachBuiltinLayer = function(e, n) {
- for (var r = this._zlevelList, i = 0; i < r.length; i++) {
- var a = r[i], o = this._layers[a];
- o.__builtin__ && e.call(n, o, a);
- }
- }, t.prototype.eachOtherLayer = function(e, n) {
- for (var r = this._zlevelList, i = 0; i < r.length; i++) {
- var a = r[i], o = this._layers[a];
- o.__builtin__ || e.call(n, o, a);
- }
- }, t.prototype.getLayers = function() {
- return this._layers;
- }, t.prototype._updateLayerStatus = function(e) {
- this.eachBuiltinLayer(function(f, d) {
- f.__dirty = f.__used = !1;
- });
- function n(f) {
- a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
- }
- if (this._singleCanvas)
- for (var r = 1; r < e.length; r++) {
- var i = e[r];
- if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
- this._needsManuallyCompositing = !0;
- break;
- }
- }
- var a = null, o = 0, s, l;
- for (l = 0; l < e.length; l++) {
- var i = e[l], u = i.zlevel, c = void 0;
- s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + kJe, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? LS : 0), this._needsManuallyCompositing), c.__builtin__ || qo("ZLevel " + u + " has been used by unkown layer " + c.id), c !== a && (c.__used = !0, c.__startIndex !== l && (c.__dirty = !0), c.__startIndex = l, c.incremental ? c.__drawIndex = -1 : c.__drawIndex = l, n(l), a = c), i.__dirty & to && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
- }
- n(l), this.eachBuiltinLayer(function(f, d) {
- !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
- });
- }, t.prototype.clear = function() {
- return this.eachBuiltinLayer(this._clearLayer), this;
- }, t.prototype._clearLayer = function(e) {
- e.clear();
- }, t.prototype.setBackgroundColor = function(e) {
- this._backgroundColor = e, F(this._layers, function(n) {
- n.setUnpainted();
- });
- }, t.prototype.configLayer = function(e, n) {
- if (n) {
- var r = this._layerConfig;
- r[e] ? mt(r[e], n, !0) : r[e] = n;
- for (var i = 0; i < this._zlevelList.length; i++) {
- var a = this._zlevelList[i];
- if (a === e || a === e + LS) {
- var o = this._layers[a];
- mt(o, r[e], !0);
- }
- }
- }
- }, t.prototype.delLayer = function(e) {
- var n = this._layers, r = this._zlevelList, i = n[e];
- i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(St(r, e), 1));
- }, t.prototype.resize = function(e, n) {
- if (this._domRoot.style) {
- var r = this._domRoot;
- r.style.display = "none";
- var i = this._opts, a = this.root;
- if (e != null && (i.width = e), n != null && (i.height = n), e = Rv(a, 0, i), n = Rv(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
- r.style.width = e + "px", r.style.height = n + "px";
- for (var o in this._layers)
- this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
- this.refresh(!0);
- }
- this._width = e, this._height = n;
- } else {
- if (e == null || n == null)
- return;
- this._width = e, this._height = n, this.getLayer(Ed).resize(e, n);
- }
- return this;
- }, t.prototype.clearLayer = function(e) {
- var n = this._layers[e];
- n && n.clear();
- }, t.prototype.dispose = function() {
- this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
- }, t.prototype.getRenderedCanvas = function(e) {
- if (e = e || {}, this._singleCanvas && !this._compositeManually)
- return this._layers[Ed].dom;
- var n = new VM("image", this, e.pixelRatio || this.dpr);
- n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
- var r = n.ctx;
- if (e.pixelRatio <= this.dpr) {
- this.refresh();
- var i = n.dom.width, a = n.dom.height;
- this.eachLayer(function(f) {
- f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
- });
- } else
- for (var o = {
- inHover: !1,
- viewWidth: this._width,
- viewHeight: this._height
- }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
- var c = s[l];
- uh(r, c, o, l === u - 1);
- }
- return n.dom;
- }, t.prototype.getWidth = function() {
- return this._width;
- }, t.prototype.getHeight = function() {
- return this._height;
- }, t;
- }();
- function zJe(t) {
- t.registerPainter("canvas", BJe);
- }
- var VJe = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n;
- }
- return e.prototype.getInitialData = function(n) {
- if (process.env.NODE_ENV !== "production") {
- var r = n.coordinateSystem;
- if (r !== "polar" && r !== "cartesian2d")
- throw new Error("Line not support coordinateSystem besides cartesian and polar");
- }
- return Yl(null, this, {
- useEncodeDefaulter: !0
- });
- }, e.prototype.getLegendIcon = function(n) {
- var r = new ct(), i = wr("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
- r.add(i), i.setStyle(n.lineStyle);
- var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, l = n.itemHeight * 0.8, u = wr(s, (n.itemWidth - l) / 2, (n.itemHeight - l) / 2, l, l, n.itemStyle.fill);
- r.add(u), u.setStyle(n.itemStyle);
- var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
- return u.rotation = c * Math.PI / 180, u.setOrigin([n.itemWidth / 2, n.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), r;
- }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
- // zlevel: 0,
- z: 3,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- clip: !0,
- label: {
- position: "top"
- },
- // itemStyle: {
- // },
- endLabel: {
- show: !1,
- valueAnimation: !0,
- distance: 8
- },
- lineStyle: {
- width: 2,
- type: "solid"
- },
- emphasis: {
- scale: !0
- },
- // areaStyle: {
- // origin of areaStyle. Valid values:
- // `'auto'/null/undefined`: from axisLine to data
- // `'start'`: from min to data
- // `'end'`: from data to max
- // origin: 'auto'
- // },
- // false, 'start', 'end', 'middle'
- step: !1,
- // Disabled if step is true
- smooth: !1,
- smoothMonotone: null,
- symbol: "emptyCircle",
- symbolSize: 4,
- symbolRotate: null,
- showSymbol: !0,
- // `false`: follow the label interval strategy.
- // `true`: show all symbols.
- // `'auto'`: If possible, show all symbols, otherwise
- // follow the label interval strategy.
- showAllSymbol: "auto",
- // Whether to connect break point.
- connectNulls: !1,
- // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
- sampling: "none",
- animationEasing: "linear",
- // Disable progressive
- progressive: 0,
- hoverLayerThreshold: 1 / 0,
- universalTransition: {
- divideShape: "clone"
- },
- triggerLineEvent: !1
- }, e;
- }(Tn)
- );
- function jg(t, e) {
- var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
- if (r === 1) {
- var i = Hg(t, e, n[0]);
- return i != null ? i + "" : null;
- } else if (r) {
- for (var a = [], o = 0; o < n.length; o++)
- a.push(Hg(t, e, n[o]));
- return a.join(" ");
- }
- }
- function ofe(t, e) {
- var n = t.mapDimensionsAll("defaultedLabel");
- if (!Se(e))
- return e + "";
- for (var r = [], i = 0; i < n.length; i++) {
- var a = t.getDimensionIndex(n[i]);
- a >= 0 && r.push(e[a]);
- }
- return r.join(" ");
- }
- var m1 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a) {
- var o = t.call(this) || this;
- return o.updateData(n, r, i, a), o;
- }
- return e.prototype._createSymbol = function(n, r, i, a, o) {
- this.removeAll();
- var s = wr(n, -1, -1, 2, 2, null, o);
- s.attr({
- z2: 100,
- culling: !0,
- scaleX: a[0] / 2,
- scaleY: a[1] / 2
- }), s.drift = FJe, this._symbolType = n, this.add(s);
- }, e.prototype.stopSymbolAnimation = function(n) {
- this.childAt(0).stopAnimation(null, n);
- }, e.prototype.getSymbolType = function() {
- return this._symbolType;
- }, e.prototype.getSymbolPath = function() {
- return this.childAt(0);
- }, e.prototype.highlight = function() {
- Fu(this.childAt(0));
- }, e.prototype.downplay = function() {
- Wu(this.childAt(0));
- }, e.prototype.setZ = function(n, r) {
- var i = this.childAt(0);
- i.zlevel = n, i.z = r;
- }, e.prototype.setDraggable = function(n, r) {
- var i = this.childAt(0);
- i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
- }, e.prototype.updateData = function(n, r, i, a) {
- this.silent = !1;
- var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
- if (u) {
- var f = n.getItemVisual(r, "symbolKeepAspect");
- this._createSymbol(o, n, r, l, f);
- } else {
- var d = this.childAt(0);
- d.silent = !1;
- var h = {
- scaleX: l[0] / 2,
- scaleY: l[1] / 2
- };
- c ? d.attr(h) : tn(d, h, s, r), Zs(d);
- }
- if (this._updateCommon(n, r, l, i, a), u) {
- var d = this.childAt(0);
- if (!c) {
- var h = {
- scaleX: this._sizeX,
- scaleY: this._sizeY,
- style: {
- // Always fadeIn. Because it has fadeOut animation when symbol is removed..
- opacity: d.style.opacity
- }
- };
- d.scaleX = d.scaleY = 0, d.style.opacity = 0, Vn(d, h, s, r);
- }
- }
- c && this.childAt(0).stopAnimation("leave");
- }, e.prototype._updateCommon = function(n, r, i, a, o) {
- var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
- if (a && (u = a.emphasisItemStyle, c = a.blurItemStyle, f = a.selectItemStyle, d = a.focus, h = a.blurScope, v = a.labelStatesModels, g = a.hoverScale, m = a.cursorStyle, p = a.emphasisDisabled), !a || n.hasItemOption) {
- var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), _ = y.getModel("emphasis");
- u = _.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), d = _.get("focus"), h = _.get("blurScope"), p = _.get("disabled"), v = ei(y), g = _.getShallow("scale"), m = y.getShallow("cursor");
- }
- var O = n.getItemVisual(r, "symbolRotate");
- s.attr("rotation", (O || 0) * Math.PI / 180 || 0);
- var S = mp(n.getItemVisual(r, "symbolOffset"), i);
- S && (s.x = S[0], s.y = S[1]), m && s.attr("cursor", m);
- var x = n.getItemVisual(r, "style"), C = x.fill;
- if (s instanceof ci) {
- var P = s.style;
- s.useStyle(_e({
- // TODO other properties like x, y ?
- image: P.image,
- x: P.x,
- y: P.y,
- width: P.width,
- height: P.height
- }, x));
- } else
- s.__isEmptyBrush ? s.useStyle(_e({}, x)) : s.useStyle(x), s.style.decal = null, s.setColor(C, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
- var $ = n.getItemVisual(r, "liftZ"), T = this._z2;
- $ != null ? T == null && (this._z2 = s.z2, s.z2 += $) : T != null && (s.z2 = T, this._z2 = null);
- var E = o && o.useNameLabel;
- Ei(s, v, {
- labelFetcher: l,
- labelDataIndex: r,
- defaultText: M,
- inheritColor: C,
- defaultOpacity: x.opacity
- });
- function M(I) {
- return E ? n.getName(I) : jg(n, I);
- }
- this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
- var R = s.ensureState("emphasis");
- R.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
- var N = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
- R.scaleX = this._sizeX * N, R.scaleY = this._sizeY * N, this.setSymbolScale(1), ur(this, d, h, p);
- }, e.prototype.setSymbolScale = function(n) {
- this.scaleX = this.scaleY = n;
- }, e.prototype.fadeOut = function(n, r, i) {
- var a = this.childAt(0), o = ft(this).dataIndex, s = i && i.animation;
- if (this.silent = a.silent = !0, i && i.fadeLabel) {
- var l = a.getTextContent();
- l && _f(l, {
- style: {
- opacity: 0
- }
- }, r, {
- dataIndex: o,
- removeOpt: s,
- cb: function() {
- a.removeTextContent();
- }
- });
- } else
- a.removeTextContent();
- _f(a, {
- style: {
- opacity: 0
- },
- scaleX: 0,
- scaleY: 0
- }, r, {
- dataIndex: o,
- cb: n,
- removeOpt: s
- });
- }, e.getSymbolSize = function(n, r) {
- return Em(n.getItemVisual(r, "symbolSize"));
- }, e;
- }(ct)
- );
- function FJe(t, e) {
- this.parent.drift(t, e);
- }
- function FM(t, e, n, r) {
- return e && !isNaN(e[0]) && !isNaN(e[1]) && !(r.isIgnore && r.isIgnore(n)) && !(r.clipShape && !r.clipShape.contain(e[0], e[1])) && t.getItemVisual(n, "symbol") !== "none";
- }
- function hZ(t) {
- return t != null && !nt(t) && (t = {
- isIgnore: t
- }), t || {};
- }
- function pZ(t) {
- var e = t.hostModel, n = e.getModel("emphasis");
- return {
- emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
- blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
- selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
- focus: n.get("focus"),
- blurScope: n.get("blurScope"),
- emphasisDisabled: n.get("disabled"),
- hoverScale: n.get("scale"),
- labelStatesModels: ei(e),
- cursorStyle: e.get("cursor")
- };
- }
- var y1 = (
- /** @class */
- function() {
- function t(e) {
- this.group = new ct(), this._SymbolCtor = e || m1;
- }
- return t.prototype.updateData = function(e, n) {
- this._progressiveEls = null, n = hZ(n);
- var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = pZ(e), u = {
- disableAnimation: s
- }, c = n.getSymbolPoint || function(f) {
- return e.getItemLayout(f);
- };
- a || r.removeAll(), e.diff(a).add(function(f) {
- var d = c(f);
- if (FM(e, d, f, n)) {
- var h = new o(e, f, l, u);
- h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
- }
- }).update(function(f, d) {
- var h = a.getItemGraphicEl(d), p = c(f);
- if (!FM(e, p, f, n)) {
- r.remove(h);
- return;
- }
- var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
- if (!h || g && g !== v)
- r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
- else {
- h.updateData(e, f, l, u);
- var m = {
- x: p[0],
- y: p[1]
- };
- s ? h.attr(m) : tn(h, m, i);
- }
- r.add(h), e.setItemGraphicEl(f, h);
- }).remove(function(f) {
- var d = a.getItemGraphicEl(f);
- d && d.fadeOut(function() {
- r.remove(d);
- }, i);
- }).execute(), this._getSymbolPoint = c, this._data = e;
- }, t.prototype.updateLayout = function() {
- var e = this, n = this._data;
- n && n.eachItemGraphicEl(function(r, i) {
- var a = e._getSymbolPoint(i);
- r.setPosition(a), r.markRedraw();
- });
- }, t.prototype.incrementalPrepareUpdate = function(e) {
- this._seriesScope = pZ(e), this._data = null, this.group.removeAll();
- }, t.prototype.incrementalUpdate = function(e, n, r) {
- this._progressiveEls = [], r = hZ(r);
- function i(l) {
- l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
- }
- for (var a = e.start; a < e.end; a++) {
- var o = n.getItemLayout(a);
- if (FM(n, o, a, r)) {
- var s = new this._SymbolCtor(n, a, this._seriesScope);
- s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
- }
- }
- }, t.prototype.eachRendered = function(e) {
- Nf(this._progressiveEls || this.group, e);
- }, t.prototype.remove = function(e) {
- var n = this.group, r = this._data;
- r && e ? r.eachItemGraphicEl(function(i) {
- i.fadeOut(function() {
- n.remove(i);
- }, r.hostModel);
- }) : n.removeAll();
- }, t;
- }()
- );
- function sfe(t, e, n) {
- var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = WJe(i, n), o = r.dim, s = i.dim, l = e.mapDimension(s), u = e.mapDimension(o), c = s === "x" || s === "radius" ? 1 : 0, f = Ce(t.dimensions, function(p) {
- return e.mapDimension(p);
- }), d = !1, h = e.getCalculationInfo("stackResultDimension");
- return Hu(
- e,
- f[0]
- /* , dims[1] */
- ) && (d = !0, f[0] = h), Hu(
- e,
- f[1]
- /* , dims[0] */
- ) && (d = !0, f[1] = h), {
- dataDimsForPoint: f,
- valueStart: a,
- valueAxisDim: s,
- baseAxisDim: o,
- stacked: !!d,
- valueDim: l,
- baseDim: u,
- baseDataOffset: c,
- stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
- };
- }
- function WJe(t, e) {
- var n = 0, r = t.scale.getExtent();
- return e === "start" ? n = r[0] : e === "end" ? n = r[1] : Kt(e) && !isNaN(e) ? n = e : r[0] > 0 ? n = r[0] : r[1] < 0 && (n = r[1]), n;
- }
- function lfe(t, e, n, r) {
- var i = NaN;
- t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
- var a = t.baseDataOffset, o = [];
- return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
- }
- function QJe(t, e) {
- var n = [];
- return e.diff(t).add(function(r) {
- n.push({
- cmd: "+",
- idx: r
- });
- }).update(function(r, i) {
- n.push({
- cmd: "=",
- idx: i,
- idx1: r
- });
- }).remove(function(r) {
- n.push({
- cmd: "-",
- idx: r
- });
- }).execute(), n;
- }
- function HJe(t, e, n, r, i, a, o, s) {
- for (var l = QJe(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = sfe(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], _ = 0; _ < l.length; _++) {
- var O = l[_], S = !0, x = void 0, C = void 0;
- switch (O.cmd) {
- case "=":
- x = O.idx * 2, C = O.idx1 * 2;
- var P = m[x], $ = m[x + 1], T = y[C], E = y[C + 1];
- (isNaN(P) || isNaN($)) && (P = T, $ = E), u.push(P, $), c.push(T, E), f.push(n[x], n[x + 1]), d.push(r[C], r[C + 1]), v.push(e.getRawIndex(O.idx1));
- break;
- case "+":
- var M = O.idx, R = g.dataDimsForPoint, N = i.dataToPoint([e.get(R[0], M), e.get(R[1], M)]);
- C = M * 2, u.push(N[0], N[1]), c.push(y[C], y[C + 1]);
- var I = lfe(g, i, e, M);
- f.push(I[0], I[1]), d.push(r[C], r[C + 1]), v.push(e.getRawIndex(M));
- break;
- case "-":
- S = !1;
- }
- S && (h.push(O), p.push(p.length));
- }
- p.sort(function(ue, ye) {
- return v[ue] - v[ye];
- });
- for (var B = u.length, Q = Al(B), W = Al(B), H = Al(B), U = Al(B), j = [], _ = 0; _ < p.length; _++) {
- var Y = p[_], ne = _ * 2, fe = Y * 2;
- Q[ne] = u[fe], Q[ne + 1] = u[fe + 1], W[ne] = c[fe], W[ne + 1] = c[fe + 1], H[ne] = f[fe], H[ne + 1] = f[fe + 1], U[ne] = d[fe], U[ne + 1] = d[fe + 1], j[_] = h[Y];
- }
- return {
- current: Q,
- next: W,
- stackedOnCurrent: H,
- stackedOnNext: U,
- status: j
- };
- }
- var wc = Math.min, Cc = Math.max;
- function $h(t, e) {
- return isNaN(t) || isNaN(e);
- }
- function iL(t, e, n, r, i, a, o, s, l) {
- for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
- var m = e[v * 2], y = e[v * 2 + 1];
- if (v >= i || v < 0)
- break;
- if ($h(m, y)) {
- if (l) {
- v += a;
- continue;
- }
- break;
- }
- if (v === n)
- t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
- else {
- var _ = m - u, O = y - c;
- if (_ * _ + O * O < 0.5) {
- v += a;
- continue;
- }
- if (o > 0) {
- for (var S = v + a, x = e[S * 2], C = e[S * 2 + 1]; x === m && C === y && g < r; )
- g++, S += a, v += a, x = e[S * 2], C = e[S * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], _ = m - u, O = y - c;
- var P = g + 1;
- if (l)
- for (; $h(x, C) && P < r; )
- P++, S += a, x = e[S * 2], C = e[S * 2 + 1];
- var $ = 0.5, T = 0, E = 0, M = void 0, R = void 0;
- if (P >= r || $h(x, C))
- h = m, p = y;
- else {
- T = x - u, E = C - c;
- var N = m - u, I = x - m, B = y - c, Q = C - y, W = void 0, H = void 0;
- if (s === "x") {
- W = Math.abs(N), H = Math.abs(I);
- var U = T > 0 ? 1 : -1;
- h = m - U * W * o, p = y, M = m + U * H * o, R = y;
- } else if (s === "y") {
- W = Math.abs(B), H = Math.abs(Q);
- var j = E > 0 ? 1 : -1;
- h = m, p = y - j * W * o, M = m, R = y + j * H * o;
- } else
- W = Math.sqrt(N * N + B * B), H = Math.sqrt(I * I + Q * Q), $ = H / (H + W), h = m - T * o * (1 - $), p = y - E * o * (1 - $), M = m + T * o * $, R = y + E * o * $, M = wc(M, Cc(x, m)), R = wc(R, Cc(C, y)), M = Cc(M, wc(x, m)), R = Cc(R, wc(C, y)), T = M - m, E = R - y, h = m - T * W / H, p = y - E * W / H, h = wc(h, Cc(u, m)), p = wc(p, Cc(c, y)), h = Cc(h, wc(u, m)), p = Cc(p, wc(c, y)), T = m - h, E = y - p, M = m + T * H / W, R = y + E * H / W;
- }
- t.bezierCurveTo(f, d, h, p, m, y), f = M, d = R;
- } else
- t.lineTo(m, y);
- }
- u = m, c = y, v += a;
- }
- return g;
- }
- var ufe = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.smooth = 0, this.smoothConstraint = !0;
- }
- return t;
- }()
- ), GJe = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "ec-polyline", r;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new ufe();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.points, a = 0, o = i.length / 2;
- if (r.connectNulls) {
- for (; o > 0 && $h(i[o * 2 - 2], i[o * 2 - 1]); o--)
- ;
- for (; a < o && $h(i[a * 2], i[a * 2 + 1]); a++)
- ;
- }
- for (; a < o; )
- a += iL(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
- }, e.prototype.getPointOn = function(n, r) {
- this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
- for (var i = this.path, a = i.data, o = jl.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
- var d = a[f++], h = void 0, p = void 0, v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0;
- switch (d) {
- case o.M:
- s = a[f++], l = a[f++];
- break;
- case o.L:
- if (h = a[f++], p = a[f++], _ = u ? (n - s) / (h - s) : (n - l) / (p - l), _ <= 1 && _ >= 0) {
- var O = u ? (p - l) * _ + l : (h - s) * _ + s;
- return u ? [n, O] : [O, n];
- }
- s = h, l = p;
- break;
- case o.C:
- h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
- var S = u ? wC(s, h, v, m, n, c) : wC(l, p, g, y, n, c);
- if (S > 0)
- for (var x = 0; x < S; x++) {
- var C = c[x];
- if (C <= 1 && C >= 0) {
- var O = u ? jr(l, p, g, y, C) : jr(s, h, v, m, C);
- return u ? [n, O] : [O, n];
- }
- }
- s = m, l = y;
- break;
- }
- }
- }, e;
- }(Dt)
- ), jJe = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e;
- }(ufe)
- ), cfe = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "ec-polygon", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new jJe();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
- if (r.connectNulls) {
- for (; s > 0 && $h(i[s * 2 - 2], i[s * 2 - 1]); s--)
- ;
- for (; o < s && $h(i[o * 2], i[o * 2 + 1]); o++)
- ;
- }
- for (; o < s; ) {
- var u = iL(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
- iL(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
- }
- }, e;
- }(Dt)
- );
- function ffe(t, e, n, r, i) {
- var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
- o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
- var f = new Zt({
- shape: {
- x: o,
- y: s,
- width: l,
- height: u
- }
- });
- if (e) {
- var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
- h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
- var v = qe(i) ? function(g) {
- i(g, f);
- } : null;
- Vn(f, {
- shape: {
- width: l,
- height: u,
- x: o,
- y: s
- }
- }, n, null, r, v);
- }
- return f;
- }
- function dfe(t, e, n) {
- var r = t.getArea(), i = sr(r.r0, 1), a = sr(r.r, 1), o = new ha({
- shape: {
- cx: sr(t.cx, 1),
- cy: sr(t.cy, 1),
- r0: i,
- r: a,
- startAngle: r.startAngle,
- endAngle: r.endAngle,
- clockwise: r.clockwise
- }
- });
- if (e) {
- var s = t.getBaseAxis().dim === "angle";
- s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Vn(o, {
- shape: {
- endAngle: r.endAngle,
- r: a
- }
- }, n);
- }
- return o;
- }
- function b1(t, e, n, r, i) {
- if (t) {
- if (t.type === "polar")
- return dfe(t, e, n);
- if (t.type === "cartesian2d")
- return ffe(t, e, n, r, i);
- } else return null;
- return null;
- }
- function yp(t, e) {
- return t.type === e;
- }
- function vZ(t, e) {
- if (t.length === e.length) {
- for (var n = 0; n < t.length; n++)
- if (t[n] !== e[n])
- return;
- return !0;
- }
- }
- function gZ(t) {
- for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
- var o = t[a++], s = t[a++];
- isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
- }
- return [[e, n], [r, i]];
- }
- function mZ(t, e) {
- var n = gZ(t), r = n[0], i = n[1], a = gZ(e), o = a[0], s = a[1];
- return Math.max(Math.abs(r[0] - o[0]), Math.abs(r[1] - o[1]), Math.abs(i[0] - s[0]), Math.abs(i[1] - s[1]));
- }
- function yZ(t) {
- return Kt(t) ? t : t ? 0.5 : 0;
- }
- function ZJe(t, e, n) {
- if (!n.valueDim)
- return [];
- for (var r = e.count(), i = Al(r * 2), a = 0; a < r; a++) {
- var o = lfe(n, t, e, a);
- i[a * 2] = o[0], i[a * 2 + 1] = o[1];
- }
- return i;
- }
- function Tc(t, e, n, r) {
- var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
- if (r) {
- for (s = 0; s < t.length; s += 2)
- !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
- t = f;
- }
- for (s = 0; s < t.length - 2; s += 2)
- switch (c[0] = t[s + 2], c[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], o.push(u[0], u[1]), n) {
- case "end":
- l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
- break;
- case "middle":
- var d = (u[a] + c[a]) / 2, h = [];
- l[a] = h[a] = d, l[1 - a] = u[1 - a], h[1 - a] = c[1 - a], o.push(l[0], l[1]), o.push(h[0], h[1]);
- break;
- default:
- l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
- }
- return o.push(t[s++], t[s++]), o;
- }
- function UJe(t, e) {
- var n = [], r = t.length, i, a;
- function o(c, f, d) {
- var h = c.coord, p = (d - h) / (f.coord - h), v = x5(p, [c.color, f.color]);
- return {
- coord: d,
- color: v
- };
- }
- for (var s = 0; s < r; s++) {
- var l = t[s], u = l.coord;
- if (u < 0)
- i = l;
- else if (u > e) {
- a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
- break;
- } else
- i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
- }
- return n;
- }
- function XJe(t, e, n) {
- var r = t.getVisual("visualMeta");
- if (!(!r || !r.length || !t.count())) {
- if (e.type !== "cartesian2d") {
- process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
- return;
- }
- for (var i, a, o = r.length - 1; o >= 0; o--) {
- var s = t.getDimensionInfo(r[o].dimension);
- if (i = s && s.coordDim, i === "x" || i === "y") {
- a = r[o];
- break;
- }
- }
- if (!a) {
- process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
- return;
- }
- var l = e.getAxis(i), u = Ce(a.stops, function(_) {
- return {
- coord: l.toGlobalCoord(l.dataToCoord(_.value)),
- color: _.color
- };
- }), c = u.length, f = a.outerColors.slice();
- c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
- var d = UJe(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
- if (!h && c)
- return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
- var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
- if (m < 1e-3)
- return "transparent";
- F(d, function(_) {
- _.offset = (_.coord - v) / m;
- }), d.push({
- // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
- offset: h ? d[h - 1].offset : 0.5,
- color: f[1] || "transparent"
- }), d.unshift({
- offset: h ? d[0].offset : 0.5,
- color: f[0] || "transparent"
- });
- var y = new _m(0, 0, 0, 0, d, !0);
- return y[i] = v, y[i + "2"] = g, y;
- }
- }
- function YJe(t, e, n) {
- var r = t.get("showAllSymbol"), i = r === "auto";
- if (!(r && !i)) {
- var a = n.getAxesByScale("ordinal")[0];
- if (a && !(i && qJe(a, e))) {
- var o = e.mapDimension(a.dim), s = {};
- return F(a.getViewLabels(), function(l) {
- var u = a.scale.getRawOrdinalNumber(l.tickValue);
- s[u] = 1;
- }), function(l) {
- return !s.hasOwnProperty(e.get(o, l));
- };
- }
- }
- }
- function qJe(t, e) {
- var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
- isNaN(r) && (r = 0);
- for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
- if (m1.getSymbolSize(
- e,
- o
- // Only for cartesian, where `isHorizontal` exists.
- )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
- return !1;
- return !0;
- }
- function KJe(t, e) {
- return isNaN(t) || isNaN(e);
- }
- function JJe(t) {
- for (var e = t.length / 2; e > 0 && KJe(t[e * 2 - 2], t[e * 2 - 1]); e--)
- ;
- return e - 1;
- }
- function bZ(t, e) {
- return [t[e * 2], t[e * 2 + 1]];
- }
- function eet(t, e, n) {
- for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
- if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
- if (u === 0) {
- a = o;
- continue;
- }
- if (a <= e && o >= e || a >= e && o <= e) {
- l = u;
- break;
- }
- s = u, a = o;
- }
- return {
- range: [s, l],
- t: (e - a) / (o - a)
- };
- }
- function hfe(t) {
- if (t.get(["endLabel", "show"]))
- return !0;
- for (var e = 0; e < da.length; e++)
- if (t.get([da[e], "endLabel", "show"]))
- return !0;
- return !1;
- }
- function WM(t, e, n, r) {
- if (yp(e, "cartesian2d")) {
- var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
- lastFrameIndex: 0
- }, l = hfe(r) ? function(h, p) {
- t._endLabelOnDuring(h, p, o, s, a, i, e);
- } : null, u = e.getBaseAxis().isHorizontal(), c = ffe(e, n, r, function() {
- var h = t._endLabel;
- h && n && s.originalX != null && h.attr({
- x: s.originalX,
- y: s.originalY
- });
- }, l);
- if (!r.get("clip", !0)) {
- var f = c.shape, d = Math.max(f.width, f.height);
- u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
- }
- return l && l(1, c), c;
- } else
- return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), dfe(e, n, r);
- }
- function tet(t, e) {
- var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
- return {
- normal: {
- align: t.get("align") || a,
- verticalAlign: t.get("verticalAlign") || o
- }
- };
- }
- var net = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.init = function() {
- var n = new ct(), r = new y1();
- this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
- }, e.prototype.render = function(n, r, i) {
- var a = this, o = n.coordinateSystem, s = this.group, l = n.getData(), u = n.getModel("lineStyle"), c = n.getModel("areaStyle"), f = l.getLayout("points") || [], d = o.type === "polar", h = this._coordSys, p = this._symbolDraw, v = this._polyline, g = this._polygon, m = this._lineGroup, y = !r.ssr && n.get("animation"), _ = !c.isEmpty(), O = c.get("origin"), S = sfe(o, l, O), x = _ && ZJe(o, l, S), C = n.get("showSymbol"), P = n.get("connectNulls"), $ = C && !d && YJe(n, l, o), T = this._data;
- T && T.eachItemGraphicEl(function(ye, se) {
- ye.__temp && (s.remove(ye), T.setItemGraphicEl(se, null));
- }), C || p.remove(), s.add(m);
- var E = d ? !1 : n.get("step"), M;
- o && o.getArea && n.get("clip", !0) && (M = o.getArea(), M.width != null ? (M.x -= 0.1, M.y -= 0.1, M.width += 0.2, M.height += 0.2) : M.r0 && (M.r0 -= 0.5, M.r += 0.5)), this._clipShapeForSymbol = M;
- var R = XJe(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
- if (!(v && h.type === o.type && E === this._step))
- C && p.updateData(l, {
- isIgnore: $,
- clipShape: M,
- disableAnimation: !0,
- getSymbolPoint: function(ye) {
- return [f[ye * 2], f[ye * 2 + 1]];
- }
- }), y && this._initSymbolLabelAnimation(l, o, M), E && (f = Tc(f, o, E, P), x && (x = Tc(x, o, E, P))), v = this._newPolyline(f), _ ? g = this._newPolygon(f, x) : g && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Uh(R)), m.setClipPath(WM(this, o, !0, n));
- else {
- _ && !g ? g = this._newPolygon(f, x) : g && !_ && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Uh(R));
- var N = m.getClipPath();
- if (N) {
- var I = WM(this, o, !1, n);
- Vn(N, {
- shape: I.shape
- }, n);
- } else
- m.setClipPath(WM(this, o, !0, n));
- C && p.updateData(l, {
- isIgnore: $,
- clipShape: M,
- disableAnimation: !0,
- getSymbolPoint: function(ye) {
- return [f[ye * 2], f[ye * 2 + 1]];
- }
- }), (!vZ(this._stackedOnPoints, x) || !vZ(this._points, f)) && (y ? this._doUpdateAnimation(l, x, o, i, E, O, P) : (E && (f = Tc(f, o, E, P), x && (x = Tc(x, o, E, P))), v.setShape({
- points: f
- }), g && g.setShape({
- points: f,
- stackedOnPoints: x
- })));
- }
- var B = n.getModel("emphasis"), Q = B.get("focus"), W = B.get("blurScope"), H = B.get("disabled");
- if (v.useStyle(it(
- // Use color in lineStyle first
- u.getLineStyle(),
- {
- fill: "none",
- stroke: R,
- lineJoin: "bevel"
- }
- )), Ai(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
- var U = v.getState("emphasis").style;
- U.lineWidth = +v.style.lineWidth + 1;
- }
- ft(v).seriesIndex = n.seriesIndex, ur(v, Q, W, H);
- var j = yZ(n.get("smooth")), Y = n.get("smoothMonotone");
- if (v.setShape({
- smooth: j,
- smoothMonotone: Y,
- connectNulls: P
- }), g) {
- var ne = l.getCalculationInfo("stackedOnSeries"), fe = 0;
- g.useStyle(it(c.getAreaStyle(), {
- fill: R,
- opacity: 0.7,
- lineJoin: "bevel",
- decal: l.getVisual("style").decal
- })), ne && (fe = yZ(ne.get("smooth"))), g.setShape({
- smooth: j,
- stackedOnSmooth: fe,
- smoothMonotone: Y,
- connectNulls: P
- }), Ai(g, n, "areaStyle"), ft(g).seriesIndex = n.seriesIndex, ur(g, Q, W, H);
- }
- var ue = function(ye) {
- a._changePolyState(ye);
- };
- l.eachItemGraphicEl(function(ye) {
- ye && (ye.onHoverStateChange = ue);
- }), this._polyline.onHoverStateChange = ue, this._data = l, this._coordSys = o, this._stackedOnPoints = x, this._points = f, this._step = E, this._valueOrigin = O, n.get("triggerLineEvent") && (this.packEventData(n, v), g && this.packEventData(n, g));
- }, e.prototype.packEventData = function(n, r) {
- ft(r).eventData = {
- componentType: "series",
- componentSubType: "line",
- componentIndex: n.componentIndex,
- seriesIndex: n.seriesIndex,
- seriesName: n.name,
- seriesType: "line"
- };
- }, e.prototype.highlight = function(n, r, i, a) {
- var o = n.getData(), s = Gh(o, a);
- if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
- var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
- if (!u) {
- var c = l[s * 2], f = l[s * 2 + 1];
- if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
- return;
- var d = n.get("zlevel") || 0, h = n.get("z") || 0;
- u = new m1(o, s), u.x = c, u.y = f, u.setZ(d, h);
- var p = u.getSymbolPath().getTextContent();
- p && (p.zlevel = d, p.z = h, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
- }
- u.highlight();
- } else
- _n.prototype.highlight.call(this, n, r, i, a);
- }, e.prototype.downplay = function(n, r, i, a) {
- var o = n.getData(), s = Gh(o, a);
- if (this._changePolyState("normal"), s != null && s >= 0) {
- var l = o.getItemGraphicEl(s);
- l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
- } else
- _n.prototype.downplay.call(this, n, r, i, a);
- }, e.prototype._changePolyState = function(n) {
- var r = this._polygon;
- IC(this._polyline, n), r && IC(r, n);
- }, e.prototype._newPolyline = function(n) {
- var r = this._polyline;
- return r && this._lineGroup.remove(r), r = new GJe({
- shape: {
- points: n
- },
- segmentIgnoreThreshold: 2,
- z2: 10
- }), this._lineGroup.add(r), this._polyline = r, r;
- }, e.prototype._newPolygon = function(n, r) {
- var i = this._polygon;
- return i && this._lineGroup.remove(i), i = new cfe({
- shape: {
- points: n,
- stackedOnPoints: r
- },
- segmentIgnoreThreshold: 2
- }), this._lineGroup.add(i), this._polygon = i, i;
- }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
- var a, o, s = r.getBaseAxis(), l = s.inverse;
- r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
- var u = n.hostModel, c = u.get("animationDuration");
- qe(c) && (c = c(null));
- var f = u.get("animationDelay") || 0, d = qe(f) ? f(null) : f;
- n.eachItemGraphicEl(function(h, p) {
- var v = h;
- if (v) {
- var g = [h.x, h.y], m = void 0, y = void 0, _ = void 0;
- if (i)
- if (o) {
- var O = i, S = r.pointToCoord(g);
- a ? (m = O.startAngle, y = O.endAngle, _ = -S[1] / 180 * Math.PI) : (m = O.r0, y = O.r, _ = S[0]);
- } else {
- var x = i;
- a ? (m = x.x, y = x.x + x.width, _ = h.x) : (m = x.y + x.height, y = x.y, _ = h.y);
- }
- var C = y === m ? 0 : (_ - m) / (y - m);
- l && (C = 1 - C);
- var P = qe(f) ? f(p) : c * C + d, $ = v.getSymbolPath(), T = $.getTextContent();
- v.attr({
- scaleX: 0,
- scaleY: 0
- }), v.animateTo({
- scaleX: 1,
- scaleY: 1
- }, {
- duration: 200,
- setToFinal: !0,
- delay: P
- }), T && T.animateFrom({
- style: {
- opacity: 0
- }
- }, {
- duration: 300,
- delay: P
- }), $.disableLabelAnimation = !0;
- }
- });
- }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
- var a = n.getModel("endLabel");
- if (hfe(n)) {
- var o = n.getData(), s = this._polyline, l = o.getLayout("points");
- if (!l) {
- s.removeTextContent(), this._endLabel = null;
- return;
- }
- var u = this._endLabel;
- u || (u = this._endLabel = new jt({
- z2: 200
- // should be higher than item symbol
- }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
- var c = JJe(l);
- c >= 0 && (Ei(s, ei(n, "endLabel"), {
- inheritColor: i,
- labelFetcher: n,
- labelDataIndex: c,
- defaultText: function(f, d, h) {
- return h != null ? ofe(o, h) : jg(o, f);
- },
- enableTextSetter: !0
- }, tet(a, r)), s.textConfig.position = null);
- } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
- }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
- var u = this._endLabel, c = this._polyline;
- if (u) {
- n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
- var f = i.getLayout("points"), d = i.hostModel, h = d.get("connectNulls"), p = s.get("precision"), v = s.get("distance") || 0, g = l.getBaseAxis(), m = g.isHorizontal(), y = g.inverse, _ = r.shape, O = y ? m ? _.x : _.y + _.height : m ? _.x + _.width : _.y, S = (m ? v : 0) * (y ? -1 : 1), x = (m ? 0 : -v) * (y ? -1 : 1), C = m ? "x" : "y", P = eet(f, O, C), $ = P.range, T = $[1] - $[0], E = void 0;
- if (T >= 1) {
- if (T > 1 && !h) {
- var M = bZ(f, $[0]);
- u.attr({
- x: M[0] + S,
- y: M[1] + x
- }), o && (E = d.getRawValue($[0]));
- } else {
- var M = c.getPointOn(O, C);
- M && u.attr({
- x: M[0] + S,
- y: M[1] + x
- });
- var R = d.getRawValue($[0]), N = d.getRawValue($[1]);
- o && (E = Vse(i, p, R, N, P.t));
- }
- a.lastFrameIndex = $[0];
- } else {
- var I = n === 1 || a.lastFrameIndex > 0 ? $[0] : 0, M = bZ(f, I);
- o && (E = d.getRawValue(I)), u.attr({
- x: M[0] + S,
- y: M[1] + x
- });
- }
- if (o) {
- var B = wm(u);
- typeof B.setLabelText == "function" && B.setLabelText(E);
- }
- }
- }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
- var u = this._polyline, c = this._polygon, f = n.hostModel, d = HJe(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
- if (o && (h = Tc(d.current, i, o, l), p = Tc(d.stackedOnCurrent, i, o, l), v = Tc(d.next, i, o, l), g = Tc(d.stackedOnNext, i, o, l)), mZ(h, v) > 3e3 || c && mZ(p, g) > 3e3) {
- u.stopAnimation(), u.setShape({
- points: v
- }), c && (c.stopAnimation(), c.setShape({
- points: v,
- stackedOnPoints: g
- }));
- return;
- }
- u.shape.__points = d.current, u.shape.points = h;
- var m = {
- shape: {
- points: v
- }
- };
- d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), tn(u, m, f), c && (c.setShape({
- // Reuse the points with polyline.
- points: h,
- stackedOnPoints: p
- }), c.stopAnimation(), tn(c, {
- shape: {
- stackedOnPoints: g
- }
- }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
- for (var y = [], _ = d.status, O = 0; O < _.length; O++) {
- var S = _[O].cmd;
- if (S === "=") {
- var x = n.getItemGraphicEl(_[O].idx1);
- x && y.push({
- el: x,
- ptIdx: O
- // Index of points
- });
- }
- }
- u.animators && u.animators.length && u.animators[0].during(function() {
- c && c.dirtyShape();
- for (var C = u.shape.__points, P = 0; P < y.length; P++) {
- var $ = y[P].el, T = y[P].ptIdx * 2;
- $.x = C[T], $.y = C[T + 1], $.markRedraw();
- }
- });
- }, e.prototype.remove = function(n) {
- var r = this.group, i = this._data;
- this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
- a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
- }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
- }, e.type = "line", e;
- }(_n)
- );
- function _1(t, e) {
- return {
- seriesType: t,
- plan: $m(),
- reset: function(n) {
- var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
- if (i) {
- var s = Ce(i.dimensions, function(h) {
- return r.mapDimension(h);
- }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
- Hu(r, s[0]) && (s[0] = u), Hu(r, s[1]) && (s[1] = u);
- var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
- return l && {
- progress: function(h, p) {
- for (var v = h.end - h.start, g = o && Al(v * l), m = [], y = [], _ = h.start, O = 0; _ < h.end; _++) {
- var S = void 0;
- if (l === 1) {
- var x = c.get(f, _);
- S = i.dataToPoint(x, null, y);
- } else
- m[0] = c.get(f, _), m[1] = c.get(d, _), S = i.dataToPoint(m, null, y);
- o ? (g[O++] = S[0], g[O++] = S[1]) : p.setItemLayout(_, S.slice());
- }
- o && p.setLayout("points", g);
- }
- };
- }
- }
- };
- }
- var ret = {
- average: function(t) {
- for (var e = 0, n = 0, r = 0; r < t.length; r++)
- isNaN(t[r]) || (e += t[r], n++);
- return n === 0 ? NaN : e / n;
- },
- sum: function(t) {
- for (var e = 0, n = 0; n < t.length; n++)
- e += t[n] || 0;
- return e;
- },
- max: function(t) {
- for (var e = -1 / 0, n = 0; n < t.length; n++)
- t[n] > e && (e = t[n]);
- return isFinite(e) ? e : NaN;
- },
- min: function(t) {
- for (var e = 1 / 0, n = 0; n < t.length; n++)
- t[n] < e && (e = t[n]);
- return isFinite(e) ? e : NaN;
- },
- minmax: function(t) {
- for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
- var i = t[r], a = Math.abs(i);
- a > e && (e = a, n = i);
- }
- return isFinite(n) ? n : NaN;
- },
- // TODO
- // Median
- nearest: function(t) {
- return t[0];
- }
- }, iet = function(t) {
- return Math.round(t.length / 2);
- };
- function pfe(t) {
- return {
- seriesType: t,
- // FIXME:TS never used, so comment it
- // modifyOutputEnd: true,
- reset: function(e, n, r) {
- var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
- if (s > 10 && o.type === "cartesian2d" && a) {
- var l = o.getBaseAxis(), u = o.getOtherAxis(l), c = l.getExtent(), f = r.getDevicePixelRatio(), d = Math.abs(c[1] - c[0]) * (f || 1), h = Math.round(s / d);
- if (isFinite(h) && h > 1) {
- a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
- var p = void 0;
- Ve(a) ? p = ret[a] : qe(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, iet));
- }
- }
- }
- };
- }
- function aet(t) {
- t.registerChartView(net), t.registerSeriesModel(VJe), t.registerLayout(_1("line", !0)), t.registerVisual({
- seriesType: "line",
- reset: function(e) {
- var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
- r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
- }
- }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, pfe("line"));
- }
- var a_ = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Yl(null, this, {
- useEncodeDefaulter: !0
- });
- }, e.prototype.getMarkerPosition = function(n, r, i) {
- var a = this.coordinateSystem;
- if (a && a.clampData) {
- var o = a.clampData(n), s = a.dataToPoint(o);
- if (i)
- F(a.getAxes(), function(d, h) {
- if (d.type === "category" && r != null) {
- var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
- if (m && !v && (g += 1), p.length < 2)
- return;
- if (p.length === 2) {
- s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
- return;
- }
- for (var y = void 0, _ = void 0, O = 1, S = 0; S < p.length; S++) {
- var x = p[S].coord, C = S === p.length - 1 ? p[S - 1].tickValue + O : p[S].tickValue;
- if (C === g) {
- _ = x;
- break;
- } else if (C < g)
- y = x;
- else if (y != null && C > g) {
- _ = (x + y) / 2;
- break;
- }
- S === 1 && (O = C - p[0].tickValue);
- }
- _ == null && (y ? y && (_ = p[p.length - 1].coord) : _ = p[0].coord), s[h] = d.toGlobalCoord(_);
- }
- });
- else {
- var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
- s[f] += u + c / 2;
- }
- return s;
- }
- return [NaN, NaN];
- }, e.type = "series.__base_bar__", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- // stack: null
- // Cartesian coordinate system
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- barMinHeight: 0,
- barMinAngle: 0,
- // cursor: null,
- large: !1,
- largeThreshold: 400,
- progressive: 3e3,
- progressiveChunkMode: "mod"
- }, e;
- }(Tn)
- );
- Tn.registerClass(a_);
- var oet = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.getInitialData = function() {
- return Yl(null, this, {
- useEncodeDefaulter: !0,
- createInvertedIndices: !!this.get("realtimeSort", !0) || null
- });
- }, e.prototype.getProgressive = function() {
- return this.get("large") ? this.get("progressive") : !1;
- }, e.prototype.getProgressiveThreshold = function() {
- var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
- return r > n && (n = r), n;
- }, e.prototype.brushSelector = function(n, r, i) {
- return i.rect(r.getItemLayout(n));
- }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Bf(a_.defaultOption, {
- // If clipped
- // Only available on cartesian2d
- clip: !0,
- roundCap: !1,
- showBackground: !1,
- backgroundStyle: {
- color: "rgba(180, 180, 180, 0.2)",
- borderColor: null,
- borderWidth: 0,
- borderType: "solid",
- borderRadius: 0,
- shadowBlur: 0,
- shadowColor: null,
- shadowOffsetX: 0,
- shadowOffsetY: 0,
- opacity: 1
- },
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- },
- realtimeSort: !1
- }), e;
- }(a_)
- ), set = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
- }
- return t;
- }()
- ), tT = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "sausage", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new set();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.cx, a = r.cy, o = Math.max(r.r0 || 0, 0), s = Math.max(r.r, 0), l = (s - o) * 0.5, u = o + l, c = r.startAngle, f = r.endAngle, d = r.clockwise, h = Math.PI * 2, p = d ? f - c < h : c - f < h;
- p || (c = f - (d ? h : -h));
- var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
- p ? (n.moveTo(v * o + i, g * o + a), n.arc(v * u + i, g * u + a, l, -Math.PI + c, c, !d)) : n.moveTo(v * s + i, g * s + a), n.arc(i, a, s, c, f, !d), n.arc(m * u + i, y * u + a, l, f - Math.PI * 2, f - Math.PI, !d), o !== 0 && n.arc(i, a, o, f, c, d);
- }, e;
- }(Dt)
- );
- function uet(t, e) {
- e = e || {};
- var n = e.isRoundCap;
- return function(r, i, a) {
- var o = i.position;
- if (!o || o instanceof Array)
- return AC(r, i, a);
- var s = t(o), l = i.distance != null ? i.distance : 5, u = this.shape, c = u.cx, f = u.cy, d = u.r, h = u.r0, p = (d + h) / 2, v = u.startAngle, g = u.endAngle, m = (v + g) / 2, y = n ? Math.abs(d - h) / 2 : 0, _ = Math.cos, O = Math.sin, S = c + d * _(v), x = f + d * O(v), C = "left", P = "top";
- switch (s) {
- case "startArc":
- S = c + (h - l) * _(m), x = f + (h - l) * O(m), C = "center", P = "top";
- break;
- case "insideStartArc":
- S = c + (h + l) * _(m), x = f + (h + l) * O(m), C = "center", P = "bottom";
- break;
- case "startAngle":
- S = c + p * _(v) + NS(v, l + y, !1), x = f + p * O(v) + BS(v, l + y, !1), C = "right", P = "middle";
- break;
- case "insideStartAngle":
- S = c + p * _(v) + NS(v, -l + y, !1), x = f + p * O(v) + BS(v, -l + y, !1), C = "left", P = "middle";
- break;
- case "middle":
- S = c + p * _(m), x = f + p * O(m), C = "center", P = "middle";
- break;
- case "endArc":
- S = c + (d + l) * _(m), x = f + (d + l) * O(m), C = "center", P = "bottom";
- break;
- case "insideEndArc":
- S = c + (d - l) * _(m), x = f + (d - l) * O(m), C = "center", P = "top";
- break;
- case "endAngle":
- S = c + p * _(g) + NS(g, l + y, !0), x = f + p * O(g) + BS(g, l + y, !0), C = "left", P = "middle";
- break;
- case "insideEndAngle":
- S = c + p * _(g) + NS(g, -l + y, !0), x = f + p * O(g) + BS(g, -l + y, !0), C = "right", P = "middle";
- break;
- default:
- return AC(r, i, a);
- }
- return r = r || {}, r.x = S, r.y = x, r.align = C, r.verticalAlign = P, r;
- };
- }
- function cet(t, e, n, r) {
- if (Kt(r)) {
- t.setTextConfig({
- rotation: r
- });
- return;
- } else if (Se(e)) {
- t.setTextConfig({
- rotation: 0
- });
- return;
- }
- var i = t.shape, a = i.clockwise ? i.startAngle : i.endAngle, o = i.clockwise ? i.endAngle : i.startAngle, s = (a + o) / 2, l, u = n(e);
- switch (u) {
- case "startArc":
- case "insideStartArc":
- case "middle":
- case "insideEndArc":
- case "endArc":
- l = s;
- break;
- case "startAngle":
- case "insideStartAngle":
- l = a;
- break;
- case "endAngle":
- case "insideEndAngle":
- l = o;
- break;
- default:
- t.setTextConfig({
- rotation: 0
- });
- return;
- }
- var c = Math.PI * 1.5 - l;
- u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
- rotation: c
- });
- }
- function NS(t, e, n) {
- return e * Math.sin(t) * (n ? -1 : 1);
- }
- function BS(t, e, n) {
- return e * Math.cos(t) * (n ? 1 : -1);
- }
- function ch(t, e, n) {
- var r = t.get("borderRadius");
- if (r == null)
- return n ? {
- cornerRadius: 0
- } : null;
- Se(r) || (r = [r, r, r, r]);
- var i = Math.abs(e.r || 0 - e.r0 || 0);
- return {
- cornerRadius: Ce(r, function(a) {
- return js(a, i);
- })
- };
- }
- var QM = Math.max, HM = Math.min;
- function fet(t, e) {
- var n = t.getArea && t.getArea();
- if (yp(t, "cartesian2d")) {
- var r = t.getBaseAxis();
- if (r.type !== "category" || !r.onBand) {
- var i = e.getLayout("bandWidth");
- r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
- }
- }
- return n;
- }
- var det = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t.call(this) || this;
- return n.type = e.type, n._isFirstFrame = !0, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
- var o = n.get("coordinateSystem");
- o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(n, r, i) : this._renderNormal(n, r, i, a)) : process.env.NODE_ENV !== "production" && nr("Only cartesian2d and polar supported for bar.");
- }, e.prototype.incrementalPrepareRender = function(n) {
- this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
- }, e.prototype.incrementalRender = function(n, r) {
- this._progressiveEls = [], this._incrementalRenderLarge(n, r);
- }, e.prototype.eachRendered = function(n) {
- Nf(this._progressiveEls || this.group, n);
- }, e.prototype._updateDrawMode = function(n) {
- var r = n.pipelineContext.large;
- (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
- }, e.prototype._renderNormal = function(n, r, i, a) {
- var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
- u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
- var d = n.isAnimationEnabled() ? n : null, h = het(n, u);
- h && this._enableRealtimeSort(h, s, i);
- var p = n.get("clip", !0) || h, v = fet(u, s);
- o.removeClipPath();
- var g = n.get("roundCap", !0), m = n.get("showBackground", !0), y = n.getModel("backgroundStyle"), _ = y.get("borderRadius") || 0, O = [], S = this._backgroundEls, x = a && a.isInitSort, C = a && a.type === "changeAxisOrder";
- function P(E) {
- var M = zS[u.type](s, E), R = _et(u, f, M);
- return R.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? R.setShape("r", _) : R.setShape("cornerRadius", _), O[E] = R, R;
- }
- s.diff(l).add(function(E) {
- var M = s.getItemModel(E), R = zS[u.type](s, E, M);
- if (m && P(E), !(!s.hasValue(E) || !wZ[u.type](R))) {
- var N = !1;
- p && (N = _Z[u.type](v, R));
- var I = OZ[u.type](n, s, E, R, f, d, c.model, !1, g);
- h && (I.forceLabelAnimation = !0), CZ(I, s, E, M, R, n, f, u.type === "polar"), x ? I.attr({
- shape: R
- }) : h ? SZ(h, d, I, R, E, f, !1, !1) : Vn(I, {
- shape: R
- }, n, E), s.setItemGraphicEl(E, I), o.add(I), I.ignore = N;
- }
- }).update(function(E, M) {
- var R = s.getItemModel(E), N = zS[u.type](s, E, R);
- if (m) {
- var I = void 0;
- S.length === 0 ? I = P(M) : (I = S[M], I.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? I.setShape("r", _) : I.setShape("cornerRadius", _), O[E] = I);
- var B = zS[u.type](s, E), Q = gfe(f, B, u);
- tn(I, {
- shape: Q
- }, d, E);
- }
- var W = l.getItemGraphicEl(M);
- if (!s.hasValue(E) || !wZ[u.type](N)) {
- o.remove(W);
- return;
- }
- var H = !1;
- if (p && (H = _Z[u.type](v, N), H && o.remove(W)), W ? Zs(W) : W = OZ[u.type](n, s, E, N, f, d, c.model, !!W, g), h && (W.forceLabelAnimation = !0), C) {
- var U = W.getTextContent();
- if (U) {
- var j = wm(U);
- j.prevValue != null && (j.prevValue = j.value);
- }
- } else
- CZ(W, s, E, R, N, n, f, u.type === "polar");
- x ? W.attr({
- shape: N
- }) : h ? SZ(h, d, W, N, E, f, !0, C) : tn(W, {
- shape: N
- }, n, E, null), s.setItemGraphicEl(E, W), W.ignore = H, o.add(W);
- }).remove(function(E) {
- var M = l.getItemGraphicEl(E);
- M && Xb(M, n, E);
- }).execute();
- var $ = this._backgroundGroup || (this._backgroundGroup = new ct());
- $.removeAll();
- for (var T = 0; T < O.length; ++T)
- $.add(O[T]);
- o.add($), this._backgroundEls = O, this._data = s;
- }, e.prototype._renderLarge = function(n, r, i) {
- this._clear(), PZ(n, this.group), this._updateLargeClip(n);
- }, e.prototype._incrementalRenderLarge = function(n, r) {
- this._removeBackground(), PZ(r, this.group, this._progressiveEls, !0);
- }, e.prototype._updateLargeClip = function(n) {
- var r = n.get("clip", !0) && b1(n.coordinateSystem, !1, n), i = this.group;
- r ? i.setClipPath(r) : i.removeClipPath();
- }, e.prototype._enableRealtimeSort = function(n, r, i) {
- var a = this;
- if (r.count()) {
- var o = n.baseAxis;
- if (this._isFirstFrame)
- this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
- else {
- var s = function(l) {
- var u = r.getItemGraphicEl(l), c = u && u.shape;
- return c && // The result should be consistent with the initial sort by data value.
- // Do not support the case that both positive and negative exist.
- Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
- };
- this._onRendered = function() {
- a._updateSortWithinSameData(r, s, o, i);
- }, i.getZr().on("rendered", this._onRendered);
- }
- }
- }, e.prototype._dataSort = function(n, r, i) {
- var a = [];
- return n.each(n.mapDimension(r.dim), function(o, s) {
- var l = i(s);
- l = l ?? NaN, a.push({
- dataIndex: s,
- mappedValue: l,
- ordinalNumber: o
- });
- }), a.sort(function(o, s) {
- return s.mappedValue - o.mappedValue;
- }), {
- ordinalNumbers: Ce(a, function(o) {
- return o.ordinalNumber;
- })
- };
- }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
- for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
- var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
- if (f > s)
- return !0;
- s = f;
- }
- return !1;
- }, e.prototype._isOrderDifferentInView = function(n, r) {
- for (var i = r.scale, a = i.getExtent(), o = Math.max(0, a[0]), s = Math.min(a[1], i.getOrdinalMeta().categories.length - 1); o <= s; ++o)
- if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
- return !0;
- }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
- if (this._isOrderChangedWithinSameData(n, r, i)) {
- var o = this._dataSort(n, i, r);
- this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
- type: "changeAxisOrder",
- componentType: i.dim + "Axis",
- axisId: i.index,
- sortInfo: o
- }));
- }
- }, e.prototype._dispatchInitSort = function(n, r, i) {
- var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
- return n.get(n.mapDimension(r.otherAxis.dim), s);
- });
- i.dispatchAction({
- type: "changeAxisOrder",
- componentType: a.dim + "Axis",
- isInitSort: !0,
- axisId: a.index,
- sortInfo: o
- });
- }, e.prototype.remove = function(n, r) {
- this._clear(this._model), this._removeOnRenderedListener(r);
- }, e.prototype.dispose = function(n, r) {
- this._removeOnRenderedListener(r);
- }, e.prototype._removeOnRenderedListener = function(n) {
- this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
- }, e.prototype._clear = function(n) {
- var r = this.group, i = this._data;
- n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
- Xb(a, n, ft(a).dataIndex);
- })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
- }, e.prototype._removeBackground = function() {
- this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
- }, e.type = "bar", e;
- }(_n)
- ), _Z = {
- cartesian2d: function(t, e) {
- var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
- n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
- var i = t.x + t.width, a = t.y + t.height, o = QM(e.x, t.x), s = HM(e.x + e.width, i), l = QM(e.y, t.y), u = HM(e.y + e.height, a), c = s < o, f = u < l;
- return e.x = c && o > i ? s : o, e.y = f && l > a ? u : l, e.width = c ? 0 : s - o, e.height = f ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height), c || f;
- },
- polar: function(t, e) {
- var n = e.r0 <= e.r ? 1 : -1;
- if (n < 0) {
- var r = e.r;
- e.r = e.r0, e.r0 = r;
- }
- var i = HM(e.r, t.r), a = QM(e.r0, t.r0);
- e.r = i, e.r0 = a;
- var o = i - a < 0;
- if (n < 0) {
- var r = e.r;
- e.r = e.r0, e.r0 = r;
- }
- return o;
- }
- }, OZ = {
- cartesian2d: function(t, e, n, r, i, a, o, s, l) {
- var u = new Zt({
- shape: _e({}, r),
- z2: 1
- });
- if (u.__dataIndex = n, u.name = "item", a) {
- var c = u.shape, f = i ? "height" : "width";
- c[f] = 0;
- }
- return u;
- },
- polar: function(t, e, n, r, i, a, o, s, l) {
- var u = !i && l ? tT : ha, c = new u({
- shape: r,
- z2: 1
- });
- c.name = "item";
- var f = vfe(i);
- if (c.calculateTextPosition = uet(f, {
- isRoundCap: u === tT
- }), a) {
- var d = c.shape, h = i ? "r" : "endAngle", p = {};
- d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? tn : Vn)(c, {
- shape: p
- // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
- }, a);
- }
- return c;
- }
- };
- function het(t, e) {
- var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
- if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && nr("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && nr("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && e.type === "cartesian2d")
- return {
- baseAxis: r,
- otherAxis: e.getOtherAxis(r)
- };
- }
- function SZ(t, e, n, r, i, a, o, s) {
- var l, u;
- a ? (u = {
- x: r.x,
- width: r.width
- }, l = {
- y: r.y,
- height: r.height
- }) : (u = {
- y: r.y,
- height: r.height
- }, l = {
- x: r.x,
- width: r.width
- }), s || (o ? tn : Vn)(n, {
- shape: l
- }, e, i, null);
- var c = e ? t.baseAxis.model : null;
- (o ? tn : Vn)(n, {
- shape: u
- }, c, i);
- }
- function xZ(t, e) {
- for (var n = 0; n < e.length; n++)
- if (!isFinite(t[e[n]]))
- return !0;
- return !1;
- }
- var pet = ["x", "y", "width", "height"], vet = ["cx", "cy", "r", "startAngle", "endAngle"], wZ = {
- cartesian2d: function(t) {
- return !xZ(t, pet);
- },
- polar: function(t) {
- return !xZ(t, vet);
- }
- }, zS = {
- // itemModel is only used to get borderWidth, which is not needed
- // when calculating bar background layout.
- cartesian2d: function(t, e, n) {
- var r = t.getItemLayout(e), i = n ? met(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
- return {
- x: r.x + a * i / 2,
- y: r.y + o * i / 2,
- width: r.width - a * i,
- height: r.height - o * i
- };
- },
- polar: function(t, e, n) {
- var r = t.getItemLayout(e);
- return {
- cx: r.cx,
- cy: r.cy,
- r0: r.r0,
- r: r.r,
- startAngle: r.startAngle,
- endAngle: r.endAngle,
- clockwise: r.clockwise
- };
- }
- };
- function get(t) {
- return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
- }
- function vfe(t) {
- return /* @__PURE__ */ function(e) {
- var n = e ? "Arc" : "Angle";
- return function(r) {
- switch (r) {
- case "start":
- case "insideStart":
- case "end":
- case "insideEnd":
- return r + n;
- default:
- return r;
- }
- };
- }(t);
- }
- function CZ(t, e, n, r, i, a, o, s) {
- var l = e.getItemVisual(n, "style");
- if (s) {
- if (!a.get("roundCap")) {
- var c = t.shape, f = ch(r.getModel("itemStyle"), c, !0);
- _e(c, f), t.setShape(c);
- }
- } else {
- var u = r.get(["itemStyle", "borderRadius"]) || 0;
- t.setShape("r", u);
- }
- t.useStyle(l);
- var d = r.getShallow("cursor");
- d && t.attr("cursor", d);
- var h = s ? o ? i.r >= i.r0 ? "endArc" : "startArc" : i.endAngle >= i.startAngle ? "endAngle" : "startAngle" : o ? i.height >= 0 ? "bottom" : "top" : i.width >= 0 ? "right" : "left", p = ei(r);
- Ei(t, p, {
- labelFetcher: a,
- labelDataIndex: n,
- defaultText: jg(a.getData(), n),
- inheritColor: l.fill,
- defaultOpacity: l.opacity,
- defaultOutsidePosition: h
- });
- var v = t.getTextContent();
- if (s && v) {
- var g = r.get(["label", "position"]);
- t.textConfig.inside = g === "middle" ? !0 : null, cet(t, g === "outside" ? h : g, vfe(o), r.get(["label", "rotate"]));
- }
- Lle(v, p, a.getRawValue(n), function(y) {
- return ofe(e, y);
- });
- var m = r.getModel(["emphasis"]);
- ur(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Ai(t, r), get(i) && (t.style.fill = "none", t.style.stroke = "none", F(t.states, function(y) {
- y.style && (y.style.fill = y.style.stroke = "none");
- }));
- }
- function met(t, e) {
- var n = t.get(["itemStyle", "borderColor"]);
- if (!n || n === "none")
- return 0;
- var r = t.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), a = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
- return Math.min(r, i, a);
- }
- var yet = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), TZ = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "largeBar", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new yet();
- }, e.prototype.buildPath = function(n, r) {
- for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
- l[a] = u, l[o] = i[c + 2], s[a] = i[c + a], s[o] = i[c + o], n.rect(s[0], s[1], l[0], l[1]);
- }, e;
- }(Dt)
- );
- function PZ(t, e, n, r) {
- var i = t.getData(), a = i.getLayout("valueAxisHorizontal") ? 1 : 0, o = i.getLayout("largeDataIndices"), s = i.getLayout("size"), l = t.getModel("backgroundStyle"), u = i.getLayout("largeBackgroundPoints");
- if (u) {
- var c = new TZ({
- shape: {
- points: u
- },
- incremental: !!r,
- silent: !0,
- z2: 0
- });
- c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
- }
- var f = new TZ({
- shape: {
- points: i.getLayout("largePoints")
- },
- incremental: !!r,
- ignoreCoarsePointer: !0,
- z2: 1
- });
- f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), ft(f).seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", $Z), f.on("mousemove", $Z)), n && n.push(f);
- }
- var $Z = kP(function(t) {
- var e = this, n = bet(e, t.offsetX, t.offsetY);
- ft(e).dataIndex = n >= 0 ? n : null;
- }, 30, !1);
- function bet(t, e, n) {
- for (var r = t.baseDimIdx, i = 1 - r, a = t.shape.points, o = t.largeDataIndices, s = [], l = [], u = t.barWidth, c = 0, f = a.length / 3; c < f; c++) {
- var d = c * 3;
- if (l[r] = u, l[i] = a[d + 2], s[r] = a[d + r], s[i] = a[d + i], l[i] < 0 && (s[i] += l[i], l[i] = -l[i]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1])
- return o[c];
- }
- return -1;
- }
- function gfe(t, e, n) {
- if (yp(n, "cartesian2d")) {
- var r = e, i = n.getArea();
- return {
- x: t ? r.x : i.x,
- y: t ? i.y : r.y,
- width: t ? r.width : i.width,
- height: t ? i.height : r.height
- };
- } else {
- var i = n.getArea(), a = e;
- return {
- cx: i.cx,
- cy: i.cy,
- r0: t ? i.r0 : a.r0,
- r: t ? i.r : a.r,
- startAngle: t ? a.startAngle : 0,
- endAngle: t ? a.endAngle : Math.PI * 2
- };
- }
- }
- function _et(t, e, n) {
- var r = t.type === "polar" ? ha : Zt;
- return new r({
- shape: gfe(e, n, t),
- silent: !0,
- z2: 0
- });
- }
- function Oet(t) {
- t.registerChartView(det), t.registerSeriesModel(oet), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, vt(Oce, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Sce("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, pfe("bar")), t.registerAction({
- type: "changeAxisOrder",
- event: "changeAxisOrder",
- update: "update"
- }, function(e, n) {
- var r = e.componentType || "series";
- n.eachComponent({
- mainType: r,
- query: e
- }, function(i) {
- e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
- });
- });
- }
- var AZ = Math.PI * 2, VS = Math.PI / 180;
- function mfe(t, e) {
- return Mr(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- });
- }
- function yfe(t, e) {
- var n = mfe(t, e), r = t.get("center"), i = t.get("radius");
- Se(i) || (i = [0, i]);
- var a = ze(n.width, e.getWidth()), o = ze(n.height, e.getHeight()), s = Math.min(a, o), l = ze(i[0], s / 2), u = ze(i[1], s / 2), c, f, d = t.coordinateSystem;
- if (d) {
- var h = d.dataToPoint(r);
- c = h[0] || 0, f = h[1] || 0;
- } else
- Se(r) || (r = [r, r]), c = ze(r[0], a) + n.x, f = ze(r[1], o) + n.y;
- return {
- cx: c,
- cy: f,
- r0: l,
- r: u
- };
- }
- function xet(t, e, n) {
- e.eachSeriesByType(t, function(r) {
- var i = r.getData(), a = i.mapDimension("value"), o = mfe(r, n), s = yfe(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * VS, h = r.get("endAngle"), p = r.get("padAngle") * VS;
- h = h === "auto" ? d - AZ : -h * VS;
- var v = r.get("minAngle") * VS, g = v + p, m = 0;
- i.each(a, function(Q) {
- !isNaN(Q) && m++;
- });
- var y = i.getSum(a), _ = Math.PI / (y || m) * 2, O = r.get("clockwise"), S = r.get("roseType"), x = r.get("stillShowZeroSum"), C = i.getDataExtent(a);
- C[0] = 0;
- var P = O ? 1 : -1, $ = [d, h], T = P * p / 2;
- D5($, !O), d = $[0], h = $[1];
- var E = bfe(r);
- E.startAngle = d, E.endAngle = h, E.clockwise = O;
- var M = Math.abs(h - d), R = M, N = 0, I = d;
- if (i.setLayout({
- viewRect: o,
- r: c
- }), i.each(a, function(Q, W) {
- var H;
- if (isNaN(Q)) {
- i.setItemLayout(W, {
- angle: NaN,
- startAngle: NaN,
- endAngle: NaN,
- clockwise: O,
- cx: l,
- cy: u,
- r0: f,
- r: S ? NaN : c
- });
- return;
- }
- S !== "area" ? H = y === 0 && x ? _ : Q * _ : H = M / m, H < g ? (H = g, R -= g) : N += Q;
- var U = I + P * H, j = 0, Y = 0;
- p > H ? (j = I + P * H / 2, Y = j) : (j = I + T, Y = U - T), i.setItemLayout(W, {
- angle: H,
- startAngle: j,
- endAngle: Y,
- clockwise: O,
- cx: l,
- cy: u,
- r0: f,
- r: S ? gn(Q, C, [f, c]) : c
- }), I = U;
- }), R < AZ && m)
- if (R <= 1e-3) {
- var B = M / m;
- i.each(a, function(Q, W) {
- if (!isNaN(Q)) {
- var H = i.getItemLayout(W);
- H.angle = B;
- var U = 0, j = 0;
- B < p ? (U = d + P * (W + 1 / 2) * B, j = U) : (U = d + P * W * B + T, j = d + P * (W + 1) * B - T), H.startAngle = U, H.endAngle = j;
- }
- });
- } else
- _ = R / N, I = d, i.each(a, function(Q, W) {
- if (!isNaN(Q)) {
- var H = i.getItemLayout(W), U = H.angle === g ? g : Q * _, j = 0, Y = 0;
- U < p ? (j = I + P * U / 2, Y = j) : (j = I + T, Y = I + P * U - T), H.startAngle = j, H.endAngle = Y, I += P * U;
- }
- });
- });
- }
- var bfe = Ut();
- function O1(t) {
- return {
- seriesType: t,
- reset: function(e, n) {
- var r = n.findComponents({
- mainType: "legend"
- });
- if (!(!r || !r.length)) {
- var i = e.getData();
- i.filterSelf(function(a) {
- for (var o = i.getName(a), s = 0; s < r.length; s++)
- if (!r[s].isSelected(o))
- return !1;
- return !0;
- });
- }
- }
- };
- }
- var wet = Math.PI / 180;
- function EZ(t, e, n, r, i, a, o, s, l, u) {
- if (t.length < 2)
- return;
- function c(v) {
- for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
- var _ = v.list[y], O = Math.abs(_.label.y - n), S = r + _.len, x = S * S, C = Math.sqrt((1 - Math.abs(O * O / m)) * x), P = e + (C + _.len2) * i, $ = P - _.label.x, T = _.targetTextWidth - $ * i;
- _fe(_, T, !0), _.label.x = P;
- }
- }
- function f(v) {
- for (var g = {
- list: [],
- maxY: 0
- }, m = {
- list: [],
- maxY: 0
- }, y = 0; y < v.length; y++)
- if (v[y].labelAlignTo === "none") {
- var _ = v[y], O = _.label.y > n ? m : g, S = Math.abs(_.label.y - n);
- if (S >= O.maxY) {
- var x = _.label.x - e - _.len2 * i, C = r + _.len, P = Math.abs(x) < C ? Math.sqrt(S * S / (1 - x * x / C / C)) : C;
- O.rB = P, O.maxY = S;
- }
- O.list.push(_);
- }
- c(g), c(m);
- }
- for (var d = t.length, h = 0; h < d; h++)
- if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
- var p = t[h].label.x - u;
- t[h].linePoints[1][0] += p, t[h].label.x = u;
- }
- Qce(t, l, l + o) && f(t);
- }
- function Cet(t, e, n, r, i, a, o, s) {
- for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
- var h = t[d].label;
- GM(t[d]) || (h.x < e ? (c = Math.min(c, h.x), l.push(t[d])) : (f = Math.max(f, h.x), u.push(t[d])));
- }
- for (var d = 0; d < t.length; d++) {
- var p = t[d];
- if (!GM(p) && p.linePoints) {
- if (p.labelStyleWidth != null)
- continue;
- var h = p.label, v = p.linePoints, g = void 0;
- p.labelAlignTo === "edge" ? h.x < e ? g = v[2][0] - p.labelDistance - o - p.edgeDistance : g = o + i - p.edgeDistance - v[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? h.x < e ? g = c - o - p.bleedMargin : g = o + i - f - p.bleedMargin : h.x < e ? g = h.x - o - p.bleedMargin : g = o + i - h.x - p.bleedMargin, p.targetTextWidth = g, _fe(p, g);
- }
- }
- EZ(u, e, n, r, 1, i, a, o, s, f), EZ(l, e, n, r, -1, i, a, o, s, c);
- for (var d = 0; d < t.length; d++) {
- var p = t[d];
- if (!GM(p) && p.linePoints) {
- var h = p.label, v = p.linePoints, m = p.labelAlignTo === "edge", y = h.style.padding, _ = y ? y[1] + y[3] : 0, O = h.style.backgroundColor ? 0 : _, S = p.rect.width + O, x = v[1][0] - v[2][0];
- m ? h.x < e ? v[2][0] = o + p.edgeDistance + S + p.labelDistance : v[2][0] = o + i - p.edgeDistance - S - p.labelDistance : (h.x < e ? v[2][0] = h.x + p.labelDistance : v[2][0] = h.x - p.labelDistance, v[1][0] = v[2][0] + x), v[1][1] = v[2][1] = h.y;
- }
- }
- }
- function _fe(t, e, n) {
- if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
- var r = t.label, i = r.style, a = t.rect, o = i.backgroundColor, s = i.padding, l = s ? s[1] + s[3] : 0, u = i.overflow, c = a.width + (o ? 0 : l);
- if (e < c || n) {
- var f = a.height;
- if (u && u.match("break")) {
- r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
- var d = r.getBoundingRect();
- r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
- } else {
- var h = e - l, p = e < c ? h : (
- // Current available width is enough, but the text may have
- // already been wrapped with a smaller available width.
- n ? h > t.unconstrainedWidth ? null : h : null
- );
- r.setStyle("width", p);
- }
- var v = r.getBoundingRect();
- a.width = v.width;
- var g = (r.style.margin || 0) + 2.1;
- a.height = v.height + g, a.y -= (a.height - f) / 2;
- }
- }
- }
- function GM(t) {
- return t.position === "center";
- }
- function Tet(t) {
- var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * wet, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
- function h(x) {
- x.ignore = !0;
- }
- function p(x) {
- if (!x.ignore)
- return !0;
- for (var C in x.states)
- if (x.states[C].ignore === !1)
- return !0;
- return !1;
- }
- e.each(function(x) {
- var C = e.getItemGraphicEl(x), P = C.shape, $ = C.getTextContent(), T = C.getTextGuideLine(), E = e.getItemModel(x), M = E.getModel("label"), R = M.get("position") || E.get(["emphasis", "label", "position"]), N = M.get("distanceToLabelLine"), I = M.get("alignTo"), B = ze(M.get("edgeDistance"), u), Q = M.get("bleedMargin"), W = E.getModel("labelLine"), H = W.get("length");
- H = ze(H, u);
- var U = W.get("length2");
- if (U = ze(U, u), Math.abs(P.endAngle - P.startAngle) < o) {
- F($.states, h), $.ignore = !0, T && (F(T.states, h), T.ignore = !0);
- return;
- }
- if (p($)) {
- var j = (P.startAngle + P.endAngle) / 2, Y = Math.cos(j), ne = Math.sin(j), fe, ue, ye, se;
- r = P.cx, i = P.cy;
- var he = R === "inside" || R === "inner";
- if (R === "center")
- fe = P.cx, ue = P.cy, se = "center";
- else {
- var re = (he ? (P.r + P.r0) / 2 * Y : P.r * Y) + r, q = (he ? (P.r + P.r0) / 2 * ne : P.r * ne) + i;
- if (fe = re + Y * 3, ue = q + ne * 3, !he) {
- var K = re + Y * (H + l - P.r), de = q + ne * (H + l - P.r), xe = K + (Y < 0 ? -1 : 1) * U, we = de;
- I === "edge" ? fe = Y < 0 ? c + B : c + u - B : fe = xe + (Y < 0 ? -N : N), ue = we, ye = [[re, q], [K, de], [xe, we]];
- }
- se = he ? "center" : I === "edge" ? Y > 0 ? "right" : "left" : Y > 0 ? "left" : "right";
- }
- var He = Math.PI, je = 0, Be = M.get("rotate");
- if (Kt(Be))
- je = Be * (He / 180);
- else if (R === "center")
- je = 0;
- else if (Be === "radial" || Be === !0) {
- var Le = Y < 0 ? -j + He : -j;
- je = Le;
- } else if (Be === "tangential" && R !== "outside" && R !== "outer") {
- var Pe = Math.atan2(Y, ne);
- Pe < 0 && (Pe = He * 2 + Pe);
- var Fe = ne > 0;
- Fe && (Pe = He + Pe), je = Pe - He;
- }
- if (a = !!je, $.x = fe, $.y = ue, $.rotation = je, $.setStyle({
- verticalAlign: "middle"
- }), he) {
- $.setStyle({
- align: se
- });
- var It = $.states.select;
- It && (It.x += $.x, It.y += $.y);
- } else {
- var Ye = $.getBoundingRect().clone();
- Ye.applyTransform($.getComputedTransform());
- var xt = ($.style.margin || 0) + 2.1;
- Ye.y -= xt / 2, Ye.height += xt, n.push({
- label: $,
- labelLine: T,
- position: R,
- len: H,
- len2: U,
- minTurnAngle: W.get("minTurnAngle"),
- maxSurfaceAngle: W.get("maxSurfaceAngle"),
- surfaceNormal: new yt(Y, ne),
- linePoints: ye,
- textAlign: se,
- labelDistance: N,
- labelAlignTo: I,
- edgeDistance: B,
- bleedMargin: Q,
- rect: Ye,
- unconstrainedWidth: Ye.width,
- labelStyleWidth: $.style.width
- });
- }
- C.setTextConfig({
- inside: he
- });
- }
- }), !a && t.get("avoidLabelOverlap") && Cet(n, r, i, l, u, d, c, f);
- for (var v = 0; v < n.length; v++) {
- var g = n[v], m = g.label, y = g.labelLine, _ = isNaN(m.x) || isNaN(m.y);
- if (m) {
- m.setStyle({
- align: g.textAlign
- }), _ && (F(m.states, h), m.ignore = !0);
- var O = m.states.select;
- O && (O.x += m.x, O.y += m.y);
- }
- if (y) {
- var S = g.linePoints;
- _ || !S ? (F(y.states, h), y.ignore = !0) : (Vce(S, g.minTurnAngle), ZKe(S, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
- points: S
- }), m.__hostTarget.textGuideLineConfig = {
- anchor: new yt(S[0][0], S[0][1])
- });
- }
- }
- }
- var Pet = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this) || this;
- a.z2 = 2;
- var o = new jt();
- return a.setTextContent(o), a.updateData(n, r, i, !0), a;
- }
- return e.prototype.updateData = function(n, r, i, a) {
- var o = this, s = n.hostModel, l = n.getItemModel(r), u = l.getModel("emphasis"), c = n.getItemLayout(r), f = _e(ch(l.getModel("itemStyle"), c, !0), c);
- if (isNaN(f.startAngle)) {
- o.setShape(f);
- return;
- }
- if (a) {
- o.setShape(f);
- var d = s.getShallow("animationType");
- s.ecModel.ssr ? (Vn(o, {
- scaleX: 0,
- scaleY: 0
- }, s, {
- dataIndex: r,
- isFrom: !0
- }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Vn(o, {
- shape: {
- r: c.r
- }
- }, s, r)) : i != null ? (o.setShape({
- startAngle: i,
- endAngle: i
- }), Vn(o, {
- shape: {
- startAngle: c.startAngle,
- endAngle: c.endAngle
- }
- }, s, r)) : (o.shape.endAngle = c.startAngle, tn(o, {
- shape: {
- endAngle: c.endAngle
- }
- }, s, r));
- } else
- Zs(o), tn(o, {
- shape: f
- }, s, r);
- o.useStyle(n.getItemVisual(r, "style")), Ai(o, l);
- var h = (c.startAngle + c.endAngle) / 2, p = s.get("selectedOffset"), v = Math.cos(h) * p, g = Math.sin(h) * p, m = l.getShallow("cursor");
- m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = _e({
- r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
- }, ch(u.getModel("itemStyle"), c)), _e(o.ensureState("select"), {
- x: v,
- y: g,
- shape: ch(l.getModel(["select", "itemStyle"]), c)
- }), _e(o.ensureState("blur"), {
- shape: ch(l.getModel(["blur", "itemStyle"]), c)
- });
- var y = o.getTextGuideLine(), _ = o.getTextContent();
- y && _e(y.ensureState("select"), {
- x: v,
- y: g
- }), _e(_.ensureState("select"), {
- x: v,
- y: g
- }), ur(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
- }, e.prototype._updateLabel = function(n, r, i) {
- var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
- Ei(a, ei(o), {
- labelFetcher: r.hostModel,
- labelDataIndex: i,
- inheritColor: u,
- defaultOpacity: c,
- defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
- });
- var f = a.getTextContent();
- a.setTextConfig({
- // reset position, rotation
- position: null,
- rotation: null
- }), f.attr({
- z2: 10
- });
- var d = n.get(["label", "position"]);
- if (d !== "outside" && d !== "outer")
- a.removeTextGuideLine();
- else {
- var h = this.getTextGuideLine();
- h || (h = new va(), this.setTextGuideLine(h)), A3(this, E3(o), {
- stroke: u,
- opacity: co(s.get(["lineStyle", "opacity"]), c, 1)
- });
- }
- }, e;
- }(ha)
- ), $et = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.ignoreLabelLineUpdate = !0, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- var o = n.getData(), s = this._data, l = this.group, u;
- if (!s && o.count() > 0) {
- for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
- c = o.getItemLayout(f);
- c && (u = c.startAngle);
- }
- if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
- var d = bfe(n), h = new ha({
- shape: _e(yfe(n, i), d)
- });
- h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
- }
- o.diff(s).add(function(p) {
- var v = new Pet(o, p, u);
- o.setItemGraphicEl(p, v), l.add(v);
- }).update(function(p, v) {
- var g = s.getItemGraphicEl(v);
- g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
- }).remove(function(p) {
- var v = s.getItemGraphicEl(p);
- Xb(v, n, p);
- }).execute(), Tet(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
- }, e.prototype.dispose = function() {
- }, e.prototype.containPoint = function(n, r) {
- var i = r.getData(), a = i.getItemLayout(0);
- if (a) {
- var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
- return l <= a.r && l >= a.r0;
- }
- }, e.type = "pie", e;
- }(_n)
- );
- function Rm(t, e, n) {
- e = Se(e) && {
- coordDimensions: e
- } || _e({
- encodeDefine: t.getEncode()
- }, e);
- var r = t.getSource(), i = Mm(r, e).dimensions, a = new Wi(i, t);
- return a.initData(r, n), a;
- }
- var S1 = (
- /** @class */
- function() {
- function t(e, n) {
- this._getDataWithEncodedVisual = e, this._getRawData = n;
- }
- return t.prototype.getAllNames = function() {
- var e = this._getRawData();
- return e.mapArray(e.getName);
- }, t.prototype.containName = function(e) {
- var n = this._getRawData();
- return n.indexOfName(e) >= 0;
- }, t.prototype.indexOfName = function(e) {
- var n = this._getDataWithEncodedVisual();
- return n.indexOfName(e);
- }, t.prototype.getItemVisual = function(e, n) {
- var r = this._getDataWithEncodedVisual();
- return r.getItemVisual(e, n);
- }, t;
- }()
- ), Aet = Ut(), Eet = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.init = function(n) {
- t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this)), this._defaultLabelLine(n);
- }, e.prototype.mergeOption = function() {
- t.prototype.mergeOption.apply(this, arguments);
- }, e.prototype.getInitialData = function() {
- return Rm(this, {
- coordDimensions: ["value"],
- encodeDefaulter: vt(n3, this)
- });
- }, e.prototype.getDataParams = function(n) {
- var r = this.getData(), i = Aet(r), a = i.seats;
- if (!a) {
- var o = [];
- r.each(r.mapDimension("value"), function(l) {
- o.push(l);
- }), a = i.seats = Mse(o, r.hostModel.get("percentPrecision"));
- }
- var s = t.prototype.getDataParams.call(this, n);
- return s.percent = a[n] || 0, s.$vars.push("percent"), s;
- }, e.prototype._defaultLabelLine = function(n) {
- Hh(n, "labelLine", ["show"]);
- var r = n.labelLine, i = n.emphasis.labelLine;
- r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
- }, e.type = "series.pie", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- colorBy: "data",
- // 默认全局居中
- center: ["50%", "50%"],
- radius: [0, "75%"],
- // 默认顺时针
- clockwise: !0,
- startAngle: 90,
- endAngle: "auto",
- padAngle: 0,
- // 最小角度改为0
- minAngle: 0,
- // If the angle of a sector less than `minShowLabelAngle`,
- // the label will not be displayed.
- minShowLabelAngle: 0,
- // 选中时扇区偏移量
- selectedOffset: 10,
- // 选择模式,默认关闭,可选single,multiple
- // selectedMode: false,
- // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
- // roseType: null,
- percentPrecision: 2,
- // If still show when all data zero.
- stillShowZeroSum: !0,
- // cursor: null,
- left: 0,
- top: 0,
- right: 0,
- bottom: 0,
- width: null,
- height: null,
- label: {
- // color: 'inherit',
- // If rotate around circle
- rotate: 0,
- show: !0,
- overflow: "truncate",
- // 'outer', 'inside', 'center'
- position: "outer",
- // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
- alignTo: "none",
- // Closest distance between label and chart edge.
- // Works only position is 'outer' and alignTo is 'edge'.
- edgeDistance: "25%",
- // Works only position is 'outer' and alignTo is not 'edge'.
- bleedMargin: 10,
- // Distance between text and label line.
- distanceToLabelLine: 5
- // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调
- // 默认使用全局文本样式,详见 textStyle
- // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
- },
- // Enabled when label.normal.position is 'outer'
- labelLine: {
- show: !0,
- // 引导线两段中的第一段长度
- length: 15,
- // 引导线两段中的第二段长度
- length2: 15,
- smooth: !1,
- minTurnAngle: 90,
- maxSurfaceAngle: 90,
- lineStyle: {
- // color: 各异,
- width: 1,
- type: "solid"
- }
- },
- itemStyle: {
- borderWidth: 1,
- borderJoin: "round"
- },
- showEmptyCircle: !0,
- emptyCircleStyle: {
- color: "lightgray",
- opacity: 1
- },
- labelLayout: {
- // Hide the overlapped label.
- hideOverlap: !0
- },
- emphasis: {
- scale: !0,
- scaleSize: 5
- },
- // If use strategy to avoid label overlapping
- avoidLabelOverlap: !0,
- // Animation type. Valid values: expansion, scale
- animationType: "expansion",
- animationDuration: 1e3,
- // Animation type when update. Valid values: transition, expansion
- animationTypeUpdate: "transition",
- animationEasingUpdate: "cubicInOut",
- animationDurationUpdate: 500,
- animationEasing: "cubicInOut"
- }, e;
- }(Tn)
- );
- function Met(t) {
- return {
- seriesType: t,
- reset: function(e, n) {
- var r = e.getData();
- r.filterSelf(function(i) {
- var a = r.mapDimension("value"), o = r.get(a, i);
- return !(Kt(o) && !isNaN(o) && o < 0);
- });
- }
- };
- }
- function Iet(t) {
- t.registerChartView($et), t.registerSeriesModel(Eet), Bue("pie", t.registerAction), t.registerLayout(vt(xet, "pie")), t.registerProcessor(O1("pie")), t.registerProcessor(Met("pie"));
- }
- var Det = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Yl(null, this, {
- useEncodeDefaulter: !0
- });
- }, e.prototype.getProgressive = function() {
- var n = this.option.progressive;
- return n ?? (this.option.large ? 5e3 : this.get("progressive"));
- }, e.prototype.getProgressiveThreshold = function() {
- var n = this.option.progressiveThreshold;
- return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
- }, e.prototype.brushSelector = function(n, r, i) {
- return i.point(r.getItemLayout(n));
- }, e.prototype.getZLevelKey = function() {
- return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
- }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
- coordinateSystem: "cartesian2d",
- // zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- symbolSize: 10,
- // symbolRotate: null, // 图形旋转控制
- large: !1,
- // Available when large is true
- largeThreshold: 2e3,
- // cursor: null,
- itemStyle: {
- opacity: 0.8
- // color: 各异
- },
- emphasis: {
- scale: !0
- },
- // If clip the overflow graphics
- // Works on cartesian / polar series
- clip: !0,
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- },
- universalTransition: {
- divideShape: "clone"
- }
- // progressive: null
- }, e;
- }(Tn)
- ), Ofe = 4, Ret = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), ket = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r._off = 0, r.hoverDataIdx = -1, r;
- }
- return e.prototype.getDefaultShape = function() {
- return new Ret();
- }, e.prototype.reset = function() {
- this.notClear = !1, this._off = 0;
- }, e.prototype.buildPath = function(n, r) {
- var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < Ofe, c = this.softClipShape, f;
- if (u) {
- this._ctx = l;
- return;
- }
- for (this._ctx = null, f = this._off; f < i.length; ) {
- var d = i[f++], h = i[f++];
- isNaN(d) || isNaN(h) || c && !c.contain(d, h) || (s.x = d - a[0] / 2, s.y = h - a[1] / 2, s.width = a[0], s.height = a[1], o.buildPath(n, s, !0));
- }
- this.incremental && (this._off = f, this.notClear = !0);
- }, e.prototype.afterBrush = function() {
- var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
- if (a) {
- for (s = this._off; s < r.length; ) {
- var l = r[s++], u = r[s++];
- isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
- }
- this.incremental && (this._off = s, this.notClear = !0);
- }
- }, e.prototype.findDataIndex = function(n, r) {
- for (var i = this.shape, a = i.points, o = i.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = a.length / 2 - 1; u >= 0; u--) {
- var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
- if (n >= f && r >= d && n <= f + s && r <= d + l)
- return u;
- }
- return -1;
- }, e.prototype.contain = function(n, r) {
- var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
- if (n = i[0], r = i[1], a.contain(n, r)) {
- var o = this.hoverDataIdx = this.findDataIndex(n, r);
- return o >= 0;
- }
- return this.hoverDataIdx = -1, !1;
- }, e.prototype.getBoundingRect = function() {
- var n = this._rect;
- if (!n) {
- for (var r = this.shape, i = r.points, a = r.size, o = a[0], s = a[1], l = 1 / 0, u = 1 / 0, c = -1 / 0, f = -1 / 0, d = 0; d < i.length; ) {
- var h = i[d++], p = i[d++];
- l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
- }
- n = this._rect = new bt(l - o / 2, u - s / 2, c - l + o, f - u + s);
- }
- return n;
- }, e;
- }(Dt)
- ), Let = (
- /** @class */
- function() {
- function t() {
- this.group = new ct();
- }
- return t.prototype.updateData = function(e, n) {
- this._clear();
- var r = this._create();
- r.setShape({
- points: e.getLayout("points")
- }), this._setCommon(r, e, n);
- }, t.prototype.updateLayout = function(e) {
- var n = e.getLayout("points");
- this.group.eachChild(function(r) {
- if (r.startIndex != null) {
- var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
- n = new Float32Array(n.buffer, a, i);
- }
- r.setShape("points", n), r.reset();
- });
- }, t.prototype.incrementalPrepareUpdate = function(e) {
- this._clear();
- }, t.prototype.incrementalUpdate = function(e, n, r) {
- var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
- if (o && o.length < 2e4) {
- var s = o.length, l = new Float32Array(s + a.length);
- l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
- points: l
- });
- } else {
- this._newAdded = [];
- var u = this._create();
- u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
- points: a
- }), this._setCommon(u, n, r);
- }
- }, t.prototype.eachRendered = function(e) {
- this._newAdded[0] && e(this._newAdded[0]);
- }, t.prototype._create = function() {
- var e = new ket({
- cursor: "default"
- });
- return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
- }, t.prototype._setCommon = function(e, n, r) {
- var i = n.hostModel;
- r = r || {};
- var a = n.getVisual("symbolSize");
- e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = r.clipShape || null, e.symbolProxy = wr(n.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
- var o = e.shape.size[0] < Ofe;
- e.useStyle(
- // Draw shadow when doing fillRect is extremely slow.
- i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
- );
- var s = n.getVisual("style"), l = s && s.fill;
- l && e.setColor(l);
- var u = ft(e);
- u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
- u.dataIndex = null;
- var f = e.hoverDataIdx;
- f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
- });
- }, t.prototype.remove = function() {
- this._clear();
- }, t.prototype._clear = function() {
- this._newAdded = [], this.group.removeAll();
- }, t;
- }()
- ), Net = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this._updateSymbolDraw(a, n);
- o.updateData(a, {
- // TODO
- // If this parameter should be a shape or a bounding volume
- // shape will be more general.
- // But bounding volume like bounding rect will be much faster in the contain calculation
- clipShape: this._getClipShape(n)
- }), this._finished = !0;
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- var a = n.getData(), o = this._updateSymbolDraw(a, n);
- o.incrementalPrepareUpdate(a), this._finished = !1;
- }, e.prototype.incrementalRender = function(n, r, i) {
- this._symbolDraw.incrementalUpdate(n, r.getData(), {
- clipShape: this._getClipShape(r)
- }), this._finished = n.end === r.getData().count();
- }, e.prototype.updateTransform = function(n, r, i) {
- var a = n.getData();
- if (this.group.dirty(), !this._finished || a.count() > 1e4)
- return {
- update: !0
- };
- var o = _1("").reset(n, r, i);
- o.progress && o.progress({
- start: 0,
- end: a.count(),
- count: a.count()
- }, a), this._symbolDraw.updateLayout(a);
- }, e.prototype.eachRendered = function(n) {
- this._symbolDraw && this._symbolDraw.eachRendered(n);
- }, e.prototype._getClipShape = function(n) {
- if (n.get("clip", !0)) {
- var r = n.coordinateSystem;
- return r && r.getArea && r.getArea(0.1);
- }
- }, e.prototype._updateSymbolDraw = function(n, r) {
- var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
- return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new Let() : new y1(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
- }, e.prototype.remove = function(n, r) {
- this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
- }, e.prototype.dispose = function() {
- }, e.type = "scatter", e;
- }(_n)
- ), Bet = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
- show: !1,
- // zlevel: 0,
- z: 0,
- left: "10%",
- top: 60,
- right: "10%",
- bottom: 70,
- // If grid size contain label
- containLabel: !1,
- // width: {totalWidth} - left - right,
- // height: {totalHeight} - top - bottom,
- backgroundColor: "rgba(0,0,0,0)",
- borderWidth: 1,
- borderColor: "#ccc"
- }, e;
- }(At)
- ), aL = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.getCoordSysModel = function() {
- return this.getReferringComponents("grid", Er).models[0];
- }, e.type = "cartesian2dAxis", e;
- }(At)
- );
- vr(aL, Dm);
- var Sfe = {
- show: !0,
- // zlevel: 0,
- z: 0,
- // Inverse the axis.
- inverse: !1,
- // Axis name displayed.
- name: "",
- // 'start' | 'middle' | 'end'
- nameLocation: "end",
- // By degree. By default auto rotate by nameLocation.
- nameRotate: null,
- nameTruncate: {
- maxWidth: null,
- ellipsis: "...",
- placeholder: "."
- },
- // Use global text style by default.
- nameTextStyle: {},
- // The gap between axisName and axisLine.
- nameGap: 15,
- // Default `false` to support tooltip.
- silent: !1,
- // Default `false` to avoid legacy user event listener fail.
- triggerEvent: !1,
- tooltip: {
- show: !1
- },
- axisPointer: {},
- axisLine: {
- show: !0,
- onZero: !0,
- onZeroAxisIndex: null,
- lineStyle: {
- color: "#6E7079",
- width: 1,
- type: "solid"
- },
- // The arrow at both ends the the axis.
- symbol: ["none", "none"],
- symbolSize: [10, 15]
- },
- axisTick: {
- show: !0,
- // Whether axisTick is inside the grid or outside the grid.
- inside: !1,
- // The length of axisTick.
- length: 5,
- lineStyle: {
- width: 1
- }
- },
- axisLabel: {
- show: !0,
- // Whether axisLabel is inside the grid or outside the grid.
- inside: !1,
- rotate: 0,
- // true | false | null/undefined (auto)
- showMinLabel: null,
- // true | false | null/undefined (auto)
- showMaxLabel: null,
- margin: 8,
- // formatter: null,
- fontSize: 12
- },
- splitLine: {
- show: !0,
- lineStyle: {
- color: ["#E0E6F1"],
- width: 1,
- type: "solid"
- }
- },
- splitArea: {
- show: !1,
- areaStyle: {
- color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
- }
- }
- }, zet = mt({
- // The gap at both ends of the axis. For categoryAxis, boolean.
- boundaryGap: !0,
- // Set false to faster category collection.
- deduplication: null,
- // splitArea: {
- // show: false
- // },
- splitLine: {
- show: !1
- },
- axisTick: {
- // If tick is align with label when boundaryGap is true
- alignWithLabel: !1,
- interval: "auto"
- },
- axisLabel: {
- interval: "auto"
- }
- }, Sfe), N3 = mt({
- boundaryGap: [0, 0],
- axisLine: {
- // Not shown when other axis is categoryAxis in cartesian
- show: "auto"
- },
- axisTick: {
- // Not shown when other axis is categoryAxis in cartesian
- show: "auto"
- },
- // TODO
- // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
- splitNumber: 5,
- minorTick: {
- // Minor tick, not available for cateogry axis.
- show: !1,
- // Split number of minor ticks. The value should be in range of (0, 100)
- splitNumber: 5,
- // Length of minor tick
- length: 3,
- // Line style
- lineStyle: {
- // Default to be same with axisTick
- }
- },
- minorSplitLine: {
- show: !1,
- lineStyle: {
- color: "#F4F7FD",
- width: 1
- }
- }
- }, Sfe), Vet = mt({
- splitNumber: 6,
- axisLabel: {
- // To eliminate labels that are not nice
- showMinLabel: !1,
- showMaxLabel: !1,
- rich: {
- primary: {
- fontWeight: "bold"
- }
- }
- },
- splitLine: {
- show: !1
- }
- }, N3), Fet = it({
- logBase: 10
- }, N3);
- const xfe = {
- category: zet,
- value: N3,
- time: Vet,
- log: Fet
- };
- var Wet = {
- value: 1,
- category: 1,
- time: 1,
- log: 1
- };
- function Zg(t, e, n, r) {
- F(Wet, function(i, a) {
- var o = mt(mt({}, xfe[a], !0), r, !0), s = (
- /** @class */
- function(l) {
- le(u, l);
- function u() {
- var c = l !== null && l.apply(this, arguments) || this;
- return c.type = e + "Axis." + a, c;
- }
- return u.prototype.mergeDefaultAndTheme = function(c, f) {
- var d = qb(this), h = d ? Tm(c) : {}, p = f.getTheme();
- mt(c, p.get(a + "Axis")), mt(c, this.getDefaultOption()), c.type = MZ(c), d && Of(c, h, d);
- }, u.prototype.optionUpdated = function() {
- var c = this.option;
- c.type === "category" && (this.__ordinalMeta = qk.createByAxisModel(this));
- }, u.prototype.getCategories = function(c) {
- var f = this.option;
- if (f.type === "category")
- return c ? f.data : this.__ordinalMeta.categories;
- }, u.prototype.getOrdinalMeta = function() {
- return this.__ordinalMeta;
- }, u.type = e + "Axis." + a, u.defaultOption = o, u;
- }(n)
- );
- t.registerComponentModel(s);
- }), t.registerSubTypeDefaulter(e + "Axis", MZ);
- }
- function MZ(t) {
- return t.type || (t.data ? "category" : "value");
- }
- var Qet = (
- /** @class */
- function() {
- function t(e) {
- this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
- }
- return t.prototype.getAxis = function(e) {
- return this._axes[e];
- }, t.prototype.getAxes = function() {
- return Ce(this._dimList, function(e) {
- return this._axes[e];
- }, this);
- }, t.prototype.getAxesByScale = function(e) {
- return e = e.toLowerCase(), yn(this.getAxes(), function(n) {
- return n.scale.type === e;
- });
- }, t.prototype.addAxis = function(e) {
- var n = e.dim;
- this._axes[n] = e, this._dimList.push(n);
- }, t;
- }()
- ), oL = ["x", "y"];
- function IZ(t) {
- return t.type === "interval" || t.type === "time";
- }
- var Het = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "cartesian2d", n.dimensions = oL, n;
- }
- return e.prototype.calcAffineTransform = function() {
- this._transform = this._invTransform = null;
- var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
- if (!(!IZ(n) || !IZ(r))) {
- var i = n.getExtent(), a = r.getExtent(), o = this.dataToPoint([i[0], a[0]]), s = this.dataToPoint([i[1], a[1]]), l = i[1] - i[0], u = a[1] - a[0];
- if (!(!l || !u)) {
- var c = (s[0] - o[0]) / l, f = (s[1] - o[1]) / u, d = o[0] - i[0] * c, h = o[1] - a[0] * f, p = this._transform = [c, 0, 0, f, d, h];
- this._invTransform = dp([], p);
- }
- }
- }, e.prototype.getBaseAxis = function() {
- return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
- }, e.prototype.containPoint = function(n) {
- var r = this.getAxis("x"), i = this.getAxis("y");
- return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
- }, e.prototype.containData = function(n) {
- return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
- }, e.prototype.containZone = function(n, r) {
- var i = this.dataToPoint(n), a = this.dataToPoint(r), o = this.getArea(), s = new bt(i[0], i[1], a[0] - i[0], a[1] - i[1]);
- return o.intersect(s);
- }, e.prototype.dataToPoint = function(n, r, i) {
- i = i || [];
- var a = n[0], o = n[1];
- if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
- return oi(i, n, this._transform);
- var s = this.getAxis("x"), l = this.getAxis("y");
- return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
- }, e.prototype.clampData = function(n, r) {
- var i = this.getAxis("x").scale, a = this.getAxis("y").scale, o = i.getExtent(), s = a.getExtent(), l = i.parse(n[0]), u = a.parse(n[1]);
- return r = r || [], r[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), r[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), r;
- }, e.prototype.pointToData = function(n, r) {
- var i = [];
- if (this._invTransform)
- return oi(i, n, this._invTransform);
- var a = this.getAxis("x"), o = this.getAxis("y");
- return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
- }, e.prototype.getOtherAxis = function(n) {
- return this.getAxis(n.dim === "x" ? "y" : "x");
- }, e.prototype.getArea = function(n) {
- n = n || 0;
- var r = this.getAxis("x").getGlobalExtent(), i = this.getAxis("y").getGlobalExtent(), a = Math.min(r[0], r[1]) - n, o = Math.min(i[0], i[1]) - n, s = Math.max(r[0], r[1]) - a + n, l = Math.max(i[0], i[1]) - o + n;
- return new bt(a, o, s, l);
- }, e;
- }(Qet)
- ), Get = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a, o) {
- var s = t.call(this, n, r, i) || this;
- return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
- }
- return e.prototype.isHorizontal = function() {
- var n = this.position;
- return n === "top" || n === "bottom";
- }, e.prototype.getGlobalExtent = function(n) {
- var r = this.getExtent();
- return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
- }, e.prototype.pointToData = function(n, r) {
- return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
- }, e.prototype.setCategorySortInfo = function(n) {
- if (this.type !== "category")
- return !1;
- this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
- }, e;
- }(vs)
- );
- function sL(t, e, n) {
- n = n || {};
- var r = t.coordinateSystem, i = e.axis, a = {}, o = i.getAxesOnZeroOf()[0], s = i.position, l = o ? "onZero" : s, u = i.dim, c = r.getRect(), f = [c.x, c.x + c.width, c.y, c.y + c.height], d = {
- left: 0,
- right: 1,
- top: 0,
- bottom: 1,
- onZero: 2
- }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
- if (o) {
- var v = o.toGlobalCoord(o.dataToCoord(0));
- p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
- }
- a.position = [u === "y" ? p[d[l]] : f[0], u === "x" ? p[d[l]] : f[3]], a.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
- var g = {
- top: -1,
- bottom: 1,
- left: -1,
- right: 1
- };
- a.labelDirection = a.tickDirection = a.nameDirection = g[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), Or(n.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
- var m = e.get(["axisLabel", "rotate"]);
- return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
- }
- function DZ(t) {
- return t.get("coordinateSystem") === "cartesian2d";
- }
- function RZ(t) {
- var e = {
- xAxisModel: null,
- yAxisModel: null
- };
- return F(e, function(n, r) {
- var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Er).models[0];
- if (process.env.NODE_ENV !== "production" && !a)
- throw new Error(i + ' "' + co(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
- e[r] = a;
- }), e;
- }
- var jM = Math.log;
- function wfe(t, e, n) {
- var r = Gu.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = Pce(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
- if (t.type === "log") {
- var d = jM(t.base);
- u = [jM(u[0]) / d, jM(u[1]) / d];
- }
- t.setExtent(u[0], u[1]), t.calcNiceExtent({
- splitNumber: o,
- fixMin: c,
- fixMax: f
- });
- var h = r.getExtent.call(t);
- c && (u[0] = h[0]), f && (u[1] = h[1]);
- var p = r.getInterval.call(t), v = u[0], g = u[1];
- if (c && f)
- p = (g - v) / o;
- else if (c)
- for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
- p = MM(p), g = u[0] + p * o;
- else if (f)
- for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
- p = MM(p), v = u[1] - p * o;
- else {
- var m = t.getTicks().length - 1;
- m > o && (p = MM(p));
- var y = p * o;
- g = Math.ceil(u[1] / p) * p, v = sr(g - y), v < 0 && u[0] >= 0 ? (v = 0, g = sr(y)) : g > 0 && u[1] <= 0 && (g = 0, v = -sr(y));
- }
- var _ = (i[0].value - a[0].value) / s, O = (i[o].value - a[o].value) / s;
- if (r.setExtent.call(t, v + p * _, g + p * O), r.setInterval.call(t, p), (_ || O) && r.setNiceExtent.call(t, v + p, g - p), process.env.NODE_ENV !== "production") {
- var S = r.getTicks.call(t);
- S[1] && (!zqe(p) || EC(S[1].value) > EC(p)) && nr(
- // eslint-disable-next-line
- "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
- );
- }
- }
- var jet = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = oL, this._initCartesian(e, n, r), this.model = e;
- }
- return t.prototype.getRect = function() {
- return this._rect;
- }, t.prototype.update = function(e, n) {
- var r = this._axesMap;
- this._updateScale(e, this.model);
- function i(o) {
- var s, l = kt(o), u = l.length;
- if (u) {
- for (var c = [], f = u - 1; f >= 0; f--) {
- var d = +l[f], h = o[d], p = h.model, v = h.scale;
- // Only value and log axis without interval support alignTicks.
- Kk(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Xh(v, p), Kk(v) && (s = h));
- }
- c.length && (s || (s = c.pop(), Xh(s.scale, s.model)), F(c, function(g) {
- wfe(g.scale, g.model, s.scale);
- }));
- }
- }
- i(r.x), i(r.y);
- var a = {};
- F(r.x, function(o) {
- kZ(r, "y", o, a);
- }), F(r.y, function(o) {
- kZ(r, "x", o, a);
- }), this.resize(this.model, n);
- }, t.prototype.resize = function(e, n, r) {
- var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Mr(i, {
- width: n.getWidth(),
- height: n.getHeight()
- });
- this._rect = o;
- var s = this._axesList;
- l(), a && (F(s, function(u) {
- if (!u.model.get(["axisLabel", "inside"])) {
- var c = uKe(u);
- if (c) {
- var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
- o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
- }
- }
- }), l()), F(this._coordsList, function(u) {
- u.calcAffineTransform();
- });
- function l() {
- F(s, function(u) {
- var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
- u.setExtent(f[d], f[1 - d]), Zet(u, c ? o.x : o.y);
- });
- }
- }, t.prototype.getAxis = function(e, n) {
- var r = this._axesMap[e];
- if (r != null)
- return r[n || 0];
- }, t.prototype.getAxes = function() {
- return this._axesList.slice();
- }, t.prototype.getCartesian = function(e, n) {
- if (e != null && n != null) {
- var r = "x" + e + "y" + n;
- return this._coordsMap[r];
- }
- nt(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
- for (var i = 0, a = this._coordsList; i < a.length; i++)
- if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
- return a[i];
- }, t.prototype.getCartesians = function() {
- return this._coordsList.slice();
- }, t.prototype.convertToPixel = function(e, n, r) {
- var i = this._findConvertTarget(n);
- return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
- }, t.prototype.convertFromPixel = function(e, n, r) {
- var i = this._findConvertTarget(n);
- return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
- }, t.prototype._findConvertTarget = function(e) {
- var n = e.seriesModel, r = e.xAxisModel || n && n.getReferringComponents("xAxis", Er).models[0], i = e.yAxisModel || n && n.getReferringComponents("yAxis", Er).models[0], a = e.gridModel, o = this._coordsList, s, l;
- if (n)
- s = n.coordinateSystem, St(o, s) < 0 && (s = null);
- else if (r && i)
- s = this.getCartesian(r.componentIndex, i.componentIndex);
- else if (r)
- l = this.getAxis("x", r.componentIndex);
- else if (i)
- l = this.getAxis("y", i.componentIndex);
- else if (a) {
- var u = a.coordinateSystem;
- u === this && (s = this._coordsList[0]);
- }
- return {
- cartesian: s,
- axis: l
- };
- }, t.prototype.containPoint = function(e) {
- var n = this._coordsList[0];
- if (n)
- return n.containPoint(e);
- }, t.prototype._initCartesian = function(e, n, r) {
- var i = this, a = this, o = {
- left: !1,
- right: !1,
- top: !1,
- bottom: !1
- }, s = {
- x: {},
- y: {}
- }, l = {
- x: 0,
- y: 0
- };
- if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
- this._axesMap = {}, this._axesList = [];
- return;
- }
- this._axesMap = s, F(s.x, function(c, f) {
- F(s.y, function(d, h) {
- var p = "x" + f + "y" + h, v = new Het(p);
- v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
- });
- });
- function u(c) {
- return function(f, d) {
- if (ZM(f, e)) {
- var h = f.get("position");
- c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
- var p = new Get(c, g1(f), [0, 0], f.get("type"), h), v = p.type === "category";
- p.onBand = v && f.get("boundaryGap"), p.inverse = f.get("inverse"), f.axis = p, p.model = f, p.grid = a, p.index = d, a._axesList.push(p), s[c][d] = p, l[c]++;
- }
- };
- }
- }, t.prototype._updateScale = function(e, n) {
- F(this._axesList, function(i) {
- if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
- var a = i.model.get("categorySortInfo");
- i.scale.setSortInfo(a);
- }
- }), e.eachSeries(function(i) {
- if (DZ(i)) {
- var a = RZ(i), o = a.xAxisModel, s = a.yAxisModel;
- if (!ZM(o, n) || !ZM(s, n))
- return;
- var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
- r(u, c), r(u, f);
- }
- }, this);
- function r(i, a) {
- F(qC(i, a.dim), function(o) {
- a.scale.unionExtentFromData(i, o);
- });
- }
- }, t.prototype.getTooltipAxes = function(e) {
- var n = [], r = [];
- return F(this.getCartesians(), function(i) {
- var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
- St(n, a) < 0 && n.push(a), St(r, o) < 0 && r.push(o);
- }), {
- baseAxes: n,
- otherAxes: r
- };
- }, t.create = function(e, n) {
- var r = [];
- return e.eachComponent("grid", function(i, a) {
- var o = new t(i, e, n);
- o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
- }), e.eachSeries(function(i) {
- if (DZ(i)) {
- var a = RZ(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
- if (process.env.NODE_ENV !== "production") {
- if (!l)
- throw new Error('Grid "' + co(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
- if (o.getCoordSysModel() !== s.getCoordSysModel())
- throw new Error("xAxis and yAxis must use the same grid");
- }
- var u = l.coordinateSystem;
- i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
- }
- }), r;
- }, t.dimensions = oL, t;
- }()
- );
- function ZM(t, e) {
- return t.getCoordSysModel() === e;
- }
- function kZ(t, e, n, r) {
- n.getAxesOnZeroOf = function() {
- return a ? [a] : [];
- };
- var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
- if (!s)
- return;
- if (l != null)
- LZ(i[l]) && (a = i[l]);
- else
- for (var u in i)
- if (i.hasOwnProperty(u) && LZ(i[u]) && !r[c(i[u])]) {
- a = i[u];
- break;
- }
- a && (r[c(a)] = !0);
- function c(f) {
- return f.dim + "_" + f.index;
- }
- }
- function LZ(t) {
- return t && t.type !== "category" && t.type !== "time" && lKe(t);
- }
- function Zet(t, e) {
- var n = t.getExtent(), r = n[0] + n[1];
- t.toGlobalCoord = t.dim === "x" ? function(i) {
- return i + e;
- } : function(i) {
- return r - i + e;
- }, t.toLocalCoord = t.dim === "x" ? function(i) {
- return i - e;
- } : function(i) {
- return r - i + e;
- };
- }
- var jc = Math.PI, sa = (
- /** @class */
- function() {
- function t(e, n) {
- this.group = new ct(), this.opt = n, this.axisModel = e, it(n, {
- labelOffset: 0,
- nameDirection: 1,
- tickDirection: 1,
- labelDirection: 1,
- silent: !0,
- handleAutoShown: function() {
- return !0;
- }
- });
- var r = new ct({
- x: n.position[0],
- y: n.position[1],
- rotation: n.rotation
- });
- r.updateTransform(), this._transformGroup = r;
- }
- return t.prototype.hasBuilder = function(e) {
- return !!NZ[e];
- }, t.prototype.add = function(e) {
- NZ[e](this.opt, this.axisModel, this.group, this._transformGroup);
- }, t.prototype.getGroup = function() {
- return this.group;
- }, t.innerTextLayout = function(e, n, r) {
- var i = P5(n - e), a, o;
- return Vg(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Vg(i - jc) ? (o = r > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < jc ? a = r > 0 ? "right" : "left" : a = r > 0 ? "left" : "right"), {
- rotation: i,
- textAlign: a,
- textVerticalAlign: o
- };
- }, t.makeAxisEventDataBase = function(e) {
- var n = {
- componentType: e.mainType,
- componentIndex: e.componentIndex
- };
- return n[e.mainType + "Index"] = e.componentIndex, n;
- }, t.isLabelSilent = function(e) {
- var n = e.get("tooltip");
- return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
- }, t;
- }()
- ), NZ = {
- axisLine: function(t, e, n, r) {
- var i = e.get(["axisLine", "show"]);
- if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
- var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
- o && (oi(s, s, o), oi(l, l, o));
- var c = _e({
- lineCap: "round"
- }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Xr({
- shape: {
- x1: s[0],
- y1: s[1],
- x2: l[0],
- y2: l[1]
- },
- style: c,
- strokeContainThreshold: t.strokeContainThreshold || 5,
- silent: !0,
- z2: 1
- });
- Qg(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
- var d = e.get(["axisLine", "symbol"]);
- if (d != null) {
- var h = e.get(["axisLine", "symbolSize"]);
- Ve(d) && (d = [d, d]), (Ve(h) || Kt(h)) && (h = [h, h]);
- var p = mp(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
- F([{
- rotate: t.rotation + Math.PI / 2,
- offset: p[0],
- r: 0
- }, {
- rotate: t.rotation - Math.PI / 2,
- offset: p[1],
- r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
- }], function(m, y) {
- if (d[y] !== "none" && d[y] != null) {
- var _ = wr(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), O = m.r + m.offset, S = u ? l : s;
- _.attr({
- rotation: m.rotate,
- x: S[0] + O * Math.cos(t.rotation),
- y: S[1] - O * Math.sin(t.rotation),
- silent: !0,
- z2: 11
- }), n.add(_);
- }
- });
- }
- }
- },
- axisTickLabel: function(t, e, n, r) {
- var i = Yet(n, r, e, t), a = Ket(n, r, e, t);
- if (Xet(e, a, i), qet(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
- var o = Fce(Ce(a, function(s) {
- return {
- label: s,
- priority: s.z2,
- defaultAttr: {
- ignore: s.ignore
- }
- };
- }));
- Hce(o);
- }
- },
- axisName: function(t, e, n, r) {
- var i = Or(t.axisName, e.get("name"));
- if (i) {
- var a = e.get("nameLocation"), o = t.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), c = u[0] > u[1] ? -1 : 1, f = [
- a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
- // Reuse labelOffset.
- zZ(a) ? t.labelOffset + o * l : 0
- ], d, h = e.get("nameRotate");
- h != null && (h = h * jc / 180);
- var p;
- zZ(a) ? d = sa.innerTextLayout(
- t.rotation,
- h ?? t.rotation,
- // Adapt to axis.
- o
- ) : (d = Uet(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
- var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = Or(t.nameTruncateMaxWidth, g.maxWidth, p), _ = new jt({
- x: f[0],
- y: f[1],
- rotation: d.rotation,
- silent: sa.isLabelSilent(e),
- style: Mn(s, {
- text: i,
- font: v,
- overflow: "truncate",
- width: y,
- ellipsis: m,
- fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
- align: s.get("align") || d.textAlign,
- verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
- }),
- z2: 1
- });
- if (xm({
- el: _,
- componentModel: e,
- itemName: i
- }), _.__fullText = i, _.anid = "name", e.get("triggerEvent")) {
- var O = sa.makeAxisEventDataBase(e);
- O.targetType = "axisName", O.name = i, ft(_).eventData = O;
- }
- r.add(_), _.updateTransform(), n.add(_), _.decomposeTransform();
- }
- }
- };
- function Uet(t, e, n, r) {
- var i = P5(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
- return Vg(i - jc / 2) ? (o = l ? "bottom" : "top", a = "center") : Vg(i - jc * 1.5) ? (o = l ? "top" : "bottom", a = "center") : (o = "middle", i < jc * 1.5 && i > jc / 2 ? a = l ? "left" : "right" : a = l ? "right" : "left"), {
- rotation: i,
- textAlign: a,
- textVerticalAlign: o
- };
- }
- function Xet(t, e, n) {
- if (!$ce(t.axis)) {
- var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
- e = e || [], n = n || [];
- var a = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = n[0], c = n[1], f = n[n.length - 1], d = n[n.length - 2];
- r === !1 ? (Io(a), Io(u)) : BZ(a, o) && (r ? (Io(o), Io(c)) : (Io(a), Io(u))), i === !1 ? (Io(s), Io(f)) : BZ(l, s) && (i ? (Io(l), Io(d)) : (Io(s), Io(f)));
- }
- }
- function Io(t) {
- t && (t.ignore = !0);
- }
- function BZ(t, e) {
- var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
- if (!(!n || !r)) {
- var i = i1([]);
- return Lf(i, i, -t.rotation), n.applyTransform(Ll([], i, t.getLocalTransform())), r.applyTransform(Ll([], i, e.getLocalTransform())), n.intersect(r);
- }
- }
- function zZ(t) {
- return t === "middle" || t === "center";
- }
- function Cfe(t, e, n, r, i) {
- for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
- var u = t[l].coord;
- o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (oi(o, o, e), oi(s, s, e));
- var c = new Xr({
- shape: {
- x1: o[0],
- y1: o[1],
- x2: s[0],
- y2: s[1]
- },
- style: r,
- z2: 2,
- autoBatch: !0,
- silent: !0
- });
- Qg(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
- }
- return a;
- }
- function Yet(t, e, n, r) {
- var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
- if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
- for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = Cfe(u, e.transform, l, it(s.getLineStyle(), {
- stroke: n.get(["axisLine", "lineStyle", "color"])
- }), "ticks"), f = 0; f < c.length; f++)
- t.add(c[f]);
- return c;
- }
- }
- function qet(t, e, n, r) {
- var i = n.axis, a = n.getModel("minorTick");
- if (!(!a.get("show") || i.scale.isBlank())) {
- var o = i.getMinorTicksCoords();
- if (o.length)
- for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = it(s.getLineStyle(), it(n.getModel("axisTick").getLineStyle(), {
- stroke: n.get(["axisLine", "lineStyle", "color"])
- })), c = 0; c < o.length; c++)
- for (var f = Cfe(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
- t.add(f[d]);
- }
- }
- function Ket(t, e, n, r) {
- var i = n.axis, a = Or(r.axisLabelShow, n.get(["axisLabel", "show"]));
- if (!(!a || i.scale.isBlank())) {
- var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (Or(r.labelRotate, o.get("rotate")) || 0) * jc / 180, c = sa.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = sa.isLabelSilent(n), p = n.get("triggerEvent");
- return F(l, function(v, g) {
- var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, _ = v.rawLabel, O = o;
- if (f && f[m]) {
- var S = f[m];
- nt(S) && S.textStyle && (O = new wn(S.textStyle, o, n.ecModel));
- }
- var x = O.getTextColor() || n.get(["axisLine", "lineStyle", "color"]), C = i.dataToCoord(m), P = O.getShallow("align", !0) || c.textAlign, $ = dt(O.getShallow("alignMinLabel", !0), P), T = dt(O.getShallow("alignMaxLabel", !0), P), E = O.getShallow("verticalAlign", !0) || O.getShallow("baseline", !0) || c.textVerticalAlign, M = dt(O.getShallow("verticalAlignMinLabel", !0), E), R = dt(O.getShallow("verticalAlignMaxLabel", !0), E), N = new jt({
- x: C,
- y: r.labelOffset + r.labelDirection * s,
- rotation: c.rotation,
- silent: h,
- z2: 10 + (v.level || 0),
- style: Mn(O, {
- text: y,
- align: g === 0 ? $ : g === l.length - 1 ? T : P,
- verticalAlign: g === 0 ? M : g === l.length - 1 ? R : E,
- fill: qe(x) ? x(
- // (1) In category axis with data zoom, tick is not the original
- // index of axis.data. So tick should not be exposed to user
- // in category axis.
- // (2) Compatible with previous version, which always use formatted label as
- // input. But in interval scale the formatted label is like '223,445', which
- // maked user replace ','. So we modify it to return original val but remain
- // it as 'string' to avoid error in replacing.
- i.type === "category" ? _ : i.type === "value" ? m + "" : m,
- g
- ) : x
- })
- });
- if (N.anid = "label_" + m, p) {
- var I = sa.makeAxisEventDataBase(n);
- I.targetType = "axisLabel", I.value = _, I.tickIndex = g, i.type === "category" && (I.dataIndex = m), ft(N).eventData = I;
- }
- e.add(N), N.updateTransform(), d.push(N), t.add(N), N.decomposeTransform();
- }), d;
- }
- }
- function Jet(t, e) {
- var n = {
- /**
- * key: makeKey(axis.model)
- * value: {
- * axis,
- * coordSys,
- * axisPointerModel,
- * triggerTooltip,
- * triggerEmphasis,
- * involveSeries,
- * snap,
- * seriesModels,
- * seriesDataCount
- * }
- */
- axesInfo: {},
- seriesInvolved: !1,
- /**
- * key: makeKey(coordSys.model)
- * value: Object: key makeKey(axis.model), value: axisInfo
- */
- coordSysAxesInfo: {},
- coordSysMap: {}
- };
- return ett(n, t, e), n.seriesInvolved && ntt(n, t), n;
- }
- function ett(t, e, n) {
- var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
- F(n.getCoordinateSystems(), function(s) {
- if (!s.axisPointerEnabled)
- return;
- var l = o_(s.model), u = t.coordSysAxesInfo[l] = {};
- t.coordSysMap[l] = s;
- var c = s.model, f = c.getModel("tooltip", r);
- if (F(s.getAxes(), vt(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
- var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
- (d || h) && F(p.baseAxes, vt(v, h ? "cross" : !0, d)), h && F(p.otherAxes, vt(v, "cross", !1));
- }
- function v(g, m, y) {
- var _ = y.model.getModel("axisPointer", i), O = _.get("show");
- if (!(!O || O === "auto" && !g && !lL(_))) {
- m == null && (m = _.get("triggerTooltip")), _ = g ? ttt(y, f, i, e, g, m) : _;
- var S = _.get("snap"), x = _.get("triggerEmphasis"), C = o_(y.model), P = m || S || y.type === "category", $ = t.axesInfo[C] = {
- key: C,
- axis: y,
- coordSys: s,
- axisPointerModel: _,
- triggerTooltip: m,
- triggerEmphasis: x,
- involveSeries: P,
- snap: S,
- useHandle: lL(_),
- seriesModels: [],
- linkGroup: null
- };
- u[C] = $, t.seriesInvolved = t.seriesInvolved || P;
- var T = rtt(a, y);
- if (T != null) {
- var E = o[T] || (o[T] = {
- axesInfo: {}
- });
- E.axesInfo[C] = $, E.mapper = a[T].mapper, $.linkGroup = E;
- }
- }
- }
- });
- }
- function ttt(t, e, n, r, i, a) {
- var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
- F(s, function(d) {
- l[d] = ot(o.get(d));
- }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
- var u = l.label || (l.label = {});
- if (u.show == null && (u.show = !1), i === "cross") {
- var c = o.get(["label", "show"]);
- if (u.show = c ?? !0, !a) {
- var f = l.lineStyle = o.get("crossStyle");
- f && it(u, f.textStyle);
- }
- }
- return t.model.getModel("axisPointer", new wn(l, n, r));
- }
- function ntt(t, e) {
- e.eachSeries(function(n) {
- var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
- !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || F(t.coordSysAxesInfo[o_(r.model)], function(o) {
- var s = o.axis;
- r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
- });
- });
- }
- function rtt(t, e) {
- for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
- var a = t[i] || {};
- if (UM(a[r + "AxisId"], n.id) || UM(a[r + "AxisIndex"], n.componentIndex) || UM(a[r + "AxisName"], n.name))
- return i;
- }
- }
- function UM(t, e) {
- return t === "all" || Se(t) && St(t, e) >= 0 || t === e;
- }
- function itt(t) {
- var e = B3(t);
- if (e) {
- var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
- o != null && (o = r.parse(o));
- var s = lL(n);
- a == null && (i.status = s ? "show" : "hide");
- var l = r.getExtent().slice();
- l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
- (o == null || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), i.value = o, s && (i.status = e.axis.scale.isBlank() ? "hide" : "show");
- }
- }
- function B3(t) {
- var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
- return e && e.axesInfo[o_(t)];
- }
- function att(t) {
- var e = B3(t);
- return e && e.axisPointerModel;
- }
- function lL(t) {
- return !!t.get(["handle", "show"]);
- }
- function o_(t) {
- return t.type + "||" + t.id;
- }
- var XM = {}, bp = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- this.axisPointerClass && itt(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
- }, e.prototype.updateAxisPointer = function(n, r, i, a) {
- this._doUpdateAxisPointerClass(n, i, !1);
- }, e.prototype.remove = function(n, r) {
- var i = this._axisPointer;
- i && i.remove(r);
- }, e.prototype.dispose = function(n, r) {
- this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
- }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
- var a = e.getAxisPointerClass(this.axisPointerClass);
- if (a) {
- var o = att(n);
- o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
- }
- }, e.prototype._disposeAxisPointer = function(n) {
- this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
- }, e.registerAxisPointerClass = function(n, r) {
- if (process.env.NODE_ENV !== "production" && XM[n])
- throw new Error("axisPointer " + n + " exists");
- XM[n] = r;
- }, e.getAxisPointerClass = function(n) {
- return n && XM[n];
- }, e.type = "axis", e;
- }(Ln)
- ), uL = Ut();
- function Tfe(t, e, n, r) {
- var i = n.axis;
- if (!i.scale.isBlank()) {
- var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
- tickModel: a,
- clamp: !0
- });
- if (u.length) {
- var c = s.length, f = uL(t).splitAreaColors, d = Ze(), h = 0;
- if (f)
- for (var p = 0; p < u.length; p++) {
- var v = f.get(u[p].tickValue);
- if (v != null) {
- h = (v + (c - 1) * p) % c;
- break;
- }
- }
- var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
- s = Se(s) ? s : [s];
- for (var p = 1; p < u.length; p++) {
- var y = i.toGlobalCoord(u[p].coord), _ = void 0, O = void 0, S = void 0, x = void 0;
- i.isHorizontal() ? (_ = g, O = l.y, S = y - _, x = l.height, g = _ + S) : (_ = l.x, O = g, S = l.width, x = y - O, g = O + x);
- var C = u[p - 1].tickValue;
- C != null && d.set(C, h), e.add(new Zt({
- anid: C != null ? "area_" + C : null,
- shape: {
- x: _,
- y: O,
- width: S,
- height: x
- },
- style: it({
- fill: s[h]
- }, m),
- autoBatch: !0,
- silent: !0
- })), h = (h + 1) % c;
- }
- uL(t).splitAreaColors = d;
- }
- }
- }
- function Pfe(t) {
- uL(t).splitAreaColors = null;
- }
- var ott = ["axisLine", "axisTickLabel", "axisName"], stt = ["splitArea", "splitLine", "minorSplitLine"], $fe = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
- }
- return e.prototype.render = function(n, r, i, a) {
- this.group.removeAll();
- var o = this._axisGroup;
- if (this._axisGroup = new ct(), this.group.add(this._axisGroup), !!n.get("show")) {
- var s = n.getCoordSysModel(), l = sL(s, n), u = new sa(n, _e({
- handleAutoShown: function(f) {
- for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
- if (Kk(d[h].getOtherAxis(n.axis).scale))
- return !0;
- return !1;
- }
- }, l));
- F(ott, u.add, u), this._axisGroup.add(u.getGroup()), F(stt, function(f) {
- n.get([f, "show"]) && ltt[f](this, this._axisGroup, n, s);
- }, this);
- var c = a && a.type === "changeAxisOrder" && a.isInitSort;
- c || h1(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
- }
- }, e.prototype.remove = function() {
- Pfe(this);
- }, e.type = "cartesianAxis", e;
- }(bp)
- ), ltt = {
- splitLine: function(t, e, n, r) {
- var i = n.axis;
- if (!i.scale.isBlank()) {
- var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
- s = Se(s) ? s : [s];
- for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
- tickModel: a
- }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
- var g = i.toGlobalCoord(f[v].coord);
- u ? (d[0] = g, d[1] = l.y, h[0] = g, h[1] = l.y + l.height) : (d[0] = l.x, d[1] = g, h[0] = l.x + l.width, h[1] = g);
- var m = c++ % s.length, y = f[v].tickValue, _ = new Xr({
- anid: y != null ? "line_" + f[v].tickValue : null,
- autoBatch: !0,
- shape: {
- x1: d[0],
- y1: d[1],
- x2: h[0],
- y2: h[1]
- },
- style: it({
- stroke: s[m]
- }, p),
- silent: !0
- });
- Qg(_.shape, p.lineWidth), e.add(_);
- }
- }
- },
- minorSplitLine: function(t, e, n, r) {
- var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
- if (u.length)
- for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
- for (var p = 0; p < u[h].length; p++) {
- var v = i.toGlobalCoord(u[h][p].coord);
- l ? (c[0] = v, c[1] = s.y, f[0] = v, f[1] = s.y + s.height) : (c[0] = s.x, c[1] = v, f[0] = s.x + s.width, f[1] = v);
- var g = new Xr({
- anid: "minor_line_" + u[h][p].tickValue,
- autoBatch: !0,
- shape: {
- x1: c[0],
- y1: c[1],
- x2: f[0],
- y2: f[1]
- },
- style: d,
- silent: !0
- });
- Qg(g.shape, d.lineWidth), e.add(g);
- }
- },
- splitArea: function(t, e, n, r) {
- Tfe(t, e, n, r);
- }
- }, Afe = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "xAxis", e;
- }($fe)
- ), utt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = Afe.type, n;
- }
- return e.type = "yAxis", e;
- }($fe)
- ), ctt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "grid", n;
- }
- return e.prototype.render = function(n, r) {
- this.group.removeAll(), n.get("show") && this.group.add(new Zt({
- shape: n.coordinateSystem.getRect(),
- style: it({
- fill: n.get("backgroundColor")
- }, n.getItemStyle()),
- silent: !0,
- z2: -1
- }));
- }, e.type = "grid", e;
- }(Ln)
- ), VZ = {
- // gridIndex: 0,
- // gridId: '',
- offset: 0
- };
- function Efe(t) {
- t.registerComponentView(ctt), t.registerComponentModel(Bet), t.registerCoordinateSystem("cartesian2d", jet), Zg(t, "x", aL, VZ), Zg(t, "y", aL, VZ), t.registerComponentView(Afe), t.registerComponentView(utt), t.registerPreprocessor(function(e) {
- e.xAxis && e.yAxis && !e.grid && (e.grid = {});
- });
- }
- function ftt(t) {
- Mt(Efe), t.registerSeriesModel(Det), t.registerChartView(Net), t.registerLayout(_1("scatter"));
- }
- function dtt(t) {
- t.eachSeriesByType("radar", function(e) {
- var n = e.getData(), r = [], i = e.coordinateSystem;
- if (i) {
- var a = i.getIndicatorAxes();
- F(a, function(o, s) {
- n.each(n.mapDimension(a[s].dim), function(l, u) {
- r[u] = r[u] || [];
- var c = i.dataToPoint(l, s);
- r[u][s] = FZ(c) ? c : WZ(i);
- });
- }), n.each(function(o) {
- var s = Uoe(r[o], function(l) {
- return FZ(l);
- }) || WZ(i);
- r[o].push(s.slice()), n.setItemLayout(o, r[o]);
- });
- }
- });
- }
- function FZ(t) {
- return !isNaN(t[0]) && !isNaN(t[1]);
- }
- function WZ(t) {
- return [t.cx, t.cy];
- }
- function htt(t) {
- var e = t.polar;
- if (e) {
- Se(e) || (e = [e]);
- var n = [];
- F(e, function(r, i) {
- r.indicator ? (r.type && !r.shape && (r.shape = r.type), t.radar = t.radar || [], Se(t.radar) || (t.radar = [t.radar]), t.radar.push(r)) : n.push(r);
- }), t.polar = n;
- }
- F(t.series, function(r) {
- r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
- });
- }
- var ptt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
- function u(d, h) {
- var p = d.getItemVisual(h, "symbol") || "circle";
- if (p !== "none") {
- var v = Em(d.getItemVisual(h, "symbolSize")), g = wr(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
- return g.attr({
- style: {
- strokeNoScale: !0
- },
- z2: 100,
- scaleX: v[0] / 2,
- scaleY: v[1] / 2,
- rotation: m * Math.PI / 180 || 0
- }), g;
- }
- }
- function c(d, h, p, v, g, m) {
- p.removeAll();
- for (var y = 0; y < h.length - 1; y++) {
- var _ = u(v, g);
- _ && (_.__dimIdx = y, d[y] ? (_.setPosition(d[y]), hp[m ? "initProps" : "updateProps"](_, {
- x: h[y][0],
- y: h[y][1]
- }, n, g)) : _.setPosition(h[y]), p.add(_));
- }
- }
- function f(d) {
- return Ce(d, function(h) {
- return [a.cx, a.cy];
- });
- }
- s.diff(l).add(function(d) {
- var h = s.getItemLayout(d);
- if (h) {
- var p = new pa(), v = new va(), g = {
- shape: {
- points: h
- }
- };
- p.shape.points = f(h), v.shape.points = f(h), Vn(p, g, n, d), Vn(v, g, n, d);
- var m = new ct(), y = new ct();
- m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
- }
- }).update(function(d, h) {
- var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
- shape: {
- points: s.getItemLayout(d)
- }
- };
- y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), Zs(g), Zs(v), tn(v, y, n), tn(g, y, n), s.setItemGraphicEl(d, p));
- }).remove(function(d) {
- o.remove(l.getItemGraphicEl(d));
- }).execute(), s.eachItemGraphicEl(function(d, h) {
- var p = s.getItemModel(h), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = s.getItemVisual(h, "style"), _ = y.fill;
- o.add(d), v.useStyle(it(p.getModel("lineStyle").getLineStyle(), {
- fill: "none",
- stroke: _
- })), Ai(v, p, "lineStyle"), Ai(g, p, "areaStyle");
- var O = p.getModel("areaStyle"), S = O.isEmpty() && O.parentModel.isEmpty();
- g.ignore = S, F(["emphasis", "select", "blur"], function(P) {
- var $ = p.getModel([P, "areaStyle"]), T = $.isEmpty() && $.parentModel.isEmpty();
- g.ensureState(P).ignore = T && S;
- }), g.useStyle(it(O.getAreaStyle(), {
- fill: _,
- opacity: 0.7,
- decal: y.decal
- }));
- var x = p.getModel("emphasis"), C = x.getModel("itemStyle").getItemStyle();
- m.eachChild(function(P) {
- if (P instanceof ci) {
- var $ = P.style;
- P.useStyle(_e({
- // TODO other properties like x, y ?
- image: $.image,
- x: $.x,
- y: $.y,
- width: $.width,
- height: $.height
- }, y));
- } else
- P.useStyle(y), P.setColor(_), P.style.strokeNoScale = !0;
- var T = P.ensureState("emphasis");
- T.style = ot(C);
- var E = s.getStore().get(s.getDimensionIndex(P.__dimIdx), h);
- (E == null || isNaN(E)) && (E = ""), Ei(P, ei(p), {
- labelFetcher: s.hostModel,
- labelDataIndex: h,
- labelDimIndex: P.__dimIdx,
- defaultText: E,
- inheritColor: _,
- defaultOpacity: y.opacity
- });
- }), ur(d, x.get("focus"), x.get("blurScope"), x.get("disabled"));
- }), this._data = s;
- }, e.prototype.remove = function() {
- this.group.removeAll(), this._data = null;
- }, e.type = "radar", e;
- }(_n)
- ), vtt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n;
- }
- return e.prototype.init = function(n) {
- t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this));
- }, e.prototype.getInitialData = function(n, r) {
- return Rm(this, {
- generateCoord: "indicator_",
- generateCoordCount: 1 / 0
- });
- }, e.prototype.formatTooltip = function(n, r, i) {
- var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = Tue(this, n);
- return ti("section", {
- header: u,
- sortBlocks: !0,
- blocks: Ce(s, function(f) {
- var d = a.get(a.mapDimension(f.dim), n);
- return ti("nameValue", {
- markerType: "subItem",
- markerColor: c,
- name: f.name,
- value: d,
- sortParam: d
- });
- })
- });
- }, e.prototype.getTooltipPosition = function(n) {
- if (n != null) {
- for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(Ce(i.dimensions, function(u) {
- return r.mapDimension(u);
- }), n), o = 0, s = a.length; o < s; o++)
- if (!isNaN(a[o])) {
- var l = i.getIndicatorAxes();
- return i.coordToPoint(l[o].dataToCoord(a[o]), o);
- }
- }
- }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- colorBy: "data",
- coordinateSystem: "radar",
- legendHoverLink: !0,
- radarIndex: 0,
- lineStyle: {
- width: 2,
- type: "solid",
- join: "round"
- },
- label: {
- position: "top"
- },
- // areaStyle: {
- // },
- // itemStyle: {}
- symbolSize: 8
- // symbolRotate: null
- }, e;
- }(Tn)
- ), Q0 = xfe.value;
- function FS(t, e) {
- return it({
- show: e
- }, t);
- }
- var gtt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.optionUpdated = function() {
- var n = this.get("boundaryGap"), r = this.get("splitNumber"), i = this.get("scale"), a = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), c = this.get(["axisName", "formatter"]), f = this.get("axisNameGap"), d = this.get("triggerEvent"), h = Ce(this.get("indicator") || [], function(p) {
- p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
- var v = l;
- p.color != null && (v = it({
- color: p.color
- }, l));
- var g = mt(ot(p), {
- boundaryGap: n,
- splitNumber: r,
- scale: i,
- axisLine: a,
- axisTick: o,
- // axisType: axisType,
- axisLabel: s,
- // Compatible with 2 and use text
- name: p.text,
- showName: u,
- nameLocation: "end",
- nameGap: f,
- // min: 0,
- nameTextStyle: v,
- triggerEvent: d
- }, !1);
- if (Ve(c)) {
- var m = g.name;
- g.name = c.replace("{value}", m ?? "");
- } else qe(c) && (g.name = c(g.name, g));
- var y = new wn(g, null, this.ecModel);
- return vr(y, Dm.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
- }, this);
- this._indicatorModels = h;
- }, e.prototype.getIndicatorModels = function() {
- return this._indicatorModels;
- }, e.type = "radar", e.defaultOption = {
- // zlevel: 0,
- z: 0,
- center: ["50%", "50%"],
- radius: "75%",
- startAngle: 90,
- axisName: {
- show: !0
- // formatter: null
- // textStyle: {}
- },
- boundaryGap: [0, 0],
- splitNumber: 5,
- axisNameGap: 15,
- scale: !1,
- // Polygon or circle
- shape: "polygon",
- axisLine: mt({
- lineStyle: {
- color: "#bbb"
- }
- }, Q0.axisLine),
- axisLabel: FS(Q0.axisLabel, !1),
- axisTick: FS(Q0.axisTick, !1),
- // axisType: 'value',
- splitLine: FS(Q0.splitLine, !0),
- splitArea: FS(Q0.splitArea, !0),
- // {text, min, max}
- indicator: []
- }, e;
- }(At)
- ), mtt = ["axisLine", "axisTickLabel", "axisName"], ytt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = this.group;
- a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
- }, e.prototype._buildAxes = function(n) {
- var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = Ce(i, function(o) {
- var s = o.model.get("showName") ? o.name : "", l = new sa(o.model, {
- axisName: s,
- position: [r.cx, r.cy],
- rotation: o.angle,
- labelDirection: -1,
- tickDirection: -1,
- nameDirection: 1
- });
- return l;
- });
- F(a, function(o) {
- F(mtt, o.add, o), this.group.add(o.getGroup());
- }, this);
- }, e.prototype._buildSplitLineAndArea = function(n) {
- var r = n.coordinateSystem, i = r.getIndicatorAxes();
- if (!i.length)
- return;
- var a = n.get("shape"), o = n.getModel("splitLine"), s = n.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), c = o.get("show"), f = s.get("show"), d = l.get("color"), h = u.get("color"), p = Se(d) ? d : [d], v = Se(h) ? h : [h], g = [], m = [];
- function y(I, B, Q) {
- var W = Q % B.length;
- return I[W] = I[W] || [], W;
- }
- if (a === "circle")
- for (var _ = i[0].getTicksCoords(), O = r.cx, S = r.cy, x = 0; x < _.length; x++) {
- if (c) {
- var C = y(g, p, x);
- g[C].push(new ic({
- shape: {
- cx: O,
- cy: S,
- r: _[x].coord
- }
- }));
- }
- if (f && x < _.length - 1) {
- var C = y(m, v, x);
- m[C].push(new c1({
- shape: {
- cx: O,
- cy: S,
- r0: _[x].coord,
- r: _[x + 1].coord
- }
- }));
- }
- }
- else
- for (var P, $ = Ce(i, function(I, B) {
- var Q = I.getTicksCoords();
- return P = P == null ? Q.length - 1 : Math.min(Q.length - 1, P), Ce(Q, function(W) {
- return r.coordToPoint(W.coord, B);
- });
- }), T = [], x = 0; x <= P; x++) {
- for (var E = [], M = 0; M < i.length; M++)
- E.push($[M][x]);
- if (E[0] ? E.push(E[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + x), c) {
- var C = y(g, p, x);
- g[C].push(new va({
- shape: {
- points: E
- }
- }));
- }
- if (f && T) {
- var C = y(m, v, x - 1);
- m[C].push(new pa({
- shape: {
- points: E.concat(T)
- }
- }));
- }
- T = E.slice().reverse();
- }
- var R = l.getLineStyle(), N = u.getAreaStyle();
- F(m, function(I, B) {
- this.group.add(no(I, {
- style: it({
- stroke: "none",
- fill: v[B % v.length]
- }, N),
- silent: !0
- }));
- }, this), F(g, function(I, B) {
- this.group.add(no(I, {
- style: it({
- fill: "none",
- stroke: p[B % p.length]
- }, R),
- silent: !0
- }));
- }, this);
- }, e.type = "radar", e;
- }(Ln)
- ), btt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this, n, r, i) || this;
- return a.type = "value", a.angle = 0, a.name = "", a;
- }
- return e;
- }(vs)
- ), _tt = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.dimensions = [], this._model = e, this._indicatorAxes = Ce(e.getIndicatorModels(), function(i, a) {
- var o = "indicator_" + a, s = new btt(
- o,
- new Gu()
- // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
- );
- return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
- }, this), this.resize(e, r);
- }
- return t.prototype.getIndicatorAxes = function() {
- return this._indicatorAxes;
- }, t.prototype.dataToPoint = function(e, n) {
- var r = this._indicatorAxes[n];
- return this.coordToPoint(r.dataToCoord(e), n);
- }, t.prototype.coordToPoint = function(e, n) {
- var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
- return [a, o];
- }, t.prototype.pointToData = function(e) {
- var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
- n /= i, r /= i;
- for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
- var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
- f < o && (s = c, l = u, o = f);
- }
- return [l, +(s && s.coordToData(i))];
- }, t.prototype.resize = function(e, n) {
- var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
- this.cx = ze(r[0], i), this.cy = ze(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
- var s = e.get("radius");
- (Ve(s) || Kt(s)) && (s = [0, s]), this.r0 = ze(s[0], o), this.r = ze(s[1], o), F(this._indicatorAxes, function(l, u) {
- l.setExtent(this.r0, this.r);
- var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
- c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
- }, this);
- }, t.prototype.update = function(e, n) {
- var r = this._indicatorAxes, i = this._model;
- F(r, function(s) {
- s.scale.setExtent(1 / 0, -1 / 0);
- }), e.eachSeriesByType("radar", function(s, l) {
- if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
- var u = s.getData();
- F(r, function(c) {
- c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
- });
- }
- }, this);
- var a = i.get("splitNumber"), o = new Gu();
- o.setExtent(0, a), o.setInterval(1), F(r, function(s, l) {
- wfe(s.scale, s.model, o);
- });
- }, t.prototype.convertToPixel = function(e, n, r) {
- return console.warn("Not implemented."), null;
- }, t.prototype.convertFromPixel = function(e, n, r) {
- return console.warn("Not implemented."), null;
- }, t.prototype.containPoint = function(e) {
- return console.warn("Not implemented."), !1;
- }, t.create = function(e, n) {
- var r = [];
- return e.eachComponent("radar", function(i) {
- var a = new t(i, e, n);
- r.push(a), i.coordinateSystem = a;
- }), e.eachSeriesByType("radar", function(i) {
- i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
- }), r;
- }, t.dimensions = [], t;
- }()
- );
- function Ott(t) {
- t.registerCoordinateSystem("radar", _tt), t.registerComponentModel(gtt), t.registerComponentView(ytt), t.registerVisual({
- seriesType: "radar",
- reset: function(e) {
- var n = e.getData();
- n.each(function(r) {
- n.setItemVisual(r, "legendIcon", "roundRect");
- }), n.setVisual("legendIcon", "roundRect");
- }
- });
- }
- function Stt(t) {
- Mt(Ott), t.registerChartView(ptt), t.registerSeriesModel(vtt), t.registerLayout(dtt), t.registerProcessor(O1("radar")), t.registerPreprocessor(htt);
- }
- var QZ = "\0_ec_interaction_mutex";
- function xtt(t, e, n) {
- var r = z3(t);
- r[e] = n;
- }
- function wtt(t, e, n) {
- var r = z3(t), i = r[e];
- i === n && (r[e] = null);
- }
- function HZ(t, e) {
- return !!z3(t)[e];
- }
- function z3(t) {
- return t[QZ] || (t[QZ] = {});
- }
- Js({
- type: "takeGlobalCursor",
- event: "globalCursorTaken",
- update: "update"
- }, fr);
- var x1 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- r._zr = n;
- var i = We(r._mousedownHandler, r), a = We(r._mousemoveHandler, r), o = We(r._mouseupHandler, r), s = We(r._mousewheelHandler, r), l = We(r._pinchHandler, r);
- return r.enable = function(u, c) {
- this.disable(), this._opt = it(ot(c) || {}, {
- zoomOnMouseWheel: !0,
- moveOnMouseMove: !0,
- // By default, wheel do not trigger move.
- moveOnMouseWheel: !1,
- preventDefaultMouseMove: !0
- }), u == null && (u = !0), (u === !0 || u === "move" || u === "pan") && (n.on("mousedown", i), n.on("mousemove", a), n.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (n.on("mousewheel", s), n.on("pinch", l));
- }, r.disable = function() {
- n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
- }, r;
- }
- return e.prototype.isDragging = function() {
- return this._dragging;
- }, e.prototype.isPinching = function() {
- return this._pinching;
- }, e.prototype.setPointerChecker = function(n) {
- this.pointerChecker = n;
- }, e.prototype.dispose = function() {
- this.disable();
- }, e.prototype._mousedownHandler = function(n) {
- if (!yH(n)) {
- for (var r = n.target; r; ) {
- if (r.draggable)
- return;
- r = r.__hostTarget || r.parent;
- }
- var i = n.offsetX, a = n.offsetY;
- this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
- }
- }, e.prototype._mousemoveHandler = function(n) {
- if (!(!this._dragging || !mw("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || HZ(this._zr, "globalPan"))) {
- var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
- this._x = r, this._y = i, this._opt.preventDefaultMouseMove && Vu(n.event), Mfe(this, "pan", "moveOnMouseMove", n, {
- dx: s,
- dy: l,
- oldX: a,
- oldY: o,
- newX: r,
- newY: i,
- isAvailableBehavior: null
- });
- }
- }, e.prototype._mouseupHandler = function(n) {
- yH(n) || (this._dragging = !1);
- }, e.prototype._mousewheelHandler = function(n) {
- var r = mw("zoomOnMouseWheel", n, this._opt), i = mw("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
- if (!(a === 0 || !r && !i)) {
- if (r) {
- var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
- YM(this, "zoom", "zoomOnMouseWheel", n, {
- scale: c,
- originX: s,
- originY: l,
- isAvailableBehavior: null
- });
- }
- if (i) {
- var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
- YM(this, "scrollMove", "moveOnMouseWheel", n, {
- scrollDelta: d,
- originX: s,
- originY: l,
- isAvailableBehavior: null
- });
- }
- }
- }, e.prototype._pinchHandler = function(n) {
- if (!HZ(this._zr, "globalPan")) {
- var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
- YM(this, "zoom", null, n, {
- scale: r,
- originX: n.pinchX,
- originY: n.pinchY,
- isAvailableBehavior: null
- });
- }
- }, e;
- }(fs)
- );
- function YM(t, e, n, r, i) {
- t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (Vu(r.event), Mfe(t, e, n, r, i));
- }
- function Mfe(t, e, n, r, i) {
- i.isAvailableBehavior = We(mw, null, n, r), t.trigger(e, i);
- }
- function mw(t, e, n) {
- var r = n[t];
- return !t || r && (!Ve(r) || e.event[r + "Key"]);
- }
- function V3(t, e, n) {
- var r = t.target;
- r.x += e, r.y += n, r.dirty();
- }
- function F3(t, e, n, r) {
- var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
- if (o *= e, a) {
- var s = a.min || 0, l = a.max || 1 / 0;
- o = Math.max(Math.min(l, o), s);
- }
- var u = o / t.zoom;
- t.zoom = o, i.x -= (n - i.x) * (u - 1), i.y -= (r - i.y) * (u - 1), i.scaleX *= u, i.scaleY *= u, i.dirty();
- }
- var Ctt = {
- axisPointer: 1,
- tooltip: 1,
- brush: 1
- };
- function QP(t, e, n) {
- var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
- return r && r !== n && !Ctt.hasOwnProperty(r.mainType) && i && i.model !== n;
- }
- function Ife(t) {
- if (Ve(t)) {
- var e = new DOMParser();
- t = e.parseFromString(t, "text/xml");
- }
- var n = t;
- for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
- n = n.nextSibling;
- return n;
- }
- var qM, nT = {
- fill: "fill",
- stroke: "stroke",
- "stroke-width": "lineWidth",
- opacity: "opacity",
- "fill-opacity": "fillOpacity",
- "stroke-opacity": "strokeOpacity",
- "stroke-dasharray": "lineDash",
- "stroke-dashoffset": "lineDashOffset",
- "stroke-linecap": "lineCap",
- "stroke-linejoin": "lineJoin",
- "stroke-miterlimit": "miterLimit",
- "font-family": "fontFamily",
- "font-size": "fontSize",
- "font-style": "fontStyle",
- "font-weight": "fontWeight",
- "text-anchor": "textAlign",
- visibility: "visibility",
- display: "display"
- }, GZ = kt(nT), rT = {
- "alignment-baseline": "textBaseline",
- "stop-color": "stopColor"
- }, jZ = kt(rT), Ttt = function() {
- function t() {
- this._defs = {}, this._root = null;
- }
- return t.prototype.parse = function(e, n) {
- n = n || {};
- var r = Ife(e);
- if (process.env.NODE_ENV !== "production" && !r)
- throw new Error("Illegal svg");
- this._defsUsePending = [];
- var i = new ct();
- this._root = i;
- var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
- isNaN(s) && (s = null), isNaN(l) && (l = null), Xa(r, i, null, !0, !1);
- for (var u = r.firstChild; u; )
- this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
- Att(this._defs, this._defsUsePending), this._defsUsePending = [];
- var c, f;
- if (o) {
- var d = HP(o);
- d.length >= 4 && (c = {
- x: parseFloat(d[0] || 0),
- y: parseFloat(d[1] || 0),
- width: parseFloat(d[2]),
- height: parseFloat(d[3])
- });
- }
- if (c && s != null && l != null && (f = Rfe(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
- var h = i;
- i = new ct(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
- }
- return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new Zt({
- shape: { x: 0, y: 0, width: s, height: l }
- })), {
- root: i,
- width: s,
- height: l,
- viewBoxRect: c,
- viewBoxTransform: f,
- named: a
- };
- }, t.prototype._parseNode = function(e, n, r, i, a, o) {
- var s = e.nodeName.toLowerCase(), l, u = i;
- if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
- l = n;
- else {
- if (!a) {
- var c = qM[s];
- if (c && Qe(qM, s)) {
- l = c.call(this, e, n);
- var f = e.getAttribute("name");
- if (f) {
- var d = {
- name: f,
- namedFrom: null,
- svgNodeTagLower: s,
- el: l
- };
- r.push(d), s === "g" && (u = d);
- } else i && r.push({
- name: i.name,
- namedFrom: i,
- svgNodeTagLower: s,
- el: l
- });
- n.add(l);
- }
- }
- var h = ZZ[s];
- if (h && Qe(ZZ, s)) {
- var p = h.call(this, e), v = e.getAttribute("id");
- v && (this._defs[v] = p);
- }
- }
- if (l && l.isGroup)
- for (var g = e.firstChild; g; )
- g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
- }, t.prototype._parseText = function(e, n) {
- var r = new Wg({
- style: {
- text: e.textContent
- },
- silent: !0,
- x: this._textX || 0,
- y: this._textY || 0
- });
- Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), Ptt(r, n);
- var i = r.style, a = i.fontSize;
- a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
- var o = (i.fontSize || i.fontFamily) && [
- i.fontStyle,
- i.fontWeight,
- (i.fontSize || 12) + "px",
- i.fontFamily || "sans-serif"
- ].join(" ");
- i.font = o;
- var s = r.getBoundingRect();
- return this._textX += s.width, n.add(r), r;
- }, t.internalField = function() {
- qM = {
- g: function(e, n) {
- var r = new ct();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r;
- },
- rect: function(e, n) {
- var r = new Zt();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
- x: parseFloat(e.getAttribute("x") || "0"),
- y: parseFloat(e.getAttribute("y") || "0"),
- width: parseFloat(e.getAttribute("width") || "0"),
- height: parseFloat(e.getAttribute("height") || "0")
- }), r.silent = !0, r;
- },
- circle: function(e, n) {
- var r = new ic();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
- cx: parseFloat(e.getAttribute("cx") || "0"),
- cy: parseFloat(e.getAttribute("cy") || "0"),
- r: parseFloat(e.getAttribute("r") || "0")
- }), r.silent = !0, r;
- },
- line: function(e, n) {
- var r = new Xr();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
- x1: parseFloat(e.getAttribute("x1") || "0"),
- y1: parseFloat(e.getAttribute("y1") || "0"),
- x2: parseFloat(e.getAttribute("x2") || "0"),
- y2: parseFloat(e.getAttribute("y2") || "0")
- }), r.silent = !0, r;
- },
- ellipse: function(e, n) {
- var r = new OP();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
- cx: parseFloat(e.getAttribute("cx") || "0"),
- cy: parseFloat(e.getAttribute("cy") || "0"),
- rx: parseFloat(e.getAttribute("rx") || "0"),
- ry: parseFloat(e.getAttribute("ry") || "0")
- }), r.silent = !0, r;
- },
- polygon: function(e, n) {
- var r = e.getAttribute("points"), i;
- r && (i = YZ(r));
- var a = new pa({
- shape: {
- points: i || []
- },
- silent: !0
- });
- return Do(n, a), Xa(e, a, this._defsUsePending, !1, !1), a;
- },
- polyline: function(e, n) {
- var r = e.getAttribute("points"), i;
- r && (i = YZ(r));
- var a = new va({
- shape: {
- points: i || []
- },
- silent: !0
- });
- return Do(n, a), Xa(e, a, this._defsUsePending, !1, !1), a;
- },
- image: function(e, n) {
- var r = new ci();
- return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setStyle({
- image: e.getAttribute("xlink:href") || e.getAttribute("href"),
- x: +e.getAttribute("x"),
- y: +e.getAttribute("y"),
- width: +e.getAttribute("width"),
- height: +e.getAttribute("height")
- }), r.silent = !0, r;
- },
- text: function(e, n) {
- var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
- this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
- var s = new ct();
- return Do(n, s), Xa(e, s, this._defsUsePending, !1, !0), s;
- },
- tspan: function(e, n) {
- var r = e.getAttribute("x"), i = e.getAttribute("y");
- r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
- var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new ct();
- return Do(n, s), Xa(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
- },
- path: function(e, n) {
- var r = e.getAttribute("d") || "", i = vle(r);
- return Do(n, i), Xa(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
- }
- };
- }(), t;
- }(), ZZ = {
- lineargradient: function(t) {
- var e = parseInt(t.getAttribute("x1") || "0", 10), n = parseInt(t.getAttribute("y1") || "0", 10), r = parseInt(t.getAttribute("x2") || "10", 10), i = parseInt(t.getAttribute("y2") || "0", 10), a = new _m(e, n, r, i);
- return UZ(t, a), XZ(t, a), a;
- },
- radialgradient: function(t) {
- var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new V5(e, n, r);
- return UZ(t, i), XZ(t, i), i;
- }
- };
- function UZ(t, e) {
- var n = t.getAttribute("gradientUnits");
- n === "userSpaceOnUse" && (e.global = !0);
- }
- function XZ(t, e) {
- for (var n = t.firstChild; n; ) {
- if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
- var r = n.getAttribute("offset"), i = void 0;
- r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
- var a = {};
- Dfe(n, a, a);
- var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
- e.colorStops.push({
- offset: i,
- color: o
- });
- }
- n = n.nextSibling;
- }
- }
- function Do(t, e) {
- t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), it(e.__inheritedStyle, t.__inheritedStyle));
- }
- function YZ(t) {
- for (var e = HP(t), n = [], r = 0; r < e.length; r += 2) {
- var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
- n.push([i, a]);
- }
- return n;
- }
- function Xa(t, e, n, r, i) {
- var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
- t.nodeType === 1 && (Itt(t, e), Dfe(t, o, s), r || Dtt(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = qZ(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = qZ(a, "stroke", o.stroke, n)), F([
- "lineWidth",
- "opacity",
- "fillOpacity",
- "strokeOpacity",
- "miterLimit",
- "fontSize"
- ], function(l) {
- o[l] != null && (a.style[l] = parseFloat(o[l]));
- }), F([
- "lineDashOffset",
- "lineCap",
- "lineJoin",
- "fontWeight",
- "fontFamily",
- "fontStyle",
- "textAlign"
- ], function(l) {
- o[l] != null && (a.style[l] = o[l]);
- }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = Ce(HP(o.lineDash), function(l) {
- return parseFloat(l);
- })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
- }
- function Ptt(t, e) {
- var n = e.__selfStyle;
- if (n) {
- var r = n.textBaseline, i = r;
- !r || r === "auto" || r === "baseline" ? i = "alphabetic" : r === "before-edge" || r === "text-before-edge" ? i = "top" : r === "after-edge" || r === "text-after-edge" ? i = "bottom" : (r === "central" || r === "mathematical") && (i = "middle"), t.style.textBaseline = i;
- }
- var a = e.__inheritedStyle;
- if (a) {
- var o = a.textAlign, s = o;
- o && (o === "middle" && (s = "center"), t.style.textAlign = s);
- }
- }
- var $tt = /^url\(\s*#(.*?)\)/;
- function qZ(t, e, n, r) {
- var i = n && n.match($tt);
- if (i) {
- var a = Zo(i[1]);
- r.push([t, e, a]);
- return;
- }
- return n === "none" && (n = null), n;
- }
- function Att(t, e) {
- for (var n = 0; n < e.length; n++) {
- var r = e[n];
- r[0].style[r[1]] = t[r[2]];
- }
- }
- var Ett = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
- function HP(t) {
- return t.match(Ett) || [];
- }
- var Mtt = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, KM = Math.PI / 180;
- function Itt(t, e) {
- var n = t.getAttribute("transform");
- if (n) {
- n = n.replace(/,/g, " ");
- var r = [], i = null;
- n.replace(Mtt, function(f, d, h) {
- return r.push(d, h), "";
- });
- for (var a = r.length - 1; a > 0; a -= 2) {
- var o = r[a], s = r[a - 1], l = HP(o);
- switch (i = i || Na(), s) {
- case "translate":
- Gs(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
- break;
- case "scale":
- uP(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
- break;
- case "rotate":
- Lf(i, i, -parseFloat(l[0]) * KM, [
- parseFloat(l[1] || "0"),
- parseFloat(l[2] || "0")
- ]);
- break;
- case "skewX":
- var u = Math.tan(parseFloat(l[0]) * KM);
- Ll(i, [1, 0, u, 1, 0, 0], i);
- break;
- case "skewY":
- var c = Math.tan(parseFloat(l[0]) * KM);
- Ll(i, [1, c, 0, 1, 0, 0], i);
- break;
- case "matrix":
- i[0] = parseFloat(l[0]), i[1] = parseFloat(l[1]), i[2] = parseFloat(l[2]), i[3] = parseFloat(l[3]), i[4] = parseFloat(l[4]), i[5] = parseFloat(l[5]);
- break;
- }
- }
- e.setLocalTransform(i);
- }
- }
- var KZ = /([^\s:;]+)\s*:\s*([^:;]+)/g;
- function Dfe(t, e, n) {
- var r = t.getAttribute("style");
- if (r) {
- KZ.lastIndex = 0;
- for (var i; (i = KZ.exec(r)) != null; ) {
- var a = i[1], o = Qe(nT, a) ? nT[a] : null;
- o && (e[o] = i[2]);
- var s = Qe(rT, a) ? rT[a] : null;
- s && (n[s] = i[2]);
- }
- }
- }
- function Dtt(t, e, n) {
- for (var r = 0; r < GZ.length; r++) {
- var i = GZ[r], a = t.getAttribute(i);
- a != null && (e[nT[i]] = a);
- }
- for (var r = 0; r < jZ.length; r++) {
- var i = jZ[r], a = t.getAttribute(i);
- a != null && (n[rT[i]] = a);
- }
- }
- function Rfe(t, e) {
- var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
- return {
- scale: i,
- x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
- y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
- };
- }
- function Rtt(t, e) {
- var n = new Ttt();
- return n.parse(t, e);
- }
- var ktt = Ze([
- "rect",
- "circle",
- "line",
- "ellipse",
- "polygon",
- "polyline",
- "path",
- // <text> <tspan> are also enabled because some SVG might paint text itself,
- // but still need to trigger events or tooltip.
- "text",
- "tspan",
- // <g> is also enabled because this case: if multiple tags share one name
- // and need label displayed, every tags will display the name, which is not
- // expected. So we can put them into a <g name="xxx">. Thereby only one label
- // displayed and located based on the bounding rect of the <g>.
- "g"
- ]), Ltt = (
- /** @class */
- function() {
- function t(e, n) {
- this.type = "geoSVG", this._usedGraphicMap = Ze(), this._freedGraphics = [], this._mapName = e, this._parsedXML = Ife(n);
- }
- return t.prototype.load = function() {
- var e = this._firstGraphic;
- if (!e) {
- e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
- var n = Btt(e.named), r = n.regions, i = n.regionsMap;
- this._regions = r, this._regionsMap = i;
- }
- return {
- boundingRect: this._boundingRect,
- regions: this._regions,
- regionsMap: this._regionsMap
- };
- }, t.prototype._buildGraphic = function(e) {
- var n, r;
- try {
- n = e && Rtt(e, {
- ignoreViewBox: !0,
- ignoreRootClip: !0
- }) || {}, r = n.root, at(r != null);
- } catch (g) {
- throw new Error(`Invalid svg format
- ` + g.message);
- }
- var i = new ct();
- i.add(r), i.isGeoSVGGraphicRoot = !0;
- var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
- if (!l) {
- var u = void 0, c = void 0, f = void 0, d = void 0;
- if (a != null ? (u = 0, f = a) : s && (u = s.x, f = s.width), o != null ? (c = 0, d = o) : s && (c = s.y, d = s.height), u == null || c == null) {
- var h = r.getBoundingRect();
- u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
- }
- l = this._boundingRect = new bt(u, c, f, d);
- }
- if (s) {
- var p = Rfe(s, l);
- r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
- }
- i.setClipPath(new Zt({
- shape: l.plain()
- }));
- var v = [];
- return F(n.named, function(g) {
- ktt.get(g.svgNodeTagLower) != null && (v.push(g), Ntt(g.el));
- }), {
- root: i,
- boundingRect: l,
- named: v
- };
- }, t.prototype.useGraphic = function(e) {
- var n = this._usedGraphicMap, r = n.get(e);
- return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
- }, t.prototype.freeGraphic = function(e) {
- var n = this._usedGraphicMap, r = n.get(e);
- r && (n.removeKey(e), this._freedGraphics.push(r));
- }, t;
- }()
- );
- function Ntt(t) {
- t.silent = !1, t.isGroup && t.traverse(function(e) {
- e.silent = !1;
- });
- }
- function Btt(t) {
- var e = [], n = Ze();
- return F(t, function(r) {
- if (r.namedFrom == null) {
- var i = new OKe(r.name, r.el);
- e.push(i), n.set(r.name, i);
- }
- }), {
- regions: e,
- regionsMap: n
- };
- }
- var cL = [126, 25], JZ = "南海诸岛", Ld = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];
- for (var Md = 0; Md < Ld.length; Md++)
- for (var av = 0; av < Ld[Md].length; av++)
- Ld[Md][av][0] /= 10.5, Ld[Md][av][1] /= -10.5 / 0.75, Ld[Md][av][0] += cL[0], Ld[Md][av][1] += cL[1];
- function ztt(t, e) {
- if (t === "china") {
- for (var n = 0; n < e.length; n++)
- if (e[n].name === JZ)
- return;
- e.push(new Ece(JZ, Ce(Ld, function(r) {
- return {
- type: "polygon",
- exterior: r
- };
- }), cL));
- }
- }
- var Vtt = {
- 南海诸岛: [32, 80],
- // 全国
- 广东: [0, -10],
- 香港: [10, 5],
- 澳门: [-10, 10],
- // '北京': [-10, 0],
- 天津: [5, 5]
- };
- function Ftt(t, e) {
- if (t === "china") {
- var n = Vtt[e.name];
- if (n) {
- var r = e.getCenter();
- r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
- }
- }
- }
- var Wtt = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
- function Qtt(t, e) {
- t === "china" && e.name === "台湾" && e.geometries.push({
- type: "polygon",
- exterior: Wtt[0]
- });
- }
- var Htt = "name", Gtt = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.type = "geoJSON", this._parsedMap = Ze(), this._mapName = e, this._specialAreas = r, this._geoJSON = Ztt(n);
- }
- return t.prototype.load = function(e, n) {
- n = n || Htt;
- var r = this._parsedMap.get(n);
- if (!r) {
- var i = this._parseToRegions(n);
- r = this._parsedMap.set(n, {
- regions: i,
- boundingRect: jtt(i)
- });
- }
- var a = Ze(), o = [];
- return F(r.regions, function(s) {
- var l = s.name;
- e && Qe(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
- }), {
- regions: o,
- boundingRect: r.boundingRect || new bt(0, 0, 0, 0),
- regionsMap: a
- };
- }, t.prototype._parseToRegions = function(e) {
- var n = this._mapName, r = this._geoJSON, i;
- try {
- i = r ? eL(r, e) : [];
- } catch (a) {
- throw new Error(`Invalid geoJson format
- ` + a.message);
- }
- return ztt(n, i), F(i, function(a) {
- var o = a.name;
- Ftt(n, a), Qtt(n, a);
- var s = this._specialAreas && this._specialAreas[o];
- s && a.transformTo(s.left, s.top, s.width, s.height);
- }, this), i;
- }, t.prototype.getMapForUser = function() {
- return {
- // For backward compatibility, use geoJson
- // PENDING: it has been returning them without clone.
- // do we need to avoid outsite modification?
- geoJson: this._geoJSON,
- geoJSON: this._geoJSON,
- specialAreas: this._specialAreas
- };
- }, t;
- }()
- );
- function jtt(t) {
- for (var e, n = 0; n < t.length; n++) {
- var r = t[n].getBoundingRect();
- e = e || r.clone(), e.union(r);
- }
- return e;
- }
- function Ztt(t) {
- return Ve(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
- }
- var H0 = Ze();
- const ju = {
- /**
- * Compatible with previous `echarts.registerMap`.
- *
- * @usage
- * ```js
- *
- * echarts.registerMap('USA', geoJson, specialAreas);
- *
- * echarts.registerMap('USA', {
- * geoJson: geoJson,
- * specialAreas: {...}
- * });
- * echarts.registerMap('USA', {
- * geoJSON: geoJson,
- * specialAreas: {...}
- * });
- *
- * echarts.registerMap('airport', {
- * svg: svg
- * }
- * ```
- *
- * Note:
- * Do not support that register multiple geoJSON or SVG
- * one map name. Because different geoJSON and SVG have
- * different unit. It's not easy to make sure how those
- * units are mapping/normalize.
- * If intending to use multiple geoJSON or SVG, we can
- * use multiple geo coordinate system.
- */
- registerMap: function(t, e, n) {
- if (e.svg) {
- var r = new Ltt(t, e.svg);
- H0.set(t, r);
- } else {
- var i = e.geoJson || e.geoJSON;
- i && !e.features ? n = e.specialAreas : i = e;
- var r = new Gtt(t, i, n);
- H0.set(t, r);
- }
- },
- getGeoResource: function(t) {
- return H0.get(t);
- },
- /**
- * Only for exporting to users.
- * **MUST NOT** used internally.
- */
- getMapForUser: function(t) {
- var e = H0.get(t);
- return e && e.type === "geoJSON" && e.getMapForUser();
- },
- load: function(t, e, n) {
- var r = H0.get(t);
- if (!r) {
- process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
- return;
- }
- return r.load(e, n);
- }
- };
- var W3 = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], Utt = Ze(W3), Xtt = Ze(W3.concat(["g"])), Ytt = Ze(W3.concat(["g"])), kfe = Ut();
- function WS(t) {
- var e = t.getItemStyle(), n = t.get("areaColor");
- return n != null && (e.fill = n), e;
- }
- function eU(t) {
- var e = t.style;
- e && (e.stroke = e.stroke || e.fill, e.fill = null);
- }
- var Lfe = (
- /** @class */
- function() {
- function t(e) {
- var n = new ct();
- this.uid = Cm("ec_map_draw"), this._controller = new x1(e.getZr()), this._controllerHost = {
- target: n
- }, this.group = n, n.add(this._regionsGroup = new ct()), n.add(this._svgGroup = new ct());
- }
- return t.prototype.draw = function(e, n, r, i, a) {
- var o = e.mainType === "geo", s = e.getData && e.getData();
- o && n.eachComponent({
- mainType: "series",
- subType: "map"
- }, function(m) {
- !s && m.getHostGeoModel() === e && (s = m.getData());
- });
- var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
- p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : tn(c, h, e);
- var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
- api: r,
- geo: l,
- mapOrGeoModel: e,
- data: s,
- isVisualEncodedByVisualMap: v,
- isGeo: o,
- transformInfoRaw: d
- };
- l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
- }, t.prototype._buildGeoJSON = function(e) {
- var n = this._regionsGroupByName = Ze(), r = Ze(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
- function c(h, p) {
- return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
- }
- function f(h) {
- for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
- var m = c(h[g], v);
- m && p.push(m);
- }
- return p;
- }
- function d(h) {
- return {
- shape: {
- points: f(h)
- }
- };
- }
- i.removeAll(), F(e.geo.regions, function(h) {
- var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
- v || (v = n.set(p, new ct()), i.add(v), m = s ? s.indexOfName(p) : null, y = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(m) : null, r.set(p, {
- dataIdx: m,
- regionModel: y
- }));
- var _ = [], O = [];
- F(h.geometries, function(C) {
- if (C.type === "polygon") {
- var P = [C.exterior].concat(C.interiors || []);
- u && (P = oU(P, u)), F(P, function(T) {
- _.push(new pa(d(T)));
- });
- } else {
- var $ = C.points;
- u && ($ = oU($, u, !0)), F($, function(T) {
- O.push(new va(d(T)));
- });
- }
- });
- var S = c(h.getCenter(), l && l.project);
- function x(C, P) {
- if (C.length) {
- var $ = new xP({
- culling: !0,
- segmentIgnoreThreshold: 1,
- shape: {
- paths: C
- }
- });
- v.add($), tU(e, $, m, y), nU(e, $, p, y, o, m, S), P && (eU($), F($.states, eU));
- }
- }
- x(_), x(O, !0);
- }), n.each(function(h, p) {
- var v = r.get(p), g = v.dataIdx, m = v.regionModel;
- rU(e, h, p, m, o, g), iU(e, h, p, m, o), aU(e, h, p, m, o);
- }, this);
- }, t.prototype._buildSVG = function(e) {
- var n = e.geo.map, r = e.transformInfoRaw;
- this._svgGroup.x = r.x, this._svgGroup.y = r.y, this._svgGroup.scaleX = r.scaleX, this._svgGroup.scaleY = r.scaleY, this._svgResourceChanged(n) && (this._freeSVG(), this._useSVG(n));
- var i = this._svgDispatcherMap = Ze(), a = !1;
- F(this._svgGraphicRecord.named, function(o) {
- var s = o.name, l = e.mapOrGeoModel, u = e.data, c = o.svgNodeTagLower, f = o.el, d = u ? u.indexOfName(s) : null, h = l.getRegionModel(s);
- if (Utt.get(c) != null && f instanceof ls && tU(e, f, d, h), f instanceof ls && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (Ytt.get(c) != null && nU(e, f, s, h, l, d, null), rU(e, f, s, h, l, d), iU(e, f, s, h, l), Xtt.get(c) != null)) {
- var p = aU(e, f, s, h, l);
- p === "self" && (a = !0);
- var v = i.get(s) || i.set(s, []);
- v.push(f);
- }
- }, this), this._enableBlurEntireSVG(a, e);
- }, t.prototype._enableBlurEntireSVG = function(e, n) {
- if (e && n.isGeo) {
- var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
- this._svgGraphicRecord.root.traverse(function(a) {
- if (!a.isGroup) {
- Zh(a);
- var o = a.ensureState("blur").style || {};
- o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
- }
- });
- }
- }, t.prototype.remove = function() {
- this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
- }, t.prototype.findHighDownDispatchers = function(e, n) {
- if (e == null)
- return [];
- var r = n.coordinateSystem;
- if (r.resourceType === "geoJSON") {
- var i = this._regionsGroupByName;
- if (i) {
- var a = i.get(e);
- return a ? [a] : [];
- }
- } else if (r.resourceType === "geoSVG")
- return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
- }, t.prototype._svgResourceChanged = function(e) {
- return this._svgMapName !== e;
- }, t.prototype._useSVG = function(e) {
- var n = ju.getGeoResource(e);
- if (n && n.type === "geoSVG") {
- var r = n.useGraphic(this.uid);
- this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
- }
- }, t.prototype._freeSVG = function() {
- var e = this._svgMapName;
- if (e != null) {
- var n = ju.getGeoResource(e);
- n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
- }
- }, t.prototype._updateController = function(e, n, r) {
- var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
- o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
- var s = e.mainType;
- function l() {
- var u = {
- type: "geoRoam",
- componentType: s
- };
- return u[s + "Id"] = e.id, u;
- }
- a.off("pan").on("pan", function(u) {
- this._mouseDownFlag = !1, V3(o, u.dx, u.dy), r.dispatchAction(_e(l(), {
- dx: u.dx,
- dy: u.dy,
- animation: {
- duration: 0
- }
- }));
- }, this), a.off("zoom").on("zoom", function(u) {
- this._mouseDownFlag = !1, F3(o, u.scale, u.originX, u.originY), r.dispatchAction(_e(l(), {
- totalZoom: o.zoom,
- zoom: u.scale,
- originX: u.originX,
- originY: u.originY,
- animation: {
- duration: 0
- }
- }));
- }, this), a.setPointerChecker(function(u, c, f) {
- return i.containPoint([c, f]) && !QP(u, r, e);
- });
- }, t.prototype.resetForLabelLayout = function() {
- this.group.traverse(function(e) {
- var n = e.getTextContent();
- n && (n.ignore = kfe(n).ignore);
- });
- }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
- var a = this;
- n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
- a._mouseDownFlag = !0;
- }), n.on("click", function(o) {
- a._mouseDownFlag && (a._mouseDownFlag = !1);
- }));
- }, t;
- }()
- );
- function tU(t, e, n, r) {
- var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = WS(i), u = WS(a), c = WS(s), f = WS(o), d = t.data;
- if (d) {
- var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
- t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = Gg(p, t.api));
- }
- e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, Zh(e);
- }
- function nU(t, e, n, r, i, a, o) {
- var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
- if (l || u || c && c.showLabel) {
- var f = l ? n : a, d = void 0;
- (!s || a >= 0) && (d = i);
- var h = o ? {
- normal: {
- align: "center",
- verticalAlign: "middle"
- }
- } : null;
- Ei(e, ei(r), {
- labelFetcher: d,
- labelDataIndex: f,
- defaultText: n
- }, h);
- var p = e.getTextContent();
- if (p && (kfe(p).ignore = p.ignore, e.textConfig && o)) {
- var v = e.getBoundingRect().clone();
- e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
- }
- e.disableLabelAnimation = !0;
- } else
- e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
- }
- function rU(t, e, n, r, i, a) {
- t.data ? t.data.setItemGraphicEl(a, e) : ft(e).eventData = {
- componentType: "geo",
- componentIndex: i.componentIndex,
- geoIndex: i.componentIndex,
- name: n,
- region: r && r.option || {}
- };
- }
- function iU(t, e, n, r, i) {
- t.data || xm({
- el: e,
- componentModel: i,
- itemName: n,
- // @ts-ignore FIXME:TS fix the "compatible with each other"?
- itemTooltipOption: r.get("tooltip")
- });
- }
- function aU(t, e, n, r, i) {
- e.highDownSilentOnTouch = !!i.get("selectedMode");
- var a = r.getModel("emphasis"), o = a.get("focus");
- return ur(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && xZe(e, i, n), o;
- }
- function oU(t, e, n) {
- var r = [], i;
- function a() {
- i = [];
- }
- function o() {
- i.length && (r.push(i), i = []);
- }
- var s = e({
- polygonStart: a,
- polygonEnd: o,
- lineStart: a,
- lineEnd: o,
- point: function(l, u) {
- isFinite(l) && isFinite(u) && i.push([l, u]);
- },
- sphere: function() {
- }
- });
- return !n && s.polygonStart(), F(t, function(l) {
- s.lineStart();
- for (var u = 0; u < l.length; u++)
- s.point(l[u][0], l[u][1]);
- s.lineEnd();
- }), !n && s.polygonEnd(), r;
- }
- var qtt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
- var o = this.group;
- if (o.removeAll(), !n.getHostGeoModel()) {
- if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
- var s = this._mapDraw;
- s && o.add(s.group);
- } else if (n.needsDrawMap) {
- var s = this._mapDraw || new Lfe(i);
- o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
- } else
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
- n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
- }
- }
- }, e.prototype.remove = function() {
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
- }, e.prototype.dispose = function() {
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
- }, e.prototype._renderSymbols = function(n, r, i) {
- var a = n.originalData, o = this.group;
- a.each(a.mapDimension("value"), function(s, l) {
- if (!isNaN(s)) {
- var u = a.getItemLayout(l);
- if (!(!u || !u.point)) {
- var c = u.point, f = u.offset, d = new ic({
- style: {
- // Because the special of map draw.
- // Which needs statistic of multiple series and draw on one map.
- // And each series also need a symbol with legend color
- //
- // Layout and visual are put one the different data
- // TODO
- fill: n.getData().getVisual("style").fill
- },
- shape: {
- cx: c[0] + f * 9,
- cy: c[1],
- r: 3
- },
- silent: !0,
- // Do not overlap the first series, on which labels are displayed.
- z2: 8 + (f ? 0 : bm + 1)
- });
- if (!f) {
- var h = n.mainSeries.getData(), p = a.getName(l), v = h.indexOfName(p), g = a.getItemModel(l), m = g.getModel("label"), y = h.getItemGraphicEl(v);
- Ei(d, ei(g), {
- labelFetcher: {
- getFormattedLabel: function(_, O) {
- return n.getFormattedLabel(v, O);
- }
- },
- defaultText: p
- }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
- position: "bottom"
- }), y.onHoverStateChange = function(_) {
- IC(d, _);
- };
- }
- o.add(d);
- }
- }
- });
- }, e.type = "map", e;
- }(_n)
- ), Ktt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
- if (r != null) {
- var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
- return o && a.dataToPoint(o.getCenter());
- }
- }, n;
- }
- return e.prototype.getInitialData = function(n) {
- for (var r = Rm(this, {
- coordDimensions: ["value"],
- encodeDefaulter: vt(n3, this)
- }), i = Ze(), a = [], o = 0, s = r.count(); o < s; o++) {
- var l = r.getName(o);
- i.set(l, !0);
- }
- var u = ju.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
- return F(u.regions, function(c) {
- var f = c.name;
- i.get(f) || a.push(f);
- }), r.appendValues([], a), r;
- }, e.prototype.getHostGeoModel = function() {
- var n = this.option.geoIndex;
- return n != null ? this.ecModel.getComponent("geo", n) : null;
- }, e.prototype.getMapType = function() {
- return (this.getHostGeoModel() || this).option.map;
- }, e.prototype.getRawValue = function(n) {
- var r = this.getData();
- return r.get(r.mapDimension("value"), n);
- }, e.prototype.getRegionModel = function(n) {
- var r = this.getData();
- return r.getItemModel(r.indexOfName(n));
- }, e.prototype.formatTooltip = function(n, r, i) {
- for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
- var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
- isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
- }
- return ti("section", {
- header: u.join(", "),
- noHeader: !u.length,
- blocks: [ti("nameValue", {
- name: s,
- value: o
- })]
- });
- }, e.prototype.setZoom = function(n) {
- this.option.zoom = n;
- }, e.prototype.setCenter = function(n) {
- this.option.center = n;
- }, e.prototype.getLegendIcon = function(n) {
- var r = n.icon || "roundRect", i = wr(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
- return i.setStyle(n.itemStyle), i.style.stroke = "none", r.indexOf("empty") > -1 && (i.style.stroke = i.style.fill, i.style.fill = "#fff", i.style.lineWidth = 2), i;
- }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
- // 一级层叠
- // zlevel: 0,
- // 二级层叠
- z: 2,
- coordinateSystem: "geo",
- // map should be explicitly specified since ec3.
- map: "",
- // If `geoIndex` is not specified, a exclusive geo will be
- // created. Otherwise use the specified geo component, and
- // `map` and `mapType` are ignored.
- // geoIndex: 0,
- // 'center' | 'left' | 'right' | 'x%' | {number}
- left: "center",
- // 'center' | 'top' | 'bottom' | 'x%' | {number}
- top: "center",
- // right
- // bottom
- // width:
- // height
- // Aspect is width / height. Inited to be geoJson bbox aspect
- // This parameter is used for scale this aspect
- // Default value:
- // for geoSVG source: 1,
- // for geoJSON source: 0.75.
- aspectScale: null,
- // Layout with center and size
- // If you want to put map in a fixed size box with right aspect ratio
- // This two properties may be more convenient.
- // layoutCenter: [50%, 50%]
- // layoutSize: 100
- showLegendSymbol: !0,
- // Define left-top, right-bottom coords to control view
- // For example, [ [180, 90], [-180, -90] ],
- // higher priority than center and zoom
- boundingCoords: null,
- // Default on center of map
- center: null,
- zoom: 1,
- scaleLimit: null,
- selectedMode: !0,
- label: {
- show: !1,
- color: "#000"
- },
- // scaleLimit: null,
- itemStyle: {
- borderWidth: 0.5,
- borderColor: "#444",
- areaColor: "#eee"
- },
- emphasis: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- areaColor: "rgba(255,215,0,0.8)"
- }
- },
- select: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- color: "rgba(255,215,0,0.8)"
- }
- },
- nameProperty: "name"
- }, e;
- }(Tn)
- );
- function Jtt(t, e) {
- var n = {};
- return F(t, function(r) {
- r.each(r.mapDimension("value"), function(i, a) {
- var o = "ec-" + r.getName(a);
- n[o] = n[o] || [], isNaN(i) || n[o].push(i);
- });
- }), t[0].map(t[0].mapDimension("value"), function(r, i) {
- for (var a = "ec-" + t[0].getName(i), o = 0, s = 1 / 0, l = -1 / 0, u = n[a].length, c = 0; c < u; c++)
- s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
- var f;
- return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
- });
- }
- function ent(t) {
- var e = {};
- t.eachSeriesByType("map", function(n) {
- var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
- (e[i] = e[i] || []).push(n);
- }), F(e, function(n, r) {
- for (var i = Jtt(Ce(n, function(o) {
- return o.getData();
- }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
- n[a].originalData = n[a].getData();
- for (var a = 0; a < n.length; a++)
- n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
- });
- }
- function tnt(t) {
- var e = {};
- t.eachSeriesByType("map", function(n) {
- var r = n.getMapType();
- if (!(n.getHostGeoModel() || e[r])) {
- var i = {};
- F(n.seriesGroup, function(o) {
- var s = o.coordinateSystem, l = o.originalData;
- o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
- var f = l.getName(c), d = s.getRegion(f);
- if (!(!d || isNaN(u))) {
- var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
- i[f] = h + 1, l.setItemLayout(c, {
- point: p,
- offset: h
- });
- }
- });
- });
- var a = n.getData();
- a.each(function(o) {
- var s = a.getName(o), l = a.getItemLayout(o) || {};
- l.showLabel = !i[s], a.setItemLayout(o, l);
- }), e[r] = !0;
- }
- });
- }
- var sU = oi, w1 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new Pu(), r._rawTransformable = new Pu(), r.name = n, r;
- }
- return e.prototype.setBoundingRect = function(n, r, i, a) {
- return this._rect = new bt(n, r, i, a), this._rect;
- }, e.prototype.getBoundingRect = function() {
- return this._rect;
- }, e.prototype.setViewRect = function(n, r, i, a) {
- this._transformTo(n, r, i, a), this._viewRect = new bt(n, r, i, a);
- }, e.prototype._transformTo = function(n, r, i, a) {
- var o = this.getBoundingRect(), s = this._rawTransformable;
- s.transform = o.calculateTransform(new bt(n, r, i, a));
- var l = s.parent;
- s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
- }, e.prototype.setCenter = function(n, r) {
- n && (this._center = [ze(n[0], r.getWidth()), ze(n[1], r.getHeight())], this._updateCenterAndZoom());
- }, e.prototype.setZoom = function(n) {
- n = n || 1;
- var r = this.zoomLimit;
- r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
- }, e.prototype.getDefaultCenter = function() {
- var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
- return [r, i];
- }, e.prototype.getCenter = function() {
- return this._center || this.getDefaultCenter();
- }, e.prototype.getZoom = function() {
- return this._zoom || 1;
- }, e.prototype.getRoamTransform = function() {
- return this._roamTransformable.getLocalTransform();
- }, e.prototype._updateCenterAndZoom = function() {
- var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
- a = oi([], a, n), i = oi([], i, n), r.originX = a[0], r.originY = a[1], r.x = i[0] - a[0], r.y = i[1] - a[1], r.scaleX = r.scaleY = o, this._updateTransform();
- }, e.prototype._updateTransform = function() {
- var n = this._roamTransformable, r = this._rawTransformable;
- r.parent = n, n.updateTransform(), r.updateTransform(), lP(this.transform || (this.transform = []), r.transform || Na()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], dp(this.invTransform, this.transform), this.decomposeTransform();
- }, e.prototype.getTransformInfo = function() {
- var n = this._rawTransformable, r = this._roamTransformable, i = new Pu();
- return i.transform = r.transform, i.decomposeTransform(), {
- roam: {
- x: i.x,
- y: i.y,
- scaleX: i.scaleX,
- scaleY: i.scaleY
- },
- raw: {
- x: n.x,
- y: n.y,
- scaleX: n.scaleX,
- scaleY: n.scaleY
- }
- };
- }, e.prototype.getViewRect = function() {
- return this._viewRect;
- }, e.prototype.getViewRectAfterRoam = function() {
- var n = this.getBoundingRect().clone();
- return n.applyTransform(this.transform), n;
- }, e.prototype.dataToPoint = function(n, r, i) {
- var a = r ? this._rawTransform : this.transform;
- return i = i || [], a ? sU(i, n, a) : ki(i, n);
- }, e.prototype.pointToData = function(n) {
- var r = this.invTransform;
- return r ? sU([], n, r) : [n[0], n[1]];
- }, e.prototype.convertToPixel = function(n, r, i) {
- var a = lU(r);
- return a === this ? a.dataToPoint(i) : null;
- }, e.prototype.convertFromPixel = function(n, r, i) {
- var a = lU(r);
- return a === this ? a.pointToData(i) : null;
- }, e.prototype.containPoint = function(n) {
- return this.getViewRectAfterRoam().contain(n[0], n[1]);
- }, e.dimensions = ["x", "y"], e;
- }(Pu)
- );
- function lU(t) {
- var e = t.seriesModel;
- return e ? e.coordinateSystem : null;
- }
- var nnt = {
- geoJSON: {
- aspectScale: 0.75,
- invertLongitute: !0
- },
- geoSVG: {
- aspectScale: 1,
- invertLongitute: !1
- }
- }, Nfe = ["lng", "lat"], Bfe = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this, n) || this;
- a.dimensions = Nfe, a.type = "geo", a._nameCoordMap = Ze(), a.map = r;
- var o = i.projection, s = ju.load(r, i.nameMap, i.nameProperty), l = ju.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = nnt[l.type];
- a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && nr("Map " + r + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && nr("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o;
- var d;
- if (o)
- for (var h = 0; h < c.length; h++) {
- var p = c[h].getBoundingRect(o);
- d = d || p.clone(), d.union(p);
- }
- else
- d = s.boundingRect;
- return a.setBoundingRect(d.x, d.y, d.width, d.height), a.aspectScale = o ? 1 : dt(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a;
- }
- return e.prototype._transformTo = function(n, r, i, a) {
- var o = this.getBoundingRect(), s = this._invertLongitute;
- o = o.clone(), s && (o.y = -o.y - o.height);
- var l = this._rawTransformable;
- l.transform = o.calculateTransform(new bt(n, r, i, a));
- var u = l.parent;
- l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
- }, e.prototype.getRegion = function(n) {
- return this._regionsMap.get(n);
- }, e.prototype.getRegionByCoord = function(n) {
- for (var r = this.regions, i = 0; i < r.length; i++) {
- var a = r[i];
- if (a.type === "geoJSON" && a.contain(n))
- return r[i];
- }
- }, e.prototype.addGeoCoord = function(n, r) {
- this._nameCoordMap.set(n, r);
- }, e.prototype.getGeoCoord = function(n) {
- var r = this._regionsMap.get(n);
- return this._nameCoordMap.get(n) || r && r.getCenter();
- }, e.prototype.dataToPoint = function(n, r, i) {
- if (Ve(n) && (n = this.getGeoCoord(n)), n) {
- var a = this.projection;
- return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
- }
- }, e.prototype.pointToData = function(n) {
- var r = this.projection;
- return r && (n = r.unproject(n)), n && this.pointToProjected(n);
- }, e.prototype.pointToProjected = function(n) {
- return t.prototype.pointToData.call(this, n);
- }, e.prototype.projectedToPoint = function(n, r, i) {
- return t.prototype.dataToPoint.call(this, n, r, i);
- }, e.prototype.convertToPixel = function(n, r, i) {
- var a = uU(r);
- return a === this ? a.dataToPoint(i) : null;
- }, e.prototype.convertFromPixel = function(n, r, i) {
- var a = uU(r);
- return a === this ? a.pointToData(i) : null;
- }, e;
- }(w1)
- );
- vr(Bfe, w1);
- function uU(t) {
- var e = t.geoModel, n = t.seriesModel;
- return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Er).models[0] || {}).coordinateSystem : null;
- }
- const cU = Bfe;
- function fU(t, e) {
- var n = t.get("boundingCoords");
- if (n != null) {
- var r = n[0], i = n[1];
- if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
- process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
- else {
- var a = this.projection;
- if (a) {
- var o = r[0], s = r[1], l = i[0], u = i[1];
- r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
- var c = function(x, C, P, $) {
- for (var T = P - x, E = $ - C, M = 0; M <= 100; M++) {
- var R = M / 100, N = a.project([x + T * R, C + E * R]);
- Cu(r, r, N), Tu(i, i, N);
- }
- };
- c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
- }
- this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
- }
- }
- var f = this.getBoundingRect(), d = t.get("layoutCenter"), h = t.get("layoutSize"), p = e.getWidth(), v = e.getHeight(), g = f.width / f.height * this.aspectScale, m = !1, y, _;
- d && h && (y = [ze(d[0], p), ze(d[1], v)], _ = ze(h, Math.min(p, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(_) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
- var O;
- if (m)
- O = {}, g > 1 ? (O.width = _, O.height = _ / g) : (O.height = _, O.width = _ * g), O.y = y[1] - O.height / 2, O.x = y[0] - O.width / 2;
- else {
- var S = t.getBoxLayoutParams();
- S.aspect = g, O = Mr(S, {
- width: p,
- height: v
- });
- }
- this.setViewRect(O.x, O.y, O.width, O.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
- }
- function rnt(t, e) {
- F(e.get("geoCoord"), function(n, r) {
- t.addGeoCoord(r, n);
- });
- }
- var int = (
- /** @class */
- function() {
- function t() {
- this.dimensions = Nfe;
- }
- return t.prototype.create = function(e, n) {
- var r = [];
- function i(o) {
- return {
- nameProperty: o.get("nameProperty"),
- aspectScale: o.get("aspectScale"),
- projection: o.get("projection")
- };
- }
- e.eachComponent("geo", function(o, s) {
- var l = o.get("map"), u = new cU(l + s, l, _e({
- nameMap: o.get("nameMap")
- }, i(o)));
- u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = fU, u.resize(o, n);
- }), e.eachSeries(function(o) {
- var s = o.get("coordinateSystem");
- if (s === "geo") {
- var l = o.get("geoIndex") || 0;
- o.coordinateSystem = r[l];
- }
- });
- var a = {};
- return e.eachSeriesByType("map", function(o) {
- if (!o.getHostGeoModel()) {
- var s = o.getMapType();
- a[s] = a[s] || [], a[s].push(o);
- }
- }), F(a, function(o, s) {
- var l = Ce(o, function(c) {
- return c.get("nameMap");
- }), u = new cU(s, s, _e({
- nameMap: aP(l)
- }, i(o[0])));
- u.zoomLimit = Or.apply(null, Ce(o, function(c) {
- return c.get("scaleLimit");
- })), r.push(u), u.resize = fU, u.resize(o[0], n), F(o, function(c) {
- c.coordinateSystem = u, rnt(u, c);
- });
- }), r;
- }, t.prototype.getFilledRegions = function(e, n, r, i) {
- for (var a = (e || []).slice(), o = Ze(), s = 0; s < a.length; s++)
- o.set(a[s].name, a[s]);
- var l = ju.load(n, r, i);
- return F(l.regions, function(u) {
- var c = u.name;
- !o.get(c) && a.push({
- name: c
- });
- }), a;
- }, t;
- }()
- ), zfe = new int(), ant = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r, i) {
- var a = ju.getGeoResource(n.map);
- if (a && a.type === "geoJSON") {
- var o = n.itemStyle = n.itemStyle || {};
- "color" in o || (o.color = "#eee");
- }
- this.mergeDefaultAndTheme(n, i), Hh(n, "label", ["show"]);
- }, e.prototype.optionUpdated = function() {
- var n = this, r = this.option;
- r.regions = zfe.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
- var i = {};
- this._optionModelMap = os(r.regions || [], function(a, o) {
- var s = o.name;
- return s && (a.set(s, new wn(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
- }, Ze()), r.selectedMap || (r.selectedMap = i);
- }, e.prototype.getRegionModel = function(n) {
- return this._optionModelMap.get(n) || new wn(null, this, this.ecModel);
- }, e.prototype.getFormattedLabel = function(n, r) {
- var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
- name: n
- };
- if (qe(a))
- return o.status = r, a(o);
- if (Ve(a))
- return a.replace("{a}", n ?? "");
- }, e.prototype.setZoom = function(n) {
- this.option.zoom = n;
- }, e.prototype.setCenter = function(n) {
- this.option.center = n;
- }, e.prototype.select = function(n) {
- var r = this.option, i = r.selectedMode;
- if (i) {
- i !== "multiple" && (r.selectedMap = null);
- var a = r.selectedMap || (r.selectedMap = {});
- a[n] = !0;
- }
- }, e.prototype.unSelect = function(n) {
- var r = this.option.selectedMap;
- r && (r[n] = !1);
- }, e.prototype.toggleSelected = function(n) {
- this[this.isSelected(n) ? "unSelect" : "select"](n);
- }, e.prototype.isSelected = function(n) {
- var r = this.option.selectedMap;
- return !!(r && r[n]);
- }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
- // zlevel: 0,
- z: 0,
- show: !0,
- left: "center",
- top: "center",
- // Default value:
- // for geoSVG source: 1,
- // for geoJSON source: 0.75.
- aspectScale: null,
- // /// Layout with center and size
- // If you want to put map in a fixed size box with right aspect ratio
- // This two properties may be more convenient
- // layoutCenter: [50%, 50%]
- // layoutSize: 100
- silent: !1,
- // Map type
- map: "",
- // Define left-top, right-bottom coords to control view
- // For example, [ [180, 90], [-180, -90] ]
- boundingCoords: null,
- // Default on center of map
- center: null,
- zoom: 1,
- scaleLimit: null,
- // selectedMode: false
- label: {
- show: !1,
- color: "#000"
- },
- itemStyle: {
- borderWidth: 0.5,
- borderColor: "#444"
- // Default color:
- // + geoJSON: #eee
- // + geoSVG: null (use SVG original `fill`)
- // color: '#eee'
- },
- emphasis: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- color: "rgba(255,215,0,0.8)"
- }
- },
- select: {
- label: {
- show: !0,
- color: "rgb(100,0,0)"
- },
- itemStyle: {
- color: "rgba(255,215,0,0.8)"
- }
- },
- regions: []
- // tooltip: {
- // show: false
- // }
- }, e;
- }(At)
- );
- function dU(t, e) {
- return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
- }
- function Q3(t, e, n, r) {
- var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
- if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(dU(t, s), r)), o != null) {
- if (n) {
- var l = n.min || 0, u = n.max || 1 / 0;
- o = Math.max(Math.min(i * o, u), l) / i;
- }
- t.scaleX *= o, t.scaleY *= o;
- var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
- t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(dU(t, s), r), t.setZoom(o * i);
- }
- return {
- center: t.getCenter(),
- zoom: t.getZoom()
- };
- }
- var ont = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.focusBlurEnabled = !0, n;
- }
- return e.prototype.init = function(n, r) {
- this._api = r;
- }, e.prototype.render = function(n, r, i, a) {
- if (this._model = n, !n.get("show")) {
- this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
- return;
- }
- this._mapDraw || (this._mapDraw = new Lfe(i));
- var o = this._mapDraw;
- o.draw(n, r, i, this, a), o.group.on("click", this._handleRegionClick, this), o.group.silent = n.get("silent"), this.group.add(o.group), this.updateSelectStatus(n, r, i);
- }, e.prototype._handleRegionClick = function(n) {
- var r;
- sh(n.target, function(i) {
- return (r = ft(i).eventData) != null;
- }, !0), r && this._api.dispatchAction({
- type: "geoToggleSelect",
- geoId: this._model.id,
- name: r.name
- });
- }, e.prototype.updateSelectStatus = function(n, r, i) {
- var a = this;
- this._mapDraw.group.traverse(function(o) {
- var s = ft(o).eventData;
- if (s)
- return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
- });
- }, e.prototype.findHighDownDispatchers = function(n) {
- return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
- }, e.prototype.dispose = function() {
- this._mapDraw && this._mapDraw.remove();
- }, e.type = "geo", e;
- }(Ln)
- );
- function snt(t, e, n) {
- ju.registerMap(t, e, n);
- }
- function Vfe(t) {
- t.registerCoordinateSystem("geo", zfe), t.registerComponentModel(ant), t.registerComponentView(ont), t.registerImpl("registerMap", snt), t.registerImpl("getMap", function(n) {
- return ju.getMapForUser(n);
- });
- function e(n, r) {
- r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
- var o = {}, s = [];
- return a.eachComponent({
- mainType: "geo",
- query: i
- }, function(l) {
- l[n](i.name);
- var u = l.coordinateSystem;
- F(u.regions, function(f) {
- o[f.name] = l.isSelected(f.name) || !1;
- });
- var c = [];
- F(o, function(f, d) {
- o[d] && c.push(d);
- }), s.push({
- geoIndex: l.componentIndex,
- // Use singular, the same naming convention as the event `selectchanged`.
- name: c
- });
- }), {
- selected: o,
- allSelected: s,
- name: i.name
- };
- });
- }
- e("toggleSelected", {
- type: "geoToggleSelect",
- event: "geoselectchanged"
- }), e("select", {
- type: "geoSelect",
- event: "geoselected"
- }), e("unSelect", {
- type: "geoUnSelect",
- event: "geounselected"
- }), t.registerAction({
- type: "geoRoam",
- event: "geoRoam",
- update: "updateTransform"
- }, function(n, r, i) {
- var a = n.componentType || "series";
- r.eachComponent({
- mainType: a,
- query: n
- }, function(o) {
- var s = o.coordinateSystem;
- if (s.type === "geo") {
- var l = Q3(s, n, o.get("scaleLimit"), i);
- o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && F(o.seriesGroup, function(u) {
- u.setCenter(l.center), u.setZoom(l.zoom);
- });
- }
- });
- });
- }
- function lnt(t) {
- Mt(Vfe), t.registerChartView(qtt), t.registerSeriesModel(Ktt), t.registerLayout(tnt), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, ent), Bue("map", t.registerAction);
- }
- function unt(t) {
- var e = t;
- e.hierNode = {
- defaultAncestor: null,
- ancestor: e,
- prelim: 0,
- modifier: 0,
- change: 0,
- shift: 0,
- i: 0,
- thread: null
- };
- for (var n = [e], r, i; r = n.pop(); )
- if (i = r.children, r.isExpand && i.length)
- for (var a = i.length, o = a - 1; o >= 0; o--) {
- var s = i[o];
- s.hierNode = {
- defaultAncestor: null,
- ancestor: s,
- prelim: 0,
- modifier: 0,
- change: 0,
- shift: 0,
- i: o,
- thread: null
- }, n.push(s);
- }
- }
- function cnt(t, e) {
- var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
- if (n.length) {
- hnt(t);
- var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
- i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
- } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
- t.parentNode.hierNode.defaultAncestor = pnt(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
- }
- function fnt(t) {
- var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
- t.setLayout({
- x: e
- }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
- }
- function hU(t) {
- return arguments.length ? t : mnt;
- }
- function Sy(t, e) {
- return t -= Math.PI / 2, {
- x: e * Math.cos(t),
- y: e * Math.sin(t)
- };
- }
- function dnt(t, e) {
- return Mr(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- });
- }
- function hnt(t) {
- for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
- var a = e[n];
- a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
- }
- }
- function pnt(t, e, n, r) {
- if (e) {
- for (var i = t, a = t, o = a.parentNode.children[0], s = e, l = i.hierNode.modifier, u = a.hierNode.modifier, c = o.hierNode.modifier, f = s.hierNode.modifier; s = JM(s), a = eI(a), s && a; ) {
- i = JM(i), o = eI(o), i.hierNode.ancestor = t;
- var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
- d > 0 && (gnt(vnt(s, t, n), t, d), u += d, l += d), f += s.hierNode.modifier, u += a.hierNode.modifier, l += i.hierNode.modifier, c += o.hierNode.modifier;
- }
- s && !JM(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !eI(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
- }
- return n;
- }
- function JM(t) {
- var e = t.children;
- return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
- }
- function eI(t) {
- var e = t.children;
- return e.length && t.isExpand ? e[0] : t.hierNode.thread;
- }
- function vnt(t, e, n) {
- return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
- }
- function gnt(t, e, n) {
- var r = n / (e.hierNode.i - t.hierNode.i);
- e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
- }
- function mnt(t, e) {
- return t.parentNode === e.parentNode ? 1 : 2;
- }
- var ynt = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.parentPoint = [], this.childPoints = [];
- }
- return t;
- }()
- ), bnt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new ynt();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
- if (a === 1) {
- n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
- return;
- }
- var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = ze(r.forkPosition, 1), h = [];
- h[c] = o[c], h[f] = o[f] + (l[f] - o[f]) * d, n.moveTo(o[0], o[1]), n.lineTo(h[0], h[1]), n.moveTo(s[0], s[1]), h[c] = s[c], n.lineTo(h[0], h[1]), h[c] = l[c], n.lineTo(h[0], h[1]), n.lineTo(l[0], l[1]);
- for (var p = 1; p < a - 1; p++) {
- var v = i[p];
- n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
- }
- }, e;
- }(Dt)
- ), _nt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._mainGroup = new ct(), n;
- }
- return e.prototype.init = function(n, r) {
- this._controller = new x1(r.getZr()), this._controllerHost = {
- target: this.group
- }, this.group.add(this._mainGroup);
- }, e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
- l === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(n, i), this._updateController(n, r, i);
- var u = this._data;
- a.diff(u).add(function(c) {
- pU(a, c) && vU(a, c, null, s, n);
- }).update(function(c, f) {
- var d = u.getItemGraphicEl(f);
- if (!pU(a, c)) {
- d && mU(u, f, d, s, n);
- return;
- }
- vU(a, c, d, s, n);
- }).remove(function(c) {
- var f = u.getItemGraphicEl(c);
- f && mU(u, c, f, s, n);
- }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
- c.off("click").on("click", function() {
- i.dispatchAction({
- type: "treeExpandAndCollapse",
- seriesId: n.id,
- dataIndex: f
- });
- });
- }), this._data = a;
- }, e.prototype._updateViewCoordSys = function(n, r) {
- var i = n.getData(), a = [];
- i.each(function(f) {
- var d = i.getItemLayout(f);
- d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
- });
- var o = [], s = [];
- yP(a, o, s);
- var l = this._min, u = this._max;
- s[0] - o[0] === 0 && (o[0] = l ? l[0] : o[0] - 1, s[0] = u ? u[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = l ? l[1] : o[1] - 1, s[1] = u ? u[1] : s[1] + 1);
- var c = n.coordinateSystem = new w1();
- c.zoomLimit = n.get("scaleLimit"), c.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), c.setCenter(n.get("center"), r), c.setZoom(n.get("zoom")), this.group.attr({
- x: c.x,
- y: c.y,
- scaleX: c.scaleX,
- scaleY: c.scaleY
- }), this._min = o, this._max = s;
- }, e.prototype._updateController = function(n, r, i) {
- var a = this, o = this._controller, s = this._controllerHost, l = this.group;
- o.setPointerChecker(function(u, c, f) {
- var d = l.getBoundingRect();
- return d.applyTransform(l.transform), d.contain(c, f) && !QP(u, i, n);
- }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
- V3(s, u.dx, u.dy), i.dispatchAction({
- seriesId: n.id,
- type: "treeRoam",
- dx: u.dx,
- dy: u.dy
- });
- }).on("zoom", function(u) {
- F3(s, u.scale, u.originX, u.originY), i.dispatchAction({
- seriesId: n.id,
- type: "treeRoam",
- zoom: u.scale,
- originX: u.originX,
- originY: u.originY
- }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
- });
- }, e.prototype._updateNodeAndLinkScale = function(n) {
- var r = n.getData(), i = this._getNodeGlobalScale(n);
- r.eachItemGraphicEl(function(a, o) {
- a.setSymbolScale(i);
- });
- }, e.prototype._getNodeGlobalScale = function(n) {
- var r = n.coordinateSystem;
- if (r.type !== "view")
- return 1;
- var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
- return s / a;
- }, e.prototype.dispose = function() {
- this._controller && this._controller.dispose(), this._controllerHost = null;
- }, e.prototype.remove = function() {
- this._mainGroup.removeAll(), this._data = null;
- }, e.type = "tree", e;
- }(_n)
- );
- function pU(t, e) {
- var n = t.getItemLayout(e);
- return n && !isNaN(n.x) && !isNaN(n.y);
- }
- function vU(t, e, n, r, i) {
- var a = !n, o = t.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", c = t.tree.root, f = o.parentNode === c ? o : o.parentNode || o, d = t.getItemGraphicEl(f.dataIndex), h = f.getLayout(), p = d ? {
- x: d.__oldX,
- y: d.__oldY,
- rawX: d.__radialOldRawX,
- rawY: d.__radialOldRawY
- } : h, v = o.getLayout();
- a ? (n = new m1(t, e, null, {
- symbolInnerColor: u,
- useNameLabel: !0
- }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
- symbolInnerColor: u,
- useNameLabel: !0
- }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = v.rawX, n.__radialRawY = v.rawY, r.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, tn(n, {
- x: v.x,
- y: v.y
- }, i);
- var g = n.getSymbolPath();
- if (i.get("layout") === "radial") {
- var m = c.children[0], y = m.getLayout(), _ = m.children.length, O = void 0, S = void 0;
- if (v.x === y.x && o.isExpand === !0 && m.children.length) {
- var x = {
- x: (m.children[0].getLayout().x + m.children[_ - 1].getLayout().x) / 2,
- y: (m.children[0].getLayout().y + m.children[_ - 1].getLayout().y) / 2
- };
- O = Math.atan2(x.y - y.y, x.x - y.x), O < 0 && (O = Math.PI * 2 + O), S = x.x < y.x, S && (O = O - Math.PI);
- } else
- O = Math.atan2(v.y - y.y, v.x - y.x), O < 0 && (O = Math.PI * 2 + O), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (S = v.x < y.x, S && (O = O - Math.PI)) : (S = v.x > y.x, S || (O = O - Math.PI));
- var C = S ? "left" : "right", P = s.getModel("label"), $ = P.get("rotate"), T = $ * (Math.PI / 180), E = g.getTextContent();
- E && (g.setTextConfig({
- position: P.get("position") || C,
- rotation: $ == null ? -O : T,
- origin: "center"
- }), E.setStyle("verticalAlign", "middle"));
- }
- var M = s.get(["emphasis", "focus"]), R = M === "relative" ? Fb(o.getAncestorsIndices(), o.getDescendantIndices()) : M === "ancestor" ? o.getAncestorsIndices() : M === "descendant" ? o.getDescendantIndices() : null;
- R && (ft(n).focus = R), Ont(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(N) {
- if (N !== "blur") {
- var I = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
- I && I.hoverState === u1 || IC(n.__edge, N);
- }
- });
- }
- function Ont(t, e, n, r, i, a, o, s) {
- var l = e.getModel(), u = t.get("edgeShape"), c = t.get("layout"), f = t.getOrient(), d = t.get(["lineStyle", "curveness"]), h = t.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), v = r.__edge;
- if (u === "curve")
- e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new f1({
- shape: fL(c, f, d, i, i)
- })), tn(v, {
- shape: fL(c, f, d, a, o)
- }, t));
- else if (u === "polyline") {
- if (c === "orthogonal") {
- if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
- for (var g = e.children, m = [], y = 0; y < g.length; y++) {
- var _ = g[y].getLayout();
- m.push([_.x, _.y]);
- }
- v || (v = r.__edge = new bnt({
- shape: {
- parentPoint: [o.x, o.y],
- childPoints: [[o.x, o.y]],
- orient: f,
- forkPosition: h
- }
- })), tn(v, {
- shape: {
- parentPoint: [o.x, o.y],
- childPoints: m
- }
- }, t);
- }
- } else if (process.env.NODE_ENV !== "production")
- throw new Error("The polyline edgeShape can only be used in orthogonal layout");
- }
- v && !(u === "polyline" && !e.isExpand) && (v.useStyle(it({
- strokeNoScale: !0,
- fill: null
- }, p)), Ai(v, l, "lineStyle"), Zh(v), s.add(v));
- }
- function gU(t, e, n, r, i) {
- var a = e.tree.root, o = Ffe(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
- if (u) {
- var c = e.getItemGraphicEl(s.dataIndex), f = c.__edge, d = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? f : void 0), h = r.get("edgeShape"), p = r.get("layout"), v = r.get("orient"), g = r.get(["lineStyle", "curveness"]);
- d && (h === "curve" ? _f(d, {
- shape: fL(p, v, g, l, l),
- style: {
- opacity: 0
- }
- }, r, {
- cb: function() {
- n.remove(d);
- },
- removeOpt: i
- }) : h === "polyline" && r.get("layout") === "orthogonal" && _f(d, {
- shape: {
- parentPoint: [l.x, l.y],
- childPoints: [[l.x, l.y]]
- },
- style: {
- opacity: 0
- }
- }, r, {
- cb: function() {
- n.remove(d);
- },
- removeOpt: i
- }));
- }
- }
- function Ffe(t, e) {
- for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
- n = n.parentNode === t ? n : n.parentNode || n;
- return {
- source: n,
- sourceLayout: r
- };
- }
- function mU(t, e, n, r, i) {
- var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = Ffe(o, a).sourceLayout, l = {
- duration: i.get("animationDurationUpdate"),
- easing: i.get("animationEasingUpdate")
- };
- _f(n, {
- x: s.x + 1,
- y: s.y + 1
- }, i, {
- cb: function() {
- r.remove(n), t.setItemGraphicEl(e, null);
- },
- removeOpt: l
- }), n.fadeOut(null, t.hostModel, {
- fadeLabel: !0,
- animation: l
- }), a.children.forEach(function(u) {
- gU(u, t, r, i, l);
- }), gU(a, t, r, i, l);
- }
- function fL(t, e, n, r, i) {
- var a, o, s, l, u, c, f, d;
- if (t === "radial") {
- u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
- var h = Sy(u, f), p = Sy(u, f + (d - f) * n), v = Sy(c, d + (f - d) * n), g = Sy(c, d);
- return {
- x1: h.x || 0,
- y1: h.y || 0,
- x2: g.x || 0,
- y2: g.y || 0,
- cpx1: p.x || 0,
- cpy1: p.y || 0,
- cpx2: v.x || 0,
- cpy2: v.y || 0
- };
- } else
- u = r.x, f = r.y, c = i.x, d = i.y, (e === "LR" || e === "RL") && (a = u + (c - u) * n, o = f, s = c + (u - c) * n, l = d), (e === "TB" || e === "BT") && (a = u, o = f + (d - f) * n, s = c, l = d + (f - d) * n);
- return {
- x1: u,
- y1: f,
- x2: c,
- y2: d,
- cpx1: a,
- cpy1: o,
- cpx2: s,
- cpy2: l
- };
- }
- var Ko = Ut();
- function Wfe(t) {
- var e = t.mainData, n = t.datas;
- n || (n = {
- main: e
- }, t.datasAttr = {
- main: "data"
- }), t.datas = t.mainData = null, Qfe(e, n, t), F(n, function(r) {
- F(e.TRANSFERABLE_METHODS, function(i) {
- r.wrapMethod(i, vt(Snt, t));
- });
- }), e.wrapMethod("cloneShallow", vt(wnt, t)), F(e.CHANGABLE_METHODS, function(r) {
- e.wrapMethod(r, vt(xnt, t));
- }), at(n[e.dataType] === e);
- }
- function Snt(t, e) {
- if (Pnt(this)) {
- var n = _e({}, Ko(this).datas);
- n[this.dataType] = e, Qfe(e, n, t);
- } else
- H3(e, this.dataType, Ko(this).mainData, t);
- return e;
- }
- function xnt(t, e) {
- return t.struct && t.struct.update(), e;
- }
- function wnt(t, e) {
- return F(Ko(e).datas, function(n, r) {
- n !== e && H3(n.cloneShallow(), r, e, t);
- }), e;
- }
- function Cnt(t) {
- var e = Ko(this).mainData;
- return t == null || e == null ? e : Ko(e).datas[t];
- }
- function Tnt() {
- var t = Ko(this).mainData;
- return t == null ? [{
- data: t
- }] : Ce(kt(Ko(t).datas), function(e) {
- return {
- type: e,
- data: Ko(t).datas[e]
- };
- });
- }
- function Pnt(t) {
- return Ko(t).mainData === t;
- }
- function Qfe(t, e, n) {
- Ko(t).datas = {}, F(e, function(r, i) {
- H3(r, i, t, n);
- });
- }
- function H3(t, e, n, r) {
- Ko(n).datas[e] = t, Ko(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = Cnt, t.getLinkedDataAll = Tnt;
- }
- var $nt = (
- /** @class */
- function() {
- function t(e, n) {
- this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
- }
- return t.prototype.isRemoved = function() {
- return this.dataIndex < 0;
- }, t.prototype.eachNode = function(e, n, r) {
- qe(e) && (r = n, n = e, e = null), e = e || {}, Ve(e) && (e = {
- order: e
- });
- var i = e.order || "preorder", a = this[e.attr || "children"], o;
- i === "preorder" && (o = n.call(r, this));
- for (var s = 0; !o && s < a.length; s++)
- a[s].eachNode(e, n, r);
- i === "postorder" && n.call(r, this);
- }, t.prototype.updateDepthAndHeight = function(e) {
- var n = 0;
- this.depth = e;
- for (var r = 0; r < this.children.length; r++) {
- var i = this.children[r];
- i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
- }
- this.height = n + 1;
- }, t.prototype.getNodeById = function(e) {
- if (this.getId() === e)
- return this;
- for (var n = 0, r = this.children, i = r.length; n < i; n++) {
- var a = r[n].getNodeById(e);
- if (a)
- return a;
- }
- }, t.prototype.contains = function(e) {
- if (e === this)
- return !0;
- for (var n = 0, r = this.children, i = r.length; n < i; n++) {
- var a = r[n].contains(e);
- if (a)
- return a;
- }
- }, t.prototype.getAncestors = function(e) {
- for (var n = [], r = e ? this : this.parentNode; r; )
- n.push(r), r = r.parentNode;
- return n.reverse(), n;
- }, t.prototype.getAncestorsIndices = function() {
- for (var e = [], n = this; n; )
- e.push(n.dataIndex), n = n.parentNode;
- return e.reverse(), e;
- }, t.prototype.getDescendantIndices = function() {
- var e = [];
- return this.eachNode(function(n) {
- e.push(n.dataIndex);
- }), e;
- }, t.prototype.getValue = function(e) {
- var n = this.hostTree.data;
- return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
- }, t.prototype.setLayout = function(e, n) {
- this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
- }, t.prototype.getLayout = function() {
- return this.hostTree.data.getItemLayout(this.dataIndex);
- }, t.prototype.getModel = function(e) {
- if (!(this.dataIndex < 0)) {
- var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
- return r.getModel(e);
- }
- }, t.prototype.getLevelModel = function() {
- return (this.hostTree.levelModels || [])[this.depth];
- }, t.prototype.setVisual = function(e, n) {
- this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
- }, t.prototype.getVisual = function(e) {
- return this.hostTree.data.getItemVisual(this.dataIndex, e);
- }, t.prototype.getRawIndex = function() {
- return this.hostTree.data.getRawIndex(this.dataIndex);
- }, t.prototype.getId = function() {
- return this.hostTree.data.getId(this.dataIndex);
- }, t.prototype.getChildIndex = function() {
- if (this.parentNode) {
- for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
- if (e[n] === this)
- return n;
- return -1;
- }
- return -1;
- }, t.prototype.isAncestorOf = function(e) {
- for (var n = e.parentNode; n; ) {
- if (n === this)
- return !0;
- n = n.parentNode;
- }
- return !1;
- }, t.prototype.isDescendantOf = function(e) {
- return e !== this && e.isAncestorOf(this);
- }, t;
- }()
- ), G3 = (
- /** @class */
- function() {
- function t(e) {
- this.type = "tree", this._nodes = [], this.hostModel = e;
- }
- return t.prototype.eachNode = function(e, n, r) {
- this.root.eachNode(e, n, r);
- }, t.prototype.getNodeByDataIndex = function(e) {
- var n = this.data.getRawIndex(e);
- return this._nodes[n];
- }, t.prototype.getNodeById = function(e) {
- return this.root.getNodeById(e);
- }, t.prototype.update = function() {
- for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
- n[r].dataIndex = -1;
- for (var r = 0, i = e.count(); r < i; r++)
- n[e.getRawIndex(r)].dataIndex = r;
- }, t.prototype.clearLayouts = function() {
- this.data.clearItemLayouts();
- }, t.createTree = function(e, n, r) {
- var i = new t(n), a = [], o = 1;
- s(e);
- function s(c, f) {
- var d = c.value;
- o = Math.max(o, Se(d) ? d.length : 1), a.push(c);
- var h = new $nt(Br(c.name, ""), i);
- f ? Ant(h, f) : i.root = h, i._nodes.push(h);
- var p = c.children;
- if (p)
- for (var v = 0; v < p.length; v++)
- s(p[v], h);
- }
- i.root.updateDepthAndHeight(0);
- var l = Mm(a, {
- coordDimensions: ["value"],
- dimensionsCount: o
- }).dimensions, u = new Wi(l, n);
- return u.initData(a), r && r(u), Wfe({
- mainData: u,
- struct: i,
- structAttr: "tree"
- }), i.update(), i;
- }, t;
- }()
- );
- function Ant(t, e) {
- var n = e.children;
- t.parentNode !== e && (n.push(t), t.parentNode = e);
- }
- function s_(t, e, n) {
- if (t && St(e, t.type) >= 0) {
- var r = n.getData().tree.root, i = t.targetNode;
- if (Ve(i) && (i = r.getNodeById(i)), i && r.contains(i))
- return {
- node: i
- };
- var a = t.targetNodeId;
- if (a != null && (i = r.getNodeById(a)))
- return {
- node: i
- };
- }
- }
- function Hfe(t) {
- for (var e = []; t; )
- t = t.parentNode, t && e.push(t);
- return e.reverse();
- }
- function j3(t, e) {
- var n = Hfe(t);
- return St(n, e) >= 0;
- }
- function GP(t, e) {
- for (var n = []; t; ) {
- var r = t.dataIndex;
- n.push({
- name: t.name,
- dataIndex: r,
- value: e.getRawValue(r)
- }), t = t.parentNode;
- }
- return n.reverse(), n;
- }
- var Ent = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
- }
- return e.prototype.getInitialData = function(n) {
- var r = {
- name: n.name,
- children: n.data
- }, i = n.leaves || {}, a = new wn(i, this, this.ecModel), o = G3.createTree(r, this, s);
- function s(f) {
- f.wrapMethod("getItemModel", function(d, h) {
- var p = o.getNodeByDataIndex(h);
- return p && p.children.length && p.isExpand || (d.parentModel = a), d;
- });
- }
- var l = 0;
- o.eachNode("preorder", function(f) {
- f.depth > l && (l = f.depth);
- });
- var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
- return o.root.eachNode("preorder", function(f) {
- var d = f.hostTree.data.getRawDataItem(f.dataIndex);
- f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
- }), o.data;
- }, e.prototype.getOrient = function() {
- var n = this.get("orient");
- return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
- }, e.prototype.setZoom = function(n) {
- this.option.zoom = n;
- }, e.prototype.setCenter = function(n) {
- this.option.center = n;
- }, e.prototype.formatTooltip = function(n, r, i) {
- for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
- u = s.parentNode.name + "." + u, s = s.parentNode;
- return ti("nameValue", {
- name: u,
- value: l,
- noValue: isNaN(l) || l == null
- });
- }, e.prototype.getDataParams = function(n) {
- var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
- return r.treeAncestors = GP(i, this), r.collapsed = !i.isExpand, r;
- }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "view",
- // the position of the whole view
- left: "12%",
- top: "12%",
- right: "12%",
- bottom: "12%",
- // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
- layout: "orthogonal",
- // value can be 'polyline'
- edgeShape: "curve",
- edgeForkPosition: "50%",
- // true | false | 'move' | 'scale', see module:component/helper/RoamController.
- roam: !1,
- // Symbol size scale ratio in roam
- nodeScaleRatio: 0.4,
- // Default on center of graph
- center: null,
- zoom: 1,
- orient: "LR",
- symbol: "emptyCircle",
- symbolSize: 7,
- expandAndCollapse: !0,
- initialTreeDepth: 2,
- lineStyle: {
- color: "#ccc",
- width: 1.5,
- curveness: 0.5
- },
- itemStyle: {
- color: "lightsteelblue",
- // borderColor: '#c23531',
- borderWidth: 1.5
- },
- label: {
- show: !0
- },
- animationEasing: "linear",
- animationDuration: 700,
- animationDurationUpdate: 500
- }, e;
- }(Tn)
- );
- function Mnt(t, e, n) {
- for (var r = [t], i = [], a; a = r.pop(); )
- if (i.push(a), a.isExpand) {
- var o = a.children;
- if (o.length)
- for (var s = 0; s < o.length; s++)
- r.push(o[s]);
- }
- for (; a = i.pop(); )
- e(a, n);
- }
- function G0(t, e) {
- for (var n = [t], r; r = n.pop(); )
- if (e(r), r.isExpand) {
- var i = r.children;
- if (i.length)
- for (var a = i.length - 1; a >= 0; a--)
- n.push(i[a]);
- }
- }
- function Int(t, e) {
- t.eachSeriesByType("tree", function(n) {
- Dnt(n, e);
- });
- }
- function Dnt(t, e) {
- var n = dnt(t, e);
- t.layoutInfo = n;
- var r = t.get("layout"), i = 0, a = 0, o = null;
- r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = hU(function(_, O) {
- return (_.parentNode === O.parentNode ? 1 : 2) / _.depth;
- })) : (i = n.width, a = n.height, o = hU());
- var s = t.getData().tree.root, l = s.children[0];
- if (l) {
- unt(s), Mnt(l, cnt, o), s.hierNode.modifier = -l.hierNode.prelim, G0(l, fnt);
- var u = l, c = l, f = l;
- G0(l, function(_) {
- var O = _.getLayout().x;
- O < u.getLayout().x && (u = _), O > c.getLayout().x && (c = _), _.depth > f.depth && (f = _);
- });
- var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
- if (r === "radial")
- p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), G0(l, function(_) {
- g = (_.getLayout().x + h) * p, m = (_.depth - 1) * v;
- var O = Sy(g, m);
- _.setLayout({
- x: O.x,
- y: O.y,
- rawX: g,
- rawY: m
- }, !0);
- });
- else {
- var y = t.getOrient();
- y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), G0(l, function(_) {
- m = (_.getLayout().x + h) * v, g = y === "LR" ? (_.depth - 1) * p : i - (_.depth - 1) * p, _.setLayout({
- x: g,
- y: m
- }, !0);
- })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), G0(l, function(_) {
- g = (_.getLayout().x + h) * p, m = y === "TB" ? (_.depth - 1) * v : a - (_.depth - 1) * v, _.setLayout({
- x: g,
- y: m
- }, !0);
- }));
- }
- }
- }
- function Rnt(t) {
- t.eachSeriesByType("tree", function(e) {
- var n = e.getData(), r = n.tree;
- r.eachNode(function(i) {
- var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
- _e(s, o);
- });
- });
- }
- function knt(t) {
- t.registerAction({
- type: "treeExpandAndCollapse",
- event: "treeExpandAndCollapse",
- update: "update"
- }, function(e, n) {
- n.eachComponent({
- mainType: "series",
- subType: "tree",
- query: e
- }, function(r) {
- var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
- o.isExpand = !o.isExpand;
- });
- }), t.registerAction({
- type: "treeRoam",
- event: "treeRoam",
- // Here we set 'none' instead of 'update', because roam action
- // just need to update the transform matrix without having to recalculate
- // the layout. So don't need to go through the whole update process, such
- // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
- update: "none"
- }, function(e, n, r) {
- n.eachComponent({
- mainType: "series",
- subType: "tree",
- query: e
- }, function(i) {
- var a = i.coordinateSystem, o = Q3(a, e, void 0, r);
- i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
- });
- });
- }
- function Lnt(t) {
- t.registerChartView(_nt), t.registerSeriesModel(Ent), t.registerLayout(Int), t.registerVisual(Rnt), knt(t);
- }
- var yU = ["treemapZoomToNode", "treemapRender", "treemapMove"];
- function Nnt(t) {
- for (var e = 0; e < yU.length; e++)
- t.registerAction({
- type: yU[e],
- update: "updateView"
- }, fr);
- t.registerAction({
- type: "treemapRootToNode",
- update: "updateView"
- }, function(n, r) {
- r.eachComponent({
- mainType: "series",
- subType: "treemap",
- query: n
- }, i);
- function i(a, o) {
- var s = ["treemapZoomToNode", "treemapRootToNode"], l = s_(n, s, a);
- if (l) {
- var u = a.getViewRoot();
- u && (n.direction = j3(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
- }
- }
- });
- }
- function Gfe(t) {
- var e = t.getData(), n = e.tree, r = {};
- n.eachNode(function(i) {
- for (var a = i; a && a.depth > 1; )
- a = a.parentNode;
- var o = zk(t.ecModel, a.name || a.dataIndex + "", r);
- i.setVisual("decal", o);
- });
- }
- var Bnt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.preventUsingHoverLayer = !0, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- var i = {
- name: n.name,
- children: n.data
- };
- jfe(i);
- var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new wn({
- itemStyle: o
- }, this, r);
- a = n.levels = znt(a, r);
- var l = Ce(a || [], function(f) {
- return new wn(f, s, r);
- }, this), u = G3.createTree(i, this, c);
- function c(f) {
- f.wrapMethod("getItemModel", function(d, h) {
- var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
- return d.parentModel = v || s, d;
- });
- }
- return u.data;
- }, e.prototype.optionUpdated = function() {
- this.resetViewRoot();
- }, e.prototype.formatTooltip = function(n, r, i) {
- var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
- return ti("nameValue", {
- name: s,
- value: o
- });
- }, e.prototype.getDataParams = function(n) {
- var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
- return r.treeAncestors = GP(i, this), r.treePathInfo = r.treeAncestors, r;
- }, e.prototype.setLayoutInfo = function(n) {
- this.layoutInfo = this.layoutInfo || {}, _e(this.layoutInfo, n);
- }, e.prototype.mapIdToIndex = function(n) {
- var r = this._idIndexMap;
- r || (r = this._idIndexMap = Ze(), this._idIndexMapCount = 0);
- var i = r.get(n);
- return i == null && r.set(n, i = this._idIndexMapCount++), i;
- }, e.prototype.getViewRoot = function() {
- return this._viewRoot;
- }, e.prototype.resetViewRoot = function(n) {
- n ? this._viewRoot = n : n = this._viewRoot;
- var r = this.getRawData().tree.root;
- (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
- }, e.prototype.enableAriaDecal = function() {
- Gfe(this);
- }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
- // Disable progressive rendering
- progressive: 0,
- // size: ['80%', '80%'], // deprecated, compatible with ec2.
- left: "center",
- top: "middle",
- width: "80%",
- height: "80%",
- sort: !0,
- clipWindow: "origin",
- squareRatio: 0.5 * (1 + Math.sqrt(5)),
- leafDepth: null,
- drillDownIcon: "▶",
- // to align specialized icon. ▷▶❒❐▼✚
- zoomToNodeRatio: 0.32 * 0.32,
- scaleLimit: null,
- roam: !0,
- nodeClick: "zoomToNode",
- animation: !0,
- animationDurationUpdate: 900,
- animationEasing: "quinticInOut",
- breadcrumb: {
- show: !0,
- height: 22,
- left: "center",
- top: "bottom",
- // right
- // bottom
- emptyItemWidth: 25,
- itemStyle: {
- color: "rgba(0,0,0,0.7)",
- textStyle: {
- color: "#fff"
- }
- },
- emphasis: {
- itemStyle: {
- color: "rgba(0,0,0,0.9)"
- // '#5793f3',
- }
- }
- },
- label: {
- show: !0,
- // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
- distance: 0,
- padding: 5,
- position: "inside",
- // formatter: null,
- color: "#fff",
- overflow: "truncate"
- // align
- // verticalAlign
- },
- upperLabel: {
- show: !1,
- position: [0, "50%"],
- height: 20,
- // formatter: null,
- // color: '#fff',
- overflow: "truncate",
- // align: null,
- verticalAlign: "middle"
- },
- itemStyle: {
- color: null,
- colorAlpha: null,
- colorSaturation: null,
- borderWidth: 0,
- gapWidth: 0,
- borderColor: "#fff",
- borderColorSaturation: null
- // If specified, borderColor will be ineffective, and the
- // border color is evaluated by color of current node and
- // borderColorSaturation.
- },
- emphasis: {
- upperLabel: {
- show: !0,
- position: [0, "50%"],
- overflow: "truncate",
- verticalAlign: "middle"
- }
- },
- visualDimension: 0,
- visualMin: null,
- visualMax: null,
- color: [],
- // level[n].color (if necessary).
- // + Specify color list of each level. level[0].color would be global
- // color list if not specified. (see method `setDefault`).
- // + But set as a empty array to forbid fetch color from global palette
- // when using nodeModel.get('color'), otherwise nodes on deep level
- // will always has color palette set and are not able to inherit color
- // from parent node.
- // + TreemapSeries.color can not be set as 'none', otherwise effect
- // legend color fetching (see seriesColor.js).
- colorAlpha: null,
- colorSaturation: null,
- colorMappingBy: "index",
- visibleMin: 10,
- // be rendered. Only works when sort is 'asc' or 'desc'.
- childrenVisibleMin: null,
- // grandchildren will not show.
- // Why grandchildren? If not grandchildren but children,
- // some siblings show children and some not,
- // the appearance may be mess and not consistent,
- levels: []
- // Each item: {
- // visibleMin, itemStyle, visualDimension, label
- // }
- }, e;
- }(Tn)
- );
- function jfe(t) {
- var e = 0;
- F(t.children, function(r) {
- jfe(r);
- var i = r.value;
- Se(i) && (i = i[0]), e += i;
- });
- var n = t.value;
- Se(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), Se(t.value) ? t.value[0] = n : t.value = n;
- }
- function znt(t, e) {
- var n = Cn(e.get("color")), r = Cn(e.get(["aria", "decal", "decals"]));
- if (n) {
- t = t || [];
- var i, a;
- F(t, function(s) {
- var l = new wn(s), u = l.get("color"), c = l.get("decal");
- (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
- });
- var o = t[0] || (t[0] = {});
- return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
- }
- }
- var Vnt = 8, bU = 8, tI = 5, Fnt = (
- /** @class */
- function() {
- function t(e) {
- this.group = new ct(), e.add(this.group);
- }
- return t.prototype.render = function(e, n, r, i) {
- var a = e.getModel("breadcrumb"), o = this.group;
- if (o.removeAll(), !(!a.get("show") || !r)) {
- var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
- pos: {
- left: a.get("left"),
- right: a.get("right"),
- top: a.get("top"),
- bottom: a.get("bottom")
- },
- box: {
- width: n.getWidth(),
- height: n.getHeight()
- },
- emptyItemWidth: a.get("emptyItemWidth"),
- totalWidth: 0,
- renderList: []
- };
- this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), MP(o, f.pos, f.box);
- }
- }, t.prototype._prepare = function(e, n, r) {
- for (var i = e; i; i = i.parentNode) {
- var a = Br(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Vnt * 2, n.emptyItemWidth);
- n.totalWidth += s + bU, n.renderList.push({
- node: i,
- text: a,
- width: s
- });
- }
- }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
- for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = $Ue(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
- var g = h[v], m = g.node, y = g.width, _ = g.text;
- d > f.width && (d -= y - u, y = u, _ = null);
- var O = new pa({
- shape: {
- points: Wnt(l, 0, y, c, v === h.length - 1, v === 0)
- },
- style: it(r.getItemStyle(), {
- lineJoin: "bevel"
- }),
- textContent: new jt({
- style: Mn(a, {
- text: _
- })
- }),
- textConfig: {
- position: "inside"
- },
- z2: bm * 1e4,
- onclick: vt(s, m)
- });
- O.disableLabelAnimation = !0, O.getTextContent().ensureState("emphasis").style = Mn(o, {
- text: _
- }), O.ensureState("emphasis").style = p, ur(O, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(O), Qnt(O, e, m), l += y + bU;
- }
- }, t.prototype.remove = function() {
- this.group.removeAll();
- }, t;
- }()
- );
- function Wnt(t, e, n, r, i, a) {
- var o = [[i ? t : t - tI, e], [t + n, e], [t + n, e + r], [i ? t : t - tI, e + r]];
- return !a && o.splice(2, 0, [t + n + tI, e + r / 2]), !i && o.push([t, e + r / 2]), o;
- }
- function Qnt(t, e, n) {
- ft(t).eventData = {
- componentType: "series",
- componentSubType: "treemap",
- componentIndex: e.componentIndex,
- seriesIndex: e.seriesIndex,
- seriesName: e.name,
- seriesType: "treemap",
- selfType: "breadcrumb",
- nodeData: {
- dataIndex: n && n.dataIndex,
- name: n && n.name
- },
- treePathInfo: n && GP(n, e)
- };
- }
- var Hnt = (
- /** @class */
- function() {
- function t() {
- this._storage = [], this._elExistsMap = {};
- }
- return t.prototype.add = function(e, n, r, i, a) {
- return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
- el: e,
- target: n,
- duration: r,
- delay: i,
- easing: a
- }), !0);
- }, t.prototype.finished = function(e) {
- return this._finishedCallback = e, this;
- }, t.prototype.start = function() {
- for (var e = this, n = this._storage.length, r = function() {
- n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
- }, i = 0, a = this._storage.length; i < a; i++) {
- var o = this._storage[i];
- o.el.animateTo(o.target, {
- duration: o.duration,
- delay: o.delay,
- easing: o.easing,
- setToFinal: !0,
- done: r,
- aborted: r
- });
- }
- return this;
- }, t;
- }()
- );
- function Gnt() {
- return new Hnt();
- }
- var dL = ct, _U = Zt, OU = 3, SU = "label", xU = "upperLabel", jnt = bm * 10, Znt = bm * 2, Unt = bm * 3, Nd = jh([
- ["fill", "color"],
- // `borderColor` and `borderWidth` has been occupied,
- // so use `stroke` to indicate the stroke of the rect.
- ["stroke", "strokeColor"],
- ["lineWidth", "strokeWidth"],
- ["shadowBlur"],
- ["shadowOffsetX"],
- ["shadowOffsetY"],
- ["shadowColor"]
- // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
- // So do not transfer decal directly.
- ]), wU = function(t) {
- var e = Nd(t);
- return e.stroke = e.fill = e.lineWidth = null, e;
- }, iT = Ut(), Xnt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._state = "ready", n._storage = j0(), n;
- }
- return e.prototype.render = function(n, r, i, a) {
- var o = r.findComponents({
- mainType: "series",
- subType: "treemap",
- query: a
- });
- if (!(St(o, n) < 0)) {
- this.seriesModel = n, this.api = i, this.ecModel = r;
- var s = ["treemapZoomToNode", "treemapRootToNode"], l = s_(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
- rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
- direction: a.direction
- } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
- v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
- }
- }, e.prototype._giveContainerGroup = function(n) {
- var r = this._containerGroup;
- return r || (r = this._containerGroup = new dL(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
- }, e.prototype._doRender = function(n, r, i) {
- var a = r.getData().tree, o = this._oldTree, s = j0(), l = j0(), u = this._storage, c = [];
- function f(y, _, O, S) {
- return Ynt(r, l, u, i, s, c, y, _, O, S);
- }
- v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
- var d = g(u);
- if (this._oldTree = a, this._storage = l, this._controllerHost) {
- var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
- p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
- }
- return {
- lastsForAnimation: s,
- willDeleteEls: d,
- renderFinally: m
- };
- function v(y, _, O, S, x) {
- S ? (_ = y, F(y, function($, T) {
- !$.isRemoved() && P(T, T);
- })) : new Qu(_, y, C, C).add(P).update(P).remove(vt(P, null)).execute();
- function C($) {
- return $.getId();
- }
- function P($, T) {
- var E = $ != null ? y[$] : null, M = T != null ? _[T] : null, R = f(E, M, O, x);
- R && v(E && E.viewChildren || [], M && M.viewChildren || [], R, S, x + 1);
- }
- }
- function g(y) {
- var _ = j0();
- return y && F(y, function(O, S) {
- var x = _[S];
- F(O, function(C) {
- C && (x.push(C), iT(C).willDelete = !0);
- });
- }), _;
- }
- function m() {
- F(d, function(y) {
- F(y, function(_) {
- _.parent && _.parent.remove(_);
- });
- }), F(c, function(y) {
- y.invisible = !0, y.dirty();
- });
- }
- }, e.prototype._doAnimation = function(n, r, i, a) {
- var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (qe(o) ? 0 : o) || 0, u = (qe(s) ? null : s) || "cubicOut", c = Gnt();
- F(r.willDeleteEls, function(f, d) {
- F(f, function(h, p) {
- if (!h.invisible) {
- var v = h.parent, g, m = iT(v);
- if (a && a.direction === "drillDown")
- g = v === a.rootNodeGroup ? {
- shape: {
- x: 0,
- y: 0,
- width: m.nodeWidth,
- height: m.nodeHeight
- },
- style: {
- opacity: 0
- }
- } : {
- style: {
- opacity: 0
- }
- };
- else {
- var y = 0, _ = 0;
- m.willDelete || (y = m.nodeWidth / 2, _ = m.nodeHeight / 2), g = d === "nodeGroup" ? {
- x: y,
- y: _,
- style: {
- opacity: 0
- }
- } : {
- shape: {
- x: y,
- y: _,
- width: 0,
- height: 0
- },
- style: {
- opacity: 0
- }
- };
- }
- g && c.add(h, g, l, 0, u);
- }
- });
- }), F(this._storage, function(f, d) {
- F(f, function(h, p) {
- var v = r.lastsForAnimation[d][p], g = {};
- v && (h instanceof ct ? v.oldX != null && (g.x = h.x, g.y = h.y, h.x = v.oldX, h.y = v.oldY) : (v.oldShape && (g.shape = _e({}, h.shape), h.setShape(v.oldShape)), v.fadein ? (h.setStyle("opacity", 0), g.style = {
- opacity: 1
- }) : h.style.opacity !== 1 && (g.style = {
- opacity: 1
- })), c.add(h, g, l, 0, u));
- });
- }, this), this._state = "animating", c.finished(We(function() {
- this._state = "ready", r.renderFinally();
- }, this)).start();
- }, e.prototype._resetController = function(n) {
- var r = this._controller, i = this._controllerHost;
- i || (this._controllerHost = {
- target: this.group
- }, i = this._controllerHost), r || (r = this._controller = new x1(n.getZr()), r.enable(this.seriesModel.get("roam")), i.zoomLimit = this.seriesModel.get("scaleLimit"), i.zoom = this.seriesModel.get("zoom"), r.on("pan", We(this._onPan, this)), r.on("zoom", We(this._onZoom, this)));
- var a = new bt(0, 0, n.getWidth(), n.getHeight());
- r.setPointerChecker(function(o, s, l) {
- return a.contain(s, l);
- });
- }, e.prototype._clearController = function() {
- var n = this._controller;
- this._controllerHost = null, n && (n.dispose(), n = null);
- }, e.prototype._onPan = function(n) {
- if (this._state !== "animating" && (Math.abs(n.dx) > OU || Math.abs(n.dy) > OU)) {
- var r = this.seriesModel.getData().tree.root;
- if (!r)
- return;
- var i = r.getLayout();
- if (!i)
- return;
- this.api.dispatchAction({
- type: "treemapMove",
- from: this.uid,
- seriesId: this.seriesModel.id,
- rootRect: {
- x: i.x + n.dx,
- y: i.y + n.dy,
- width: i.width,
- height: i.height
- }
- });
- }
- }, e.prototype._onZoom = function(n) {
- var r = n.originX, i = n.originY, a = n.scale;
- if (this._state !== "animating") {
- var o = this.seriesModel.getData().tree.root;
- if (!o)
- return;
- var s = o.getLayout();
- if (!s)
- return;
- var l = new bt(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
- u = c.zoomLimit;
- var f = c.zoom = c.zoom || 1;
- if (f *= a, u) {
- var d = u.min || 0, h = u.max || 1 / 0;
- f = Math.max(Math.min(h, f), d);
- }
- var p = f / c.zoom;
- c.zoom = f;
- var v = this.seriesModel.layoutInfo;
- r -= v.x, i -= v.y;
- var g = Na();
- Gs(g, g, [-r, -i]), uP(g, g, [p, p]), Gs(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
- type: "treemapRender",
- from: this.uid,
- seriesId: this.seriesModel.id,
- rootRect: {
- x: l.x,
- y: l.y,
- width: l.width,
- height: l.height
- }
- });
- }
- }, e.prototype._initEvents = function(n) {
- var r = this;
- n.on("click", function(i) {
- if (r._state === "ready") {
- var a = r.seriesModel.get("nodeClick", !0);
- if (a) {
- var o = r.findTarget(i.offsetX, i.offsetY);
- if (o) {
- var s = o.node;
- if (s.getLayout().isLeafRoot)
- r._rootToNode(o);
- else if (a === "zoomToNode")
- r._zoomToNode(o);
- else if (a === "link") {
- var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
- u && BC(u, c);
- }
- }
- }
- }
- }, this);
- }, e.prototype._renderBreadcrumb = function(n, r, i) {
- var a = this;
- i || (i = n.get("leafDepth", !0) != null ? {
- node: n.getViewRoot()
- } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
- node: n.getData().tree.root
- })), (this._breadcrumb || (this._breadcrumb = new Fnt(this.group))).render(n, r, i.node, function(o) {
- a._state !== "animating" && (j3(n.getViewRoot(), o) ? a._rootToNode({
- node: o
- }) : a._zoomToNode({
- node: o
- }));
- });
- }, e.prototype.remove = function() {
- this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = j0(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
- }, e.prototype.dispose = function() {
- this._clearController();
- }, e.prototype._zoomToNode = function(n) {
- this.api.dispatchAction({
- type: "treemapZoomToNode",
- from: this.uid,
- seriesId: this.seriesModel.id,
- targetNode: n.node
- });
- }, e.prototype._rootToNode = function(n) {
- this.api.dispatchAction({
- type: "treemapRootToNode",
- from: this.uid,
- seriesId: this.seriesModel.id,
- targetNode: n.node
- });
- }, e.prototype.findTarget = function(n, r) {
- var i, a = this.seriesModel.getViewRoot();
- return a.eachNode({
- attr: "viewChildren",
- order: "preorder"
- }, function(o) {
- var s = this._storage.background[o.getRawIndex()];
- if (s) {
- var l = s.transformCoordToLocal(n, r), u = s.shape;
- if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
- i = {
- node: o,
- offsetX: l[0],
- offsetY: l[1]
- };
- else
- return !1;
- }
- }, this), i;
- }, e.type = "treemap", e;
- }(_n)
- );
- function j0() {
- return {
- nodeGroup: [],
- background: [],
- content: []
- };
- }
- function Ynt(t, e, n, r, i, a, o, s, l, u) {
- if (!o)
- return;
- var c = o.getLayout(), f = t.getData(), d = o.getModel();
- if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
- return;
- var h = c.width, p = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), _ = o.viewChildren, O = c.upperHeight, S = _ && _.length, x = d.getModel("itemStyle"), C = d.getModel(["emphasis", "itemStyle"]), P = d.getModel(["blur", "itemStyle"]), $ = d.getModel(["select", "itemStyle"]), T = x.get("borderRadius") || 0, E = fe("nodeGroup", dL);
- if (!E)
- return;
- if (l.add(E), E.x = c.x || 0, E.y = c.y || 0, E.markRedraw(), iT(E).nodeWidth = h, iT(E).nodeHeight = p, c.isAboveViewRoot)
- return E;
- var M = fe("background", _U, u, Znt);
- M && H(E, M, S && c.upperLabelHeight);
- var R = d.getModel("emphasis"), N = R.get("focus"), I = R.get("blurScope"), B = R.get("disabled"), Q = N === "ancestor" ? o.getAncestorsIndices() : N === "descendant" ? o.getDescendantIndices() : N;
- if (S)
- bf(E) && ah(E, !1), M && (ah(M, !B), f.setItemGraphicEl(o.dataIndex, M), Ek(M, Q, I));
- else {
- var W = fe("content", _U, u, Unt);
- W && U(E, W), M.disableMorphing = !0, M && bf(M) && ah(M, !1), ah(E, !B), f.setItemGraphicEl(o.dataIndex, E), Ek(E, Q, I);
- }
- return E;
- function H(se, he, re) {
- var q = ft(he);
- if (q.dataIndex = o.dataIndex, q.seriesIndex = t.seriesIndex, he.setShape({
- x: 0,
- y: 0,
- width: h,
- height: p,
- r: T
- }), g)
- j(he);
- else {
- he.invisible = !1;
- var K = o.getVisual("style"), de = K.stroke, xe = wU(x);
- xe.fill = de;
- var we = Nd(C);
- we.fill = C.get("borderColor");
- var He = Nd(P);
- He.fill = P.get("borderColor");
- var je = Nd($);
- if (je.fill = $.get("borderColor"), re) {
- var Be = h - 2 * v;
- Y(
- // PENDING: convert ZRColor to ColorString for text.
- he,
- de,
- K.opacity,
- {
- x: v,
- y: 0,
- width: Be,
- height: O
- }
- );
- } else
- he.removeTextContent();
- he.setStyle(xe), he.ensureState("emphasis").style = we, he.ensureState("blur").style = He, he.ensureState("select").style = je, Zh(he);
- }
- se.add(he);
- }
- function U(se, he) {
- var re = ft(he);
- re.dataIndex = o.dataIndex, re.seriesIndex = t.seriesIndex;
- var q = Math.max(h - 2 * v, 0), K = Math.max(p - 2 * v, 0);
- if (he.culling = !0, he.setShape({
- x: v,
- y: v,
- width: q,
- height: K,
- r: T
- }), g)
- j(he);
- else {
- he.invisible = !1;
- var de = o.getVisual("style"), xe = de.fill, we = wU(x);
- we.fill = xe, we.decal = de.decal;
- var He = Nd(C), je = Nd(P), Be = Nd($);
- Y(he, xe, de.opacity, null), he.setStyle(we), he.ensureState("emphasis").style = He, he.ensureState("blur").style = je, he.ensureState("select").style = Be, Zh(he);
- }
- se.add(he);
- }
- function j(se) {
- !se.invisible && a.push(se);
- }
- function Y(se, he, re, q) {
- var K = d.getModel(q ? xU : SU), de = Br(d.get("name"), null), xe = K.getShallow("show");
- Ei(se, ei(d, q ? xU : SU), {
- defaultText: xe ? de : null,
- inheritColor: he,
- defaultOpacity: re,
- labelFetcher: t,
- labelDataIndex: o.dataIndex
- });
- var we = se.getTextContent();
- if (we) {
- var He = we.style, je = sP(He.padding || 0);
- q && (se.setTextConfig({
- layoutRect: q
- }), we.disableLabelLayout = !0), we.beforeUpdate = function() {
- var Le = Math.max((q ? q.width : se.shape.width) - je[1] - je[3], 0), Pe = Math.max((q ? q.height : se.shape.height) - je[0] - je[2], 0);
- (He.width !== Le || He.height !== Pe) && we.setStyle({
- width: Le,
- height: Pe
- });
- }, He.truncateMinChar = 2, He.lineOverflow = "truncate", ne(He, q, c);
- var Be = we.getState("emphasis");
- ne(Be ? Be.style : null, q, c);
- }
- }
- function ne(se, he, re) {
- var q = se ? se.text : null;
- if (!he && re.isLeafRoot && q != null) {
- var K = t.get("drillDownIcon", !0);
- se.text = K ? K + " " + q : q;
- }
- }
- function fe(se, he, re, q) {
- var K = y != null && n[se][y], de = i[se];
- return K ? (n[se][y] = null, ue(de, K)) : g || (K = new he(), K instanceof ls && (K.z2 = qnt(re, q)), ye(de, K)), e[se][m] = K;
- }
- function ue(se, he) {
- var re = se[m] = {};
- he instanceof dL ? (re.oldX = he.x, re.oldY = he.y) : re.oldShape = _e({}, he.shape);
- }
- function ye(se, he) {
- var re = se[m] = {}, q = o.parentNode, K = he instanceof ct;
- if (q && (!r || r.direction === "drillDown")) {
- var de = 0, xe = 0, we = i.background[q.getRawIndex()];
- !r && we && we.oldShape && (de = we.oldShape.width, xe = we.oldShape.height), K ? (re.oldX = 0, re.oldY = xe) : re.oldShape = {
- x: de,
- y: xe,
- width: 0,
- height: 0
- };
- }
- re.fadein = !K;
- }
- }
- function qnt(t, e) {
- return t * jnt + e;
- }
- var l_ = F, Knt = nt, aT = -1, Kr = (
- /** @class */
- function() {
- function t(e) {
- var n = e.mappingMethod, r = e.type, i = this.option = ot(e);
- this.type = r, this.mappingMethod = n, this._normalizeData = trt[n];
- var a = t.visualHandlers[r];
- this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (nI(i), Jnt(i)) : n === "category" ? i.categories ? ert(i) : nI(i, !0) : (at(n !== "linear" || i.dataExtent), nI(i));
- }
- return t.prototype.mapValueToVisual = function(e) {
- var n = this._normalizeData(e);
- return this._normalizedToVisual(n, e);
- }, t.prototype.getNormalizer = function() {
- return We(this._normalizeData, this);
- }, t.listVisualTypes = function() {
- return kt(t.visualHandlers);
- }, t.isValidType = function(e) {
- return t.visualHandlers.hasOwnProperty(e);
- }, t.eachVisual = function(e, n, r) {
- nt(e) ? F(e, n, r) : n.call(r, e);
- }, t.mapVisual = function(e, n, r) {
- var i, a = Se(e) ? [] : nt(e) ? {} : (i = !0, null);
- return t.eachVisual(e, function(o, s) {
- var l = n.call(r, o, s);
- i ? a = l : a[s] = l;
- }), a;
- }, t.retrieveVisuals = function(e) {
- var n = {}, r;
- return e && l_(t.visualHandlers, function(i, a) {
- e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
- }), r ? n : null;
- }, t.prepareVisualTypes = function(e) {
- if (Se(e))
- e = e.slice();
- else if (Knt(e)) {
- var n = [];
- l_(e, function(r, i) {
- n.push(i);
- }), e = n;
- } else
- return [];
- return e.sort(function(r, i) {
- return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
- }), e;
- }, t.dependsOn = function(e, n) {
- return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
- }, t.findPieceIndex = function(e, n, r) {
- for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
- var l = n[o].value;
- if (l != null) {
- if (l === e || Ve(l) && l === e + "")
- return o;
- r && d(l, o);
- }
- }
- for (var o = 0, s = n.length; o < s; o++) {
- var u = n[o], c = u.interval, f = u.close;
- if (c) {
- if (c[0] === -1 / 0) {
- if (HS(f[1], e, c[1]))
- return o;
- } else if (c[1] === 1 / 0) {
- if (HS(f[0], c[0], e))
- return o;
- } else if (HS(f[0], c[0], e) && HS(f[1], e, c[1]))
- return o;
- r && d(c[0], o), r && d(c[1], o);
- }
- }
- if (r)
- return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
- function d(h, p) {
- var v = Math.abs(h - e);
- v < a && (a = v, i = p);
- }
- }, t.visualHandlers = {
- color: {
- applyVisual: Z0("color"),
- getColorMapper: function() {
- var e = this.option;
- return We(e.mappingMethod === "category" ? function(n, r) {
- return !r && (n = this._normalizeData(n)), xy.call(this, n);
- } : function(n, r, i) {
- var a = !!i;
- return !r && (n = this._normalizeData(n)), i = Ky(n, e.parsedVisual, i), a ? i : Bs(i, "rgba");
- }, this);
- },
- _normalizedToVisual: {
- linear: function(e) {
- return Bs(Ky(e, this.option.parsedVisual), "rgba");
- },
- category: xy,
- piecewise: function(e, n) {
- var r = pL.call(this, n);
- return r == null && (r = Bs(Ky(e, this.option.parsedVisual), "rgba")), r;
- },
- fixed: Bd
- }
- },
- colorHue: QS(function(e, n) {
- return Yv(e, n);
- }),
- colorSaturation: QS(function(e, n) {
- return Yv(e, null, n);
- }),
- colorLightness: QS(function(e, n) {
- return Yv(e, null, null, n);
- }),
- colorAlpha: QS(function(e, n) {
- return Gb(e, n);
- }),
- decal: {
- applyVisual: Z0("decal"),
- _normalizedToVisual: {
- linear: null,
- category: xy,
- piecewise: null,
- fixed: null
- }
- },
- opacity: {
- applyVisual: Z0("opacity"),
- _normalizedToVisual: hL([0, 1])
- },
- liftZ: {
- applyVisual: Z0("liftZ"),
- _normalizedToVisual: {
- linear: Bd,
- category: Bd,
- piecewise: Bd,
- fixed: Bd
- }
- },
- symbol: {
- applyVisual: function(e, n, r) {
- var i = this.mapValueToVisual(e);
- r("symbol", i);
- },
- _normalizedToVisual: {
- linear: CU,
- category: xy,
- piecewise: function(e, n) {
- var r = pL.call(this, n);
- return r == null && (r = CU.call(this, e)), r;
- },
- fixed: Bd
- }
- },
- symbolSize: {
- applyVisual: Z0("symbolSize"),
- _normalizedToVisual: hL([0, 1])
- }
- }, t;
- }()
- );
- function Jnt(t) {
- var e = t.pieceList;
- t.hasSpecialVisual = !1, F(e, function(n, r) {
- n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
- });
- }
- function ert(t) {
- var e = t.categories, n = t.categoryMap = {}, r = t.visual;
- if (l_(e, function(o, s) {
- n[o] = s;
- }), !Se(r)) {
- var i = [];
- nt(r) ? l_(r, function(o, s) {
- var l = n[s];
- i[l ?? aT] = o;
- }) : i[aT] = r, r = Zfe(t, i);
- }
- for (var a = e.length - 1; a >= 0; a--)
- r[a] == null && (delete n[e[a]], e.pop());
- }
- function nI(t, e) {
- var n = t.visual, r = [];
- nt(n) ? l_(n, function(a) {
- r.push(a);
- }) : n != null && r.push(n);
- var i = {
- color: 1,
- symbol: 1
- };
- !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), Zfe(t, r);
- }
- function QS(t) {
- return {
- applyVisual: function(e, n, r) {
- var i = this.mapValueToVisual(e);
- r("color", t(n("color"), i));
- },
- _normalizedToVisual: hL([0, 1])
- };
- }
- function CU(t) {
- var e = this.option.visual;
- return e[Math.round(gn(t, [0, 1], [0, e.length - 1], !0))] || {};
- }
- function Z0(t) {
- return function(e, n, r) {
- r(t, this.mapValueToVisual(e));
- };
- }
- function xy(t) {
- var e = this.option.visual;
- return e[this.option.loop && t !== aT ? t % e.length : t];
- }
- function Bd() {
- return this.option.visual[0];
- }
- function hL(t) {
- return {
- linear: function(e) {
- return gn(e, t, this.option.visual, !0);
- },
- category: xy,
- piecewise: function(e, n) {
- var r = pL.call(this, n);
- return r == null && (r = gn(e, t, this.option.visual, !0)), r;
- },
- fixed: Bd
- };
- }
- function pL(t) {
- var e = this.option, n = e.pieceList;
- if (e.hasSpecialVisual) {
- var r = Kr.findPieceIndex(t, n), i = n[r];
- if (i && i.visual)
- return i.visual[this.type];
- }
- }
- function Zfe(t, e) {
- return t.visual = e, t.type === "color" && (t.parsedVisual = Ce(e, function(n) {
- var r = oa(n);
- return !r && process.env.NODE_ENV !== "production" && nr("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
- })), e;
- }
- var trt = {
- linear: function(t) {
- return gn(t, this.option.dataExtent, [0, 1], !0);
- },
- piecewise: function(t) {
- var e = this.option.pieceList, n = Kr.findPieceIndex(t, e, !0);
- if (n != null)
- return gn(n, [0, e.length - 1], [0, 1], !0);
- },
- category: function(t) {
- var e = this.option.categories ? this.option.categoryMap[t] : t;
- return e ?? aT;
- },
- fixed: fr
- };
- function HS(t, e, n) {
- return t ? e <= n : e < n;
- }
- var nrt = "itemStyle", Ufe = Ut();
- const rrt = {
- seriesType: "treemap",
- reset: function(t) {
- var e = t.getData().tree, n = e.root;
- n.isRemoved() || Xfe(
- n,
- // Visual should calculate from tree root but not view root.
- {},
- t.getViewRoot().getAncestors(),
- t
- );
- }
- };
- function Xfe(t, e, n, r) {
- var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
- if (!(!a || a.invisible || !a.isInView)) {
- var s = i.getModel(nrt), l = irt(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
- f != null && (d = TU(l), c = art(f, d)), u.stroke = c;
- var h = t.viewChildren;
- if (!h || !h.length)
- d = TU(l), u.fill = d;
- else {
- var p = ort(t, i, a, s, l, h);
- F(h, function(v, g) {
- if (v.depth >= n.length || v === n[v.depth]) {
- var m = srt(i, l, v, g, p, r);
- Xfe(v, m, n, r);
- }
- });
- }
- }
- }
- function irt(t, e, n) {
- var r = _e({}, e), i = n.designatedVisualItemStyle;
- return F(["color", "colorAlpha", "colorSaturation"], function(a) {
- i[a] = e[a];
- var o = t.get(a);
- i[a] = null, o != null && (r[a] = o);
- }), r;
- }
- function TU(t) {
- var e = rI(t, "color");
- if (e) {
- var n = rI(t, "colorAlpha"), r = rI(t, "colorSaturation");
- return r && (e = Yv(e, null, null, r)), n && (e = Gb(e, n)), e;
- }
- }
- function art(t, e) {
- return e != null ? Yv(e, null, null, t) : null;
- }
- function rI(t, e) {
- var n = t[e];
- if (n != null && n !== "none")
- return n;
- }
- function ort(t, e, n, r, i, a) {
- if (!(!a || !a.length)) {
- var o = iI(e, "color") || i.color != null && i.color !== "none" && (iI(e, "colorAlpha") || iI(e, "colorSaturation"));
- if (o) {
- var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
- s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
- var c = e.get("colorMappingBy"), f = {
- type: o.name,
- dataExtent: u,
- visual: o.range
- };
- f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
- var d = new Kr(f);
- return Ufe(d).drColorMappingBy = c, d;
- }
- }
- }
- function iI(t, e) {
- var n = t.get(e);
- return Se(n) && n.length ? {
- name: e,
- range: n
- } : null;
- }
- function srt(t, e, n, r, i, a) {
- var o = _e({}, e);
- if (i) {
- var s = i.type, l = s === "color" && Ufe(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
- o[s] = i.mapValueToVisual(u);
- }
- return o;
- }
- var u_ = Math.max, oT = Math.min, PU = Or, Z3 = F, Yfe = ["itemStyle", "borderWidth"], lrt = ["itemStyle", "gapWidth"], urt = ["upperLabel", "show"], crt = ["upperLabel", "height"];
- const frt = {
- seriesType: "treemap",
- reset: function(t, e, n, r) {
- var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Mr(t.getBoxLayoutParams(), {
- width: n.getWidth(),
- height: n.getHeight()
- }), l = o.size || [], u = ze(PU(s.width, l[0]), i), c = ze(PU(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = s_(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = Hfe(v);
- if (f !== "treemapMove") {
- var m = f === "treemapZoomToNode" ? mrt(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
- y && y !== "asc" && y !== "desc" && (y = "desc");
- var _ = {
- squareRatio: o.squareRatio,
- sort: y,
- leafDepth: o.leafDepth
- };
- v.hostTree.clearLayouts();
- var O = {
- x: 0,
- y: 0,
- width: m[0],
- height: m[1],
- area: m[0] * m[1]
- };
- v.setLayout(O), qfe(v, _, !1, 0), O = v.getLayout(), Z3(g, function(x, C) {
- var P = (g[C + 1] || v).getValue();
- x.setLayout(_e({
- dataExtent: [P, P],
- borderWidth: 0,
- upperHeight: 0
- }, O));
- });
- }
- var S = t.getData().tree.root;
- S.setLayout(yrt(s, p, h), !0), t.setLayoutInfo(s), Kfe(
- S,
- // Transform to base element coordinate system.
- new bt(-s.x, -s.y, i, a),
- g,
- v,
- 0
- );
- }
- };
- function qfe(t, e, n, r) {
- var i, a;
- if (!t.isRemoved()) {
- var o = t.getLayout();
- i = o.width, a = o.height;
- var s = t.getModel(), l = s.get(Yfe), u = s.get(lrt) / 2, c = Jfe(s), f = Math.max(l, c), d = l - u, h = f - u;
- t.setLayout({
- borderWidth: l,
- upperHeight: f,
- upperLabelHeight: c
- }, !0), i = u_(i - 2 * d, 0), a = u_(a - d - h, 0);
- var p = i * a, v = drt(t, s, p, e, n, r);
- if (v.length) {
- var g = {
- x: d,
- y: h,
- width: i,
- height: a
- }, m = oT(i, a), y = 1 / 0, _ = [];
- _.area = 0;
- for (var O = 0, S = v.length; O < S; ) {
- var x = v[O];
- _.push(x), _.area += x.getLayout().area;
- var C = grt(_, m, e.squareRatio);
- C <= y ? (O++, y = C) : (_.area -= _.pop().getLayout().area, $U(_, m, g, u, !1), m = oT(g.width, g.height), _.length = _.area = 0, y = 1 / 0);
- }
- if (_.length && $U(_, m, g, u, !0), !n) {
- var P = s.get("childrenVisibleMin");
- P != null && p < P && (n = !0);
- }
- for (var O = 0, S = v.length; O < S; O++)
- qfe(v[O], e, n, r + 1);
- }
- }
- }
- function drt(t, e, n, r, i, a) {
- var o = t.children || [], s = r.sort;
- s !== "asc" && s !== "desc" && (s = null);
- var l = r.leafDepth != null && r.leafDepth <= a;
- if (i && !l)
- return t.viewChildren = [];
- o = yn(o, function(h) {
- return !h.isRemoved();
- }), prt(o, s);
- var u = vrt(e, o, s);
- if (u.sum === 0)
- return t.viewChildren = [];
- if (u.sum = hrt(e, n, u.sum, s, o), u.sum === 0)
- return t.viewChildren = [];
- for (var c = 0, f = o.length; c < f; c++) {
- var d = o[c].getValue() / u.sum * n;
- o[c].setLayout({
- area: d
- });
- }
- return l && (o.length && t.setLayout({
- isLeafRoot: !0
- }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
- dataExtent: u.dataExtent
- }, !0), o;
- }
- function hrt(t, e, n, r, i) {
- if (!r)
- return n;
- for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
- var u = i[r === "asc" ? o - l - 1 : l].getValue();
- u / n * e < a && (s = l, n -= u);
- }
- return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
- }
- function prt(t, e) {
- return e && t.sort(function(n, r) {
- var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
- return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
- }), t;
- }
- function vrt(t, e, n) {
- for (var r = 0, i = 0, a = e.length; i < a; i++)
- r += e[i].getValue();
- var o = t.get("visualDimension"), s;
- return !e || !e.length ? s = [NaN, NaN] : o === "value" && n ? (s = [e[e.length - 1].getValue(), e[0].getValue()], n === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Z3(e, function(l) {
- var u = l.getValue(o);
- u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
- })), {
- sum: r,
- dataExtent: s
- };
- }
- function grt(t, e, n) {
- for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
- o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
- var l = t.area * t.area, u = e * e * n;
- return l ? u_(u * r / l, l / (u * i)) : 1 / 0;
- }
- function $U(t, e, n, r, i) {
- var a = e === n.width ? 0 : 1, o = 1 - a, s = ["x", "y"], l = ["width", "height"], u = n[s[a]], c = e ? t.area / e : 0;
- (i || c > n[l[o]]) && (c = n[l[o]]);
- for (var f = 0, d = t.length; f < d; f++) {
- var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = u_(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, _ = p[l[a]] = u_(y - 2 * r, 0);
- p[s[o]] = n[s[o]] + oT(r, g / 2), p[s[a]] = u + oT(r, _ / 2), u += y, h.setLayout(p, !0);
- }
- n[s[o]] += c, n[l[o]] -= c;
- }
- function mrt(t, e, n, r, i) {
- var a = (e || {}).node, o = [r, i];
- if (!a || a === n)
- return o;
- for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
- for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
- c += f[d].getValue();
- var p = a.getValue();
- if (p === 0)
- return o;
- u *= c / p;
- var v = s.getModel(), g = v.get(Yfe), m = Math.max(g, Jfe(v));
- u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > Ok && (u = Ok), a = s;
- }
- u < l && (u = l);
- var y = Math.pow(u / l, 0.5);
- return [r * y, i * y];
- }
- function yrt(t, e, n) {
- if (e)
- return {
- x: e.x,
- y: e.y
- };
- var r = {
- x: 0,
- y: 0
- };
- if (!n)
- return r;
- var i = n.node, a = i.getLayout();
- if (!a)
- return r;
- for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
- var l = s.getLayout();
- o[0] += l.x, o[1] += l.y, s = s.parentNode;
- }
- return {
- x: t.width / 2 - o[0],
- y: t.height / 2 - o[1]
- };
- }
- function Kfe(t, e, n, r, i) {
- var a = t.getLayout(), o = n[i], s = o && o === t;
- if (!(o && !s || i === n.length && t !== r)) {
- t.setLayout({
- // isInView means: viewRoot sub tree + viewAbovePath
- isInView: !0,
- // invisible only means: outside view clip so that the node can not
- // see but still layout for animation preparation but not render.
- invisible: !s && !e.intersect(a),
- isAboveViewRoot: s
- }, !0);
- var l = new bt(e.x - a.x, e.y - a.y, e.width, e.height);
- Z3(t.viewChildren || [], function(u) {
- Kfe(u, l, n, r, i + 1);
- });
- }
- }
- function Jfe(t) {
- return t.get(urt) ? t.get(crt) : 0;
- }
- function brt(t) {
- t.registerSeriesModel(Bnt), t.registerChartView(Xnt), t.registerVisual(rrt), t.registerLayout(frt), Nnt(t);
- }
- function _rt(t) {
- var e = t.findComponents({
- mainType: "legend"
- });
- !e || !e.length || t.eachSeriesByType("graph", function(n) {
- var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
- a.filterSelf(function(s) {
- var l = a.getItemModel(s), u = l.getShallow("category");
- if (u != null) {
- Kt(u) && (u = o[u]);
- for (var c = 0; c < e.length; c++)
- if (!e[c].isSelected(u))
- return !1;
- }
- return !0;
- });
- });
- }
- function Ort(t) {
- var e = {};
- t.eachSeriesByType("graph", function(n) {
- var r = n.getCategoriesData(), i = n.getData(), a = {};
- r.each(function(o) {
- var s = r.getName(o);
- a["ec-" + s] = o;
- var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
- u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
- for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
- var d = l.getShallow(c[f], !0);
- d != null && r.setItemVisual(o, c[f], d);
- }
- }), r.count() && i.each(function(o) {
- var s = i.getItemModel(o), l = s.getShallow("category");
- if (l != null) {
- Ve(l) && (l = a["ec-" + l]);
- var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
- _e(c, u);
- for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
- i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
- }
- });
- });
- }
- function GS(t) {
- return t instanceof Array || (t = [t, t]), t;
- }
- function Srt(t) {
- t.eachSeriesByType("graph", function(e) {
- var n = e.getGraph(), r = e.getEdgeData(), i = GS(e.get("edgeSymbol")), a = GS(e.get("edgeSymbolSize"));
- r.setVisual("fromSymbol", i && i[0]), r.setVisual("toSymbol", i && i[1]), r.setVisual("fromSymbolSize", a && a[0]), r.setVisual("toSymbolSize", a && a[1]), r.setVisual("style", e.getModel("lineStyle").getLineStyle()), r.each(function(o) {
- var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = GS(s.getShallow("symbol", !0)), c = GS(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
- switch (_e(d, f), d.stroke) {
- case "source": {
- var h = l.node1.getVisual("style");
- d.stroke = h && h.fill;
- break;
- }
- case "target": {
- var h = l.node2.getVisual("style");
- d.stroke = h && h.fill;
- break;
- }
- }
- u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), c[0] && l.setVisual("fromSymbolSize", c[0]), c[1] && l.setVisual("toSymbolSize", c[1]);
- });
- });
- }
- var vL = "-->", jP = function(t) {
- return t.get("autoCurveness") || null;
- }, ede = function(t, e) {
- var n = jP(t), r = 20, i = [];
- if (Kt(n))
- r = n;
- else if (Se(n)) {
- t.__curvenessList = n;
- return;
- }
- e > r && (r = e);
- var a = r % 2 ? r + 2 : r + 3;
- i = [];
- for (var o = 0; o < a; o++)
- i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
- t.__curvenessList = i;
- }, c_ = function(t, e, n) {
- var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
- return [n.uid, r, i].join(vL);
- }, tde = function(t) {
- var e = t.split(vL);
- return [e[0], e[2], e[1]].join(vL);
- }, xrt = function(t, e) {
- var n = c_(t.node1, t.node2, e);
- return e.__edgeMap[n];
- }, wrt = function(t, e) {
- var n = gL(c_(t.node1, t.node2, e), e), r = gL(c_(t.node2, t.node1, e), e);
- return n + r;
- }, gL = function(t, e) {
- var n = e.__edgeMap;
- return n[t] ? n[t].length : 0;
- };
- function Crt(t) {
- jP(t) && (t.__curvenessList = [], t.__edgeMap = {}, ede(t));
- }
- function Trt(t, e, n, r) {
- if (jP(n)) {
- var i = c_(t, e, n), a = n.__edgeMap, o = a[tde(i)];
- a[i] && !o ? a[i].isForward = !0 : o && a[i] && (o.isForward = !0, a[i].isForward = !1), a[i] = a[i] || [], a[i].push(r);
- }
- }
- function U3(t, e, n, r) {
- var i = jP(e), a = Se(i);
- if (!i)
- return null;
- var o = xrt(t, e);
- if (!o)
- return null;
- for (var s = -1, l = 0; l < o.length; l++)
- if (o[l] === n) {
- s = l;
- break;
- }
- var u = wrt(t, e);
- ede(e, u), t.lineStyle = t.lineStyle || {};
- var c = c_(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
- if (o.isForward)
- return f[d + s];
- var h = tde(c), p = gL(h, e), v = f[s + p + d];
- return r ? a ? i && i[0] === 0 ? (p + d) % 2 ? v : -v : ((p % 2 ? 0 : 1) + d) % 2 ? v : -v : (p + d) % 2 ? v : -v : f[s + p + d];
- }
- function nde(t) {
- var e = t.coordinateSystem;
- if (!(e && e.type !== "view")) {
- var n = t.getGraph();
- n.eachNode(function(r) {
- var i = r.getModel();
- r.setLayout([+i.get("x"), +i.get("y")]);
- }), X3(n, t);
- }
- }
- function X3(t, e) {
- t.eachEdge(function(n, r) {
- var i = co(n.getModel().get(["lineStyle", "curveness"]), -U3(n, e, r, !0), 0), a = kl(n.node1.getLayout()), o = kl(n.node2.getLayout()), s = [a, o];
- +i && s.push([(a[0] + o[0]) / 2 - (a[1] - o[1]) * i, (a[1] + o[1]) / 2 - (o[0] - a[0]) * i]), n.setLayout(s);
- });
- }
- function Prt(t, e) {
- t.eachSeriesByType("graph", function(n) {
- var r = n.get("layout"), i = n.coordinateSystem;
- if (i && i.type !== "view") {
- var a = n.getData(), o = [];
- F(i.dimensions, function(d) {
- o = o.concat(a.mapDimensionsAll(d));
- });
- for (var s = 0; s < a.count(); s++) {
- for (var l = [], u = !1, c = 0; c < o.length; c++) {
- var f = a.get(o[c], s);
- isNaN(f) || (u = !0), l.push(f);
- }
- u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
- }
- X3(a.graph, n);
- } else (!r || r === "none") && nde(n);
- });
- }
- function wy(t) {
- var e = t.coordinateSystem;
- if (e.type !== "view")
- return 1;
- var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
- return a / r;
- }
- function Cy(t) {
- var e = t.getVisual("symbolSize");
- return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
- }
- var AU = Math.PI, aI = [];
- function Y3(t, e, n, r) {
- var i = t.coordinateSystem;
- if (!(i && i.type !== "view")) {
- var a = i.getBoundingRect(), o = t.getData(), s = o.graph, l = a.width / 2 + a.x, u = a.height / 2 + a.y, c = Math.min(a.width, a.height) / 2, f = o.count();
- if (o.setLayout({
- cx: l,
- cy: u
- }), !!f) {
- if (n) {
- var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
- fp(v, v), Xy(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
- var g = t.get(["circular", "rotateLabel"]);
- rde(n, g, l, u);
- }
- $rt[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
- var _ = co(m.getModel().get(["lineStyle", "curveness"]), U3(m, t, y), 0), O = kl(m.node1.getLayout()), S = kl(m.node2.getLayout()), x, C = (O[0] + S[0]) / 2, P = (O[1] + S[1]) / 2;
- +_ && (_ *= 3, x = [l * _ + C * (1 - _), u * _ + P * (1 - _)]), m.setLayout([O, S, x]);
- });
- }
- }
- }
- var $rt = {
- value: function(t, e, n, r, i, a, o) {
- var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
- e.eachNode(function(c) {
- var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
- s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
- });
- },
- symbolSize: function(t, e, n, r, i, a, o) {
- var s = 0;
- aI.length = o;
- var l = wy(t);
- e.eachNode(function(f) {
- var d = Cy(f);
- isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
- var h = Math.asin(d / 2 / r);
- isNaN(h) && (h = AU / 2), aI[f.dataIndex] = h, s += h * 2;
- });
- var u = (2 * AU - s) / o / 2, c = 0;
- e.eachNode(function(f) {
- var d = u + aI[f.dataIndex];
- c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
- });
- }
- };
- function rde(t, e, n, r) {
- var i = t.getGraphicEl();
- if (i) {
- var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
- if (e) {
- var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
- u < 0 && (u = Math.PI * 2 + u);
- var c = l[0] < n;
- c && (u = u - Math.PI);
- var f = c ? "left" : "right";
- s.setTextConfig({
- rotation: -u,
- position: f,
- origin: "center"
- });
- var d = s.ensureState("emphasis");
- _e(d.textConfig || (d.textConfig = {}), {
- position: f
- });
- } else
- s.setTextConfig({
- rotation: o *= Math.PI / 180
- });
- }
- }
- function Art(t) {
- t.eachSeriesByType("graph", function(e) {
- e.get("layout") === "circular" && Y3(e, "symbolSize");
- });
- }
- var ov = _C;
- function Ert(t, e, n) {
- for (var r = t, i = e, a = n.rect, o = a.width, s = a.height, l = [a.x + o / 2, a.y + s / 2], u = n.gravity == null ? 0.1 : n.gravity, c = 0; c < r.length; c++) {
- var f = r[c];
- f.p || (f.p = kf(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = kl(f.p), f.edges = null;
- }
- var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
- return {
- warmUp: function() {
- h = d * 0.8;
- },
- setFixed: function(g) {
- r[g].fixed = !0;
- },
- setUnfixed: function(g) {
- r[g].fixed = !1;
- },
- /**
- * Before step hook
- */
- beforeStep: function(g) {
- p = g;
- },
- /**
- * After step hook
- */
- afterStep: function(g) {
- v = g;
- },
- /**
- * Some formulas were originally copied from "d3.js"
- * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
- * with some modifications made for this project.
- * See the license statement at the head of this file.
- */
- step: function(g) {
- p && p(r, i);
- for (var m = [], y = r.length, _ = 0; _ < i.length; _++) {
- var O = i[_];
- if (!O.ignoreForceLayout) {
- var S = O.n1, x = O.n2;
- Wc(m, x.p, S.p);
- var C = Wb(m) - O.d, P = x.w / (S.w + x.w);
- isNaN(P) && (P = 0), fp(m, m), !S.fixed && ov(S.p, S.p, m, P * C * h), !x.fixed && ov(x.p, x.p, m, -(1 - P) * C * h);
- }
- }
- for (var _ = 0; _ < y; _++) {
- var $ = r[_];
- $.fixed || (Wc(m, l, $.p), ov($.p, $.p, m, u * h));
- }
- for (var _ = 0; _ < y; _++)
- for (var S = r[_], T = _ + 1; T < y; T++) {
- var x = r[T];
- Wc(m, x.p, S.p);
- var C = Wb(m);
- C === 0 && (Joe(m, Math.random() - 0.5, Math.random() - 0.5), C = 1);
- var E = (S.rep + x.rep) / C / C;
- !S.fixed && ov(S.pp, S.pp, m, E), !x.fixed && ov(x.pp, x.pp, m, -E);
- }
- for (var M = [], _ = 0; _ < y; _++) {
- var $ = r[_];
- $.fixed || (Wc(M, $.p, $.pp), ov($.p, $.p, M, h), ki($.pp, $.p));
- }
- h = h * 0.992;
- var R = h < 0.01;
- v && v(r, i, R), g && g(R);
- }
- };
- }
- function Mrt(t) {
- t.eachSeriesByType("graph", function(e) {
- var n = e.coordinateSystem;
- if (!(n && n.type !== "view"))
- if (e.get("layout") === "force") {
- var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
- e.preservedPoints ? a.each(function(_) {
- var O = a.getId(_);
- a.setItemLayout(_, r[O] || [NaN, NaN]);
- }) : !l || l === "none" ? nde(e) : l === "circular" && Y3(e, "value");
- var u = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), d = s.get("edgeLength"), h = Se(f) ? f : [f, f], p = Se(d) ? d : [d, d];
- p = [p[1], p[0]];
- var v = a.mapArray("value", function(_, O) {
- var S = a.getItemLayout(O), x = gn(_, u, h);
- return isNaN(x) && (x = (h[0] + h[1]) / 2), {
- w: x,
- rep: x,
- fixed: a.getItemModel(O).get("fixed"),
- p: !S || isNaN(S[0]) || isNaN(S[1]) ? null : S
- };
- }), g = o.mapArray("value", function(_, O) {
- var S = i.getEdgeByIndex(O), x = gn(_, c, p);
- isNaN(x) && (x = (p[0] + p[1]) / 2);
- var C = S.getModel(), P = co(S.getModel().get(["lineStyle", "curveness"]), -U3(S, e, O, !0), 0);
- return {
- n1: v[S.node1.dataIndex],
- n2: v[S.node2.dataIndex],
- d: x,
- curveness: P,
- ignoreForceLayout: C.get("ignoreForceLayout")
- };
- }), m = n.getBoundingRect(), y = Ert(v, g, {
- rect: m,
- gravity: s.get("gravity"),
- friction: s.get("friction")
- });
- y.beforeStep(function(_, O) {
- for (var S = 0, x = _.length; S < x; S++)
- _[S].fixed && ki(_[S].p, i.getNodeByIndex(S).getLayout());
- }), y.afterStep(function(_, O, S) {
- for (var x = 0, C = _.length; x < C; x++)
- _[x].fixed || i.getNodeByIndex(x).setLayout(_[x].p), r[a.getId(x)] = _[x].p;
- for (var x = 0, C = O.length; x < C; x++) {
- var P = O[x], $ = i.getEdgeByIndex(x), T = P.n1.p, E = P.n2.p, M = $.getLayout();
- M = M ? M.slice() : [], M[0] = M[0] || [], M[1] = M[1] || [], ki(M[0], T), ki(M[1], E), +P.curveness && (M[2] = [(T[0] + E[0]) / 2 - (T[1] - E[1]) * P.curveness, (T[1] + E[1]) / 2 - (E[0] - T[0]) * P.curveness]), $.setLayout(M);
- }
- }), e.forceLayout = y, e.preservedPoints = r, y.step();
- } else
- e.forceLayout = null;
- });
- }
- function Irt(t, e, n) {
- var r = _e(t.getBoxLayoutParams(), {
- aspect: n
- });
- return Mr(r, {
- width: e.getWidth(),
- height: e.getHeight()
- });
- }
- function Drt(t, e) {
- var n = [];
- return t.eachSeriesByType("graph", function(r) {
- var i = r.get("coordinateSystem");
- if (!i || i === "view") {
- var a = r.getData(), o = a.mapArray(function(g) {
- var m = a.getItemModel(g);
- return [+m.get("x"), +m.get("y")];
- }), s = [], l = [];
- yP(o, s, l), l[0] - s[0] === 0 && (l[0] += 1, s[0] -= 1), l[1] - s[1] === 0 && (l[1] += 1, s[1] -= 1);
- var u = (l[0] - s[0]) / (l[1] - s[1]), c = Irt(r, e, u);
- isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
- var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new w1();
- v.zoomLimit = r.get("scaleLimit"), v.setBoundingRect(s[0], s[1], f, d), v.setViewRect(c.x, c.y, h, p), v.setCenter(r.get("center"), e), v.setZoom(r.get("zoom")), n.push(v);
- }
- }), n;
- }
- var EU = Xr.prototype, oI = f1.prototype, ide = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
- }
- return t;
- }()
- );
- (function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e;
- })(ide);
- function sI(t) {
- return isNaN(+t.cpx1) || isNaN(+t.cpy1);
- }
- var Rrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "ec-line", r;
- }
- return e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new ide();
- }, e.prototype.buildPath = function(n, r) {
- sI(r) ? EU.buildPath.call(this, n, r) : oI.buildPath.call(this, n, r);
- }, e.prototype.pointAt = function(n) {
- return sI(this.shape) ? EU.pointAt.call(this, n) : oI.pointAt.call(this, n);
- }, e.prototype.tangentAt = function(n) {
- var r = this.shape, i = sI(r) ? [r.x2 - r.x1, r.y2 - r.y1] : oI.tangentAt.call(this, n);
- return fp(i, i);
- }, e;
- }(Dt)
- ), lI = ["fromSymbol", "toSymbol"];
- function MU(t) {
- return "_" + t + "Type";
- }
- function IU(t, e, n) {
- var r = e.getItemVisual(n, t);
- if (!r || r === "none")
- return r;
- var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = Em(i), u = mp(o || 0, l);
- return r + l + u + (a || "") + (s || "");
- }
- function DU(t, e, n) {
- var r = e.getItemVisual(n, t);
- if (!(!r || r === "none")) {
- var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = Em(i), u = mp(o || 0, l), c = wr(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
- return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
- }
- }
- function krt(t) {
- var e = new Rrt({
- name: "line",
- subPixelOptimize: !0
- });
- return mL(e.shape, t), e;
- }
- function mL(t, e) {
- t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
- var n = e[2];
- n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
- }
- var q3 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this) || this;
- return a._createLine(n, r, i), a;
- }
- return e.prototype._createLine = function(n, r, i) {
- var a = n.hostModel, o = n.getItemLayout(r), s = krt(o);
- s.shape.percent = 0, Vn(s, {
- shape: {
- percent: 1
- }
- }, a, r), this.add(s), F(lI, function(l) {
- var u = DU(l, n, r);
- this.add(u), this[MU(l)] = IU(l, n, r);
- }, this), this._updateCommonStl(n, r, i);
- }, e.prototype.updateData = function(n, r, i) {
- var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
- shape: {}
- };
- mL(l.shape, s), tn(o, l, a, r), F(lI, function(u) {
- var c = IU(u, n, r), f = MU(u);
- if (this[f] !== c) {
- this.remove(this.childOfName(u));
- var d = DU(u, n, r);
- this.add(d);
- }
- this[f] = c;
- }, this), this._updateCommonStl(n, r, i);
- }, e.prototype.getLinePath = function() {
- return this.childAt(0);
- }, e.prototype._updateCommonStl = function(n, r, i) {
- var a = n.hostModel, o = this.childOfName("line"), s = i && i.emphasisLineStyle, l = i && i.blurLineStyle, u = i && i.selectLineStyle, c = i && i.labelStatesModels, f = i && i.emphasisDisabled, d = i && i.focus, h = i && i.blurScope;
- if (!i || n.hasItemOption) {
- var p = n.getItemModel(r), v = p.getModel("emphasis");
- s = v.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), f = v.get("disabled"), d = v.get("focus"), h = v.get("blurScope"), c = ei(p);
- }
- var g = n.getItemVisual(r, "style"), m = g.stroke;
- o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = l, o.ensureState("select").style = u, F(lI, function(x) {
- var C = this.childOfName(x);
- if (C) {
- C.setColor(m), C.style.opacity = g.opacity;
- for (var P = 0; P < da.length; P++) {
- var $ = da[P], T = o.getState($);
- if (T) {
- var E = T.style || {}, M = C.ensureState($), R = M.style || (M.style = {});
- E.stroke != null && (R[C.__isEmptyBrush ? "stroke" : "fill"] = E.stroke), E.opacity != null && (R.opacity = E.opacity);
- }
- }
- C.markRedraw();
- }
- }, this);
- var y = a.getRawValue(r);
- Ei(this, c, {
- labelDataIndex: r,
- labelFetcher: {
- getFormattedLabel: function(x, C) {
- return a.getFormattedLabel(x, C, n.dataType);
- }
- },
- inheritColor: m || "#000",
- defaultOpacity: g.opacity,
- defaultText: (y == null ? n.getName(r) : isFinite(y) ? sr(y) : y) + ""
- });
- var _ = this.getTextContent();
- if (_) {
- var O = c.normal;
- _.__align = _.style.align, _.__verticalAlign = _.style.verticalAlign, _.__position = O.get("position") || "middle";
- var S = O.get("distance");
- Se(S) || (S = [S, S]), _.__labelDistance = S;
- }
- this.setTextConfig({
- position: null,
- local: !0,
- inside: !1
- // Can't be inside for stroke element.
- }), ur(this, d, h, f);
- }, e.prototype.highlight = function() {
- Fu(this);
- }, e.prototype.downplay = function() {
- Wu(this);
- }, e.prototype.updateLayout = function(n, r) {
- this.setLinePoints(n.getItemLayout(r));
- }, e.prototype.setLinePoints = function(n) {
- var r = this.childOfName("line");
- mL(r.shape, n), r.dirty();
- }, e.prototype.beforeUpdate = function() {
- var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
- if (!r && !i && (!a || a.ignore))
- return;
- for (var o = 1, s = this.parent; s; )
- s.scaleX && (o /= s.scaleX), s = s.parent;
- var l = n.childOfName("line");
- if (!this.__dirty && !l.__dirty)
- return;
- var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = Wc([], f, c);
- fp(d, d);
- function h(T, E) {
- var M = T.__specifiedRotation;
- if (M == null) {
- var R = l.tangentAt(E);
- T.attr("rotation", (E === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(R[1], R[0]));
- } else
- T.attr("rotation", M);
- }
- if (r && (r.setPosition(c), h(r, 0), r.scaleX = r.scaleY = o * u, r.markRedraw()), i && (i.setPosition(f), h(i, 1), i.scaleX = i.scaleY = o * u, i.markRedraw()), a && !a.ignore) {
- a.x = a.y = 0, a.originX = a.originY = 0;
- var p = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, _ = u / 2, O = l.tangentAt(_), S = [O[1], -O[0]], x = l.pointAt(_);
- S[1] > 0 && (S[0] = -S[0], S[1] = -S[1]);
- var C = O[0] < 0 ? -1 : 1;
- if (a.__position !== "start" && a.__position !== "end") {
- var P = -Math.atan2(O[1], O[0]);
- f[0] < c[0] && (P = Math.PI + P), a.rotation = P;
- }
- var $ = void 0;
- switch (a.__position) {
- case "insideStartTop":
- case "insideMiddleTop":
- case "insideEndTop":
- case "middle":
- $ = -y, v = "bottom";
- break;
- case "insideStartBottom":
- case "insideMiddleBottom":
- case "insideEndBottom":
- $ = y, v = "top";
- break;
- default:
- $ = 0, v = "middle";
- }
- switch (a.__position) {
- case "end":
- a.x = d[0] * m + f[0], a.y = d[1] * y + f[1], p = d[0] > 0.8 ? "left" : d[0] < -0.8 ? "right" : "center", v = d[1] > 0.8 ? "top" : d[1] < -0.8 ? "bottom" : "middle";
- break;
- case "start":
- a.x = -d[0] * m + c[0], a.y = -d[1] * y + c[1], p = d[0] > 0.8 ? "right" : d[0] < -0.8 ? "left" : "center", v = d[1] > 0.8 ? "bottom" : d[1] < -0.8 ? "top" : "middle";
- break;
- case "insideStartTop":
- case "insideStart":
- case "insideStartBottom":
- a.x = m * C + c[0], a.y = c[1] + $, p = O[0] < 0 ? "right" : "left", a.originX = -m * C, a.originY = -$;
- break;
- case "insideMiddleTop":
- case "insideMiddle":
- case "insideMiddleBottom":
- case "middle":
- a.x = x[0], a.y = x[1] + $, p = "center", a.originY = -$;
- break;
- case "insideEndTop":
- case "insideEnd":
- case "insideEndBottom":
- a.x = -m * C + f[0], a.y = f[1] + $, p = O[0] >= 0 ? "right" : "left", a.originX = m * C, a.originY = -$;
- break;
- }
- a.scaleX = a.scaleY = o, a.setStyle({
- // Use the user specified text align and baseline first
- verticalAlign: a.__verticalAlign || v,
- align: a.__align || p
- });
- }
- }, e;
- }(ct)
- ), K3 = (
- /** @class */
- function() {
- function t(e) {
- this.group = new ct(), this._LineCtor = e || q3;
- }
- return t.prototype.updateData = function(e) {
- var n = this;
- this._progressiveEls = null;
- var r = this, i = r.group, a = r._lineData;
- r._lineData = e, a || i.removeAll();
- var o = RU(e);
- e.diff(a).add(function(s) {
- n._doAdd(e, s, o);
- }).update(function(s, l) {
- n._doUpdate(a, e, l, s, o);
- }).remove(function(s) {
- i.remove(a.getItemGraphicEl(s));
- }).execute();
- }, t.prototype.updateLayout = function() {
- var e = this._lineData;
- e && e.eachItemGraphicEl(function(n, r) {
- n.updateLayout(e, r);
- }, this);
- }, t.prototype.incrementalPrepareUpdate = function(e) {
- this._seriesScope = RU(e), this._lineData = null, this.group.removeAll();
- }, t.prototype.incrementalUpdate = function(e, n) {
- this._progressiveEls = [];
- function r(s) {
- !s.isGroup && !Lrt(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
- }
- for (var i = e.start; i < e.end; i++) {
- var a = n.getItemLayout(i);
- if (uI(a)) {
- var o = new this._LineCtor(n, i, this._seriesScope);
- o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
- }
- }
- }, t.prototype.remove = function() {
- this.group.removeAll();
- }, t.prototype.eachRendered = function(e) {
- Nf(this._progressiveEls || this.group, e);
- }, t.prototype._doAdd = function(e, n, r) {
- var i = e.getItemLayout(n);
- if (uI(i)) {
- var a = new this._LineCtor(e, n, r);
- e.setItemGraphicEl(n, a), this.group.add(a);
- }
- }, t.prototype._doUpdate = function(e, n, r, i, a) {
- var o = e.getItemGraphicEl(r);
- if (!uI(n.getItemLayout(i))) {
- this.group.remove(o);
- return;
- }
- o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
- }, t;
- }()
- );
- function Lrt(t) {
- return t.animators && t.animators.length > 0;
- }
- function RU(t) {
- var e = t.hostModel, n = e.getModel("emphasis");
- return {
- lineStyle: e.getModel("lineStyle").getLineStyle(),
- emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
- blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
- selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
- emphasisDisabled: n.get("disabled"),
- blurScope: n.get("blurScope"),
- focus: n.get("focus"),
- labelStatesModels: ei(e)
- };
- }
- function kU(t) {
- return isNaN(t[0]) || isNaN(t[1]);
- }
- function uI(t) {
- return t && !kU(t[0]) && !kU(t[1]);
- }
- var cI = [], fI = [], dI = [], sv = ii, hI = nf, LU = Math.abs;
- function NU(t, e, n) {
- for (var r = t[0], i = t[1], a = t[2], o = 1 / 0, s, l = n * n, u = 0.1, c = 0.1; c <= 0.9; c += 0.1) {
- cI[0] = sv(r[0], i[0], a[0], c), cI[1] = sv(r[1], i[1], a[1], c);
- var f = LU(hI(cI, e) - l);
- f < o && (o = f, s = c);
- }
- for (var d = 0; d < 32; d++) {
- var h = s + u;
- fI[0] = sv(r[0], i[0], a[0], s), fI[1] = sv(r[1], i[1], a[1], s), dI[0] = sv(r[0], i[0], a[0], h), dI[1] = sv(r[1], i[1], a[1], h);
- var f = hI(fI, e) - l;
- if (LU(f) < 0.01)
- break;
- var p = hI(dI, e) - l;
- u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
- }
- return s;
- }
- function pI(t, e) {
- var n = [], r = Qb, i = [[], [], []], a = [[], []], o = [];
- e /= 2, t.eachEdge(function(s, l) {
- var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
- u.__original || (u.__original = [kl(u[0]), kl(u[1])], u[2] && u.__original.push(kl(u[2])));
- var d = u.__original;
- if (u[2] != null) {
- if (ki(i[0], d[0]), ki(i[1], d[2]), ki(i[2], d[1]), c && c !== "none") {
- var h = Cy(s.node1), p = NU(i, d[0], h * e);
- r(i[0][0], i[1][0], i[2][0], p, n), i[0][0] = n[3], i[1][0] = n[4], r(i[0][1], i[1][1], i[2][1], p, n), i[0][1] = n[3], i[1][1] = n[4];
- }
- if (f && f !== "none") {
- var h = Cy(s.node2), p = NU(i, d[1], h * e);
- r(i[0][0], i[1][0], i[2][0], p, n), i[1][0] = n[1], i[2][0] = n[2], r(i[0][1], i[1][1], i[2][1], p, n), i[1][1] = n[1], i[2][1] = n[2];
- }
- ki(u[0], i[0]), ki(u[1], i[2]), ki(u[2], i[1]);
- } else {
- if (ki(a[0], d[0]), ki(a[1], d[1]), Wc(o, a[1], a[0]), fp(o, o), c && c !== "none") {
- var h = Cy(s.node1);
- _C(a[0], a[0], o, h * e);
- }
- if (f && f !== "none") {
- var h = Cy(s.node2);
- _C(a[1], a[1], o, -h * e);
- }
- ki(u[0], a[0]), ki(u[1], a[1]);
- }
- });
- }
- function BU(t) {
- return t.type === "view";
- }
- var Nrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r) {
- var i = new y1(), a = new K3(), o = this.group;
- this._controller = new x1(r.getZr()), this._controllerHost = {
- target: o
- }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
- }, e.prototype.render = function(n, r, i) {
- var a = this, o = n.coordinateSystem;
- this._model = n;
- var s = this._symbolDraw, l = this._lineDraw, u = this.group;
- if (BU(o)) {
- var c = {
- x: o.x,
- y: o.y,
- scaleX: o.scaleX,
- scaleY: o.scaleY
- };
- this._firstRender ? u.attr(c) : tn(u, c, n);
- }
- pI(n.getGraph(), wy(n));
- var f = n.getData();
- s.updateData(f);
- var d = n.getEdgeData();
- l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
- var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
- h && this._startForceLayoutIteration(h, p);
- var v = n.get("layout");
- f.graph.eachNode(function(_) {
- var O = _.dataIndex, S = _.getGraphicEl(), x = _.getModel();
- if (S) {
- S.off("drag").off("dragend");
- var C = x.get("draggable");
- C && S.on("drag", function($) {
- switch (v) {
- case "force":
- h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(O), f.setItemLayout(O, [S.x, S.y]);
- break;
- case "circular":
- f.setItemLayout(O, [S.x, S.y]), _.setLayout({
- fixed: !0
- }, !0), Y3(n, "symbolSize", _, [$.offsetX, $.offsetY]), a.updateLayout(n);
- break;
- case "none":
- default:
- f.setItemLayout(O, [S.x, S.y]), X3(n.getGraph(), n), a.updateLayout(n);
- break;
- }
- }).on("dragend", function() {
- h && h.setUnfixed(O);
- }), S.setDraggable(C, !!x.get("cursor"));
- var P = x.get(["emphasis", "focus"]);
- P === "adjacency" && (ft(S).focus = _.getAdjacentDataIndices());
- }
- }), f.graph.eachEdge(function(_) {
- var O = _.getGraphicEl(), S = _.getModel().get(["emphasis", "focus"]);
- O && S === "adjacency" && (ft(O).focus = {
- edge: [_.dataIndex],
- node: [_.node1.dataIndex, _.node2.dataIndex]
- });
- });
- var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
- f.graph.eachNode(function(_) {
- rde(_, g, m, y);
- }), this._firstRender = !1;
- }, e.prototype.dispose = function() {
- this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
- }, e.prototype._startForceLayoutIteration = function(n, r) {
- var i = this;
- (function a() {
- n.step(function(o) {
- i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
- });
- })();
- }, e.prototype._updateController = function(n, r, i) {
- var a = this, o = this._controller, s = this._controllerHost, l = this.group;
- if (o.setPointerChecker(function(u, c, f) {
- var d = l.getBoundingRect();
- return d.applyTransform(l.transform), d.contain(c, f) && !QP(u, i, n);
- }), !BU(n.coordinateSystem)) {
- o.disable();
- return;
- }
- o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
- V3(s, u.dx, u.dy), i.dispatchAction({
- seriesId: n.id,
- type: "graphRoam",
- dx: u.dx,
- dy: u.dy
- });
- }).on("zoom", function(u) {
- F3(s, u.scale, u.originX, u.originY), i.dispatchAction({
- seriesId: n.id,
- type: "graphRoam",
- zoom: u.scale,
- originX: u.originX,
- originY: u.originY
- }), a._updateNodeAndLinkScale(), pI(n.getGraph(), wy(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
- });
- }, e.prototype._updateNodeAndLinkScale = function() {
- var n = this._model, r = n.getData(), i = wy(n);
- r.eachItemGraphicEl(function(a, o) {
- a && a.setSymbolScale(i);
- });
- }, e.prototype.updateLayout = function(n) {
- pI(n.getGraph(), wy(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
- }, e.prototype.remove = function() {
- clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
- }, e.type = "graph", e;
- }(_n)
- );
- function lv(t) {
- return "_EC_" + t;
- }
- var Brt = (
- /** @class */
- function() {
- function t(e) {
- this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
- }
- return t.prototype.isDirected = function() {
- return this._directed;
- }, t.prototype.addNode = function(e, n) {
- e = e == null ? "" + n : "" + e;
- var r = this._nodesMap;
- if (r[lv(e)]) {
- process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
- return;
- }
- var i = new zd(e, n);
- return i.hostGraph = this, this.nodes.push(i), r[lv(e)] = i, i;
- }, t.prototype.getNodeByIndex = function(e) {
- var n = this.data.getRawIndex(e);
- return this.nodes[n];
- }, t.prototype.getNodeById = function(e) {
- return this._nodesMap[lv(e)];
- }, t.prototype.addEdge = function(e, n, r) {
- var i = this._nodesMap, a = this._edgesMap;
- if (Kt(e) && (e = this.nodes[e]), Kt(n) && (n = this.nodes[n]), e instanceof zd || (e = i[lv(e)]), n instanceof zd || (n = i[lv(n)]), !(!e || !n)) {
- var o = e.id + "-" + n.id, s = new ade(e, n, r);
- return s.hostGraph = this, this._directed && (e.outEdges.push(s), n.inEdges.push(s)), e.edges.push(s), e !== n && n.edges.push(s), this.edges.push(s), a[o] = s, s;
- }
- }, t.prototype.getEdgeByIndex = function(e) {
- var n = this.edgeData.getRawIndex(e);
- return this.edges[n];
- }, t.prototype.getEdge = function(e, n) {
- e instanceof zd && (e = e.id), n instanceof zd && (n = n.id);
- var r = this._edgesMap;
- return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
- }, t.prototype.eachNode = function(e, n) {
- for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
- r[a].dataIndex >= 0 && e.call(n, r[a], a);
- }, t.prototype.eachEdge = function(e, n) {
- for (var r = this.edges, i = r.length, a = 0; a < i; a++)
- r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
- }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
- if (n instanceof zd || (n = this._nodesMap[lv(n)]), !!n) {
- for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
- this.nodes[o].__visited = !1;
- if (!e.call(i, n, null))
- for (var s = [n]; s.length; )
- for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
- var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
- if (!f.__visited) {
- if (e.call(i, f, l))
- return;
- s.push(f), f.__visited = !0;
- }
- }
- }
- }, t.prototype.update = function() {
- for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
- r[a].dataIndex = -1;
- for (var a = 0, o = e.count(); a < o; a++)
- r[e.getRawIndex(a)].dataIndex = a;
- n.filterSelf(function(s) {
- var l = i[n.getRawIndex(s)];
- return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
- });
- for (var a = 0, o = i.length; a < o; a++)
- i[a].dataIndex = -1;
- for (var a = 0, o = n.count(); a < o; a++)
- i[n.getRawIndex(a)].dataIndex = a;
- }, t.prototype.clone = function() {
- for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
- e.addNode(n[i].id, n[i].dataIndex);
- for (var i = 0; i < r.length; i++) {
- var a = r[i];
- e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
- }
- return e;
- }, t;
- }()
- ), zd = (
- /** @class */
- function() {
- function t(e, n) {
- this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
- }
- return t.prototype.degree = function() {
- return this.edges.length;
- }, t.prototype.inDegree = function() {
- return this.inEdges.length;
- }, t.prototype.outDegree = function() {
- return this.outEdges.length;
- }, t.prototype.getModel = function(e) {
- if (!(this.dataIndex < 0)) {
- var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
- return r.getModel(e);
- }
- }, t.prototype.getAdjacentDataIndices = function() {
- for (var e = {
- edge: [],
- node: []
- }, n = 0; n < this.edges.length; n++) {
- var r = this.edges[n];
- r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
- }
- return e;
- }, t.prototype.getTrajectoryDataIndices = function() {
- for (var e = Ze(), n = Ze(), r = 0; r < this.edges.length; r++) {
- var i = this.edges[r];
- if (!(i.dataIndex < 0)) {
- e.set(i.dataIndex, !0);
- for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
- var l = a[s];
- s++, n.set(l.dataIndex, !0);
- for (var u = 0; u < l.inEdges.length; u++)
- e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
- }
- for (s = 0; s < o.length; ) {
- var c = o[s];
- s++, n.set(c.dataIndex, !0);
- for (var u = 0; u < c.outEdges.length; u++)
- e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
- }
- }
- }
- return {
- edge: e.keys(),
- node: n.keys()
- };
- }, t;
- }()
- ), ade = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
- }
- return t.prototype.getModel = function(e) {
- if (!(this.dataIndex < 0)) {
- var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
- return r.getModel(e);
- }
- }, t.prototype.getAdjacentDataIndices = function() {
- return {
- edge: [this.dataIndex],
- node: [this.node1.dataIndex, this.node2.dataIndex]
- };
- }, t.prototype.getTrajectoryDataIndices = function() {
- var e = Ze(), n = Ze();
- e.set(this.dataIndex, !0);
- for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
- var o = r[a];
- a++, n.set(o.dataIndex, !0);
- for (var s = 0; s < o.inEdges.length; s++)
- e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
- }
- for (a = 0; a < i.length; ) {
- var l = i[a];
- a++, n.set(l.dataIndex, !0);
- for (var s = 0; s < l.outEdges.length; s++)
- e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
- }
- return {
- edge: e.keys(),
- node: n.keys()
- };
- }, t;
- }()
- );
- function ode(t, e) {
- return {
- /**
- * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
- */
- getValue: function(n) {
- var r = this[t][e];
- return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
- },
- // TODO: TYPE stricter type.
- setVisual: function(n, r) {
- this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
- },
- getVisual: function(n) {
- return this[t][e].getItemVisual(this.dataIndex, n);
- },
- setLayout: function(n, r) {
- this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
- },
- getLayout: function() {
- return this[t][e].getItemLayout(this.dataIndex);
- },
- getGraphicEl: function() {
- return this[t][e].getItemGraphicEl(this.dataIndex);
- },
- getRawIndex: function() {
- return this[t][e].getRawIndex(this.dataIndex);
- }
- };
- }
- vr(zd, ode("hostGraph", "data"));
- vr(ade, ode("hostGraph", "edgeData"));
- function sde(t, e, n, r, i) {
- for (var a = new Brt(r), o = 0; o < t.length; o++)
- a.addNode(Or(
- // Id, name, dataIndex
- t[o].id,
- t[o].name,
- o
- ), o);
- for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
- var c = e[o], f = c.source, d = c.target;
- a.addEdge(f, d, u) && (l.push(c), s.push(Or(Br(c.id, null), f + " > " + d)), u++);
- }
- var h = n.get("coordinateSystem"), p;
- if (h === "cartesian2d" || h === "polar")
- p = Yl(t, n);
- else {
- var v = gp.get(h), g = v ? v.dimensions || [] : [];
- St(g, "value") < 0 && g.concat(["value"]);
- var m = Mm(t, {
- coordDimensions: g,
- encodeDefine: n.getEncode()
- }).dimensions;
- p = new Wi(m, n), p.initData(t);
- }
- var y = new Wi(["value"], n);
- return y.initData(l, s), i && i(p, y), Wfe({
- mainData: p,
- struct: a,
- structAttr: "graph",
- datas: {
- node: p,
- edge: y
- },
- datasAttr: {
- node: "data",
- edge: "edgeData"
- }
- }), a.update(), a;
- }
- var zrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n;
- }
- return e.prototype.init = function(n) {
- t.prototype.init.apply(this, arguments);
- var r = this;
- function i() {
- return r._categoriesData;
- }
- this.legendVisualProvider = new S1(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
- }, e.prototype.mergeOption = function(n) {
- t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
- }, e.prototype.mergeDefaultAndTheme = function(n) {
- t.prototype.mergeDefaultAndTheme.apply(this, arguments), Hh(n, "edgeLabel", ["show"]);
- }, e.prototype.getInitialData = function(n, r) {
- var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
- if (a && i) {
- Crt(this);
- var s = sde(a, i, this, !0, l);
- return F(s.edges, function(u) {
- Trt(u.node1, u.node2, this, u.dataIndex);
- }, this), s.data;
- }
- function l(u, c) {
- u.wrapMethod("getItemModel", function(p) {
- var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
- return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
- });
- var f = wn.prototype.getModel;
- function d(p, v) {
- var g = f.call(this, p, v);
- return g.resolveParentPath = h, g;
- }
- c.wrapMethod("getItemModel", function(p) {
- return p.resolveParentPath = h, p.getModel = d, p;
- });
- function h(p) {
- if (p && (p[0] === "label" || p[1] === "label")) {
- var v = p.slice();
- return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
- }
- return p;
- }
- }
- }, e.prototype.getGraph = function() {
- return this.getData().graph;
- }, e.prototype.getEdgeData = function() {
- return this.getGraph().edgeData;
- }, e.prototype.getCategoriesData = function() {
- return this._categoriesData;
- }, e.prototype.formatTooltip = function(n, r, i) {
- if (i === "edge") {
- var a = this.getData(), o = this.getDataParams(n, i), s = a.graph.getEdgeByIndex(n), l = a.getName(s.node1.dataIndex), u = a.getName(s.node2.dataIndex), c = [];
- return l != null && c.push(l), u != null && c.push(u), ti("nameValue", {
- name: c.join(" > "),
- value: o.value,
- noValue: o.value == null
- });
- }
- var f = $ue({
- series: this,
- dataIndex: n,
- multipleSeries: r
- });
- return f;
- }, e.prototype._updateCategoriesData = function() {
- var n = Ce(this.option.categories || [], function(i) {
- return i.value != null ? i : _e({
- value: 0
- }, i);
- }), r = new Wi(["value"], this);
- r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
- return r.getItemModel(i);
- });
- }, e.prototype.setZoom = function(n) {
- this.option.zoom = n;
- }, e.prototype.setCenter = function(n) {
- this.option.center = n;
- }, e.prototype.isAnimationEnabled = function() {
- return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
- }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "view",
- // Default option for all coordinate systems
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- // polarIndex: 0,
- // geoIndex: 0,
- legendHoverLink: !0,
- layout: null,
- // Configuration of circular layout
- circular: {
- rotateLabel: !1
- },
- // Configuration of force directed layout
- force: {
- initLayout: null,
- // Node repulsion. Can be an array to represent range.
- repulsion: [0, 50],
- gravity: 0.1,
- // Initial friction
- friction: 0.6,
- // Edge length. Can be an array to represent range.
- edgeLength: 30,
- layoutAnimation: !0
- },
- left: "center",
- top: "center",
- // right: null,
- // bottom: null,
- // width: '80%',
- // height: '80%',
- symbol: "circle",
- symbolSize: 10,
- edgeSymbol: ["none", "none"],
- edgeSymbolSize: 10,
- edgeLabel: {
- position: "middle",
- distance: 5
- },
- draggable: !1,
- roam: !1,
- // Default on center of graph
- center: null,
- zoom: 1,
- // Symbol size scale ratio in roam
- nodeScaleRatio: 0.6,
- // cursor: null,
- // categories: [],
- // data: []
- // Or
- // nodes: []
- //
- // links: []
- // Or
- // edges: []
- label: {
- show: !1,
- formatter: "{b}"
- },
- itemStyle: {},
- lineStyle: {
- color: "#aaa",
- width: 1,
- opacity: 0.5
- },
- emphasis: {
- scale: !0,
- label: {
- show: !0
- }
- },
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- }
- }, e;
- }(Tn)
- ), Vrt = {
- type: "graphRoam",
- event: "graphRoam",
- update: "none"
- };
- function Frt(t) {
- t.registerChartView(Nrt), t.registerSeriesModel(zrt), t.registerProcessor(_rt), t.registerVisual(Ort), t.registerVisual(Srt), t.registerLayout(Prt), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, Art), t.registerLayout(Mrt), t.registerCoordinateSystem("graphView", {
- dimensions: w1.dimensions,
- create: Drt
- }), t.registerAction({
- type: "focusNodeAdjacency",
- event: "focusNodeAdjacency",
- update: "series:focusNodeAdjacency"
- }, fr), t.registerAction({
- type: "unfocusNodeAdjacency",
- event: "unfocusNodeAdjacency",
- update: "series:unfocusNodeAdjacency"
- }, fr), t.registerAction(Vrt, function(e, n, r) {
- n.eachComponent({
- mainType: "series",
- query: e
- }, function(i) {
- var a = i.coordinateSystem, o = Q3(a, e, void 0, r);
- i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
- });
- });
- }
- var Wrt = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
- }
- return t;
- }()
- ), Qrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "pointer", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new Wrt();
- }, e.prototype.buildPath = function(n, r) {
- var i = Math.cos, a = Math.sin, o = r.r, s = r.width, l = r.angle, u = r.x - i(l) * s * (s >= o / 3 ? 1 : 2), c = r.y - a(l) * s * (s >= o / 3 ? 1 : 2);
- l = r.angle - Math.PI / 2, n.moveTo(u, c), n.lineTo(r.x + i(l) * s, r.y + a(l) * s), n.lineTo(r.x + i(r.angle) * o, r.y + a(r.angle) * o), n.lineTo(r.x - i(l) * s, r.y - a(l) * s), n.lineTo(u, c);
- }, e;
- }(Dt)
- );
- function Hrt(t, e) {
- var n = t.get("center"), r = e.getWidth(), i = e.getHeight(), a = Math.min(r, i), o = ze(n[0], e.getWidth()), s = ze(n[1], e.getHeight()), l = ze(t.get("radius"), a / 2);
- return {
- cx: o,
- cy: s,
- r: l
- };
- }
- function jS(t, e) {
- var n = t == null ? "" : t + "";
- return e && (Ve(e) ? n = e.replace("{value}", n) : qe(e) && (n = e(t))), n;
- }
- var Grt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- this.group.removeAll();
- var a = n.get(["axisLine", "lineStyle", "color"]), o = Hrt(n, i);
- this._renderMain(n, r, i, a, o), this._data = n.getData();
- }, e.prototype.dispose = function() {
- }, e.prototype._renderMain = function(n, r, i, a, o) {
- var s = this.group, l = n.get("clockwise"), u = -n.get("startAngle") / 180 * Math.PI, c = -n.get("endAngle") / 180 * Math.PI, f = n.getModel("axisLine"), d = f.get("roundCap"), h = d ? tT : ha, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
- D5(m, !l), u = m[0], c = m[1];
- for (var y = c - u, _ = u, O = [], S = 0; p && S < a.length; S++) {
- var x = Math.min(Math.max(a[S][0], 0), 1);
- c = u + y * x;
- var C = new h({
- shape: {
- startAngle: _,
- endAngle: c,
- cx: o.cx,
- cy: o.cy,
- clockwise: l,
- r0: o.r - g,
- r: o.r
- },
- silent: !0
- });
- C.setStyle({
- fill: a[S][1]
- }), C.setStyle(v.getLineStyle(
- // Because we use sector to simulate arc
- // so the properties for stroking are useless
- ["color", "width"]
- )), O.push(C), _ = c;
- }
- O.reverse(), F(O, function($) {
- return s.add($);
- });
- var P = function($) {
- if ($ <= 0)
- return a[0][1];
- var T;
- for (T = 0; T < a.length; T++)
- if (a[T][0] >= $ && (T === 0 ? 0 : a[T - 1][0]) < $)
- return a[T][1];
- return a[T - 1][1];
- };
- this._renderTicks(n, r, i, P, o, u, c, l, g), this._renderTitleAndDetail(n, r, i, P, o), this._renderAnchor(n, o), this._renderPointer(n, r, i, P, o, u, c, l, g);
- }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
- for (var f = this.group, d = o.cx, h = o.cy, p = o.r, v = +n.get("min"), g = +n.get("max"), m = n.getModel("splitLine"), y = n.getModel("axisTick"), _ = n.getModel("axisLabel"), O = n.get("splitNumber"), S = y.get("splitNumber"), x = ze(m.get("length"), p), C = ze(y.get("length"), p), P = s, $ = (l - s) / O, T = $ / S, E = m.getModel("lineStyle").getLineStyle(), M = y.getModel("lineStyle").getLineStyle(), R = m.get("distance"), N, I, B = 0; B <= O; B++) {
- if (N = Math.cos(P), I = Math.sin(P), m.get("show")) {
- var Q = R ? R + c : c, W = new Xr({
- shape: {
- x1: N * (p - Q) + d,
- y1: I * (p - Q) + h,
- x2: N * (p - x - Q) + d,
- y2: I * (p - x - Q) + h
- },
- style: E,
- silent: !0
- });
- E.stroke === "auto" && W.setStyle({
- stroke: a(B / O)
- }), f.add(W);
- }
- if (_.get("show")) {
- var Q = _.get("distance") + R, H = jS(sr(B / O * (g - v) + v), _.get("formatter")), U = a(B / O), j = N * (p - x - Q) + d, Y = I * (p - x - Q) + h, ne = _.get("rotate"), fe = 0;
- ne === "radial" ? (fe = -P + 2 * Math.PI, fe > Math.PI / 2 && (fe += Math.PI)) : ne === "tangential" ? fe = -P - Math.PI / 2 : Kt(ne) && (fe = ne * Math.PI / 180), fe === 0 ? f.add(new jt({
- style: Mn(_, {
- text: H,
- x: j,
- y: Y,
- verticalAlign: I < -0.8 ? "top" : I > 0.8 ? "bottom" : "middle",
- align: N < -0.4 ? "left" : N > 0.4 ? "right" : "center"
- }, {
- inheritColor: U
- }),
- silent: !0
- })) : f.add(new jt({
- style: Mn(_, {
- text: H,
- x: j,
- y: Y,
- verticalAlign: "middle",
- align: "center"
- }, {
- inheritColor: U
- }),
- silent: !0,
- originX: j,
- originY: Y,
- rotation: fe
- }));
- }
- if (y.get("show") && B !== O) {
- var Q = y.get("distance");
- Q = Q ? Q + c : c;
- for (var ue = 0; ue <= S; ue++) {
- N = Math.cos(P), I = Math.sin(P);
- var ye = new Xr({
- shape: {
- x1: N * (p - Q) + d,
- y1: I * (p - Q) + h,
- x2: N * (p - C - Q) + d,
- y2: I * (p - C - Q) + h
- },
- silent: !0,
- style: M
- });
- M.stroke === "auto" && ye.setStyle({
- stroke: a((B + ue / S) / O)
- }), f.add(ye), P += T;
- }
- P -= T;
- } else
- P += $;
- }
- }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
- var f = this.group, d = this._data, h = this._progressEls, p = [], v = n.get(["pointer", "show"]), g = n.getModel("progress"), m = g.get("show"), y = n.getData(), _ = y.mapDimension("value"), O = +n.get("min"), S = +n.get("max"), x = [O, S], C = [s, l];
- function P(T, E) {
- var M = y.getItemModel(T), R = M.getModel("pointer"), N = ze(R.get("width"), o.r), I = ze(R.get("length"), o.r), B = n.get(["pointer", "icon"]), Q = R.get("offsetCenter"), W = ze(Q[0], o.r), H = ze(Q[1], o.r), U = R.get("keepAspect"), j;
- return B ? j = wr(B, W - N / 2, H - I, N, I, null, U) : j = new Qrt({
- shape: {
- angle: -Math.PI / 2,
- width: N,
- r: I,
- x: W,
- y: H
- }
- }), j.rotation = -(E + Math.PI / 2), j.x = o.cx, j.y = o.cy, j;
- }
- function $(T, E) {
- var M = g.get("roundCap"), R = M ? tT : ha, N = g.get("overlap"), I = N ? g.get("width") : c / y.count(), B = N ? o.r - I : o.r - (T + 1) * I, Q = N ? o.r : o.r - T * I, W = new R({
- shape: {
- startAngle: s,
- endAngle: E,
- cx: o.cx,
- cy: o.cy,
- clockwise: u,
- r0: B,
- r: Q
- }
- });
- return N && (W.z2 = S - y.get(_, T) % S), W;
- }
- (m || v) && (y.diff(d).add(function(T) {
- var E = y.get(_, T);
- if (v) {
- var M = P(T, s);
- Vn(M, {
- rotation: -((isNaN(+E) ? C[0] : gn(E, x, C, !0)) + Math.PI / 2)
- }, n), f.add(M), y.setItemGraphicEl(T, M);
- }
- if (m) {
- var R = $(T, s), N = g.get("clip");
- Vn(R, {
- shape: {
- endAngle: gn(E, x, C, N)
- }
- }, n), f.add(R), Pk(n.seriesIndex, y.dataType, T, R), p[T] = R;
- }
- }).update(function(T, E) {
- var M = y.get(_, T);
- if (v) {
- var R = d.getItemGraphicEl(E), N = R ? R.rotation : s, I = P(T, N);
- I.rotation = N, tn(I, {
- rotation: -((isNaN(+M) ? C[0] : gn(M, x, C, !0)) + Math.PI / 2)
- }, n), f.add(I), y.setItemGraphicEl(T, I);
- }
- if (m) {
- var B = h[E], Q = B ? B.shape.endAngle : s, W = $(T, Q), H = g.get("clip");
- tn(W, {
- shape: {
- endAngle: gn(M, x, C, H)
- }
- }, n), f.add(W), Pk(n.seriesIndex, y.dataType, T, W), p[T] = W;
- }
- }).execute(), y.each(function(T) {
- var E = y.getItemModel(T), M = E.getModel("emphasis"), R = M.get("focus"), N = M.get("blurScope"), I = M.get("disabled");
- if (v) {
- var B = y.getItemGraphicEl(T), Q = y.getItemVisual(T, "style"), W = Q.fill;
- if (B instanceof ci) {
- var H = B.style;
- B.useStyle(_e({
- image: H.image,
- x: H.x,
- y: H.y,
- width: H.width,
- height: H.height
- }, Q));
- } else
- B.useStyle(Q), B.type !== "pointer" && B.setColor(W);
- B.setStyle(E.getModel(["pointer", "itemStyle"]).getItemStyle()), B.style.fill === "auto" && B.setStyle("fill", a(gn(y.get(_, T), x, [0, 1], !0))), B.z2EmphasisLift = 0, Ai(B, E), ur(B, R, N, I);
- }
- if (m) {
- var U = p[T];
- U.useStyle(y.getItemVisual(T, "style")), U.setStyle(E.getModel(["progress", "itemStyle"]).getItemStyle()), U.z2EmphasisLift = 0, Ai(U, E), ur(U, R, N, I);
- }
- }), this._progressEls = p);
- }, e.prototype._renderAnchor = function(n, r) {
- var i = n.getModel("anchor"), a = i.get("show");
- if (a) {
- var o = i.get("size"), s = i.get("icon"), l = i.get("offsetCenter"), u = i.get("keepAspect"), c = wr(s, r.cx - o / 2 + ze(l[0], r.r), r.cy - o / 2 + ze(l[1], r.r), o, o, null, u);
- c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
- }
- }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
- var s = this, l = n.getData(), u = l.mapDimension("value"), c = +n.get("min"), f = +n.get("max"), d = new ct(), h = [], p = [], v = n.isAnimationEnabled(), g = n.get(["pointer", "showAbove"]);
- l.diff(this._data).add(function(m) {
- h[m] = new jt({
- silent: !0
- }), p[m] = new jt({
- silent: !0
- });
- }).update(function(m, y) {
- h[m] = s._titleEls[y], p[m] = s._detailEls[y];
- }).execute(), l.each(function(m) {
- var y = l.getItemModel(m), _ = l.get(u, m), O = new ct(), S = a(gn(_, [c, f], [0, 1], !0)), x = y.getModel("title");
- if (x.get("show")) {
- var C = x.get("offsetCenter"), P = o.cx + ze(C[0], o.r), $ = o.cy + ze(C[1], o.r), T = h[m];
- T.attr({
- z2: g ? 0 : 2,
- style: Mn(x, {
- x: P,
- y: $,
- text: l.getName(m),
- align: "center",
- verticalAlign: "middle"
- }, {
- inheritColor: S
- })
- }), O.add(T);
- }
- var E = y.getModel("detail");
- if (E.get("show")) {
- var M = E.get("offsetCenter"), R = o.cx + ze(M[0], o.r), N = o.cy + ze(M[1], o.r), I = ze(E.get("width"), o.r), B = ze(E.get("height"), o.r), Q = n.get(["progress", "show"]) ? l.getItemVisual(m, "style").fill : S, T = p[m], W = E.get("formatter");
- T.attr({
- z2: g ? 0 : 2,
- style: Mn(E, {
- x: R,
- y: N,
- text: jS(_, W),
- width: isNaN(I) ? null : I,
- height: isNaN(B) ? null : B,
- align: "center",
- verticalAlign: "middle"
- }, {
- inheritColor: Q
- })
- }), Lle(T, {
- normal: E
- }, _, function(U) {
- return jS(U, W);
- }), v && Nle(T, m, l, n, {
- getFormattedLabel: function(U, j, Y, ne, fe, ue) {
- return jS(ue ? ue.interpolatedValue : _, W);
- }
- }), O.add(T);
- }
- d.add(O);
- }), this.group.add(d), this._titleEls = h, this._detailEls = p;
- }, e.type = "gauge", e;
- }(_n)
- ), jrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Rm(this, ["value"]);
- }, e.type = "series.gauge", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- colorBy: "data",
- // 默认全局居中
- center: ["50%", "50%"],
- legendHoverLink: !0,
- radius: "75%",
- startAngle: 225,
- endAngle: -45,
- clockwise: !0,
- // 最小值
- min: 0,
- // 最大值
- max: 100,
- // 分割段数,默认为10
- splitNumber: 10,
- // 坐标轴线
- axisLine: {
- // 默认显示,属性show控制显示与否
- show: !0,
- roundCap: !1,
- lineStyle: {
- color: [[1, "#E6EBF8"]],
- width: 10
- }
- },
- // 坐标轴线
- progress: {
- // 默认显示,属性show控制显示与否
- show: !1,
- overlap: !0,
- width: 10,
- roundCap: !1,
- clip: !0
- },
- // 分隔线
- splitLine: {
- // 默认显示,属性show控制显示与否
- show: !0,
- // 属性length控制线长
- length: 10,
- distance: 10,
- // 属性lineStyle(详见lineStyle)控制线条样式
- lineStyle: {
- color: "#63677A",
- width: 3,
- type: "solid"
- }
- },
- // 坐标轴小标记
- axisTick: {
- // 属性show控制显示与否,默认不显示
- show: !0,
- // 每份split细分多少段
- splitNumber: 5,
- // 属性length控制线长
- length: 6,
- distance: 10,
- // 属性lineStyle控制线条样式
- lineStyle: {
- color: "#63677A",
- width: 1,
- type: "solid"
- }
- },
- axisLabel: {
- show: !0,
- distance: 15,
- // formatter: null,
- color: "#464646",
- fontSize: 12,
- rotate: 0
- },
- pointer: {
- icon: null,
- offsetCenter: [0, 0],
- show: !0,
- showAbove: !0,
- length: "60%",
- width: 6,
- keepAspect: !1
- },
- anchor: {
- show: !1,
- showAbove: !1,
- size: 6,
- icon: "circle",
- offsetCenter: [0, 0],
- keepAspect: !1,
- itemStyle: {
- color: "#fff",
- borderWidth: 0,
- borderColor: "#5470c6"
- }
- },
- title: {
- show: !0,
- // x, y,单位px
- offsetCenter: [0, "20%"],
- // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: "#464646",
- fontSize: 16,
- valueAnimation: !1
- },
- detail: {
- show: !0,
- backgroundColor: "rgba(0,0,0,0)",
- borderWidth: 0,
- borderColor: "#ccc",
- width: 100,
- height: null,
- padding: [5, 10],
- // x, y,单位px
- offsetCenter: [0, "40%"],
- // formatter: null,
- // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: "#464646",
- fontSize: 30,
- fontWeight: "bold",
- lineHeight: 30,
- valueAnimation: !1
- }
- }, e;
- }(Tn)
- );
- function Zrt(t) {
- t.registerChartView(Grt), t.registerSeriesModel(jrt);
- }
- var Urt = ["itemStyle", "opacity"], Xrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r) {
- var i = t.call(this) || this, a = i, o = new va(), s = new jt();
- return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
- }
- return e.prototype.updateData = function(n, r, i) {
- var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(Urt);
- c = c ?? 1, i || Zs(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
- points: l.points
- }), a.style.opacity = 0, Vn(a, {
- style: {
- opacity: c
- }
- }, o, r)) : tn(a, {
- style: {
- opacity: c
- },
- shape: {
- points: l.points
- }
- }, o, r), Ai(a, s), this._updateLabel(n, r), ur(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
- }, e.prototype._updateLabel = function(n, r) {
- var i = this, a = this.getTextGuideLine(), o = i.getTextContent(), s = n.hostModel, l = n.getItemModel(r), u = n.getItemLayout(r), c = u.label, f = n.getItemVisual(r, "style"), d = f.fill;
- Ei(
- // position will not be used in setLabelStyle
- o,
- ei(l),
- {
- labelFetcher: n.hostModel,
- labelDataIndex: r,
- defaultOpacity: f.opacity,
- defaultText: n.getName(r)
- },
- {
- normal: {
- align: c.textAlign,
- verticalAlign: c.verticalAlign
- }
- }
- ), i.setTextConfig({
- local: !0,
- inside: !!c.inside,
- insideStroke: d,
- // insideFill: 'auto',
- outsideFill: d
- });
- var h = c.linePoints;
- a.setShape({
- points: h
- }), i.textGuideLineConfig = {
- anchor: h ? new yt(h[0][0], h[0][1]) : null
- }, tn(o, {
- style: {
- x: c.x,
- y: c.y
- }
- }, s, r), o.attr({
- rotation: c.rotation,
- originX: c.x,
- originY: c.y,
- z2: 10
- }), A3(i, E3(l), {
- // Default use item visual color
- stroke: d
- });
- }, e;
- }(pa)
- ), Yrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this._data, s = this.group;
- a.diff(o).add(function(l) {
- var u = new Xrt(a, l);
- a.setItemGraphicEl(l, u), s.add(u);
- }).update(function(l, u) {
- var c = o.getItemGraphicEl(u);
- c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
- }).remove(function(l) {
- var u = o.getItemGraphicEl(l);
- Xb(u, n, l);
- }).execute(), this._data = a;
- }, e.prototype.remove = function() {
- this.group.removeAll(), this._data = null;
- }, e.prototype.dispose = function() {
- }, e.type = "funnel", e;
- }(_n)
- ), qrt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n) {
- t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this)), this._defaultLabelLine(n);
- }, e.prototype.getInitialData = function(n, r) {
- return Rm(this, {
- coordDimensions: ["value"],
- encodeDefaulter: vt(n3, this)
- });
- }, e.prototype._defaultLabelLine = function(n) {
- Hh(n, "labelLine", ["show"]);
- var r = n.labelLine, i = n.emphasis.labelLine;
- r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
- }, e.prototype.getDataParams = function(n) {
- var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
- return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
- }, e.type = "series.funnel", e.defaultOption = {
- // zlevel: 0, // 一级层叠
- z: 2,
- legendHoverLink: !0,
- colorBy: "data",
- left: 80,
- top: 60,
- right: 80,
- bottom: 60,
- // width: {totalWidth} - left - right,
- // height: {totalHeight} - top - bottom,
- // 默认取数据最小最大值
- // min: 0,
- // max: 100,
- minSize: "0%",
- maxSize: "100%",
- sort: "descending",
- orient: "vertical",
- gap: 0,
- funnelAlign: "center",
- label: {
- show: !0,
- position: "outer"
- // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
- },
- labelLine: {
- show: !0,
- length: 20,
- lineStyle: {
- // color: 各异,
- width: 1
- }
- },
- itemStyle: {
- // color: 各异,
- borderColor: "#fff",
- borderWidth: 1
- },
- emphasis: {
- label: {
- show: !0
- }
- },
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- }
- }, e;
- }(Tn)
- );
- function Krt(t, e) {
- return Mr(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- });
- }
- function Jrt(t, e) {
- for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
- return l;
- }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
- i[o] = o;
- return qe(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
- return a ? r[l] - r[u] : r[u] - r[l];
- }), i;
- }
- function eit(t) {
- var e = t.hostModel, n = e.get("orient");
- t.each(function(r) {
- var i = t.getItemModel(r), a = i.getModel("label"), o = a.get("position"), s = i.getModel("labelLine"), l = t.getItemLayout(r), u = l.points, c = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", f, d, h, p;
- if (c)
- o === "insideLeft" ? (d = (u[0][0] + u[3][0]) / 2 + 5, h = (u[0][1] + u[3][1]) / 2, f = "left") : o === "insideRight" ? (d = (u[1][0] + u[2][0]) / 2 - 5, h = (u[1][1] + u[2][1]) / 2, f = "right") : (d = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, h = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, f = "center"), p = [[d, h], [d, h]];
- else {
- var v = void 0, g = void 0, m = void 0, y = void 0, _ = s.get("length");
- process.env.NODE_ENV !== "production" && (n === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), n === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = v - _, d = m - 5, f = "right") : o === "right" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = v + _, d = m + 5, f = "left") : o === "top" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = g - _, h = y - 5, f = "center") : o === "bottom" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = g + _, h = y + 5, f = "center") : o === "rightTop" ? (v = n === "horizontal" ? u[3][0] : u[1][0], g = n === "horizontal" ? u[3][1] : u[1][1], n === "horizontal" ? (y = g - _, h = y - 5, f = "center") : (m = v + _, d = m + 5, f = "top")) : o === "rightBottom" ? (v = u[2][0], g = u[2][1], n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v + _, d = m + 5, f = "bottom")) : o === "leftTop" ? (v = u[0][0], g = n === "horizontal" ? u[0][1] : u[1][1], n === "horizontal" ? (y = g - _, h = y - 5, f = "center") : (m = v - _, d = m - 5, f = "right")) : o === "leftBottom" ? (v = n === "horizontal" ? u[1][0] : u[3][0], g = n === "horizontal" ? u[1][1] : u[2][1], n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v - _, d = m - 5, f = "right")) : (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v + _, d = m + 5, f = "left")), n === "horizontal" ? (m = v, d = m) : (y = g, h = y), p = [[v, g], [m, y]];
- }
- l.label = {
- linePoints: p,
- x: d,
- y: h,
- verticalAlign: "middle",
- textAlign: f,
- inside: c
- };
- });
- }
- function tit(t, e) {
- t.eachSeriesByType("funnel", function(n) {
- var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = Krt(n, e), s = n.get("orient"), l = o.width, u = o.height, c = Jrt(r, a), f = o.x, d = o.y, h = s === "horizontal" ? [ze(n.get("minSize"), u), ze(n.get("maxSize"), u)] : [ze(n.get("minSize"), l), ze(n.get("maxSize"), l)], p = r.getDataExtent(i), v = n.get("min"), g = n.get("max");
- v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
- var m = n.get("funnelAlign"), y = n.get("gap"), _ = s === "horizontal" ? l : u, O = (_ - y * (r.count() - 1)) / r.count(), S = function(N, I) {
- if (s === "horizontal") {
- var B = r.get(i, N) || 0, Q = gn(B, [v, g], h, !0), W = void 0;
- switch (m) {
- case "top":
- W = d;
- break;
- case "center":
- W = d + (u - Q) / 2;
- break;
- case "bottom":
- W = d + (u - Q);
- break;
- }
- return [[I, W], [I, W + Q]];
- }
- var H = r.get(i, N) || 0, U = gn(H, [v, g], h, !0), j;
- switch (m) {
- case "left":
- j = f;
- break;
- case "center":
- j = f + (l - U) / 2;
- break;
- case "right":
- j = f + l - U;
- break;
- }
- return [[j, I], [j + U, I]];
- };
- a === "ascending" && (O = -O, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
- for (var x = 0; x < c.length; x++) {
- var C = c[x], P = c[x + 1], $ = r.getItemModel(C);
- if (s === "horizontal") {
- var T = $.get(["itemStyle", "width"]);
- T == null ? T = O : (T = ze(T, l), a === "ascending" && (T = -T));
- var E = S(C, f), M = S(P, f + T);
- f += T + y, r.setItemLayout(C, {
- points: E.concat(M.slice().reverse())
- });
- } else {
- var R = $.get(["itemStyle", "height"]);
- R == null ? R = O : (R = ze(R, u), a === "ascending" && (R = -R));
- var E = S(C, d), M = S(P, d + R);
- d += R + y, r.setItemLayout(C, {
- points: E.concat(M.slice().reverse())
- });
- }
- }
- eit(r);
- });
- }
- function nit(t) {
- t.registerChartView(Yrt), t.registerSeriesModel(qrt), t.registerLayout(tit), t.registerProcessor(O1("funnel"));
- }
- var rit = 0.3, iit = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._dataGroup = new ct(), n._initialized = !1, n;
- }
- return e.prototype.init = function() {
- this.group.add(this._dataGroup);
- }, e.prototype.render = function(n, r, i, a) {
- this._progressiveEls = null;
- var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = VU(n);
- s.diff(l).add(d).update(h).remove(p).execute();
- function d(g) {
- var m = zU(s, o, g, c, u);
- vI(m, s, g, f);
- }
- function h(g, m) {
- var y = l.getItemGraphicEl(m), _ = lde(s, g, c, u);
- s.setItemGraphicEl(g, y), tn(y, {
- shape: {
- points: _
- }
- }, n, g), Zs(y), vI(y, s, g, f);
- }
- function p(g) {
- var m = l.getItemGraphicEl(g);
- o.remove(m);
- }
- if (!this._initialized) {
- this._initialized = !0;
- var v = ait(u, n, function() {
- setTimeout(function() {
- o.removeClipPath();
- });
- });
- o.setClipPath(v);
- }
- this._data = s;
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- this._initialized = !0, this._data = null, this._dataGroup.removeAll();
- }, e.prototype.incrementalRender = function(n, r, i) {
- for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = VU(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
- var f = zU(a, this._dataGroup, c, s, o);
- f.incremental = !0, vI(f, a, c, l), u.push(f);
- }
- }, e.prototype.remove = function() {
- this._dataGroup && this._dataGroup.removeAll(), this._data = null;
- }, e.type = "parallel", e;
- }(_n)
- );
- function ait(t, e, n) {
- var r = t.model, i = t.getRect(), a = new Zt({
- shape: {
- x: i.x,
- y: i.y,
- width: i.width,
- height: i.height
- }
- }), o = r.get("layout") === "horizontal" ? "width" : "height";
- return a.setShape(o, 0), Vn(a, {
- shape: {
- width: i.width,
- height: i.height
- }
- }, e, n), a;
- }
- function lde(t, e, n, r) {
- for (var i = [], a = 0; a < n.length; a++) {
- var o = n[a], s = t.get(t.mapDimension(o), e);
- oit(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
- }
- return i;
- }
- function zU(t, e, n, r, i) {
- var a = lde(t, n, r, i), o = new va({
- shape: {
- points: a
- },
- // silent: true,
- z2: 10
- });
- return e.add(o), t.setItemGraphicEl(n, o), o;
- }
- function VU(t) {
- var e = t.get("smooth", !0);
- return e === !0 && (e = rit), e = Gl(e), mf(e) && (e = 0), {
- smooth: e
- };
- }
- function vI(t, e, n, r) {
- t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
- var i = e.getItemModel(n), a = i.getModel("emphasis");
- Ai(t, i, "lineStyle"), ur(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
- }
- function oit(t, e) {
- return e === "category" ? t == null : t == null || isNaN(t);
- }
- var sit = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Yl(null, this, {
- useEncodeDefaulter: We(lit, null, this)
- });
- }, e.prototype.getRawIndicesByActiveState = function(n) {
- var r = this.coordinateSystem, i = this.getData(), a = [];
- return r.eachActiveState(i, function(o, s) {
- n === o && a.push(i.getRawIndex(s));
- }), a;
- }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "parallel",
- parallelIndex: 0,
- label: {
- show: !1
- },
- inactiveOpacity: 0.05,
- activeOpacity: 1,
- lineStyle: {
- width: 1,
- opacity: 0.45,
- type: "solid"
- },
- emphasis: {
- label: {
- show: !1
- }
- },
- progressive: 500,
- smooth: !1,
- animationEasing: "linear"
- }, e;
- }(Tn)
- );
- function lit(t) {
- var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
- if (e) {
- var n = {};
- return F(e.dimensions, function(r) {
- var i = uit(r);
- n[r] = i;
- }), n;
- }
- }
- function uit(t) {
- return +t.replace("dim", "");
- }
- var cit = ["lineStyle", "opacity"], fit = {
- seriesType: "parallel",
- reset: function(t, e) {
- var n = t.coordinateSystem, r = {
- normal: t.get(["lineStyle", "opacity"]),
- active: t.get("activeOpacity"),
- inactive: t.get("inactiveOpacity")
- };
- return {
- progress: function(i, a) {
- n.eachActiveState(a, function(o, s) {
- var l = r[o];
- if (o === "normal" && a.hasItemOption) {
- var u = a.getItemModel(s).get(cit, !0);
- u != null && (l = u);
- }
- var c = a.ensureUniqueItemVisual(s, "style");
- c.opacity = l;
- }, i.start, i.end);
- }
- };
- }
- };
- function dit(t) {
- hit(t), pit(t);
- }
- function hit(t) {
- if (!t.parallel) {
- var e = !1;
- F(t.series, function(n) {
- n && n.type === "parallel" && (e = !0);
- }), e && (t.parallel = [{}]);
- }
- }
- function pit(t) {
- var e = Cn(t.parallelAxis);
- F(e, function(n) {
- if (nt(n)) {
- var r = n.parallelIndex || 0, i = Cn(t.parallel)[r];
- i && i.parallelAxisDefault && mt(n, i.parallelAxisDefault, !1);
- }
- });
- }
- var vit = 5, git = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- this._model = n, this._api = i, this._handlers || (this._handlers = {}, F(mit, function(a, o) {
- i.getZr().on(o, this._handlers[o] = We(a, this));
- }, this)), Am(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
- }, e.prototype.dispose = function(n, r) {
- Jb(this, "_throttledDispatchExpand"), F(this._handlers, function(i, a) {
- r.getZr().off(a, i);
- }), this._handlers = null;
- }, e.prototype._throttledDispatchExpand = function(n) {
- this._dispatchExpand(n);
- }, e.prototype._dispatchExpand = function(n) {
- n && this._api.dispatchAction(_e({
- type: "parallelAxisExpand"
- }, n));
- }, e.type = "parallel", e;
- }(Ln)
- ), mit = {
- mousedown: function(t) {
- gI(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
- },
- mouseup: function(t) {
- var e = this._mouseDownPoint;
- if (gI(this, "click") && e) {
- var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
- if (r > vit)
- return;
- var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
- i.behavior !== "none" && this._dispatchExpand({
- axisExpandWindow: i.axisExpandWindow
- });
- }
- this._mouseDownPoint = null;
- },
- mousemove: function(t) {
- if (!(this._mouseDownPoint || !gI(this, "mousemove"))) {
- var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
- r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
- axisExpandWindow: n.axisExpandWindow,
- // Jumping uses animation, and sliding suppresses animation.
- animation: r === "jump" ? null : {
- duration: 0
- // Disable animation.
- }
- });
- }
- }
- };
- function gI(t, e) {
- var n = t._model;
- return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
- }
- var yit = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function() {
- t.prototype.init.apply(this, arguments), this.mergeOption({});
- }, e.prototype.mergeOption = function(n) {
- var r = this.option;
- n && mt(r, n, !0), this._initDimensions();
- }, e.prototype.contains = function(n, r) {
- var i = n.get("parallelIndex");
- return i != null && r.getComponent("parallel", i) === this;
- }, e.prototype.setAxisExpand = function(n) {
- F(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
- n.hasOwnProperty(r) && (this.option[r] = n[r]);
- }, this);
- }, e.prototype._initDimensions = function() {
- var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = yn(this.ecModel.queryComponents({
- mainType: "parallelAxis"
- }), function(a) {
- return (a.get("parallelIndex") || 0) === this.componentIndex;
- }, this);
- F(i, function(a) {
- n.push("dim" + a.get("dim")), r.push(a.componentIndex);
- });
- }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
- // zlevel: 0,
- z: 0,
- left: 80,
- top: 60,
- right: 80,
- bottom: 60,
- // width: {totalWidth} - left - right,
- // height: {totalHeight} - top - bottom,
- layout: "horizontal",
- // FIXME
- // naming?
- axisExpandable: !1,
- axisExpandCenter: null,
- axisExpandCount: 0,
- axisExpandWidth: 50,
- axisExpandRate: 17,
- axisExpandDebounce: 50,
- // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
- // Do not doc to user until necessary.
- axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
- axisExpandTriggerOn: "click",
- parallelAxisDefault: null
- }, e;
- }(At)
- ), bit = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a, o) {
- var s = t.call(this, n, r, i) || this;
- return s.type = a || "value", s.axisIndex = o, s;
- }
- return e.prototype.isHorizontal = function() {
- return this.coordinateSystem.getModel().get("layout") !== "horizontal";
- }, e;
- }(vs)
- );
- function _p(t, e, n, r, i, a) {
- t = t || 0;
- var o = n[1] - n[0];
- if (i != null && (i = uv(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
- var s = Math.abs(e[1] - e[0]);
- s = uv(s, [0, o]), i = a = uv(s, [i, a]), r = 0;
- }
- e[0] = uv(e[0], n), e[1] = uv(e[1], n);
- var l = mI(e, r);
- e[r] += t;
- var u = i || 0, c = n.slice();
- l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = uv(e[r], c);
- var f;
- return f = mI(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = mI(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
- }
- function mI(t, e) {
- var n = t[e] - t[1 - e];
- return {
- span: Math.abs(n),
- sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
- };
- }
- function uv(t, e) {
- return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
- }
- var yI = F, ude = Math.min, cde = Math.max, FU = Math.floor, _it = Math.ceil, WU = sr, Oit = Math.PI, Sit = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.type = "parallel", this._axesMap = Ze(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
- }
- return t.prototype._init = function(e, n, r) {
- var i = e.dimensions, a = e.parallelAxisIndex;
- yI(i, function(o, s) {
- var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new bit(o, g1(u), [0, 0], u.get("type"), l)), f = c.type === "category";
- c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
- }, this);
- }, t.prototype.update = function(e, n) {
- this._updateAxesFromSeries(this._model, e);
- }, t.prototype.containPoint = function(e) {
- var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
- return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
- }, t.prototype.getModel = function() {
- return this._model;
- }, t.prototype._updateAxesFromSeries = function(e, n) {
- n.eachSeries(function(r) {
- if (e.contains(r, n)) {
- var i = r.getData();
- yI(this.dimensions, function(a) {
- var o = this._axesMap.get(a);
- o.scale.unionExtentFromData(i, i.mapDimension(a)), Xh(o.scale, o.model);
- }, this);
- }
- }, this);
- }, t.prototype.resize = function(e, n) {
- this._rect = Mr(e.getBoxLayoutParams(), {
- width: n.getWidth(),
- height: n.getHeight()
- }), this._layoutAxes();
- }, t.prototype.getRect = function() {
- return this._rect;
- }, t.prototype._makeLayoutInfo = function() {
- var e = this._model, n = this._rect, r = ["x", "y"], i = ["width", "height"], a = e.get("layout"), o = a === "horizontal" ? 0 : 1, s = n[i[o]], l = [0, s], u = this.dimensions.length, c = ZS(e.get("axisExpandWidth"), l), f = ZS(e.get("axisExpandCount") || 0, [0, u]), d = e.get("axisExpandable") && u > 3 && u > f && f > 1 && c > 0 && s > 0, h = e.get("axisExpandWindow"), p;
- if (h)
- p = ZS(h[1] - h[0], l), h[1] = h[0] + p;
- else {
- p = ZS(c * (f - 1), l);
- var v = e.get("axisExpandCenter") || FU(u / 2);
- h = [c * v - p / 2], h[1] = h[0] + p;
- }
- var g = (s - p) / (u - f);
- g < 3 && (g = 0);
- var m = [FU(WU(h[0] / c, 1)) + 1, _it(WU(h[1] / c, 1)) - 1], y = g / c * h[0];
- return {
- layout: a,
- pixelDimIndex: o,
- layoutBase: n[r[o]],
- layoutLength: s,
- axisBase: n[r[1 - o]],
- axisLength: n[i[1 - o]],
- axisExpandable: d,
- axisExpandWidth: c,
- axisCollapseWidth: g,
- axisExpandWindow: h,
- axisCount: u,
- winInnerIndices: m,
- axisExpandWindow0Pos: y
- };
- }, t.prototype._layoutAxes = function() {
- var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
- n.each(function(o) {
- var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
- o.setExtent(s[l], s[1 - l]);
- }), yI(r, function(o, s) {
- var l = (i.axisExpandable ? wit : xit)(s, i), u = {
- horizontal: {
- x: l.position,
- y: i.axisLength
- },
- vertical: {
- x: 0,
- y: l.position
- }
- }, c = {
- horizontal: Oit / 2,
- vertical: 0
- }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = Na();
- Lf(h, h, d), Gs(h, h, f), this._axesLayout[o] = {
- position: f,
- rotation: d,
- transform: h,
- axisNameAvailableWidth: l.axisNameAvailableWidth,
- axisLabelShow: l.axisLabelShow,
- nameTruncateMaxWidth: l.nameTruncateMaxWidth,
- tickDirection: 1,
- labelDirection: 1
- };
- }, this);
- }, t.prototype.getAxis = function(e) {
- return this._axesMap.get(e);
- }, t.prototype.dataToPoint = function(e, n) {
- return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
- }, t.prototype.eachActiveState = function(e, n, r, i) {
- r == null && (r = 0), i == null && (i = e.count());
- var a = this._axesMap, o = this.dimensions, s = [], l = [];
- F(o, function(g) {
- s.push(e.mapDimension(g)), l.push(a.get(g).model);
- });
- for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
- var f = void 0;
- if (!u)
- f = "normal";
- else {
- f = "active";
- for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
- var v = l[h].getActiveState(d[h]);
- if (v === "inactive") {
- f = "inactive";
- break;
- }
- }
- }
- n(f, c);
- }
- }, t.prototype.hasAxisBrushed = function() {
- for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
- n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
- return r;
- }, t.prototype.axisCoordToPoint = function(e, n) {
- var r = this._axesLayout[n];
- return zs([e, 0], r.transform);
- }, t.prototype.getAxisLayout = function(e) {
- return ot(this._axesLayout[e]);
- }, t.prototype.getSlidedAxisExpandWindow = function(e) {
- var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
- if (!this.containPoint(e))
- return {
- behavior: "none",
- axisExpandWindow: i
- };
- var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
- if (c)
- d && c && s < a * f[0] ? (u = "jump", l = s - a * f[2]) : d && c && s > a * (1 - f[0]) ? (u = "jump", l = s - a * (1 - f[2])) : (l = s - a * f[1]) >= 0 && (l = s - a * (1 - f[1])) <= 0 && (l = 0), l *= n.axisExpandWidth / c, l ? _p(l, i, o, "all") : u = "none";
- else {
- var h = i[1] - i[0], p = o[1] * s / h;
- i = [cde(0, p - h / 2)], i[1] = ude(o[1], i[0] + h), i[0] = i[1] - h;
- }
- return {
- axisExpandWindow: i,
- behavior: u
- };
- }, t;
- }()
- );
- function ZS(t, e) {
- return ude(cde(t, e[0]), e[1]);
- }
- function xit(t, e) {
- var n = e.layoutLength / (e.axisCount - 1);
- return {
- position: n * t,
- axisNameAvailableWidth: n,
- axisLabelShow: !0
- };
- }
- function wit(t, e) {
- var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
- return t < o[0] ? (s = t * a, c = a) : t <= o[1] ? (s = e.axisExpandWindow0Pos + t * r - e.axisExpandWindow[0], l = r, u = !0) : (s = n - (i - 1 - t) * a, c = a), {
- position: s,
- axisNameAvailableWidth: l,
- axisLabelShow: u,
- nameTruncateMaxWidth: c
- };
- }
- function Cit(t, e) {
- var n = [];
- return t.eachComponent("parallel", function(r, i) {
- var a = new Sit(r, t, e);
- a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
- }), t.eachSeries(function(r) {
- if (r.get("coordinateSystem") === "parallel") {
- var i = r.getReferringComponents("parallel", Er).models[0];
- r.coordinateSystem = i.coordinateSystem;
- }
- }), n;
- }
- var Tit = {
- create: Cit
- }, yL = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.activeIntervals = [], n;
- }
- return e.prototype.getAreaSelectStyle = function() {
- return jh([
- ["fill", "color"],
- ["lineWidth", "borderWidth"],
- ["stroke", "borderColor"],
- ["width", "width"],
- ["opacity", "opacity"]
- // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
- // So do not transfer decal directly.
- ])(this.getModel("areaSelectStyle"));
- }, e.prototype.setActiveIntervals = function(n) {
- var r = this.activeIntervals = ot(n);
- if (r)
- for (var i = r.length - 1; i >= 0; i--)
- ao(r[i]);
- }, e.prototype.getActiveState = function(n) {
- var r = this.activeIntervals;
- if (!r.length)
- return "normal";
- if (n == null || isNaN(+n))
- return "inactive";
- if (r.length === 1) {
- var i = r[0];
- if (i[0] <= n && n <= i[1])
- return "active";
- } else
- for (var a = 0, o = r.length; a < o; a++)
- if (r[a][0] <= n && n <= r[a][1])
- return "active";
- return "inactive";
- }, e;
- }(At)
- );
- vr(yL, Dm);
- var Yh = !0, f_ = Math.min, Ug = Math.max, Pit = Math.pow, $it = 1e4, Ait = 6, Eit = 6, QU = "globalPan", Mit = {
- w: [0, 0],
- e: [0, 1],
- n: [1, 0],
- s: [1, 1]
- }, Iit = {
- w: "ew",
- e: "ew",
- n: "ns",
- s: "ns",
- ne: "nesw",
- sw: "nesw",
- nw: "nwse",
- se: "nwse"
- }, HU = {
- brushStyle: {
- lineWidth: 2,
- stroke: "rgba(210,219,238,0.3)",
- fill: "#D2DBEE"
- },
- transformable: !0,
- brushMode: "single",
- removeOnClick: !1
- }, Dit = 0, J3 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this) || this;
- return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && at(n), r._zr = n, r.group = new ct(), r._uid = "brushController_" + Dit++, F(Vit, function(i, a) {
- this._handlers[a] = We(i, this);
- }, r), r;
- }
- return e.prototype.enableBrush = function(n) {
- return process.env.NODE_ENV !== "production" && at(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
- }, e.prototype._doEnableBrush = function(n) {
- var r = this._zr;
- this._enableGlobalPan || xtt(r, QU, this._uid), F(this._handlers, function(i, a) {
- r.on(a, i);
- }), this._brushType = n.brushType, this._brushOption = mt(ot(HU), n, !0);
- }, e.prototype._doDisableBrush = function() {
- var n = this._zr;
- wtt(n, QU, this._uid), F(this._handlers, function(r, i) {
- n.off(i, r);
- }), this._brushType = this._brushOption = null;
- }, e.prototype.setPanels = function(n) {
- if (n && n.length) {
- var r = this._panels = {};
- F(n, function(i) {
- r[i.panelId] = ot(i);
- });
- } else
- this._panels = null;
- return this;
- }, e.prototype.mount = function(n) {
- n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
- var r = this.group;
- return this._zr.add(r), r.attr({
- x: n.x || 0,
- y: n.y || 0,
- rotation: n.rotation || 0,
- scaleX: n.scaleX || 1,
- scaleY: n.scaleY || 1
- }), this._transform = r.getLocalTransform(), this;
- }, e.prototype.updateCovers = function(n) {
- process.env.NODE_ENV !== "production" && at(this._mounted), n = Ce(n, function(d) {
- return mt(ot(HU), d, !0);
- });
- var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
- return new Qu(i, n, u, l).add(c).update(c).remove(f).execute(), this;
- function l(d, h) {
- return (d.id != null ? d.id : r + h) + "-" + d.brushType;
- }
- function u(d, h) {
- return l(d.__brushOption, h);
- }
- function c(d, h) {
- var p = n[d];
- if (h != null && i[h] === s)
- a[d] = i[h];
- else {
- var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : dde(o, fde(o, p));
- e6(o, v);
- }
- }
- function f(d) {
- i[d] !== s && o.group.remove(i[d]);
- }
- }, e.prototype.unmount = function() {
- if (!(process.env.NODE_ENV !== "production" && !this._mounted))
- return this.enableBrush(!1), bL(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
- }, e.prototype.dispose = function() {
- this.unmount(), this.off();
- }, e;
- }(fs)
- );
- function fde(t, e) {
- var n = ZP[e.brushType].createCover(t, e);
- return n.__brushOption = e, pde(n, e), t.group.add(n), n;
- }
- function dde(t, e) {
- var n = t6(e);
- return n.endCreating && (n.endCreating(t, e), pde(e, e.__brushOption)), e;
- }
- function hde(t, e) {
- var n = e.__brushOption;
- t6(e).updateCoverShape(t, e, n.range, n);
- }
- function pde(t, e) {
- var n = e.z;
- n == null && (n = $it), t.traverse(function(r) {
- r.z = n, r.z2 = n;
- });
- }
- function e6(t, e) {
- t6(e).updateCommon(t, e), hde(t, e);
- }
- function t6(t) {
- return ZP[t.__brushOption.brushType];
- }
- function n6(t, e, n) {
- var r = t._panels;
- if (!r)
- return Yh;
- var i, a = t._transform;
- return F(r, function(o) {
- o.isTargetByCursor(e, n, a) && (i = o);
- }), i;
- }
- function vde(t, e) {
- var n = t._panels;
- if (!n)
- return Yh;
- var r = e.__brushOption.panelId;
- return r != null ? n[r] : Yh;
- }
- function bL(t) {
- var e = t._covers, n = e.length;
- return F(e, function(r) {
- t.group.remove(r);
- }, t), e.length = 0, !!n;
- }
- function qh(t, e) {
- var n = Ce(t._covers, function(r) {
- var i = r.__brushOption, a = ot(i.range);
- return {
- brushType: i.brushType,
- panelId: i.panelId,
- range: a
- };
- });
- t.trigger("brush", {
- areas: n,
- isEnd: !!e.isEnd,
- removeOnClick: !!e.removeOnClick
- });
- }
- function Rit(t) {
- var e = t._track;
- if (!e.length)
- return !1;
- var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = Pit(i * i + a * a, 0.5);
- return o > Ait;
- }
- function gde(t) {
- var e = t.length - 1;
- return e < 0 && (e = 0), [t[0], t[e]];
- }
- function mde(t, e, n, r) {
- var i = new ct();
- return i.add(new Zt({
- name: "main",
- style: r6(n),
- silent: !0,
- draggable: !0,
- cursor: "move",
- drift: vt(GU, t, e, i, ["n", "s", "w", "e"]),
- ondragend: vt(qh, e, {
- isEnd: !0
- })
- })), F(r, function(a) {
- i.add(new Zt({
- name: a.join(""),
- style: {
- opacity: 0
- },
- draggable: !0,
- silent: !0,
- invisible: !0,
- drift: vt(GU, t, e, i, a),
- ondragend: vt(qh, e, {
- isEnd: !0
- })
- }));
- }), i;
- }
- function yde(t, e, n, r) {
- var i = r.brushStyle.lineWidth || 0, a = Ug(i, Eit), o = n[0][0], s = n[1][0], l = o - i / 2, u = s - i / 2, c = n[0][1], f = n[1][1], d = c - a + i / 2, h = f - a + i / 2, p = c - o, v = f - s, g = p + i, m = v + i;
- gu(t, e, "main", o, s, p, v), r.transformable && (gu(t, e, "w", l, u, a, m), gu(t, e, "e", d, u, a, m), gu(t, e, "n", l, u, g, a), gu(t, e, "s", l, h, g, a), gu(t, e, "nw", l, u, a, a), gu(t, e, "ne", d, u, a, a), gu(t, e, "sw", l, h, a, a), gu(t, e, "se", d, h, a, a));
- }
- function _L(t, e) {
- var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
- i.useStyle(r6(n)), i.attr({
- silent: !r,
- cursor: r ? "move" : "default"
- }), F([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
- var o = e.childOfName(a.join("")), s = a.length === 1 ? OL(t, a[0]) : Lit(t, a);
- o && o.attr({
- silent: !r,
- invisible: !r,
- cursor: r ? Iit[s] + "-resize" : null
- });
- });
- }
- function gu(t, e, n, r, i, a, o) {
- var s = e.childOfName(n);
- s && s.setShape(Bit(i6(t, e, [[r, i], [r + a, i + o]])));
- }
- function r6(t) {
- return it({
- strokeNoScale: !0
- }, t.brushStyle);
- }
- function bde(t, e, n, r) {
- var i = [f_(t, n), f_(e, r)], a = [Ug(t, n), Ug(e, r)];
- return [
- [i[0], a[0]],
- [i[1], a[1]]
- // y range
- ];
- }
- function kit(t) {
- return of(t.group);
- }
- function OL(t, e) {
- var n = {
- w: "left",
- e: "right",
- n: "top",
- s: "bottom"
- }, r = {
- left: "w",
- right: "e",
- top: "n",
- bottom: "s"
- }, i = CP(n[e], kit(t));
- return r[i];
- }
- function Lit(t, e) {
- var n = [OL(t, e[0]), OL(t, e[1])];
- return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
- }
- function GU(t, e, n, r, i, a) {
- var o = n.__brushOption, s = t.toRectRange(o.range), l = _de(e, i, a);
- F(r, function(u) {
- var c = Mit[u];
- s[c[0]][c[1]] += l[c[0]];
- }), o.range = t.fromRectRange(bde(s[0][0], s[1][0], s[0][1], s[1][1])), e6(e, n), qh(e, {
- isEnd: !1
- });
- }
- function Nit(t, e, n, r) {
- var i = e.__brushOption.range, a = _de(t, n, r);
- F(i, function(o) {
- o[0] += a[0], o[1] += a[1];
- }), e6(t, e), qh(t, {
- isEnd: !1
- });
- }
- function _de(t, e, n) {
- var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
- return [i[0] - a[0], i[1] - a[1]];
- }
- function i6(t, e, n) {
- var r = vde(t, e);
- return r && r !== Yh ? r.clipPath(n, t._transform) : ot(n);
- }
- function Bit(t) {
- var e = f_(t[0][0], t[1][0]), n = f_(t[0][1], t[1][1]), r = Ug(t[0][0], t[1][0]), i = Ug(t[0][1], t[1][1]);
- return {
- x: e,
- y: n,
- width: r - e,
- height: i - n
- };
- }
- function zit(t, e, n) {
- if (
- // Check active
- !(!t._brushType || Fit(t, e.offsetX, e.offsetY))
- ) {
- var r = t._zr, i = t._covers, a = n6(t, e, n);
- if (!t._dragging)
- for (var o = 0; o < i.length; o++) {
- var s = i[o].__brushOption;
- if (a && (a === Yh || s.panelId === a.panelId) && ZP[s.brushType].contain(i[o], n[0], n[1]))
- return;
- }
- a && r.setCursorStyle("crosshair");
- }
- }
- function SL(t) {
- var e = t.event;
- e.preventDefault && e.preventDefault();
- }
- function xL(t, e, n) {
- return t.childOfName("main").contain(e, n);
- }
- function Ode(t, e, n, r) {
- var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
- if (t._track.push(n.slice()), Rit(t) || i) {
- if (a && !i) {
- o.brushMode === "single" && bL(t);
- var l = ot(o);
- l.brushType = jU(l.brushType, a), l.panelId = a === Yh ? null : a.panelId, i = t._creatingCover = fde(t, l), t._covers.push(i);
- }
- if (i) {
- var u = ZP[jU(t._brushType, a)], c = i.__brushOption;
- c.range = u.getCreatingRange(i6(t, i, t._track)), r && (dde(t, i), u.updateCommon(t, i)), hde(t, i), s = {
- isEnd: r
- };
- }
- } else r && o.brushMode === "single" && o.removeOnClick && n6(t, e, n) && bL(t) && (s = {
- isEnd: r,
- removeOnClick: !0
- });
- return s;
- }
- function jU(t, e) {
- return t === "auto" ? (process.env.NODE_ENV !== "production" && at(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
- }
- var Vit = {
- mousedown: function(t) {
- if (this._dragging)
- ZU(this, t);
- else if (!t.target || !t.target.draggable) {
- SL(t);
- var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
- this._creatingCover = null;
- var n = this._creatingPanel = n6(this, t, e);
- n && (this._dragging = !0, this._track = [e.slice()]);
- }
- },
- mousemove: function(t) {
- var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
- if (zit(this, t, r), this._dragging) {
- SL(t);
- var i = Ode(this, t, r, !1);
- i && qh(this, i);
- }
- },
- mouseup: function(t) {
- ZU(this, t);
- }
- };
- function ZU(t, e) {
- if (t._dragging) {
- SL(e);
- var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = Ode(t, e, i, !0);
- t._dragging = !1, t._track = [], t._creatingCover = null, a && qh(t, a);
- }
- }
- function Fit(t, e, n) {
- var r = t._zr;
- return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
- }
- var ZP = {
- lineX: UU(0),
- lineY: UU(1),
- rect: {
- createCover: function(t, e) {
- function n(r) {
- return r;
- }
- return mde({
- toRectRange: n,
- fromRectRange: n
- }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
- },
- getCreatingRange: function(t) {
- var e = gde(t);
- return bde(e[1][0], e[1][1], e[0][0], e[0][1]);
- },
- updateCoverShape: function(t, e, n, r) {
- yde(t, e, n, r);
- },
- updateCommon: _L,
- contain: xL
- },
- polygon: {
- createCover: function(t, e) {
- var n = new ct();
- return n.add(new va({
- name: "main",
- style: r6(e),
- silent: !0
- })), n;
- },
- getCreatingRange: function(t) {
- return t;
- },
- endCreating: function(t, e) {
- e.remove(e.childAt(0)), e.add(new pa({
- name: "main",
- draggable: !0,
- drift: vt(Nit, t, e),
- ondragend: vt(qh, t, {
- isEnd: !0
- })
- }));
- },
- updateCoverShape: function(t, e, n, r) {
- e.childAt(0).setShape({
- points: i6(t, e, n)
- });
- },
- updateCommon: _L,
- contain: xL
- }
- };
- function UU(t) {
- return {
- createCover: function(e, n) {
- return mde({
- toRectRange: function(r) {
- var i = [r, [0, 100]];
- return t && i.reverse(), i;
- },
- fromRectRange: function(r) {
- return r[t];
- }
- }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
- },
- getCreatingRange: function(e) {
- var n = gde(e), r = f_(n[0][t], n[1][t]), i = Ug(n[0][t], n[1][t]);
- return [r, i];
- },
- updateCoverShape: function(e, n, r, i) {
- var a, o = vde(e, n);
- if (o !== Yh && o.getLinearBrushOtherExtent)
- a = o.getLinearBrushOtherExtent(t);
- else {
- var s = e._zr;
- a = [0, [s.getWidth(), s.getHeight()][1 - t]];
- }
- var l = [r, a];
- t && l.reverse(), yde(e, n, l, i);
- },
- updateCommon: _L,
- contain: xL
- };
- }
- function Sde(t) {
- return t = a6(t), function(e) {
- return H5(e, t);
- };
- }
- function xde(t, e) {
- return t = a6(t), function(n) {
- var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
- return [a, a + (i || 0)];
- };
- }
- function wde(t, e, n) {
- var r = a6(t);
- return function(i, a) {
- return r.contain(a[0], a[1]) && !QP(i, e, n);
- };
- }
- function a6(t) {
- return bt.create(t);
- }
- var Wit = ["axisLine", "axisTickLabel", "axisName"], Qit = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r) {
- t.prototype.init.apply(this, arguments), (this._brushController = new J3(r.getZr())).on("brush", We(this._onBrush, this));
- }, e.prototype.render = function(n, r, i, a) {
- if (!Hit(n, r, a)) {
- this.axisModel = n, this.api = i, this.group.removeAll();
- var o = this._axisGroup;
- if (this._axisGroup = new ct(), this.group.add(this._axisGroup), !!n.get("show")) {
- var s = jit(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = _e({
- strokeContainThreshold: c
- }, d), p = new sa(n, h);
- F(Wit, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), h1(o, this._axisGroup, n);
- }
- }
- }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
- var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = bt.create({
- x: l[0],
- y: -o / 2,
- width: u,
- height: o
- });
- f.x -= c, f.width += 2 * c, this._brushController.mount({
- enableGlobalPan: !0,
- rotation: n.rotation,
- x: n.position[0],
- y: n.position[1]
- }).setPanels([{
- panelId: "pl",
- clipPath: Sde(f),
- isTargetByCursor: wde(f, s, a),
- getLinearBrushOtherExtent: xde(f, 0)
- }]).enableBrush({
- brushType: "lineX",
- brushStyle: r,
- removeOnClick: !0
- }).updateCovers(Git(i));
- }, e.prototype._onBrush = function(n) {
- var r = n.areas, i = this.axisModel, a = i.axis, o = Ce(r, function(s) {
- return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
- });
- (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
- type: "axisAreaSelect",
- parallelAxisId: i.id,
- intervals: o
- });
- }, e.prototype.dispose = function() {
- this._brushController.dispose();
- }, e.type = "parallelAxis", e;
- }(Ln)
- );
- function Hit(t, e, n) {
- return n && n.type === "axisAreaSelect" && e.findComponents({
- mainType: "parallelAxis",
- query: n
- })[0] === t;
- }
- function Git(t) {
- var e = t.axis;
- return Ce(t.activeIntervals, function(n) {
- return {
- brushType: "lineX",
- panelId: "pl",
- range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
- };
- });
- }
- function jit(t, e) {
- return e.getComponent("parallel", t.get("parallelIndex"));
- }
- var Zit = {
- type: "axisAreaSelect",
- event: "axisAreaSelected"
- // update: 'updateVisual'
- };
- function Uit(t) {
- t.registerAction(Zit, function(e, n) {
- n.eachComponent({
- mainType: "parallelAxis",
- query: e
- }, function(r) {
- r.axis.model.setActiveIntervals(e.intervals);
- });
- }), t.registerAction("parallelAxisExpand", function(e, n) {
- n.eachComponent({
- mainType: "parallel",
- query: e
- }, function(r) {
- r.setAxisExpand(e);
- });
- });
- }
- var Xit = {
- type: "value",
- areaSelectStyle: {
- width: 20,
- borderWidth: 1,
- borderColor: "rgba(160,197,232)",
- color: "rgba(160,197,232)",
- opacity: 0.3
- },
- realtime: !0,
- z: 10
- };
- function Cde(t) {
- t.registerComponentView(git), t.registerComponentModel(yit), t.registerCoordinateSystem("parallel", Tit), t.registerPreprocessor(dit), t.registerComponentModel(yL), t.registerComponentView(Qit), Zg(t, "parallel", yL, Xit), Uit(t);
- }
- function Yit(t) {
- Mt(Cde), t.registerChartView(iit), t.registerSeriesModel(sit), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, fit);
- }
- var qit = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- 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;
- }
- return t;
- }()
- ), Kit = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- return t.call(this, n) || this;
- }
- return e.prototype.getDefaultShape = function() {
- return new qit();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.extent;
- n.moveTo(r.x1, r.y1), n.bezierCurveTo(r.cpx1, r.cpy1, r.cpx2, r.cpy2, r.x2, r.y2), r.orient === "vertical" ? (n.lineTo(r.x2 + i, r.y2), n.bezierCurveTo(r.cpx2 + i, r.cpy2, r.cpx1 + i, r.cpy1, r.x1 + i, r.y1)) : (n.lineTo(r.x2, r.y2 + i), n.bezierCurveTo(r.cpx2, r.cpy2 + i, r.cpx1, r.cpy1 + i, r.x1, r.y1 + i)), n.closePath();
- }, e.prototype.highlight = function() {
- Fu(this);
- }, e.prototype.downplay = function() {
- Wu(this);
- }, e;
- }(Dt)
- ), Jit = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = this, o = n.getGraph(), s = this.group, l = n.layoutInfo, u = l.width, c = l.height, f = n.getData(), d = n.getData("edge"), h = n.get("orient");
- this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
- var v = new Kit(), g = ft(v);
- g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
- var m = p.getModel(), y = m.getModel("lineStyle"), _ = y.get("curveness"), O = p.node1.getLayout(), S = p.node1.getModel(), x = S.get("localX"), C = S.get("localY"), P = p.node2.getLayout(), $ = p.node2.getModel(), T = $.get("localX"), E = $.get("localY"), M = p.getLayout(), R, N, I, B, Q, W, H, U;
- v.shape.extent = Math.max(1, M.dy), v.shape.orient = h, h === "vertical" ? (R = (x != null ? x * u : O.x) + M.sy, N = (C != null ? C * c : O.y) + O.dy, I = (T != null ? T * u : P.x) + M.ty, B = E != null ? E * c : P.y, Q = R, W = N * (1 - _) + B * _, H = I, U = N * _ + B * (1 - _)) : (R = (x != null ? x * u : O.x) + O.dx, N = (C != null ? C * c : O.y) + M.sy, I = T != null ? T * u : P.x, B = (E != null ? E * c : P.y) + M.ty, Q = R * (1 - _) + I * _, W = N, H = R * _ + I * (1 - _), U = B), v.setShape({
- x1: R,
- y1: N,
- x2: I,
- y2: B,
- cpx1: Q,
- cpy1: W,
- cpx2: H,
- cpy2: U
- }), v.useStyle(y.getItemStyle()), XU(v.style, h, p);
- var j = "" + m.get("value"), Y = ei(m, "edgeLabel");
- Ei(v, Y, {
- labelFetcher: {
- getFormattedLabel: function(ue, ye, se, he, re, q) {
- return n.getFormattedLabel(
- ue,
- ye,
- "edge",
- he,
- // ensure edgeLabel formatter is provided
- // to prevent the inheritance from `label.formatter` of the series
- co(re, Y.normal && Y.normal.get("formatter"), j),
- q
- );
- }
- },
- labelDataIndex: p.dataIndex,
- defaultText: j
- }), v.setTextConfig({
- position: "inside"
- });
- var ne = m.getModel("emphasis");
- Ai(v, m, "lineStyle", function(ue) {
- var ye = ue.getItemStyle();
- return XU(ye, h, p), ye;
- }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
- var fe = ne.get("focus");
- ur(v, fe === "adjacency" ? p.getAdjacentDataIndices() : fe === "trajectory" ? p.getTrajectoryDataIndices() : fe, ne.get("blurScope"), ne.get("disabled"));
- }), o.eachNode(function(p) {
- var v = p.getLayout(), g = p.getModel(), m = g.get("localX"), y = g.get("localY"), _ = g.getModel("emphasis"), O = g.get(["itemStyle", "borderRadius"]) || 0, S = new Zt({
- shape: {
- x: m != null ? m * u : v.x,
- y: y != null ? y * c : v.y,
- width: v.dx,
- height: v.dy,
- r: O
- },
- style: g.getModel("itemStyle").getItemStyle(),
- z2: 10
- });
- Ei(S, ei(g), {
- labelFetcher: {
- getFormattedLabel: function(C, P) {
- return n.getFormattedLabel(C, P, "node");
- }
- },
- labelDataIndex: p.dataIndex,
- defaultText: p.id
- }), S.disableLabelAnimation = !0, S.setStyle("fill", p.getVisual("color")), S.setStyle("decal", p.getVisual("style").decal), Ai(S, g), s.add(S), f.setItemGraphicEl(p.dataIndex, S), ft(S).dataType = "node";
- var x = _.get("focus");
- ur(S, x === "adjacency" ? p.getAdjacentDataIndices() : x === "trajectory" ? p.getTrajectoryDataIndices() : x, _.get("blurScope"), _.get("disabled"));
- }), f.eachItemGraphicEl(function(p, v) {
- var g = f.getItemModel(v);
- g.get("draggable") && (p.drift = function(m, y) {
- a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
- type: "dragNode",
- seriesId: n.id,
- dataIndex: f.getRawIndex(v),
- localX: this.shape.x / u,
- localY: this.shape.y / c
- });
- }, p.ondragend = function() {
- a._focusAdjacencyDisabled = !1;
- }, p.draggable = !0, p.cursor = "move");
- }), !this._data && n.isAnimationEnabled() && s.setClipPath(eat(s.getBoundingRect(), n, function() {
- s.removeClipPath();
- })), this._data = n.getData();
- }, e.prototype.dispose = function() {
- }, e.type = "sankey", e;
- }(_n)
- );
- function XU(t, e, n) {
- switch (t.fill) {
- case "source":
- t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
- break;
- case "target":
- t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
- break;
- case "gradient":
- var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
- Ve(r) && Ve(i) && (t.fill = new _m(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
- color: r,
- offset: 0
- }, {
- color: i,
- offset: 1
- }]));
- }
- }
- function eat(t, e, n) {
- var r = new Zt({
- shape: {
- x: t.x - 10,
- y: t.y - 10,
- width: 0,
- height: t.height + 20
- }
- });
- return Vn(r, {
- shape: {
- width: t.width + 20
- }
- }, e, n), r;
- }
- var tat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
- this.levelModels = [];
- for (var s = this.levelModels, l = 0; l < o.length; l++)
- if (o[l].depth != null && o[l].depth >= 0)
- s[o[l].depth] = new wn(o[l], this, r);
- else if (process.env.NODE_ENV !== "production")
- throw new Error("levels[i].depth is mandatory and should be natural number");
- if (a && i) {
- var u = sde(a, i, this, !0, c);
- return u.data;
- }
- function c(f, d) {
- f.wrapMethod("getItemModel", function(h, p) {
- var v = h.parentModel, g = v.getData().getItemLayout(p);
- if (g) {
- var m = g.depth, y = v.levelModels[m];
- y && (h.parentModel = y);
- }
- return h;
- }), d.wrapMethod("getItemModel", function(h, p) {
- var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
- if (m) {
- var y = m.depth, _ = v.levelModels[y];
- _ && (h.parentModel = _);
- }
- return h;
- });
- }
- }, e.prototype.setNodePosition = function(n, r) {
- var i = this.option.data || this.option.nodes, a = i[n];
- a.localX = r[0], a.localY = r[1];
- }, e.prototype.getGraph = function() {
- return this.getData().graph;
- }, e.prototype.getEdgeData = function() {
- return this.getGraph().edgeData;
- }, e.prototype.formatTooltip = function(n, r, i) {
- function a(h) {
- return isNaN(h) || h == null;
- }
- if (i === "edge") {
- var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
- return ti("nameValue", {
- name: u,
- value: l,
- noValue: a(l)
- });
- } else {
- var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
- return ti("nameValue", {
- name: d != null ? d + "" : null,
- value: f,
- noValue: a(f)
- });
- }
- }, e.prototype.optionUpdated = function() {
- }, e.prototype.getDataParams = function(n, r) {
- var i = t.prototype.getDataParams.call(this, n, r);
- if (i.value == null && r === "node") {
- var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
- i.value = o;
- }
- return i;
- }, e.type = "series.sankey", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "view",
- left: "5%",
- top: "5%",
- right: "20%",
- bottom: "5%",
- orient: "horizontal",
- nodeWidth: 20,
- nodeGap: 8,
- draggable: !0,
- layoutIterations: 32,
- label: {
- show: !0,
- position: "right",
- fontSize: 12
- },
- edgeLabel: {
- show: !1,
- fontSize: 12
- },
- levels: [],
- nodeAlign: "justify",
- lineStyle: {
- color: "#314656",
- opacity: 0.2,
- curveness: 0.5
- },
- emphasis: {
- label: {
- show: !0
- },
- lineStyle: {
- opacity: 0.5
- }
- },
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- },
- animationEasing: "linear",
- animationDuration: 1e3
- }, e;
- }(Tn)
- );
- function nat(t, e) {
- t.eachSeriesByType("sankey", function(n) {
- var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = rat(n, e);
- n.layoutInfo = a;
- var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
- aat(u);
- var f = yn(u, function(v) {
- return v.getLayout().value === 0;
- }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
- iat(u, c, r, i, o, s, d, h, p);
- });
- }
- function rat(t, e) {
- return Mr(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- });
- }
- function iat(t, e, n, r, i, a, o, s, l) {
- oat(t, e, n, i, a, s, l), cat(t, e, a, i, r, o, s), bat(t, s);
- }
- function aat(t) {
- F(t, function(e) {
- var n = lf(e.outEdges, sT), r = lf(e.inEdges, sT), i = e.getValue() || 0, a = Math.max(n, r, i);
- e.setLayout({
- value: a
- }, !0);
- });
- }
- function oat(t, e, n, r, i, a, o) {
- for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
- s[d] = 1;
- for (var d = 0; d < t.length; d++)
- l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
- for (var h = -1; u.length; ) {
- for (var p = 0; p < u.length; p++) {
- var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
- m && g.depth > h && (h = g.depth), v.setLayout({
- depth: m ? g.depth : f
- }, !0), a === "vertical" ? v.setLayout({
- dy: n
- }, !0) : v.setLayout({
- dx: n
- }, !0);
- for (var y = 0; y < v.outEdges.length; y++) {
- var _ = v.outEdges[y], O = e.indexOf(_);
- s[O] = 0;
- var S = _.node2, x = t.indexOf(S);
- --l[x] === 0 && c.indexOf(S) < 0 && c.push(S);
- }
- }
- ++f, u = c, c = [];
- }
- for (var d = 0; d < s.length; d++)
- if (s[d] === 1)
- throw new Error("Sankey is a DAG, the original data has cycle!");
- var C = h > f - 1 ? h : f - 1;
- o && o !== "left" && sat(t, o, a, C);
- var P = a === "vertical" ? (i - n) / C : (r - n) / C;
- uat(t, P, a);
- }
- function Tde(t) {
- var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
- return e.depth != null && e.depth >= 0;
- }
- function sat(t, e, n, r) {
- if (e === "right") {
- for (var i = [], a = t, o = 0; a.length; ) {
- for (var s = 0; s < a.length; s++) {
- var l = a[s];
- l.setLayout({
- skNodeHeight: o
- }, !0);
- for (var u = 0; u < l.inEdges.length; u++) {
- var c = l.inEdges[u];
- i.indexOf(c.node1) < 0 && i.push(c.node1);
- }
- }
- a = i, i = [], ++o;
- }
- F(t, function(f) {
- Tde(f) || f.setLayout({
- depth: Math.max(0, r - f.getLayout().skNodeHeight)
- }, !0);
- });
- } else e === "justify" && lat(t, r);
- }
- function lat(t, e) {
- F(t, function(n) {
- !Tde(n) && !n.outEdges.length && n.setLayout({
- depth: e
- }, !0);
- });
- }
- function uat(t, e, n) {
- F(t, function(r) {
- var i = r.getLayout().depth * e;
- n === "vertical" ? r.setLayout({
- y: i
- }, !0) : r.setLayout({
- x: i
- }, !0);
- });
- }
- function cat(t, e, n, r, i, a, o) {
- var s = fat(t, o);
- dat(s, e, n, r, i, o), bI(s, i, n, r, o);
- for (var l = 1; a > 0; a--)
- l *= 0.99, hat(s, l, o), bI(s, i, n, r, o), yat(s, l, o), bI(s, i, n, r, o);
- }
- function fat(t, e) {
- var n = [], r = e === "vertical" ? "y" : "x", i = xk(t, function(a) {
- return a.getLayout()[r];
- });
- return i.keys.sort(function(a, o) {
- return a - o;
- }), F(i.keys, function(a) {
- n.push(i.buckets.get(a));
- }), n;
- }
- function dat(t, e, n, r, i, a) {
- var o = 1 / 0;
- F(t, function(s) {
- var l = s.length, u = 0;
- F(s, function(f) {
- u += f.getLayout().value;
- });
- var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
- c < o && (o = c);
- }), F(t, function(s) {
- F(s, function(l, u) {
- var c = l.getLayout().value * o;
- a === "vertical" ? (l.setLayout({
- x: u
- }, !0), l.setLayout({
- dx: c
- }, !0)) : (l.setLayout({
- y: u
- }, !0), l.setLayout({
- dy: c
- }, !0));
- });
- }), F(e, function(s) {
- var l = +s.getValue() * o;
- s.setLayout({
- dy: l
- }, !0);
- });
- }
- function bI(t, e, n, r, i) {
- var a = i === "vertical" ? "x" : "y";
- F(t, function(o) {
- o.sort(function(v, g) {
- return v.getLayout()[a] - g.getLayout()[a];
- });
- for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
- l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
- x: s
- }, !0) : l.setLayout({
- y: s
- }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
- var p = i === "vertical" ? r : n;
- if (u = c - e - p, u > 0) {
- s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
- x: s
- }, !0) : l.setLayout({
- y: s
- }, !0), c = s;
- for (var h = f - 2; h >= 0; --h)
- l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
- x: s
- }, !0) : l.setLayout({
- y: s
- }, !0)), c = l.getLayout()[a];
- }
- });
- }
- function hat(t, e, n) {
- F(t.slice().reverse(), function(r) {
- F(r, function(i) {
- if (i.outEdges.length) {
- var a = lf(i.outEdges, pat, n) / lf(i.outEdges, sT);
- if (isNaN(a)) {
- var o = i.outEdges.length;
- a = o ? lf(i.outEdges, vat, n) / o : 0;
- }
- if (n === "vertical") {
- var s = i.getLayout().x + (a - Sf(i, n)) * e;
- i.setLayout({
- x: s
- }, !0);
- } else {
- var l = i.getLayout().y + (a - Sf(i, n)) * e;
- i.setLayout({
- y: l
- }, !0);
- }
- }
- });
- });
- }
- function pat(t, e) {
- return Sf(t.node2, e) * t.getValue();
- }
- function vat(t, e) {
- return Sf(t.node2, e);
- }
- function gat(t, e) {
- return Sf(t.node1, e) * t.getValue();
- }
- function mat(t, e) {
- return Sf(t.node1, e);
- }
- function Sf(t, e) {
- return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
- }
- function sT(t) {
- return t.getValue();
- }
- function lf(t, e, n) {
- for (var r = 0, i = t.length, a = -1; ++a < i; ) {
- var o = +e(t[a], n);
- isNaN(o) || (r += o);
- }
- return r;
- }
- function yat(t, e, n) {
- F(t, function(r) {
- F(r, function(i) {
- if (i.inEdges.length) {
- var a = lf(i.inEdges, gat, n) / lf(i.inEdges, sT);
- if (isNaN(a)) {
- var o = i.inEdges.length;
- a = o ? lf(i.inEdges, mat, n) / o : 0;
- }
- if (n === "vertical") {
- var s = i.getLayout().x + (a - Sf(i, n)) * e;
- i.setLayout({
- x: s
- }, !0);
- } else {
- var l = i.getLayout().y + (a - Sf(i, n)) * e;
- i.setLayout({
- y: l
- }, !0);
- }
- }
- });
- });
- }
- function bat(t, e) {
- var n = e === "vertical" ? "x" : "y";
- F(t, function(r) {
- r.outEdges.sort(function(i, a) {
- return i.node2.getLayout()[n] - a.node2.getLayout()[n];
- }), r.inEdges.sort(function(i, a) {
- return i.node1.getLayout()[n] - a.node1.getLayout()[n];
- });
- }), F(t, function(r) {
- var i = 0, a = 0;
- F(r.outEdges, function(o) {
- o.setLayout({
- sy: i
- }, !0), i += o.getLayout().dy;
- }), F(r.inEdges, function(o) {
- o.setLayout({
- ty: a
- }, !0), a += o.getLayout().dy;
- });
- });
- }
- function _at(t) {
- t.eachSeriesByType("sankey", function(e) {
- var n = e.getGraph(), r = n.nodes, i = n.edges;
- if (r.length) {
- var a = 1 / 0, o = -1 / 0;
- F(r, function(s) {
- var l = s.getLayout().value;
- l < a && (a = l), l > o && (o = l);
- }), F(r, function(s) {
- var l = new Kr({
- type: "color",
- mappingMethod: "linear",
- dataExtent: [a, o],
- visual: e.get("color")
- }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
- c != null ? (s.setVisual("color", c), s.setVisual("style", {
- fill: c
- })) : (s.setVisual("color", u), s.setVisual("style", {
- fill: u
- }));
- });
- }
- i.length && F(i, function(s) {
- var l = s.getModel().get("lineStyle");
- s.setVisual("style", l);
- });
- });
- }
- function Oat(t) {
- t.registerChartView(Jit), t.registerSeriesModel(tat), t.registerLayout(nat), t.registerVisual(_at), t.registerAction({
- type: "dragNode",
- event: "dragnode",
- // here can only use 'update' now, other value is not support in echarts.
- update: "update"
- }, function(e, n) {
- n.eachComponent({
- mainType: "series",
- subType: "sankey",
- query: e
- }, function(r) {
- r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
- });
- });
- }
- var Pde = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.getInitialData = function(e, n) {
- var r, i = n.getComponent("xAxis", this.get("xAxisIndex")), a = n.getComponent("yAxis", this.get("yAxisIndex")), o = i.get("type"), s = a.get("type"), l;
- o === "category" ? (e.layout = "horizontal", r = i.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", r = a.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
- var u = ["x", "y"], c = e.layout === "horizontal" ? 0 : 1, f = this._baseAxisDim = u[c], d = u[1 - c], h = [i, a], p = h[c].get("type"), v = h[1 - c].get("type"), g = e.data;
- if (g && l) {
- var m = [];
- F(g, function(O, S) {
- var x;
- Se(O) ? (x = O.slice(), O.unshift(S)) : Se(O.value) ? (x = _e({}, O), x.value = x.value.slice(), O.value.unshift(S)) : x = O, m.push(x);
- }), e.data = m;
- }
- var y = this.defaultValueDimensions, _ = [{
- name: f,
- type: YC(p),
- ordinalMeta: r,
- otherDims: {
- tooltip: !1,
- itemName: 0
- },
- dimsDef: ["base"]
- }, {
- name: d,
- type: YC(v),
- dimsDef: y.slice()
- }];
- return Rm(this, {
- coordDimensions: _,
- dimensionsCount: y.length + 1,
- encodeDefaulter: vt(tue, _, this)
- });
- }, t.prototype.getBaseAxis = function() {
- var e = this._baseAxisDim;
- return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
- }, t;
- }()
- ), $de = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.defaultValueDimensions = [{
- name: "min",
- defaultTooltip: !0
- }, {
- name: "Q1",
- defaultTooltip: !0
- }, {
- name: "median",
- defaultTooltip: !0
- }, {
- name: "Q3",
- defaultTooltip: !0
- }, {
- name: "max",
- defaultTooltip: !0
- }], n.visualDrawType = "stroke", n;
- }
- return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- layout: null,
- boxWidth: [7, 50],
- itemStyle: {
- color: "#fff",
- borderWidth: 1
- },
- emphasis: {
- scale: !0,
- itemStyle: {
- borderWidth: 2,
- shadowBlur: 5,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: "rgba(0,0,0,0.2)"
- }
- },
- animationDuration: 800
- }, e;
- }(Tn)
- );
- vr($de, Pde, !0);
- var Sat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this.group, s = this._data;
- this._data || o.removeAll();
- var l = n.get("layout") === "horizontal" ? 1 : 0;
- a.diff(s).add(function(u) {
- if (a.hasValue(u)) {
- var c = a.getItemLayout(u), f = YU(c, a, u, l, !0);
- a.setItemGraphicEl(u, f), o.add(f);
- }
- }).update(function(u, c) {
- var f = s.getItemGraphicEl(c);
- if (!a.hasValue(u)) {
- o.remove(f);
- return;
- }
- var d = a.getItemLayout(u);
- f ? (Zs(f), Ade(d, f, a, u)) : f = YU(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
- }).remove(function(u) {
- var c = s.getItemGraphicEl(u);
- c && o.remove(c);
- }).execute(), this._data = a;
- }, e.prototype.remove = function(n) {
- var r = this.group, i = this._data;
- this._data = null, i && i.eachItemGraphicEl(function(a) {
- a && r.remove(a);
- });
- }, e.type = "boxplot", e;
- }(_n)
- ), xat = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), wat = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "boxplotBoxPath", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new xat();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.points, a = 0;
- for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
- n.lineTo(i[a][0], i[a][1]);
- for (n.closePath(); a < i.length; a++)
- n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
- }, e;
- }(Dt)
- );
- function YU(t, e, n, r, i) {
- var a = t.ends, o = new wat({
- shape: {
- points: i ? Cat(a, r, t) : a
- }
- });
- return Ade(t, o, e, n, i), o;
- }
- function Ade(t, e, n, r, i) {
- var a = n.hostModel, o = hp[i ? "initProps" : "updateProps"];
- o(e, {
- shape: {
- points: t.ends
- }
- }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
- var s = n.getItemModel(r), l = s.getModel("emphasis");
- Ai(e, s), ur(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
- }
- function Cat(t, e, n) {
- return Ce(t, function(r) {
- return r = r.slice(), r[e] = n.initBaseline, r;
- });
- }
- var ub = F;
- function Tat(t) {
- var e = Pat(t);
- ub(e, function(n) {
- var r = n.seriesModels;
- r.length && ($at(n), ub(r, function(i, a) {
- Aat(i, n.boxOffsetList[a], n.boxWidthList[a]);
- }));
- });
- }
- function Pat(t) {
- var e = [], n = [];
- return t.eachSeriesByType("boxplot", function(r) {
- var i = r.getBaseAxis(), a = St(n, i);
- a < 0 && (a = n.length, n[a] = i, e[a] = {
- axis: i,
- seriesModels: []
- }), e[a].seriesModels.push(r);
- }), e;
- }
- function $at(t) {
- var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
- if (e.type === "category")
- s = e.getBandWidth();
- else {
- var l = 0;
- ub(n, function(p) {
- l = Math.max(l, p.getData().count());
- });
- var u = e.getExtent();
- s = Math.abs(u[1] - u[0]) / l;
- }
- ub(n, function(p) {
- var v = p.get("boxWidth");
- Se(v) || (v = [v, v]), o.push([ze(v[0], s) || 0, ze(v[1], s) || 0]);
- });
- var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
- ub(n, function(p, v) {
- a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
- });
- }
- function Aat(t, e, n) {
- var r = t.coordinateSystem, i = t.getData(), a = n / 2, o = t.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = i.mapDimension(l[o]), c = i.mapDimensionsAll(l[s]);
- if (u == null || c.length < 5)
- return;
- for (var f = 0; f < i.count(); f++) {
- var d = i.get(u, f), h = _(d, c[2], f), p = _(d, c[0], f), v = _(d, c[1], f), g = _(d, c[3], f), m = _(d, c[4], f), y = [];
- O(y, v, !1), O(y, g, !0), y.push(p, v, m, g), S(y, p), S(y, m), S(y, h), i.setItemLayout(f, {
- initBaseline: h[s],
- ends: y
- });
- }
- function _(x, C, P) {
- var $ = i.get(C, P), T = [];
- T[o] = x, T[s] = $;
- var E;
- return isNaN(x) || isNaN($) ? E = [NaN, NaN] : (E = r.dataToPoint(T), E[o] += e), E;
- }
- function O(x, C, P) {
- var $ = C.slice(), T = C.slice();
- $[o] += a, T[o] -= a, P ? x.push($, T) : x.push(T, $);
- }
- function S(x, C) {
- var P = C.slice(), $ = C.slice();
- P[o] -= a, $[o] += a, x.push(P, $);
- }
- }
- function Eat(t, e) {
- e = e || {};
- for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
- var s = ao(t[o].slice()), l = uw(s, 0.25), u = uw(s, 0.5), c = uw(s, 0.75), f = s[0], d = s[s.length - 1], h = (i ?? 1.5) * (c - l), p = a ? f : Math.max(f, l - h), v = a ? d : Math.min(d, c + h), g = e.itemNameFormatter, m = qe(g) ? g({
- value: o
- }) : Ve(g) ? g.replace("{value}", o + "") : o + "";
- n.push([m, p, l, u, c, v]);
- for (var y = 0; y < s.length; y++) {
- var _ = s[y];
- if (_ < p || _ > v) {
- var O = [m, _];
- r.push(O);
- }
- }
- }
- return {
- boxData: n,
- outliers: r
- };
- }
- var Mat = {
- type: "echarts:boxplot",
- transform: function(e) {
- var n = e.upstream;
- if (n.sourceFormat !== Hi) {
- var r = "";
- process.env.NODE_ENV !== "production" && (r = fa("source data is not applicable for this boxplot transform. Expect number[][].")), fn(r);
- }
- var i = Eat(n.getRawData(), e.config);
- return [{
- dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
- data: i.boxData
- }, {
- data: i.outliers
- }];
- }
- };
- function Iat(t) {
- t.registerSeriesModel($de), t.registerChartView(Sat), t.registerLayout(Tat), t.registerTransform(Mat);
- }
- var Dat = ["color", "borderColor"], Rat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- this._clear(), this._updateDrawMode(n);
- }, e.prototype.incrementalRender = function(n, r, i, a) {
- this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
- }, e.prototype.eachRendered = function(n) {
- Nf(this._progressiveEls || this.group, n);
- }, e.prototype._updateDrawMode = function(n) {
- var r = n.pipelineContext.large;
- (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
- }, e.prototype._renderNormal = function(n) {
- var r = n.getData(), i = this._data, a = this.group, o = r.getLayout("isSimpleBox"), s = n.get("clip", !0), l = n.coordinateSystem, u = l.getArea && l.getArea();
- this._data || a.removeAll(), r.diff(i).add(function(c) {
- if (r.hasValue(c)) {
- var f = r.getItemLayout(c);
- if (s && qU(u, f))
- return;
- var d = _I(f, c, !0);
- Vn(d, {
- shape: {
- points: f.ends
- }
- }, n, c), OI(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
- }
- }).update(function(c, f) {
- var d = i.getItemGraphicEl(f);
- if (!r.hasValue(c)) {
- a.remove(d);
- return;
- }
- var h = r.getItemLayout(c);
- if (s && qU(u, h)) {
- a.remove(d);
- return;
- }
- d ? (tn(d, {
- shape: {
- points: h.ends
- }
- }, n, c), Zs(d)) : d = _I(h), OI(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
- }).remove(function(c) {
- var f = i.getItemGraphicEl(c);
- f && a.remove(f);
- }).execute(), this._data = r;
- }, e.prototype._renderLarge = function(n) {
- this._clear(), KU(n, this.group);
- var r = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
- r ? this.group.setClipPath(r) : this.group.removeClipPath();
- }, e.prototype._incrementalRenderNormal = function(n, r) {
- for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
- var s = i.getItemLayout(o), l = _I(s);
- OI(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
- }
- }, e.prototype._incrementalRenderLarge = function(n, r) {
- KU(r, this.group, this._progressiveEls, !0);
- }, e.prototype.remove = function(n) {
- this._clear();
- }, e.prototype._clear = function() {
- this.group.removeAll(), this._data = null;
- }, e.type = "candlestick", e;
- }(_n)
- ), kat = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), Lat = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "normalCandlestickBox", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new kat();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.points;
- this.__simpleBox ? (n.moveTo(i[4][0], i[4][1]), n.lineTo(i[6][0], i[6][1])) : (n.moveTo(i[0][0], i[0][1]), n.lineTo(i[1][0], i[1][1]), n.lineTo(i[2][0], i[2][1]), n.lineTo(i[3][0], i[3][1]), n.closePath(), n.moveTo(i[4][0], i[4][1]), n.lineTo(i[5][0], i[5][1]), n.moveTo(i[6][0], i[6][1]), n.lineTo(i[7][0], i[7][1]));
- }, e;
- }(Dt)
- );
- function _I(t, e, n) {
- var r = t.ends;
- return new Lat({
- shape: {
- points: n ? Nat(r, t) : r
- },
- z2: 100
- });
- }
- function qU(t, e) {
- for (var n = !0, r = 0; r < e.ends.length; r++)
- if (t.contain(e.ends[r][0], e.ends[r][1])) {
- n = !1;
- break;
- }
- return n;
- }
- function OI(t, e, n, r) {
- var i = e.getItemModel(n);
- t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Ai(t, i);
- }
- function Nat(t, e) {
- return Ce(t, function(n) {
- return n = n.slice(), n[1] = e.initBaseline, n;
- });
- }
- var Bat = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), SI = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r.type = "largeCandlestickBox", r;
- }
- return e.prototype.getDefaultShape = function() {
- return new Bat();
- }, e.prototype.buildPath = function(n, r) {
- for (var i = r.points, a = 0; a < i.length; )
- if (this.__sign === i[a++]) {
- var o = i[a++];
- n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
- } else
- a += 3;
- }, e;
- }(Dt)
- );
- function KU(t, e, n, r) {
- var i = t.getData(), a = i.getLayout("largePoints"), o = new SI({
- shape: {
- points: a
- },
- __sign: 1,
- ignoreCoarsePointer: !0
- });
- e.add(o);
- var s = new SI({
- shape: {
- points: a
- },
- __sign: -1,
- ignoreCoarsePointer: !0
- });
- e.add(s);
- var l = new SI({
- shape: {
- points: a
- },
- __sign: 0,
- ignoreCoarsePointer: !0
- });
- e.add(l), xI(1, o, t), xI(-1, s, t), xI(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
- }
- function xI(t, e, n, r) {
- var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
- t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
- var a = n.getModel("itemStyle").getItemStyle(Dat);
- e.useStyle(a), e.style.fill = null, e.style.stroke = i;
- }
- var Ede = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.defaultValueDimensions = [{
- name: "open",
- defaultTooltip: !0
- }, {
- name: "close",
- defaultTooltip: !0
- }, {
- name: "lowest",
- defaultTooltip: !0
- }, {
- name: "highest",
- defaultTooltip: !0
- }], n;
- }
- return e.prototype.getShadowDim = function() {
- return "open";
- }, e.prototype.brushSelector = function(n, r, i) {
- var a = r.getItemLayout(n);
- return a && i.rect(a.brushRect);
- }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- coordinateSystem: "cartesian2d",
- legendHoverLink: !0,
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- layout: null,
- clip: !0,
- itemStyle: {
- color: "#eb5454",
- color0: "#47b262",
- borderColor: "#eb5454",
- borderColor0: "#47b262",
- borderColorDoji: null,
- // borderColor: '#d24040',
- // borderColor0: '#398f4f',
- borderWidth: 1
- },
- emphasis: {
- scale: !0,
- itemStyle: {
- borderWidth: 2
- }
- },
- barMaxWidth: null,
- barMinWidth: null,
- barWidth: null,
- large: !0,
- largeThreshold: 600,
- progressive: 3e3,
- progressiveThreshold: 1e4,
- progressiveChunkMode: "mod",
- animationEasing: "linear",
- animationDuration: 300
- }, e;
- }(Tn)
- );
- vr(Ede, Pde, !0);
- function zat(t) {
- !t || !Se(t.series) || F(t.series, function(e) {
- nt(e) && e.type === "k" && (e.type = "candlestick");
- });
- }
- var Vat = ["itemStyle", "borderColor"], Fat = ["itemStyle", "borderColor0"], Wat = ["itemStyle", "borderColorDoji"], Qat = ["itemStyle", "color"], Hat = ["itemStyle", "color0"], Gat = {
- seriesType: "candlestick",
- plan: $m(),
- // For legend.
- performRawSeries: !0,
- reset: function(t, e) {
- function n(a, o) {
- return o.get(a > 0 ? Qat : Hat);
- }
- function r(a, o) {
- return o.get(a === 0 ? Wat : a > 0 ? Vat : Fat);
- }
- if (!e.isSeriesFiltered(t)) {
- var i = t.pipelineContext.large;
- return !i && {
- progress: function(a, o) {
- for (var s; (s = a.next()) != null; ) {
- var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
- c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
- var f = o.ensureUniqueItemVisual(s, "style");
- _e(f, c);
- }
- }
- };
- }
- }
- }, jat = {
- seriesType: "candlestick",
- plan: $m(),
- reset: function(t) {
- var e = t.coordinateSystem, n = t.getData(), r = Zat(t, n), i = 0, a = 1, o = ["x", "y"], s = n.getDimensionIndex(n.mapDimension(o[i])), l = Ce(n.mapDimensionsAll(o[a]), n.getDimensionIndex, n), u = l[0], c = l[1], f = l[2], d = l[3];
- if (n.setLayout({
- candleWidth: r,
- // The value is experimented visually.
- isSimpleBox: r <= 1.3
- }), s < 0 || l.length < 4)
- return;
- return {
- progress: t.pipelineContext.large ? p : h
- };
- function h(v, g) {
- for (var m, y = g.getStore(); (m = v.next()) != null; ) {
- var _ = y.get(s, m), O = y.get(u, m), S = y.get(c, m), x = y.get(f, m), C = y.get(d, m), P = Math.min(O, S), $ = Math.max(O, S), T = Q(P, _), E = Q($, _), M = Q(x, _), R = Q(C, _), N = [];
- W(N, E, 0), W(N, T, 1), N.push(U(R), U(E), U(M), U(T));
- var I = g.getItemModel(m), B = !!I.get(["itemStyle", "borderColorDoji"]);
- g.setItemLayout(m, {
- sign: JU(y, m, O, S, c, B),
- initBaseline: O > S ? E[a] : T[a],
- ends: N,
- brushRect: H(x, C, _)
- });
- }
- function Q(j, Y) {
- var ne = [];
- return ne[i] = Y, ne[a] = j, isNaN(Y) || isNaN(j) ? [NaN, NaN] : e.dataToPoint(ne);
- }
- function W(j, Y, ne) {
- var fe = Y.slice(), ue = Y.slice();
- fe[i] = dw(fe[i] + r / 2, 1, !1), ue[i] = dw(ue[i] - r / 2, 1, !0), ne ? j.push(fe, ue) : j.push(ue, fe);
- }
- function H(j, Y, ne) {
- var fe = Q(j, ne), ue = Q(Y, ne);
- return fe[i] -= r / 2, ue[i] -= r / 2, {
- x: fe[0],
- y: fe[1],
- width: r,
- height: ue[1] - fe[1]
- };
- }
- function U(j) {
- return j[i] = dw(j[i], 1), j;
- }
- }
- function p(v, g) {
- for (var m = Al(v.count * 4), y = 0, _, O = [], S = [], x, C = g.getStore(), P = !!t.get(["itemStyle", "borderColorDoji"]); (x = v.next()) != null; ) {
- var $ = C.get(s, x), T = C.get(u, x), E = C.get(c, x), M = C.get(f, x), R = C.get(d, x);
- if (isNaN($) || isNaN(M) || isNaN(R)) {
- m[y++] = NaN, y += 3;
- continue;
- }
- m[y++] = JU(C, x, T, E, c, P), O[i] = $, O[a] = M, _ = e.dataToPoint(O, null, S), m[y++] = _ ? _[0] : NaN, m[y++] = _ ? _[1] : NaN, O[a] = R, _ = e.dataToPoint(O, null, S), m[y++] = _ ? _[1] : NaN;
- }
- g.setLayout("largePoints", m);
- }
- }
- };
- function JU(t, e, n, r, i, a) {
- var o;
- return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
- }
- function Zat(t, e) {
- var n = t.getBaseAxis(), r, i = n.type === "category" ? n.getBandWidth() : (r = n.getExtent(), Math.abs(r[1] - r[0]) / e.count()), a = ze(dt(t.get("barMaxWidth"), i), i), o = ze(dt(t.get("barMinWidth"), 1), i), s = t.get("barWidth");
- return s != null ? ze(s, i) : Math.max(Math.min(i / 2, a), o);
- }
- function Uat(t) {
- t.registerChartView(Rat), t.registerSeriesModel(Ede), t.registerPreprocessor(zat), t.registerVisual(Gat), t.registerLayout(jat);
- }
- function eX(t, e) {
- var n = e.rippleEffectColor || e.color;
- t.eachChild(function(r) {
- r.attr({
- z: e.z,
- zlevel: e.zlevel,
- style: {
- stroke: e.brushType === "stroke" ? n : null,
- fill: e.brushType === "fill" ? n : null
- }
- });
- });
- }
- var Xat = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r) {
- var i = t.call(this) || this, a = new m1(n, r), o = new ct();
- return i.add(a), i.add(o), i.updateData(n, r), i;
- }
- return e.prototype.stopEffectAnimation = function() {
- this.childAt(1).removeAll();
- }, e.prototype.startEffectAnimation = function(n) {
- for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
- var l = wr(r, -1, -1, 2, 2, i);
- l.attr({
- style: {
- strokeNoScale: !0
- },
- z2: 99,
- silent: !0,
- scaleX: 0.5,
- scaleY: 0.5
- });
- var u = -s / a * n.period + n.effectOffset;
- l.animate("", !0).when(n.period, {
- scaleX: n.rippleScale / 2,
- scaleY: n.rippleScale / 2
- }).delay(u).start(), l.animateStyle(!0).when(n.period, {
- opacity: 0
- }).delay(u).start(), o.add(l);
- }
- eX(o, n);
- }, e.prototype.updateEffectAnimation = function(n) {
- for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
- var s = a[o];
- if (r[s] !== n[s]) {
- this.stopEffectAnimation(), this.startEffectAnimation(n);
- return;
- }
- }
- eX(i, n);
- }, e.prototype.highlight = function() {
- Fu(this);
- }, e.prototype.downplay = function() {
- Wu(this);
- }, e.prototype.getSymbolType = function() {
- var n = this.childAt(0);
- return n && n.getSymbolType();
- }, e.prototype.updateData = function(n, r) {
- var i = this, a = n.hostModel;
- this.childAt(0).updateData(n, r);
- var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = Em(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
- o.setScale(u), o.traverse(function(g) {
- g.setStyle("fill", f);
- });
- var h = mp(n.getItemVisual(r, "symbolOffset"), u);
- h && (o.x = h[0], o.y = h[1]);
- var p = n.getItemVisual(r, "symbolRotate");
- o.rotation = (p || 0) * Math.PI / 180 || 0;
- var v = {};
- v.showEffectOn = a.get("showEffectOn"), v.rippleScale = s.get(["rippleEffect", "scale"]), v.brushType = s.get(["rippleEffect", "brushType"]), v.period = s.get(["rippleEffect", "period"]) * 1e3, v.effectOffset = r / n.count(), v.z = a.getShallow("z") || 0, v.zlevel = a.getShallow("zlevel") || 0, v.symbolType = l, v.color = f, v.rippleEffectColor = s.get(["rippleEffect", "color"]), v.rippleNumber = s.get(["rippleEffect", "number"]), v.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(v) : this.startEffectAnimation(v), this._effectCfg = v) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
- g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
- }), this._effectCfg = v, ur(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
- }, e.prototype.fadeOut = function(n) {
- n && n();
- }, e;
- }(ct)
- ), Yat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function() {
- this._symbolDraw = new y1(Xat);
- }, e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this._symbolDraw;
- o.updateData(a, {
- clipShape: this._getClipShape(n)
- }), this.group.add(o.group);
- }, e.prototype._getClipShape = function(n) {
- var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
- return n.get("clip", !0) ? i : null;
- }, e.prototype.updateTransform = function(n, r, i) {
- var a = n.getData();
- this.group.dirty();
- var o = _1("").reset(n, r, i);
- o.progress && o.progress({
- start: 0,
- end: a.count(),
- count: a.count()
- }, a), this._symbolDraw.updateLayout();
- }, e.prototype._updateGroupTransform = function(n) {
- var r = n.coordinateSystem;
- r && r.getRoamTransform && (this.group.transform = nse(r.getRoamTransform()), this.group.decomposeTransform());
- }, e.prototype.remove = function(n, r) {
- this._symbolDraw && this._symbolDraw.remove(!0);
- }, e.type = "effectScatter", e;
- }(_n)
- ), qat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Yl(null, this, {
- useEncodeDefaulter: !0
- });
- }, e.prototype.brushSelector = function(n, r, i) {
- return i.point(r.getItemLayout(n));
- }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
- coordinateSystem: "cartesian2d",
- // zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- effectType: "ripple",
- progressive: 0,
- // When to show the effect, option: 'render'|'emphasis'
- showEffectOn: "render",
- clip: !0,
- // Ripple effect config
- rippleEffect: {
- period: 4,
- // Scale of ripple
- scale: 2.5,
- // Brush type can be fill or stroke
- brushType: "fill",
- // Ripple number
- number: 3
- },
- universalTransition: {
- divideShape: "clone"
- },
- // Cartesian coordinate system
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- // Polar coordinate system
- // polarIndex: 0,
- // Geo coordinate system
- // geoIndex: 0,
- // symbol: null, // 图形类型
- symbolSize: 10
- // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
- // symbolRotate: null, // 图形旋转控制
- // itemStyle: {
- // opacity: 1
- // }
- }, e;
- }(Tn)
- );
- function Kat(t) {
- t.registerChartView(Yat), t.registerSeriesModel(qat), t.registerLayout(_1("effectScatter"));
- }
- var Mde = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this) || this;
- return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
- }
- return e.prototype.createLine = function(n, r, i) {
- return new q3(n, r, i);
- }, e.prototype._updateEffectSymbol = function(n, r) {
- var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
- Se(o) || (o = [o, o]);
- var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
- this._symbolType !== s && (this.remove(c), c = wr(s, -0.5, -0.5, 1, 1, u), c.z2 = 100, c.culling = !0, this.add(c)), c && (c.setStyle("shadowColor", u), c.setStyle(a.getItemStyle(["color"])), c.scaleX = o[0], c.scaleY = o[1], c.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(n, a, r));
- }, e.prototype._updateEffectAnimation = function(n, r, i) {
- var a = this.childAt(1);
- if (a) {
- var o = n.getItemLayout(i), s = r.get("period") * 1e3, l = r.get("loop"), u = r.get("roundTrip"), c = r.get("constantSpeed"), f = Or(r.get("delay"), function(h) {
- return h / n.count() * s / 3;
- });
- if (a.ignore = !0, this._updateAnimationPoints(a, o), c > 0 && (s = this._getLineLength(a) / c * 1e3), s !== this._period || l !== this._loop || u !== this._roundTrip) {
- a.stopAnimation();
- var d = void 0;
- qe(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
- }
- this._period = s, this._loop = l, this._roundTrip = u;
- }
- }, e.prototype._animateSymbol = function(n, r, i, a, o) {
- if (r > 0) {
- n.__t = 0;
- var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
- __t: o ? 2 : 1
- }).delay(i).during(function() {
- s._updateSymbolPosition(n);
- });
- a || l.done(function() {
- s.remove(n);
- }), l.start();
- }
- }, e.prototype._getLineLength = function(n) {
- return wu(n.__p1, n.__cp1) + wu(n.__cp1, n.__p2);
- }, e.prototype._updateAnimationPoints = function(n, r) {
- n.__p1 = r[0], n.__p2 = r[1], n.__cp1 = r[2] || [(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2];
- }, e.prototype.updateData = function(n, r, i) {
- this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
- }, e.prototype._updateSymbolPosition = function(n) {
- var r = n.__p1, i = n.__p2, a = n.__cp1, o = n.__t < 1 ? n.__t : 2 - n.__t, s = [n.x, n.y], l = s.slice(), u = ii, c = sk;
- s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
- var f = n.__t < 1 ? c(r[0], a[0], i[0], o) : c(i[0], a[0], r[0], 1 - o), d = n.__t < 1 ? c(r[1], a[1], i[1], o) : c(i[1], a[1], r[1], 1 - o);
- n.rotation = -Math.atan2(d, f) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (n.__lastT !== void 0 && n.__lastT < n.__t ? (n.scaleY = wu(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : n.__lastT === 1 ? n.scaleY = 2 * wu(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
- }, e.prototype.updateLayout = function(n, r) {
- this.childAt(0).updateLayout(n, r);
- var i = n.getItemModel(r).getModel("effect");
- this._updateEffectAnimation(n, i, r);
- }, e;
- }(ct)
- ), Ide = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i) {
- var a = t.call(this) || this;
- return a._createPolyline(n, r, i), a;
- }
- return e.prototype._createPolyline = function(n, r, i) {
- var a = n.getItemLayout(r), o = new va({
- shape: {
- points: a
- }
- });
- this.add(o), this._updateCommonStl(n, r, i);
- }, e.prototype.updateData = function(n, r, i) {
- var a = n.hostModel, o = this.childAt(0), s = {
- shape: {
- points: n.getItemLayout(r)
- }
- };
- tn(o, s, a, r), this._updateCommonStl(n, r, i);
- }, e.prototype._updateCommonStl = function(n, r, i) {
- var a = this.childAt(0), o = n.getItemModel(r), s = i && i.emphasisLineStyle, l = i && i.focus, u = i && i.blurScope, c = i && i.emphasisDisabled;
- if (!i || n.hasItemOption) {
- var f = o.getModel("emphasis");
- s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
- }
- a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
- var d = a.ensureState("emphasis");
- d.style = s, ur(this, l, u, c);
- }, e.prototype.updateLayout = function(n, r) {
- var i = this.childAt(0);
- i.setShape("points", n.getItemLayout(r));
- }, e;
- }(ct)
- ), Jat = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n._lastFrame = 0, n._lastFramePercent = 0, n;
- }
- return e.prototype.createLine = function(n, r, i) {
- return new Ide(n, r, i);
- }, e.prototype._updateAnimationPoints = function(n, r) {
- this._points = r;
- for (var i = [0], a = 0, o = 1; o < r.length; o++) {
- var s = r[o - 1], l = r[o];
- a += wu(s, l), i.push(a);
- }
- if (a === 0) {
- this._length = 0;
- return;
- }
- for (var o = 0; o < i.length; o++)
- i[o] /= a;
- this._offsets = i, this._length = a;
- }, e.prototype._getLineLength = function() {
- return this._length;
- }, e.prototype._updateSymbolPosition = function(n) {
- var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
- if (a) {
- var s = this._lastFrame, l;
- if (r < this._lastFramePercent) {
- var u = Math.min(s + 1, o - 1);
- for (l = u; l >= 0 && !(a[l] <= r); l--)
- ;
- l = Math.min(l, o - 2);
- } else {
- for (l = s; l < o && !(a[l] > r); l++)
- ;
- l = Math.min(l - 1, o - 2);
- }
- var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
- n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
- var h = n.__t < 1 ? d[0] - f[0] : f[0] - d[0], p = n.__t < 1 ? d[1] - f[1] : f[1] - d[1];
- n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
- }
- }, e;
- }(Mde)
- ), eot = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- this.polyline = !1, this.curveness = 0, this.segs = [];
- }
- return t;
- }()
- ), tot = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n) {
- var r = t.call(this, n) || this;
- return r._off = 0, r.hoverDataIdx = -1, r;
- }
- return e.prototype.reset = function() {
- this.notClear = !1, this._off = 0;
- }, e.prototype.getDefaultStyle = function() {
- return {
- stroke: "#000",
- fill: null
- };
- }, e.prototype.getDefaultShape = function() {
- return new eot();
- }, e.prototype.buildPath = function(n, r) {
- var i = r.segs, a = r.curveness, o;
- if (r.polyline)
- for (o = this._off; o < i.length; ) {
- var s = i[o++];
- if (s > 0) {
- n.moveTo(i[o++], i[o++]);
- for (var l = 1; l < s; l++)
- n.lineTo(i[o++], i[o++]);
- }
- }
- else
- for (o = this._off; o < i.length; ) {
- var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
- if (n.moveTo(u, c), a > 0) {
- var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
- n.quadraticCurveTo(h, p, f, d);
- } else
- n.lineTo(f, d);
- }
- this.incremental && (this._off = o, this.notClear = !0);
- }, e.prototype.findDataIndex = function(n, r) {
- var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
- if (i.polyline)
- for (var l = 0, u = 0; u < a.length; ) {
- var c = a[u++];
- if (c > 0)
- for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
- var p = a[u++], v = a[u++];
- if (Mc(f, d, p, v, s, n, r))
- return l;
- }
- l++;
- }
- else
- for (var l = 0, u = 0; u < a.length; ) {
- var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
- if (o > 0) {
- var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
- if (Zse(f, d, g, m, p, v, s, n, r))
- return l;
- } else if (Mc(f, d, p, v, s, n, r))
- return l;
- l++;
- }
- return -1;
- }, e.prototype.contain = function(n, r) {
- var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
- if (n = i[0], r = i[1], a.contain(n, r)) {
- var o = this.hoverDataIdx = this.findDataIndex(n, r);
- return o >= 0;
- }
- return this.hoverDataIdx = -1, !1;
- }, e.prototype.getBoundingRect = function() {
- var n = this._rect;
- if (!n) {
- for (var r = this.shape, i = r.segs, a = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < i.length; ) {
- var c = i[u++], f = i[u++];
- a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
- }
- n = this._rect = new bt(a, o, s, l);
- }
- return n;
- }, e;
- }(Dt)
- ), not = (
- /** @class */
- function() {
- function t() {
- this.group = new ct();
- }
- return t.prototype.updateData = function(e) {
- this._clear();
- var n = this._create();
- n.setShape({
- segs: e.getLayout("linesPoints")
- }), this._setCommon(n, e);
- }, t.prototype.incrementalPrepareUpdate = function(e) {
- this.group.removeAll(), this._clear();
- }, t.prototype.incrementalUpdate = function(e, n) {
- var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
- if (a && a.length < 2e4) {
- var o = a.length, s = new Float32Array(o + i.length);
- s.set(a), s.set(i, o), r.setShape({
- segs: s
- });
- } else {
- this._newAdded = [];
- var l = this._create();
- l.incremental = !0, l.setShape({
- segs: i
- }), this._setCommon(l, n), l.__startIndex = e.start;
- }
- }, t.prototype.remove = function() {
- this._clear();
- }, t.prototype.eachRendered = function(e) {
- this._newAdded[0] && e(this._newAdded[0]);
- }, t.prototype._create = function() {
- var e = new tot({
- cursor: "default",
- ignoreCoarsePointer: !0
- });
- return this._newAdded.push(e), this.group.add(e), e;
- }, t.prototype._setCommon = function(e, n, r) {
- var i = n.hostModel;
- e.setShape({
- polyline: i.get("polyline"),
- curveness: i.get(["lineStyle", "curveness"])
- }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
- var a = n.getVisual("style");
- a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
- var o = ft(e);
- o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
- o.dataIndex = null;
- var l = e.hoverDataIdx;
- l > 0 && (o.dataIndex = l + e.__startIndex);
- });
- }, t.prototype._clear = function() {
- this._newAdded = [], this.group.removeAll();
- }, t;
- }()
- ), Dde = {
- seriesType: "lines",
- plan: $m(),
- reset: function(t) {
- var e = t.coordinateSystem;
- if (!e) {
- process.env.NODE_ENV !== "production" && $i("The lines series must have a coordinate system.");
- return;
- }
- var n = t.get("polyline"), r = t.pipelineContext.large;
- return {
- progress: function(i, a) {
- var o = [];
- if (r) {
- var s = void 0, l = i.end - i.start;
- if (n) {
- for (var u = 0, c = i.start; c < i.end; c++)
- u += t.getLineCoordsCount(c);
- s = new Float32Array(l + u * 2);
- } else
- s = new Float32Array(l * 4);
- for (var f = 0, d = [], c = i.start; c < i.end; c++) {
- var h = t.getLineCoords(c, o);
- n && (s[f++] = h);
- for (var p = 0; p < h; p++)
- d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
- }
- a.setLayout("linesPoints", s);
- } else
- for (var c = i.start; c < i.end; c++) {
- var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
- if (n)
- for (var m = 0; m < h; m++)
- g.push(e.dataToPoint(o[m]));
- else {
- g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
- var y = v.get(["lineStyle", "curveness"]);
- +y && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * y, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * y]);
- }
- a.setItemLayout(c, g);
- }
- }
- };
- }
- }, rot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this._updateLineDraw(a, n), s = n.get("zlevel"), l = n.get(["effect", "trailLength"]), u = i.getZr(), c = u.painter.getType() === "svg";
- c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
- motionBlur: !1
- }), this._showEffect(n) && l > 0 && (c ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : u.configLayer(s, {
- motionBlur: !0,
- lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
- })), o.updateData(a);
- var f = n.get("clip", !0) && b1(n.coordinateSystem, !1, n);
- f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- var a = n.getData(), o = this._updateLineDraw(a, n);
- o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
- }, e.prototype.incrementalRender = function(n, r, i) {
- this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
- }, e.prototype.eachRendered = function(n) {
- this._lineDraw && this._lineDraw.eachRendered(n);
- }, e.prototype.updateTransform = function(n, r, i) {
- var a = n.getData(), o = n.pipelineContext;
- if (!this._finished || o.large || o.progressiveRender)
- return {
- update: !0
- };
- var s = Dde.reset(n, r, i);
- s.progress && s.progress({
- start: 0,
- end: a.count(),
- count: a.count()
- }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
- }, e.prototype._updateLineDraw = function(n, r) {
- var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
- return process.env.NODE_ENV !== "production" && a && l && console.warn("Large lines not support effect"), (!i || a !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (i && i.remove(), i = this._lineDraw = l ? new not() : new K3(o ? a ? Jat : Ide : a ? Mde : q3), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
- }, e.prototype._showEffect = function(n) {
- return !!n.get(["effect", "show"]);
- }, e.prototype._clearLayer = function(n) {
- var r = n.getZr(), i = r.painter.getType() === "svg";
- !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
- }, e.prototype.remove = function(n, r) {
- this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
- }, e.prototype.dispose = function(n, r) {
- this.remove(n, r);
- }, e.type = "lines", e;
- }(_n)
- ), iot = typeof Uint32Array > "u" ? Array : Uint32Array, aot = typeof Float64Array > "u" ? Array : Float64Array;
- function tX(t) {
- var e = t.data;
- e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), t.data = Ce(e, function(n) {
- var r = [n[0].coord, n[1].coord], i = {
- coords: r
- };
- return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), aP([i, n[0], n[1]]);
- }));
- }
- var oot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
- }
- return e.prototype.init = function(n) {
- n.data = n.data || [], tX(n);
- var r = this._processFlatCoordsArray(n.data);
- this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
- }, e.prototype.mergeOption = function(n) {
- if (tX(n), n.data) {
- var r = this._processFlatCoordsArray(n.data);
- this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
- }
- t.prototype.mergeOption.apply(this, arguments);
- }, e.prototype.appendData = function(n) {
- var r = this._processFlatCoordsArray(n.data);
- r.flatCoords && (this._flatCoords ? (this._flatCoords = Fb(this._flatCoords, r.flatCoords), this._flatCoordsOffset = Fb(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
- }, e.prototype._getCoordsFromItemModel = function(n) {
- var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
- if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
- throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
- return i;
- }, e.prototype.getLineCoordsCount = function(n) {
- return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
- }, e.prototype.getLineCoords = function(n, r) {
- if (this._flatCoordsOffset) {
- for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
- r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
- return a;
- } else {
- for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
- r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
- return s.length;
- }
- }, e.prototype._processFlatCoordsArray = function(n) {
- var r = 0;
- if (this._flatCoords && (r = this._flatCoords.length), Kt(n[0])) {
- for (var i = n.length, a = new iot(i), o = new aot(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
- u++;
- var f = n[c++];
- a[l++] = s + r, a[l++] = f;
- for (var d = 0; d < f; d++) {
- var h = n[c++], p = n[c++];
- if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
- throw new Error("Invalid data format.");
- }
- }
- return {
- flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
- flatCoords: o,
- count: u
- };
- }
- return {
- flatCoordsOffset: null,
- flatCoords: null,
- count: n.length
- };
- }, e.prototype.getInitialData = function(n, r) {
- if (process.env.NODE_ENV !== "production") {
- var i = gp.get(n.coordinateSystem);
- if (!i)
- throw new Error("Unknown coordinate system " + n.coordinateSystem);
- }
- var a = new Wi(["value"], this);
- return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
- if (o instanceof Array)
- return NaN;
- a.hasItemOption = !0;
- var c = o.value;
- if (c != null)
- return c instanceof Array ? c[u] : c;
- }), a;
- }, e.prototype.formatTooltip = function(n, r, i) {
- var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
- if (s)
- return s;
- var l = o.get("fromName"), u = o.get("toName"), c = [];
- return l != null && c.push(l), u != null && c.push(u), ti("nameValue", {
- name: c.join(" > ")
- });
- }, e.prototype.preventIncremental = function() {
- return !!this.get(["effect", "show"]);
- }, e.prototype.getProgressive = function() {
- var n = this.option.progressive;
- return n ?? (this.option.large ? 1e4 : this.get("progressive"));
- }, e.prototype.getProgressiveThreshold = function() {
- var n = this.option.progressiveThreshold;
- return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
- }, e.prototype.getZLevelKey = function() {
- var n = this.getModel("effect"), r = n.get("trailLength");
- return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
- }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
- coordinateSystem: "geo",
- // zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- // Cartesian coordinate system
- xAxisIndex: 0,
- yAxisIndex: 0,
- symbol: ["none", "none"],
- symbolSize: [10, 10],
- // Geo coordinate system
- geoIndex: 0,
- effect: {
- show: !1,
- period: 4,
- constantSpeed: 0,
- symbol: "circle",
- symbolSize: 3,
- loop: !0,
- trailLength: 0.2
- },
- large: !1,
- // Available when large is true
- largeThreshold: 2e3,
- polyline: !1,
- clip: !0,
- label: {
- show: !1,
- position: "end"
- // distance: 5,
- // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
- },
- lineStyle: {
- opacity: 0.5
- }
- }, e;
- }(Tn)
- );
- function US(t) {
- return t instanceof Array || (t = [t, t]), t;
- }
- var sot = {
- seriesType: "lines",
- reset: function(t) {
- var e = US(t.get("symbol")), n = US(t.get("symbolSize")), r = t.getData();
- r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
- function i(a, o) {
- var s = a.getItemModel(o), l = US(s.getShallow("symbol", !0)), u = US(s.getShallow("symbolSize", !0));
- l[0] && a.setItemVisual(o, "fromSymbol", l[0]), l[1] && a.setItemVisual(o, "toSymbol", l[1]), u[0] && a.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && a.setItemVisual(o, "toSymbolSize", u[1]);
- }
- return {
- dataEach: r.hasItemOption ? i : null
- };
- }
- };
- function lot(t) {
- t.registerChartView(rot), t.registerSeriesModel(oot), t.registerLayout(Dde), t.registerVisual(sot);
- }
- var uot = 256, cot = (
- /** @class */
- function() {
- function t() {
- this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
- inRange: null,
- outOfRange: null
- };
- var e = Hs.createCanvas();
- this.canvas = e;
- }
- return t.prototype.update = function(e, n, r, i, a, o) {
- var s = this._getBrush(), l = this._getGradient(a, "inRange"), u = this._getGradient(a, "outOfRange"), c = this.pointSize + this.blurSize, f = this.canvas, d = f.getContext("2d"), h = e.length;
- f.width = n, f.height = r;
- for (var p = 0; p < h; ++p) {
- var v = e[p], g = v[0], m = v[1], y = v[2], _ = i(y);
- d.globalAlpha = _, d.drawImage(s, g - c, m - c);
- }
- if (!f.width || !f.height)
- return f;
- for (var O = d.getImageData(0, 0, f.width, f.height), S = O.data, x = 0, C = S.length, P = this.minOpacity, $ = this.maxOpacity, T = $ - P; x < C; ) {
- var _ = S[x + 3] / 256, E = Math.floor(_ * (uot - 1)) * 4;
- if (_ > 0) {
- var M = o(_) ? l : u;
- _ > 0 && (_ = _ * T + P), S[x++] = M[E], S[x++] = M[E + 1], S[x++] = M[E + 2], S[x++] = M[E + 3] * _ * 256;
- } else
- x += 4;
- }
- return d.putImageData(O, 0, 0), f;
- }, t.prototype._getBrush = function() {
- var e = this._brushCanvas || (this._brushCanvas = Hs.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
- e.width = r, e.height = r;
- var i = e.getContext("2d");
- return i.clearRect(0, 0, r, r), i.shadowOffsetX = r, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-n, n, this.pointSize, 0, Math.PI * 2, !0), i.closePath(), i.fill(), e;
- }, t.prototype._getGradient = function(e, n) {
- for (var r = this._gradientPixels, i = r[n] || (r[n] = new Uint8ClampedArray(256 * 4)), a = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
- e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
- return i;
- }, t;
- }()
- );
- function fot(t, e, n) {
- var r = t[1] - t[0];
- e = Ce(e, function(o) {
- return {
- interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
- };
- });
- var i = e.length, a = 0;
- return function(o) {
- var s;
- for (s = a; s < i; s++) {
- var l = e[s].interval;
- if (l[0] <= o && o <= l[1]) {
- a = s;
- break;
- }
- }
- if (s === i)
- for (s = a - 1; s >= 0; s--) {
- var l = e[s].interval;
- if (l[0] <= o && o <= l[1]) {
- a = s;
- break;
- }
- }
- return s >= 0 && s < i && n[s];
- };
- }
- function dot(t, e) {
- var n = t[1] - t[0];
- return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
- return r >= e[0] && r <= e[1];
- };
- }
- function nX(t) {
- var e = t.dimensions;
- return e[0] === "lng" && e[1] === "lat";
- }
- var hot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a;
- if (r.eachComponent("visualMap", function(s) {
- s.eachTargetSeries(function(l) {
- l === n && (a = s);
- });
- }), process.env.NODE_ENV !== "production" && !a)
- throw new Error("Heatmap must use with visualMap");
- this._progressiveEls = null, this.group.removeAll();
- var o = n.coordinateSystem;
- o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : nX(o) && this._renderOnGeo(o, n, a, i);
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- this.group.removeAll();
- }, e.prototype.incrementalRender = function(n, r, i, a) {
- var o = r.coordinateSystem;
- o && (nX(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
- }, e.prototype.eachRendered = function(n) {
- Nf(this._progressiveEls || this.group, n);
- }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
- var s = n.coordinateSystem, l = yp(s, "cartesian2d"), u, c, f, d;
- if (l) {
- var h = s.getAxis("x"), p = s.getAxis("y");
- if (process.env.NODE_ENV !== "production") {
- if (!(h.type === "category" && p.type === "category"))
- throw new Error("Heatmap on cartesian must have two category axes");
- if (!(h.onBand && p.onBand))
- throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
- }
- u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
- }
- for (var v = this.group, g = n.getData(), m = n.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = n.getModel(["blur", "itemStyle"]).getItemStyle(), _ = n.getModel(["select", "itemStyle"]).getItemStyle(), O = n.get(["itemStyle", "borderRadius"]), S = ei(n), x = n.getModel("emphasis"), C = x.get("focus"), P = x.get("blurScope"), $ = x.get("disabled"), T = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], E = i; E < a; E++) {
- var M = void 0, R = g.getItemVisual(E, "style");
- if (l) {
- var N = g.get(T[0], E), I = g.get(T[1], E);
- if (isNaN(g.get(T[2], E)) || isNaN(N) || isNaN(I) || N < f[0] || N > f[1] || I < d[0] || I > d[1])
- continue;
- var B = s.dataToPoint([N, I]);
- M = new Zt({
- shape: {
- x: B[0] - u / 2,
- y: B[1] - c / 2,
- width: u,
- height: c
- },
- style: R
- });
- } else {
- if (isNaN(g.get(T[1], E)))
- continue;
- M = new Zt({
- z2: 1,
- shape: s.dataToRect([g.get(T[0], E)]).contentShape,
- style: R
- });
- }
- if (g.hasItemOption) {
- var Q = g.getItemModel(E), W = Q.getModel("emphasis");
- m = W.getModel("itemStyle").getItemStyle(), y = Q.getModel(["blur", "itemStyle"]).getItemStyle(), _ = Q.getModel(["select", "itemStyle"]).getItemStyle(), O = Q.get(["itemStyle", "borderRadius"]), C = W.get("focus"), P = W.get("blurScope"), $ = W.get("disabled"), S = ei(Q);
- }
- M.shape.r = O;
- var H = n.getRawValue(E), U = "-";
- H && H[2] != null && (U = H[2] + ""), Ei(M, S, {
- labelFetcher: n,
- labelDataIndex: E,
- defaultOpacity: R.opacity,
- defaultText: U
- }), M.ensureState("emphasis").style = m, M.ensureState("blur").style = y, M.ensureState("select").style = _, ur(M, C, P, $), M.incremental = o, o && (M.states.emphasis.hoverLayer = !0), v.add(M), g.setItemGraphicEl(E, M), this._progressiveEls && this._progressiveEls.push(M);
- }
- }, e.prototype._renderOnGeo = function(n, r, i, a) {
- var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new cot();
- u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
- var c = n.getViewRect().clone(), f = n.getRoamTransform();
- c.applyTransform(f);
- var d = Math.max(c.x, 0), h = Math.max(c.y, 0), p = Math.min(c.width + c.x, a.getWidth()), v = Math.min(c.height + c.y, a.getHeight()), g = p - d, m = v - h, y = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], _ = l.mapArray(y, function(C, P, $) {
- var T = n.dataToPoint([C, P]);
- return T[0] -= d, T[1] -= h, T.push($), T;
- }), O = i.getExtent(), S = i.type === "visualMap.continuous" ? dot(O, i.option.range) : fot(O, i.getPieceList(), i.option.selected);
- u.update(_, g, m, o.color.getNormalizer(), {
- inRange: o.color.getColorMapper(),
- outOfRange: s.color.getColorMapper()
- }, S);
- var x = new ci({
- style: {
- width: g,
- height: m,
- x: d,
- y: h,
- image: u.canvas
- },
- silent: !0
- });
- this.group.add(x);
- }, e.type = "heatmap", e;
- }(_n)
- ), pot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- return Yl(null, this, {
- generateCoord: "value"
- });
- }, e.prototype.preventIncremental = function() {
- var n = gp.get(this.get("coordinateSystem"));
- if (n && n.dimensions)
- return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
- }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
- coordinateSystem: "cartesian2d",
- // zlevel: 0,
- z: 2,
- // Cartesian coordinate system
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- // Geo coordinate system
- geoIndex: 0,
- blurSize: 30,
- pointSize: 20,
- maxOpacity: 1,
- minOpacity: 0,
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- }
- }, e;
- }(Tn)
- );
- function vot(t) {
- t.registerChartView(hot), t.registerSeriesModel(pot);
- }
- var got = ["itemStyle", "borderWidth"], rX = [{
- xy: "x",
- wh: "width",
- index: 0,
- posDesc: ["left", "right"]
- }, {
- xy: "y",
- wh: "height",
- index: 1,
- posDesc: ["top", "bottom"]
- }], wI = new ic(), mot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
- ecSize: {
- width: i.getWidth(),
- height: i.getHeight()
- },
- seriesModel: n,
- coordSys: l,
- coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
- isHorizontal: c,
- valueDim: rX[+c],
- categoryDim: rX[1 - +c]
- };
- o.diff(s).add(function(p) {
- if (o.hasValue(p)) {
- var v = aX(o, p), g = iX(o, p, v, d), m = oX(o, d, g);
- o.setItemGraphicEl(p, m), a.add(m), lX(m, d, g);
- }
- }).update(function(p, v) {
- var g = s.getItemGraphicEl(v);
- if (!o.hasValue(p)) {
- a.remove(g);
- return;
- }
- var m = aX(o, p), y = iX(o, p, m, d), _ = zde(o, y);
- g && _ !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? wot(g, d, y) : g = oX(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), lX(g, d, y);
- }).remove(function(p) {
- var v = s.getItemGraphicEl(p);
- v && sX(s, p, v.__pictorialSymbolMeta.animationModel, v);
- }).execute();
- var h = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
- return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
- }, e.prototype.remove = function(n, r) {
- var i = this.group, a = this._data;
- n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
- sX(a, ft(o).dataIndex, n, o);
- }) : i.removeAll();
- }, e.type = "pictorialBar", e;
- }(_n)
- );
- function iX(t, e, n, r) {
- var i = t.getItemLayout(e), a = n.get("symbolRepeat"), o = n.get("symbolClip"), s = n.get("symbolPosition") || "start", l = n.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, c = n.get("symbolPatternSize") || 2, f = n.isAnimationEnabled(), d = {
- dataIndex: e,
- layout: i,
- itemModel: n,
- symbolType: t.getItemVisual(e, "symbol") || "circle",
- style: t.getItemVisual(e, "style"),
- symbolClip: o,
- symbolRepeat: a,
- symbolRepeatDirection: n.get("symbolRepeatDirection"),
- symbolPatternSize: c,
- rotation: u,
- animationModel: f ? n : null,
- hoverScale: f && n.get(["emphasis", "scale"]),
- z2: n.getShallow("z", !0) || 0
- };
- yot(n, a, i, r, d), bot(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), _ot(n, d.symbolScale, u, r, d);
- var h = d.symbolSize, p = mp(n.get("symbolOffset"), h);
- return Oot(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
- }
- function yot(t, e, n, r, i) {
- var a = r.valueDim, o = t.get("symbolBoundingData"), s = r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(n[a.wh] <= 0), c;
- if (Se(o)) {
- var f = [CI(s, o[0]) - l, CI(s, o[1]) - l];
- f[1] < f[0] && f.reverse(), c = f[u];
- } else o != null ? c = CI(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
- i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
- }
- function CI(t, e) {
- return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
- }
- function bot(t, e, n, r, i, a, o, s, l, u) {
- var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
- Se(h) ? p = h.slice() : h == null ? p = ["100%", "100%"] : p = [h, h], p[f.index] = ze(p[f.index], d), p[c.index] = ze(p[c.index], r ? d : Math.abs(a)), u.symbolSize = p;
- var v = u.symbolScale = [p[0] / s, p[1] / s];
- v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
- }
- function _ot(t, e, n, r, i) {
- var a = t.get(got) || 0;
- a && (wI.attr({
- scaleX: e[0],
- scaleY: e[1],
- rotation: n
- }), wI.updateTransform(), a /= wI.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
- }
- function Oot(t, e, n, r, i, a, o, s, l, u, c, f) {
- var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
- if (r) {
- var m = Math.abs(l), y = Or(t.get("symbolMargin"), "15%") + "", _ = !1;
- y.lastIndexOf("!") === y.length - 1 && (_ = !0, y = y.slice(0, y.length - 1));
- var O = ze(y, e[h.index]), S = Math.max(v + O * 2, 0), x = _ ? 0 : O * 2, C = hP(r), P = C ? r : uX((m + x) / S), $ = m - P * v;
- O = $ / 2 / (_ ? P : Math.max(P - 1, 1)), S = v + O * 2, x = _ ? 0 : O * 2, !C && r !== "fixed" && (P = u ? uX((Math.abs(u) + x) / S) : 0), g = P * S - x, f.repeatTimes = P, f.symbolMargin = O;
- }
- var T = p * (g / 2), E = f.pathPosition = [];
- E[d.index] = n[d.wh] / 2, E[h.index] = o === "start" ? T : o === "end" ? l - T : l / 2, a && (E[0] += a[0], E[1] += a[1]);
- var M = f.bundlePosition = [];
- M[d.index] = n[d.xy], M[h.index] = n[h.xy];
- var R = f.barRectShape = _e({}, n);
- R[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(E[h.index] + T)), R[d.wh] = n[d.wh];
- var N = f.clipShape = {};
- N[d.xy] = -n[d.xy], N[d.wh] = c.ecSize[d.wh], N[h.xy] = 0, N[h.wh] = n[h.wh];
- }
- function Rde(t) {
- var e = t.symbolPatternSize, n = wr(
- // Consider texture img, make a big size.
- t.symbolType,
- -e / 2,
- -e / 2,
- e,
- e
- );
- return n.attr({
- culling: !0
- }), n.type !== "image" && n.setStyle({
- strokeNoScale: !0
- }), n;
- }
- function kde(t, e, n, r) {
- var i = t.__pictorialBundle, a = n.symbolSize, o = n.valueLineWidth, s = n.pathPosition, l = e.valueDim, u = n.repeatTimes || 0, c = 0, f = a[e.valueDim.index] + o + n.symbolMargin * 2;
- for (o6(t, function(v) {
- v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? tg(v, null, p(c), n, r) : tg(v, null, {
- scaleX: 0,
- scaleY: 0
- }, n, r, function() {
- i.remove(v);
- }), c++;
- }); c < u; c++) {
- var d = Rde(n);
- d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
- var h = p(c);
- tg(d, {
- x: h.x,
- y: h.y,
- scaleX: 0,
- scaleY: 0
- }, {
- scaleX: h.scaleX,
- scaleY: h.scaleY,
- rotation: h.rotation
- }, n, r);
- }
- function p(v) {
- var g = s.slice(), m = n.pxSign, y = v;
- return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
- x: g[0],
- y: g[1],
- scaleX: n.symbolScale[0],
- scaleY: n.symbolScale[1],
- rotation: n.rotation
- };
- }
- }
- function Lde(t, e, n, r) {
- var i = t.__pictorialBundle, a = t.__pictorialMainPath;
- a ? tg(a, null, {
- x: n.pathPosition[0],
- y: n.pathPosition[1],
- scaleX: n.symbolScale[0],
- scaleY: n.symbolScale[1],
- rotation: n.rotation
- }, n, r) : (a = t.__pictorialMainPath = Rde(n), i.add(a), tg(a, {
- x: n.pathPosition[0],
- y: n.pathPosition[1],
- scaleX: 0,
- scaleY: 0,
- rotation: n.rotation
- }, {
- scaleX: n.symbolScale[0],
- scaleY: n.symbolScale[1]
- }, n, r));
- }
- function Nde(t, e, n) {
- var r = _e({}, e.barRectShape), i = t.__pictorialBarRect;
- i ? tg(i, null, {
- shape: r
- }, e, n) : (i = t.__pictorialBarRect = new Zt({
- z2: 2,
- shape: r,
- silent: !0,
- style: {
- stroke: "transparent",
- fill: "transparent",
- lineWidth: 0
- }
- }), i.disableMorphing = !0, t.add(i));
- }
- function Bde(t, e, n, r) {
- if (n.symbolClip) {
- var i = t.__pictorialClipPath, a = _e({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
- if (i)
- tn(i, {
- shape: a
- }, s, l);
- else {
- a[o.wh] = 0, i = new Zt({
- shape: a
- }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
- var u = {};
- u[o.wh] = n.clipShape[o.wh], hp[r ? "updateProps" : "initProps"](i, {
- shape: u
- }, s, l);
- }
- }
- }
- function aX(t, e) {
- var n = t.getItemModel(e);
- return n.getAnimationDelayParams = Sot, n.isAnimationEnabled = xot, n;
- }
- function Sot(t) {
- return {
- index: t.__pictorialAnimationIndex,
- count: t.__pictorialRepeatTimes
- };
- }
- function xot() {
- return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
- }
- function oX(t, e, n, r) {
- var i = new ct(), a = new ct();
- return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? kde(i, e, n) : Lde(i, e, n), Nde(i, n, r), Bde(i, e, n, r), i.__pictorialShapeStr = zde(t, n), i.__pictorialSymbolMeta = n, i;
- }
- function wot(t, e, n) {
- var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
- tn(a, {
- x: n.bundlePosition[0],
- y: n.bundlePosition[1]
- }, r, i), n.symbolRepeat ? kde(t, e, n, !0) : Lde(t, e, n, !0), Nde(t, n, !0), Bde(t, e, n, !0);
- }
- function sX(t, e, n, r) {
- var i = r.__pictorialBarRect;
- i && i.removeTextContent();
- var a = [];
- o6(r, function(o) {
- a.push(o);
- }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), F(a, function(o) {
- _f(o, {
- scaleX: 0,
- scaleY: 0
- }, n, e, function() {
- r.parent && r.parent.remove(r);
- });
- }), t.setItemGraphicEl(e, null);
- }
- function zde(t, e) {
- return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
- }
- function o6(t, e, n) {
- F(t.__pictorialBundle.children(), function(r) {
- r !== t.__pictorialBarRect && e.call(n, r);
- });
- }
- function tg(t, e, n, r, i, a) {
- e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && hp[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
- }
- function lX(t, e, n) {
- var r = n.dataIndex, i = n.itemModel, a = i.getModel("emphasis"), o = a.getModel("itemStyle").getItemStyle(), s = i.getModel(["blur", "itemStyle"]).getItemStyle(), l = i.getModel(["select", "itemStyle"]).getItemStyle(), u = i.getShallow("cursor"), c = a.get("focus"), f = a.get("blurScope"), d = a.get("scale");
- o6(t, function(v) {
- if (v instanceof ci) {
- var g = v.style;
- v.useStyle(_e({
- // TODO other properties like dx, dy ?
- image: g.image,
- x: g.x,
- y: g.y,
- width: g.width,
- height: g.height
- }, n.style));
- } else
- v.useStyle(n.style);
- var m = v.ensureState("emphasis");
- m.style = o, d && (m.scaleX = v.scaleX * 1.1, m.scaleY = v.scaleY * 1.1), v.ensureState("blur").style = s, v.ensureState("select").style = l, u && (v.cursor = u), v.z2 = n.z2;
- });
- var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
- p.ignoreClip = !0, Ei(p, ei(i), {
- labelFetcher: e.seriesModel,
- labelDataIndex: r,
- defaultText: jg(e.seriesModel.getData(), r),
- inheritColor: n.style.fill,
- defaultOpacity: n.style.opacity,
- defaultOutsidePosition: h
- }), ur(t, c, f, a.get("disabled"));
- }
- function uX(t) {
- var e = Math.round(t);
- return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
- }
- var Cot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
- }
- return e.prototype.getInitialData = function(n) {
- return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
- }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Bf(a_.defaultOption, {
- symbol: "circle",
- symbolSize: null,
- symbolRotate: null,
- symbolPosition: null,
- symbolOffset: null,
- symbolMargin: null,
- symbolRepeat: !1,
- symbolRepeatDirection: "end",
- symbolClip: !1,
- symbolBoundingData: null,
- symbolPatternSize: 400,
- barGap: "-100%",
- // Pictorial bar do not clip by default because in many cases
- // xAxis and yAxis are not displayed and it's expected not to clip
- clip: !1,
- // z can be set in data item, which is z2 actually.
- // Disable progressive
- progressive: 0,
- emphasis: {
- // By default pictorialBar do not hover scale. Hover scale is not suitable
- // for the case that both has foreground and background.
- scale: !1
- },
- select: {
- itemStyle: {
- borderColor: "#212121"
- }
- }
- }), e;
- }(a_)
- );
- function Tot(t) {
- t.registerChartView(mot), t.registerSeriesModel(Cot), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, vt(Oce, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Sce("pictorialBar"));
- }
- var Pot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._layers = [], n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
- s.x = 0, s.y = c.y + f[0];
- function d(g) {
- return g.name;
- }
- var h = new Qu(this._layersSeries || [], l, d, d), p = [];
- h.add(We(v, this, "add")).update(We(v, this, "update")).remove(We(v, this, "remove")).execute();
- function v(g, m, y) {
- var _ = o._layers;
- if (g === "remove") {
- s.remove(_[m]);
- return;
- }
- for (var O = [], S = [], x, C = l[m].indices, P = 0; P < C.length; P++) {
- var $ = a.getItemLayout(C[P]), T = $.x, E = $.y0, M = $.y;
- O.push(T, E), S.push(T, E + M), x = a.getItemVisual(C[P], "style");
- }
- var R, N = a.getItemLayout(C[0]), I = n.getModel("label"), B = I.get("margin"), Q = n.getModel("emphasis");
- if (g === "add") {
- var W = p[m] = new ct();
- R = new cfe({
- shape: {
- points: O,
- stackedOnPoints: S,
- smooth: 0.4,
- stackedOnSmooth: 0.4,
- smoothConstraint: !1
- },
- z2: 0
- }), W.add(R), s.add(W), n.isAnimationEnabled() && R.setClipPath($ot(R.getBoundingRect(), n, function() {
- R.removeClipPath();
- }));
- } else {
- var W = _[y];
- R = W.childAt(0), s.add(W), p[m] = W, tn(R, {
- shape: {
- points: O,
- stackedOnPoints: S
- }
- }, n), Zs(R);
- }
- Ei(R, ei(n), {
- labelDataIndex: C[P - 1],
- defaultText: a.getName(C[P - 1]),
- inheritColor: x.fill
- }, {
- normal: {
- verticalAlign: "middle"
- // align: 'right'
- }
- }), R.setTextConfig({
- position: null,
- local: !0
- });
- var H = R.getTextContent();
- H && (H.x = N.x - B, H.y = N.y0 + N.y / 2), R.useStyle(x), a.setItemGraphicEl(m, R), Ai(R, n), ur(R, Q.get("focus"), Q.get("blurScope"), Q.get("disabled"));
- }
- this._layersSeries = l, this._layers = p;
- }, e.type = "themeRiver", e;
- }(_n)
- );
- function $ot(t, e, n) {
- var r = new Zt({
- shape: {
- x: t.x - 10,
- y: t.y - 10,
- width: 0,
- height: t.height + 20
- }
- });
- return Vn(r, {
- shape: {
- x: t.x - 50,
- width: t.width + 100,
- height: t.height + 20
- }
- }, e, n), r;
- }
- var TI = 2, Aot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n) {
- t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this));
- }, e.prototype.fixData = function(n) {
- var r = n.length, i = {}, a = xk(n, function(d) {
- return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
- }), o = [];
- a.buckets.each(function(d, h) {
- o.push({
- name: h,
- dataList: d
- });
- });
- for (var s = o.length, l = 0; l < s; ++l) {
- for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
- var f = o[l].dataList[c][0] + "";
- i[f] = l;
- }
- for (var f in i)
- i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
- }
- return n;
- }, e.prototype.getInitialData = function(n, r) {
- for (var i = this.getReferringComponents("singleAxis", Er).models[0], a = i.get("type"), o = yn(n.data, function(p) {
- return p[2] !== void 0;
- }), s = this.fixData(o || []), l = [], u = this.nameMap = Ze(), c = 0, f = 0; f < s.length; ++f)
- l.push(s[f][TI]), u.get(s[f][TI]) || (u.set(s[f][TI], c), c++);
- var d = Mm(s, {
- coordDimensions: ["single"],
- dimensionsDefine: [{
- name: "time",
- type: YC(a)
- }, {
- name: "value",
- type: "float"
- }, {
- name: "name",
- type: "ordinal"
- }],
- encodeDefine: {
- single: 0,
- value: 1,
- itemName: 2
- }
- }).dimensions, h = new Wi(d, this);
- return h.initData(s), h;
- }, e.prototype.getLayerSeries = function() {
- for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
- i[a] = a;
- var o = n.mapDimension("single"), s = xk(i, function(u) {
- return n.get("name", u);
- }), l = [];
- return s.buckets.each(function(u, c) {
- u.sort(function(f, d) {
- return n.get(o, f) - n.get(o, d);
- }), l.push({
- name: c,
- indices: u
- });
- }), l;
- }, e.prototype.getAxisTooltipData = function(n, r, i) {
- Se(n) || (n = n ? [n] : []);
- for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
- for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
- var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
- g <= f && (u = v, f = g, d = o[c].indices[p]);
- }
- s.push(d);
- }
- return {
- dataIndices: s,
- nestestValue: u
- };
- }, e.prototype.formatTooltip = function(n, r, i) {
- var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
- return ti("nameValue", {
- name: o,
- value: s
- });
- }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
- // zlevel: 0,
- z: 2,
- colorBy: "data",
- coordinateSystem: "singleAxis",
- // gap in axis's orthogonal orientation
- boundaryGap: ["10%", "10%"],
- // legendHoverLink: true,
- singleAxisIndex: 0,
- animationEasing: "linear",
- label: {
- margin: 4,
- show: !0,
- position: "left",
- fontSize: 11
- },
- emphasis: {
- label: {
- show: !0
- }
- }
- }, e;
- }(Tn)
- );
- function Eot(t, e) {
- t.eachSeriesByType("themeRiver", function(n) {
- var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
- a.rect = o;
- var s = n.get("boundaryGap"), l = i.getAxis();
- if (a.boundaryGap = s, l.orient === "horizontal") {
- s[0] = ze(s[0], o.height), s[1] = ze(s[1], o.height);
- var u = o.height - s[0] - s[1];
- cX(r, n, u);
- } else {
- s[0] = ze(s[0], o.width), s[1] = ze(s[1], o.width);
- var c = o.width - s[0] - s[1];
- cX(r, n, c);
- }
- r.setLayout("layoutInfo", a);
- });
- }
- function cX(t, e, n) {
- if (t.count())
- for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = Ce(i, function(g) {
- return Ce(g.indices, function(m) {
- var y = r.dataToPoint(t.get(a, m));
- return y[1] = t.get(o, m), y;
- });
- }), l = Mot(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
- h = u[p] * c, t.setItemLayout(i[0].indices[p], {
- layerIndex: 0,
- x: s[0][p][0],
- y0: h,
- y: s[0][p][1] * c
- });
- for (var v = 1; v < f; ++v)
- h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
- layerIndex: v,
- x: s[v][p][0],
- y0: h,
- y: s[v][p][1] * c
- });
- }
- }
- function Mot(t) {
- for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
- for (var s = 0, l = 0; l < e; ++l)
- s += t[l][o][1];
- s > a && (a = s), r.push(s);
- }
- for (var u = 0; u < n; ++u)
- i[u] = (a - r[u]) / 2;
- a = 0;
- for (var c = 0; c < n; ++c) {
- var f = r[c] + i[c];
- f > a && (a = f);
- }
- return {
- y0: i,
- max: a
- };
- }
- function Iot(t) {
- t.registerChartView(Pot), t.registerSeriesModel(Aot), t.registerLayout(Eot), t.registerProcessor(O1("themeRiver"));
- }
- var Dot = 2, Rot = 4, fX = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a) {
- var o = t.call(this) || this;
- o.z2 = Dot, o.textConfig = {
- inside: !0
- }, ft(o).seriesIndex = r.seriesIndex;
- var s = new jt({
- z2: Rot,
- silent: n.getModel().get(["label", "silent"])
- });
- return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
- }
- return e.prototype.updateData = function(n, r, i, a, o) {
- this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
- var s = this;
- ft(s).dataIndex = r.dataIndex;
- var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = _e({}, c);
- f.label = null;
- var d = r.getVisual("style");
- d.lineJoin = "bevel";
- var h = r.getVisual("decal");
- h && (d.decal = Gg(h, o));
- var p = ch(l.getModel("itemStyle"), f, !0);
- _e(f, p), F(da, function(y) {
- var _ = s.ensureState(y), O = l.getModel([y, "itemStyle"]);
- _.style = O.getItemStyle();
- var S = ch(O, f);
- S && (_.shape = S);
- }), n ? (s.setShape(f), s.shape.r = c.r0, Vn(s, {
- shape: {
- r: c.r
- }
- }, i, r.dataIndex)) : (tn(s, {
- shape: f
- }, i), Zs(s)), s.useStyle(d), this._updateLabel(i);
- var v = l.getShallow("cursor");
- v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
- var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
- ur(this, m, u.get("blurScope"), u.get("disabled"));
- }, e.prototype._updateLabel = function(n) {
- var r = this, i = this.node.getModel(), a = i.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), c = Math.sin(l), f = this, d = f.getTextContent(), h = this.node.dataIndex, p = a.get("minAngle") / 180 * Math.PI, v = a.get("show") && !(p != null && Math.abs(s) < p);
- d.ignore = !v, F(Ub, function(m) {
- var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), _ = m === "normal", O = _ ? d : d.ensureState(m), S = n.getFormattedLabel(h, m);
- _ && (S = S || r.node.name), O.style = Mn(y, {}, null, m !== "normal", !0), S && (O.style.text = S);
- var x = y.get("show");
- x != null && !_ && (O.ignore = !x);
- var C = g(y, "position"), P = _ ? f : f.states[m], $ = P.style.fill;
- P.textConfig = {
- outsideFill: y.get("color") === "inherit" ? $ : null,
- inside: C !== "outside"
- };
- var T, E = g(y, "distance") || 0, M = g(y, "align"), R = g(y, "rotate"), N = Math.PI * 0.5, I = Math.PI * 1.5, B = oo(R === "tangential" ? Math.PI / 2 - l : l), Q = B > N && !Vg(B - N) && B < I;
- C === "outside" ? (T = o.r + E, M = Q ? "right" : "left") : !M || M === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? T = 0 : T = (o.r + o.r0) / 2, M = "center") : M === "left" ? (T = o.r0 + E, M = Q ? "right" : "left") : M === "right" && (T = o.r - E, M = Q ? "left" : "right"), O.style.align = M, O.style.verticalAlign = g(y, "verticalAlign") || "middle", O.x = T * u + o.cx, O.y = T * c + o.cy;
- var W = 0;
- R === "radial" ? W = oo(-l) + (Q ? Math.PI : 0) : R === "tangential" ? W = oo(Math.PI / 2 - l) + (Q ? Math.PI : 0) : Kt(R) && (W = R * Math.PI / 180), O.rotation = oo(W);
- });
- function g(m, y) {
- var _ = m.get(y);
- return _ ?? a.get(y);
- }
- d.dirtyStyle();
- }, e;
- }(ha)
- ), wL = "sunburstRootToNode", dX = "sunburstHighlight", kot = "sunburstUnhighlight";
- function Lot(t) {
- t.registerAction({
- type: wL,
- update: "updateView"
- }, function(e, n) {
- n.eachComponent({
- mainType: "series",
- subType: "sunburst",
- query: e
- }, r);
- function r(i, a) {
- var o = s_(e, [wL], i);
- if (o) {
- var s = i.getViewRoot();
- s && (e.direction = j3(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
- }
- }
- }), t.registerAction({
- type: dX,
- update: "none"
- }, function(e, n, r) {
- e = _e({}, e), n.eachComponent({
- mainType: "series",
- subType: "sunburst",
- query: e
- }, i);
- function i(a) {
- var o = s_(e, [dX], a);
- o && (e.dataIndex = o.node.dataIndex);
- }
- process.env.NODE_ENV !== "production" && _r("sunburstHighlight", "highlight"), r.dispatchAction(_e(e, {
- type: "highlight"
- }));
- }), t.registerAction({
- type: kot,
- update: "updateView"
- }, function(e, n, r) {
- e = _e({}, e), process.env.NODE_ENV !== "production" && _r("sunburstUnhighlight", "downplay"), r.dispatchAction(_e(e, {
- type: "downplay"
- }));
- });
- }
- var Not = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- var o = this;
- this.seriesModel = n, this.api = i, this.ecModel = r;
- var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
- u.eachNode(function(y) {
- d.push(y);
- });
- var h = this._oldChildren || [];
- p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
- function p(y, _) {
- if (y.length === 0 && _.length === 0)
- return;
- new Qu(_, y, O, O).add(S).update(S).remove(vt(S, null)).execute();
- function O(x) {
- return x.getId();
- }
- function S(x, C) {
- var P = x == null ? null : y[x], $ = C == null ? null : _[C];
- v(P, $);
- }
- }
- function v(y, _) {
- if (!f && y && !y.getValue() && (y = null), y !== l && _ !== l) {
- if (_ && _.piece)
- y ? (_.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, _.piece)) : g(_);
- else if (y) {
- var O = new fX(y, n, r, i);
- c.add(O), s.setItemGraphicEl(y.dataIndex, O);
- }
- }
- }
- function g(y) {
- y && y.piece && (c.remove(y.piece), y.piece = null);
- }
- function m(y, _) {
- _.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new fX(y, n, r, i), c.add(o.virtualPiece)), _.piece.off("click"), o.virtualPiece.on("click", function(O) {
- o._rootToNode(_.parentNode);
- })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
- }
- }, e.prototype._initEvents = function() {
- var n = this;
- this.group.off("click"), this.group.on("click", function(r) {
- var i = !1, a = n.seriesModel.getViewRoot();
- a.eachNode(function(o) {
- if (!i && o.piece && o.piece === r.target) {
- var s = o.getModel().get("nodeClick");
- if (s === "rootToNode")
- n._rootToNode(o);
- else if (s === "link") {
- var l = o.getModel(), u = l.get("link");
- if (u) {
- var c = l.get("target", !0) || "_blank";
- BC(u, c);
- }
- }
- i = !0;
- }
- });
- });
- }, e.prototype._rootToNode = function(n) {
- n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
- type: wL,
- from: this.uid,
- seriesId: this.seriesModel.id,
- targetNode: n
- });
- }, e.prototype.containPoint = function(n, r) {
- var i = r.getData(), a = i.getItemLayout(0);
- if (a) {
- var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
- return l <= a.r && l >= a.r0;
- }
- }, e.type = "sunburst", e;
- }(_n)
- ), Bot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.ignoreStyleOnData = !0, n;
- }
- return e.prototype.getInitialData = function(n, r) {
- var i = {
- name: n.name,
- children: n.data
- };
- Vde(i);
- var a = this._levelModels = Ce(n.levels || [], function(l) {
- return new wn(l, this, r);
- }, this), o = G3.createTree(i, this, s);
- function s(l) {
- l.wrapMethod("getItemModel", function(u, c) {
- var f = o.getNodeByDataIndex(c), d = a[f.depth];
- return d && (u.parentModel = d), u;
- });
- }
- return o.data;
- }, e.prototype.optionUpdated = function() {
- this.resetViewRoot();
- }, e.prototype.getDataParams = function(n) {
- var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
- return r.treePathInfo = GP(i, this), r;
- }, e.prototype.getLevelModel = function(n) {
- return this._levelModels && this._levelModels[n.depth];
- }, e.prototype.getViewRoot = function() {
- return this._viewRoot;
- }, e.prototype.resetViewRoot = function(n) {
- n ? this._viewRoot = n : n = this._viewRoot;
- var r = this.getRawData().tree.root;
- (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
- }, e.prototype.enableAriaDecal = function() {
- Gfe(this);
- }, e.type = "series.sunburst", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- // 默认全局居中
- center: ["50%", "50%"],
- radius: [0, "75%"],
- // 默认顺时针
- clockwise: !0,
- startAngle: 90,
- // 最小角度改为0
- minAngle: 0,
- // If still show when all data zero.
- stillShowZeroSum: !0,
- // 'rootToNode', 'link', or false
- nodeClick: "rootToNode",
- renderLabelForZeroData: !1,
- label: {
- // could be: 'radial', 'tangential', or 'none'
- rotate: "radial",
- show: !0,
- opacity: 1,
- // 'left' is for inner side of inside, and 'right' is for outer
- // side for inside
- align: "center",
- position: "inside",
- distance: 5,
- silent: !0
- },
- itemStyle: {
- borderWidth: 1,
- borderColor: "white",
- borderType: "solid",
- shadowBlur: 0,
- shadowColor: "rgba(0, 0, 0, 0.2)",
- shadowOffsetX: 0,
- shadowOffsetY: 0,
- opacity: 1
- },
- emphasis: {
- focus: "descendant"
- },
- blur: {
- itemStyle: {
- opacity: 0.2
- },
- label: {
- opacity: 0.1
- }
- },
- // Animation type can be expansion, scale.
- animationType: "expansion",
- animationDuration: 1e3,
- animationDurationUpdate: 500,
- data: [],
- /**
- * Sort order.
- *
- * Valid values: 'desc', 'asc', null, or callback function.
- * 'desc' and 'asc' for descend and ascendant order;
- * null for not sorting;
- * example of callback function:
- * function(nodeA, nodeB) {
- * return nodeA.getValue() - nodeB.getValue();
- * }
- */
- sort: "desc"
- }, e;
- }(Tn)
- );
- function Vde(t) {
- var e = 0;
- F(t.children, function(r) {
- Vde(r);
- var i = r.value;
- Se(i) && (i = i[0]), e += i;
- });
- var n = t.value;
- Se(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), Se(t.value) ? t.value[0] = n : t.value = n;
- }
- var hX = Math.PI / 180;
- function zot(t, e, n) {
- e.eachSeriesByType(t, function(r) {
- var i = r.get("center"), a = r.get("radius");
- Se(a) || (a = [0, a]), Se(i) || (i = [i, i]);
- var o = n.getWidth(), s = n.getHeight(), l = Math.min(o, s), u = ze(i[0], o), c = ze(i[1], s), f = ze(a[0], l / 2), d = ze(a[1], l / 2), h = -r.get("startAngle") * hX, p = r.get("minAngle") * hX, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
- y != null && Fde(g, y);
- var _ = 0;
- F(g.children, function(B) {
- !isNaN(B.getValue()) && _++;
- });
- var O = g.getValue(), S = Math.PI / (O || _) * 2, x = g.depth > 0, C = g.height - (x ? -1 : 1), P = (d - f) / (C || 1), $ = r.get("clockwise"), T = r.get("stillShowZeroSum"), E = $ ? 1 : -1, M = function(B, Q) {
- if (B) {
- var W = Q;
- if (B !== v) {
- var H = B.getValue(), U = O === 0 && T ? S : H * S;
- U < p && (U = p), W = Q + E * U;
- var j = B.depth - m - (x ? -1 : 1), Y = f + P * j, ne = f + P * (j + 1), fe = r.getLevelModel(B);
- if (fe) {
- var ue = fe.get("r0", !0), ye = fe.get("r", !0), se = fe.get("radius", !0);
- se != null && (ue = se[0], ye = se[1]), ue != null && (Y = ze(ue, l / 2)), ye != null && (ne = ze(ye, l / 2));
- }
- B.setLayout({
- angle: U,
- startAngle: Q,
- endAngle: W,
- clockwise: $,
- cx: u,
- cy: c,
- r0: Y,
- r: ne
- });
- }
- if (B.children && B.children.length) {
- var he = 0;
- F(B.children, function(re) {
- he += M(re, Q + he);
- });
- }
- return W - Q;
- }
- };
- if (x) {
- var R = f, N = f + P, I = Math.PI * 2;
- v.setLayout({
- angle: I,
- startAngle: h,
- endAngle: h + I,
- clockwise: $,
- cx: u,
- cy: c,
- r0: R,
- r: N
- });
- }
- M(g, h);
- });
- }
- function Fde(t, e) {
- var n = t.children || [];
- t.children = Vot(n, e), n.length && F(t.children, function(r) {
- Fde(r, e);
- });
- }
- function Vot(t, e) {
- if (qe(e)) {
- var n = Ce(t, function(i, a) {
- var o = i.getValue();
- return {
- params: {
- depth: i.depth,
- height: i.height,
- dataIndex: i.dataIndex,
- getValue: function() {
- return o;
- }
- },
- index: a
- };
- });
- return n.sort(function(i, a) {
- return e(i.params, a.params);
- }), Ce(n, function(i) {
- return t[i.index];
- });
- } else {
- var r = e === "asc";
- return t.sort(function(i, a) {
- var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
- return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
- });
- }
- }
- function Fot(t) {
- var e = {};
- function n(r, i, a) {
- for (var o = r; o && o.depth > 1; )
- o = o.parentNode;
- var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
- return r.depth > 1 && Ve(s) && (s = CC(s, (r.depth - 1) / (a - 1) * 0.5)), s;
- }
- t.eachSeriesByType("sunburst", function(r) {
- var i = r.getData(), a = i.tree;
- a.eachNode(function(o) {
- var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
- l.fill || (l.fill = n(o, r, a.root.height));
- var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
- _e(u, l);
- });
- });
- }
- function Wot(t) {
- t.registerChartView(Not), t.registerSeriesModel(Bot), t.registerLayout(vt(zot, "sunburst")), t.registerProcessor(vt(O1, "sunburst")), t.registerVisual(Fot), Lot(t);
- }
- var pX = {
- color: "fill",
- borderColor: "stroke"
- }, Qot = {
- symbol: 1,
- symbolSize: 1,
- symbolKeepAspect: 1,
- legendIcon: 1,
- visualMeta: 1,
- liftZ: 1,
- decal: 1
- }, Iu = Ut(), Hot = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.optionUpdated = function() {
- this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
- }, e.prototype.getInitialData = function(n, r) {
- return Yl(null, this);
- }, e.prototype.getDataParams = function(n, r, i) {
- var a = t.prototype.getDataParams.call(this, n, r);
- return i && (a.info = Iu(i).info), a;
- }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
- coordinateSystem: "cartesian2d",
- // zlevel: 0,
- z: 2,
- legendHoverLink: !0,
- // Custom series will not clip by default.
- // Some case will use custom series to draw label
- // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
- clip: !1
- // Cartesian coordinate system
- // xAxisIndex: 0,
- // yAxisIndex: 0,
- // Polar coordinate system
- // polarIndex: 0,
- // Geo coordinate system
- // geoIndex: 0,
- }, e;
- }(Tn)
- );
- function Got(t, e) {
- return e = e || [0, 0], Ce(["x", "y"], function(n, r) {
- var i = this.getAxis(n), a = e[r], o = t[r] / 2;
- return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
- }, this);
- }
- function jot(t) {
- var e = t.master.getRect();
- return {
- coordSys: {
- // The name exposed to user is always 'cartesian2d' but not 'grid'.
- type: "cartesian2d",
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height
- },
- api: {
- coord: function(n) {
- return t.dataToPoint(n);
- },
- size: We(Got, t)
- }
- };
- }
- function Zot(t, e) {
- return e = e || [0, 0], Ce([0, 1], function(n) {
- var r = e[n], i = t[n] / 2, a = [], o = [];
- return a[n] = r - i, o[n] = r + i, a[1 - n] = o[1 - n] = e[1 - n], Math.abs(this.dataToPoint(a)[n] - this.dataToPoint(o)[n]);
- }, this);
- }
- function Uot(t) {
- var e = t.getBoundingRect();
- return {
- coordSys: {
- type: "geo",
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height,
- zoom: t.getZoom()
- },
- api: {
- coord: function(n) {
- return t.dataToPoint(n);
- },
- size: We(Zot, t)
- }
- };
- }
- function Xot(t, e) {
- var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
- return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
- }
- function Yot(t) {
- var e = t.getRect();
- return {
- coordSys: {
- type: "singleAxis",
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height
- },
- api: {
- coord: function(n) {
- return t.dataToPoint(n);
- },
- size: We(Xot, t)
- }
- };
- }
- function qot(t, e) {
- return e = e || [0, 0], Ce(["Radius", "Angle"], function(n, r) {
- var i = "get" + n + "Axis", a = this[i](), o = e[r], s = t[r] / 2, l = a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(o - s) - a.dataToCoord(o + s));
- return n === "Angle" && (l = l * Math.PI / 180), l;
- }, this);
- }
- function Kot(t) {
- var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
- return r[0] > r[1] && r.reverse(), {
- coordSys: {
- type: "polar",
- cx: t.cx,
- cy: t.cy,
- r: r[1],
- r0: r[0]
- },
- api: {
- coord: function(i) {
- var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
- return s.push(a, o * Math.PI / 180), s;
- },
- size: We(qot, t)
- }
- };
- }
- function Jot(t) {
- var e = t.getRect(), n = t.getRangeInfo();
- return {
- coordSys: {
- type: "calendar",
- x: e.x,
- y: e.y,
- width: e.width,
- height: e.height,
- cellWidth: t.getCellWidth(),
- cellHeight: t.getCellHeight(),
- rangeInfo: {
- start: n.start,
- end: n.end,
- weeks: n.weeks,
- dayCount: n.allDay
- }
- },
- api: {
- coord: function(r, i) {
- return t.dataToPoint(r, i);
- }
- }
- };
- }
- var vX = {};
- function Wde(t, e, n, r) {
- return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Qe(t, "text")));
- }
- function Qde(t, e, n) {
- var r = t, i, a, o;
- if (e === "text")
- o = r;
- else {
- o = {}, Qe(r, "text") && (o.text = r.text), Qe(r, "rich") && (o.rich = r.rich), Qe(r, "textFill") && (o.fill = r.textFill), Qe(r, "textStroke") && (o.stroke = r.textStroke), Qe(r, "fontFamily") && (o.fontFamily = r.fontFamily), Qe(r, "fontSize") && (o.fontSize = r.fontSize), Qe(r, "fontStyle") && (o.fontStyle = r.fontStyle), Qe(r, "fontWeight") && (o.fontWeight = r.fontWeight), a = {
- type: "text",
- style: o,
- // ec4 does not support rectText trigger.
- // And when text position is different in normal and emphasis
- // => hover text trigger emphasis;
- // => text position changed, leave mouse pointer immediately;
- // That might cause incorrect state.
- silent: !0
- }, i = {};
- var s = Qe(r, "textPosition");
- n ? i.position = s ? r.textPosition : "inside" : s && (i.position = r.textPosition), Qe(r, "textPosition") && (i.position = r.textPosition), Qe(r, "textOffset") && (i.offset = r.textOffset), Qe(r, "textRotation") && (i.rotation = r.textRotation), Qe(r, "textDistance") && (i.distance = r.textDistance);
- }
- return gX(o, t), F(o.rich, function(l) {
- gX(l, l);
- }), {
- textConfig: i,
- textContent: a
- };
- }
- function gX(t, e) {
- e && (e.font = e.textFont || e.font, Qe(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), Qe(e, "textAlign") && (t.align = e.textAlign), Qe(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), Qe(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), Qe(e, "textWidth") && (t.width = e.textWidth), Qe(e, "textHeight") && (t.height = e.textHeight), Qe(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), Qe(e, "textPadding") && (t.padding = e.textPadding), Qe(e, "textBorderColor") && (t.borderColor = e.textBorderColor), Qe(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), Qe(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), Qe(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), Qe(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), Qe(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), Qe(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY));
- }
- function mX(t, e, n) {
- var r = t;
- r.textPosition = r.textPosition || n.position || "inside", n.offset != null && (r.textOffset = n.offset), n.rotation != null && (r.textRotation = n.rotation), n.distance != null && (r.textDistance = n.distance);
- var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
- yX(r, e);
- var o = r.textFill == null;
- return i ? o && (r.textFill = n.insideFill || "#fff", !r.textStroke && n.insideStroke && (r.textStroke = n.insideStroke), !r.textStroke && (r.textStroke = a), r.textStrokeWidth == null && (r.textStrokeWidth = 2)) : (o && (r.textFill = t.fill || n.outsideFill || "#000"), !r.textStroke && n.outsideStroke && (r.textStroke = n.outsideStroke)), r.text = e.text, r.rich = e.rich, F(e.rich, function(s) {
- yX(s, s);
- }), r;
- }
- function yX(t, e) {
- e && (Qe(e, "fill") && (t.textFill = e.fill), Qe(e, "stroke") && (t.textStroke = e.fill), Qe(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), Qe(e, "font") && (t.font = e.font), Qe(e, "fontStyle") && (t.fontStyle = e.fontStyle), Qe(e, "fontWeight") && (t.fontWeight = e.fontWeight), Qe(e, "fontSize") && (t.fontSize = e.fontSize), Qe(e, "fontFamily") && (t.fontFamily = e.fontFamily), Qe(e, "align") && (t.textAlign = e.align), Qe(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), Qe(e, "lineHeight") && (t.textLineHeight = e.lineHeight), Qe(e, "width") && (t.textWidth = e.width), Qe(e, "height") && (t.textHeight = e.height), Qe(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), Qe(e, "padding") && (t.textPadding = e.padding), Qe(e, "borderColor") && (t.textBorderColor = e.borderColor), Qe(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), Qe(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), Qe(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), Qe(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), Qe(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), Qe(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), Qe(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), Qe(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), Qe(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), Qe(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY));
- }
- function bX(t, e) {
- if (process.env.NODE_ENV !== "production") {
- var n = t + "^_^" + e;
- vX[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), vX[n] = !0);
- }
- }
- var Hde = {
- position: ["x", "y"],
- scale: ["scaleX", "scaleY"],
- origin: ["originX", "originY"]
- }, _X = kt(Hde), lT = os(Hl, function(t, e) {
- return t[e] = 1, t;
- }, {}), OX = Hl.join(", "), uT = ["", "style", "shape", "extra"], Xg = Ut();
- function s6(t, e, n, r, i) {
- var a = t + "Animation", o = Om(t, r, i) || {}, s = Xg(e).userDuring;
- return o.duration > 0 && (o.during = s ? We(ist, {
- el: e,
- userDuring: s
- }) : null, o.setToFinal = !0, o.scope = t), _e(o, n[a]), o;
- }
- function yw(t, e, n, r) {
- r = r || {};
- var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Xg(t), u = e.style;
- l.userDuring = e.during;
- var c = {}, f = {};
- if (ost(t, e, f), xX("shape", e, f), xX("extra", e, f), !a && s && (ast(t, e, c), SX("shape", t, e, c), SX("extra", t, e, c), sst(t, e, u, c)), f.style = u, est(t, f, o), nst(t, e), s)
- if (a) {
- var d = {};
- F(uT, function(p) {
- var v = p ? e[p] : e;
- v && v.enterFrom && (p && (d[p] = d[p] || {}), _e(p ? d[p] : d, v.enterFrom));
- });
- var h = s6("enter", t, e, n, i);
- h.duration > 0 && t.animateFrom(d, h);
- } else
- tst(t, e, i || 0, n, c);
- Gde(t, e), u ? t.dirty() : t.markRedraw();
- }
- function Gde(t, e) {
- for (var n = Xg(t).leaveToProps, r = 0; r < uT.length; r++) {
- var i = uT[r], a = i ? e[i] : e;
- a && a.leaveTo && (n || (n = Xg(t).leaveToProps = {}), i && (n[i] = n[i] || {}), _e(i ? n[i] : n, a.leaveTo));
- }
- }
- function UP(t, e, n, r) {
- if (t) {
- var i = t.parent, a = Xg(t).leaveToProps;
- if (a) {
- var o = s6("update", t, e, n, 0);
- o.done = function() {
- i.remove(t);
- }, t.animateTo(a, o);
- } else
- i.remove(t);
- }
- }
- function Ah(t) {
- return t === "all";
- }
- function est(t, e, n) {
- var r = e.style;
- if (!t.isGroup && r) {
- if (n) {
- t.useStyle({});
- for (var i = t.animators, a = 0; a < i.length; a++) {
- var o = i[a];
- o.targetName === "style" && o.changeTarget(t.style);
- }
- }
- t.setStyle(r);
- }
- e && (e.style = null, e && t.attr(e), e.style = r);
- }
- function tst(t, e, n, r, i) {
- if (i) {
- var a = s6("update", t, e, r, n);
- a.duration > 0 && t.animateFrom(i, a);
- }
- }
- function nst(t, e) {
- Qe(e, "silent") && (t.silent = e.silent), Qe(e, "ignore") && (t.ignore = e.ignore), t instanceof ls && Qe(e, "invisible") && (t.invisible = e.invisible), t instanceof Dt && Qe(e, "autoBatch") && (t.autoBatch = e.autoBatch);
- }
- var gl = {}, rst = {
- // Usually other props do not need to be changed in animation during.
- setTransform: function(t, e) {
- return process.env.NODE_ENV !== "production" && at(Qe(lT, t), "Only " + OX + " available in `setTransform`."), gl.el[t] = e, this;
- },
- getTransform: function(t) {
- return process.env.NODE_ENV !== "production" && at(Qe(lT, t), "Only " + OX + " available in `getTransform`."), gl.el[t];
- },
- setShape: function(t, e) {
- process.env.NODE_ENV !== "production" && cv(t);
- var n = gl.el, r = n.shape || (n.shape = {});
- return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
- },
- getShape: function(t) {
- process.env.NODE_ENV !== "production" && cv(t);
- var e = gl.el.shape;
- if (e)
- return e[t];
- },
- setStyle: function(t, e) {
- process.env.NODE_ENV !== "production" && cv(t);
- var n = gl.el, r = n.style;
- return r && (process.env.NODE_ENV !== "production" && mf(e) && nr("style." + t + " must not be assigned with NaN."), r[t] = e, n.dirtyStyle && n.dirtyStyle()), this;
- },
- getStyle: function(t) {
- process.env.NODE_ENV !== "production" && cv(t);
- var e = gl.el.style;
- if (e)
- return e[t];
- },
- setExtra: function(t, e) {
- process.env.NODE_ENV !== "production" && cv(t);
- var n = gl.el.extra || (gl.el.extra = {});
- return n[t] = e, this;
- },
- getExtra: function(t) {
- process.env.NODE_ENV !== "production" && cv(t);
- var e = gl.el.extra;
- if (e)
- return e[t];
- }
- };
- function cv(t) {
- if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
- throw new Error('key must not be "' + t + '"');
- }
- function ist() {
- var t = this, e = t.el;
- if (e) {
- var n = Xg(e).userDuring, r = t.userDuring;
- if (n !== r) {
- t.el = t.userDuring = null;
- return;
- }
- gl.el = e, r(rst);
- }
- }
- function SX(t, e, n, r) {
- var i = n[t];
- if (i) {
- var a = e[t], o;
- if (a) {
- var s = n.transition, l = i.transition;
- if (l)
- if (!o && (o = r[t] = {}), Ah(l))
- _e(o, a);
- else
- for (var u = Cn(l), c = 0; c < u.length; c++) {
- var f = u[c], d = a[f];
- o[f] = d;
- }
- else if (Ah(s) || St(s, t) >= 0) {
- !o && (o = r[t] = {});
- for (var h = kt(a), c = 0; c < h.length; c++) {
- var f = h[c], d = a[f];
- lst(i[f], d) && (o[f] = d);
- }
- }
- }
- }
- }
- function xX(t, e, n) {
- var r = e[t];
- if (r)
- for (var i = n[t] = {}, a = kt(r), o = 0; o < a.length; o++) {
- var s = a[o];
- i[s] = Jy(r[s]);
- }
- }
- function ast(t, e, n) {
- for (var r = e.transition, i = Ah(r) ? Hl : Cn(r || []), a = 0; a < i.length; a++) {
- var o = i[a];
- if (!(o === "style" || o === "shape" || o === "extra")) {
- var s = t[o];
- process.env.NODE_ENV !== "production" && jde(o, "el.transition"), n[o] = s;
- }
- }
- }
- function ost(t, e, n) {
- for (var r = 0; r < _X.length; r++) {
- var i = _X[r], a = Hde[i], o = e[i];
- o && (n[a[0]] = o[0], n[a[1]] = o[1]);
- }
- for (var r = 0; r < Hl.length; r++) {
- var s = Hl[r];
- e[s] != null && (n[s] = e[s]);
- }
- }
- function sst(t, e, n, r) {
- if (n) {
- var i = t.style, a;
- if (i) {
- var o = n.transition, s = e.transition;
- if (o && !Ah(o)) {
- var l = Cn(o);
- !a && (a = r.style = {});
- for (var u = 0; u < l.length; u++) {
- var c = l[u], f = i[c];
- a[c] = f;
- }
- } else if (t.getAnimationStyleProps && (Ah(s) || Ah(o) || St(s, "style") >= 0)) {
- var d = t.getAnimationStyleProps(), h = d ? d.style : null;
- if (h) {
- !a && (a = r.style = {});
- for (var p = kt(n), u = 0; u < p.length; u++) {
- var c = p[u];
- if (h[c]) {
- var f = i[c];
- a[c] = f;
- }
- }
- }
- }
- }
- }
- }
- function lst(t, e) {
- return Pi(t) ? t !== e : t != null && isFinite(t);
- }
- var jde;
- process.env.NODE_ENV !== "production" && (jde = function(t, e) {
- Qe(lT, t) || nr("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + kt(lT).join("`, `") + "` are permitted.");
- });
- var Zde = Ut(), ust = ["percent", "easing", "shape", "style", "extra"];
- function Ude(t) {
- t.stopAnimation("keyframe"), t.attr(Zde(t));
- }
- function cT(t, e, n) {
- if (!(!n.isAnimationEnabled() || !e)) {
- if (Se(e)) {
- F(e, function(s) {
- cT(t, s, n);
- });
- return;
- }
- var r = e.keyframes, i = e.duration;
- if (n && i == null) {
- var a = Om("enter", n, 0);
- i = a && a.duration;
- }
- if (!(!r || !i)) {
- var o = Zde(t);
- F(uT, function(s) {
- if (!(s && !t[s])) {
- var l, u = !1;
- r.sort(function(c, f) {
- return c.percent - f.percent;
- }), F(r, function(c) {
- var f = t.animators, d = s ? c[s] : c;
- if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
- var h = kt(d);
- if (s || (h = yn(h, function(g) {
- return St(ust, g) < 0;
- })), !!h.length) {
- l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
- for (var p = 0; p < f.length; p++)
- f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
- s && (o[s] = o[s] || {});
- var v = s ? o[s] : o;
- F(h, function(g) {
- v[g] = ((s ? t[s] : t) || {})[g];
- }), l.whenWithKeys(i * c.percent, d, h, c.easing);
- }
- }
- }), l && (process.env.NODE_ENV !== "production" && (u || nr("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(i).start(e.easing));
- }
- });
- }
- }
- }
- var Du = "emphasis", Zc = "normal", l6 = "blur", u6 = "select", xf = [Zc, Du, l6, u6], PI = {
- normal: ["itemStyle"],
- emphasis: [Du, "itemStyle"],
- blur: [l6, "itemStyle"],
- select: [u6, "itemStyle"]
- }, $I = {
- normal: ["label"],
- emphasis: [Du, "label"],
- blur: [l6, "label"],
- select: [u6, "label"]
- }, cst = ["x", "y"], fst = "e\0\0", Ro = {
- normal: {},
- emphasis: {},
- blur: {},
- select: {}
- }, wX = {
- cartesian2d: jot,
- geo: Uot,
- single: Yot,
- polar: Kot,
- calendar: Jot
- };
- function fT(t) {
- return t instanceof Dt;
- }
- function CL(t) {
- return t instanceof ls;
- }
- function dst(t, e) {
- e.copyTransform(t), CL(e) && CL(t) && (e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel, e.invisible = t.invisible, e.ignore = t.ignore, fT(e) && fT(t) && e.setShape(t.shape));
- }
- var hst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- this._progressiveEls = null;
- var o = this._data, s = n.getData(), l = this.group, u = CX(n, s, r, i);
- o || l.removeAll(), s.diff(o).add(function(f) {
- AI(i, null, f, u(f, a), n, l, s);
- }).remove(function(f) {
- var d = o.getItemGraphicEl(f);
- d && UP(d, Iu(d).option, n);
- }).update(function(f, d) {
- var h = o.getItemGraphicEl(d);
- AI(i, h, f, u(f, a), n, l, s);
- }).execute();
- var c = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
- c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
- }, e.prototype.incrementalPrepareRender = function(n, r, i) {
- this.group.removeAll(), this._data = null;
- }, e.prototype.incrementalRender = function(n, r, i, a, o) {
- var s = r.getData(), l = CX(r, s, i, a), u = this._progressiveEls = [];
- function c(h) {
- h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
- }
- for (var f = n.start; f < n.end; f++) {
- var d = AI(null, null, f, l(f, o), r, this.group, s);
- d && (d.traverse(c), u.push(d));
- }
- }, e.prototype.eachRendered = function(n) {
- Nf(this._progressiveEls || this.group, n);
- }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
- var o = r.element;
- if (o == null || i.name === o)
- return !0;
- for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
- if (i.name === o)
- return !0;
- return !1;
- }, e.type = "custom", e;
- }(_n)
- );
- function c6(t) {
- var e = t.type, n;
- if (e === "path") {
- var r = t.shape, i = r.width != null && r.height != null ? {
- x: r.x || 0,
- y: r.y || 0,
- width: r.width,
- height: r.height
- } : null, a = qde(r);
- n = d1(a, null, i, r.layout || "center"), Iu(n).customPathData = a;
- } else if (e === "image")
- n = new ci({}), Iu(n).customImagePath = t.style.image;
- else if (e === "text")
- n = new jt({});
- else if (e === "group")
- n = new ct();
- else {
- if (e === "compoundPath")
- throw new Error('"compoundPath" is not supported yet.');
- var o = wP(e);
- if (!o) {
- var s = "";
- process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), fn(s);
- }
- n = new o();
- }
- return Iu(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
- }
- function f6(t, e, n, r, i, a, o) {
- Ude(e);
- var s = i && i.normal.cfg;
- s && e.setTextConfig(s), r && r.transition == null && (r.transition = cst);
- var l = r && r.style;
- if (l) {
- if (e.type === "text") {
- var u = l;
- Qe(u, "textFill") && (u.fill = u.textFill), Qe(u, "textStroke") && (u.stroke = u.textStroke);
- }
- var c = void 0, f = fT(e) ? l.decal : null;
- t && f && (f.dirty = !0, c = Gg(f, t)), l.__decalPattern = c;
- }
- if (CL(e) && l) {
- var c = l.__decalPattern;
- c && (l.decal = c);
- }
- yw(e, r, a, {
- dataIndex: n,
- isInit: o,
- clearStyle: !0
- }), cT(e, r.keyframeAnimation, a);
- }
- function Xde(t, e, n, r, i) {
- var a = e.isGroup ? null : e, o = i && i[t].cfg;
- if (a) {
- var s = a.ensureState(t);
- if (r === !1) {
- var l = a.getState(t);
- l && (l.style = null);
- } else
- s.style = r || null;
- o && (s.textConfig = o), Zh(a);
- }
- }
- function pst(t, e, n) {
- if (!t.isGroup) {
- var r = t, i = n.currentZ, a = n.currentZLevel;
- r.z = i, r.zlevel = a;
- var o = e.z2;
- o != null && (r.z2 = o || 0);
- for (var s = 0; s < xf.length; s++)
- vst(r, e, xf[s]);
- }
- }
- function vst(t, e, n) {
- var r = n === Zc, i = r ? e : dT(e, n), a = i ? i.z2 : null, o;
- a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
- }
- function CX(t, e, n, r) {
- var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
- a && (process.env.NODE_ENV !== "production" && (at(i, "series.render is required."), at(a.prepareCustoms || wX[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : wX[a.type](a));
- for (var s = it({
- getWidth: r.getWidth,
- getHeight: r.getHeight,
- getZr: r.getZr,
- getDevicePixelRatio: r.getDevicePixelRatio,
- value: O,
- style: x,
- ordinalRawValue: S,
- styleEmphasis: C,
- visual: T,
- barLayout: E,
- currentSeriesIndices: M,
- font: R
- }, o.api || {}), l = {
- // The life cycle of context: current round of rendering.
- // The global life cycle is probably not necessary, because
- // user can store global status by themselves.
- context: {},
- seriesId: t.id,
- seriesName: t.name,
- seriesIndex: t.seriesIndex,
- coordSys: o.coordSys,
- dataInsideLength: e.count(),
- encode: gst(t.getData())
- }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < xf.length; v++) {
- var g = xf[v];
- h[g] = t.getModel(PI[g]), p[g] = t.getModel($I[g]);
- }
- function m(N) {
- return N === u ? c || (c = e.getItemModel(N)) : e.getItemModel(N);
- }
- function y(N, I) {
- return e.hasItemOption ? N === u ? f[I] || (f[I] = m(N).getModel(PI[I])) : m(N).getModel(PI[I]) : h[I];
- }
- function _(N, I) {
- return e.hasItemOption ? N === u ? d[I] || (d[I] = m(N).getModel($I[I])) : m(N).getModel($I[I]) : p[I];
- }
- return function(N, I) {
- return u = N, c = null, f = {}, d = {}, i && i(it({
- dataIndexInside: N,
- dataIndex: e.getRawIndex(N),
- // Can be used for optimization when zoom or roam.
- actionType: I ? I.type : null
- }, l), s);
- };
- function O(N, I) {
- return I == null && (I = u), e.getStore().get(e.getDimensionIndex(N || 0), I);
- }
- function S(N, I) {
- I == null && (I = u), N = N || 0;
- var B = e.getDimensionInfo(N);
- if (!B) {
- var Q = e.getDimensionIndex(N);
- return Q >= 0 ? e.getStore().get(Q, I) : void 0;
- }
- var W = e.get(B.name, I), H = B && B.ordinalMeta;
- return H ? H.categories[W] : W;
- }
- function x(N, I) {
- process.env.NODE_ENV !== "production" && bX("api.style", "Please write literal style directly instead."), I == null && (I = u);
- var B = e.getItemVisual(I, "style"), Q = B && B.fill, W = B && B.opacity, H = y(I, Zc).getItemStyle();
- Q != null && (H.fill = Q), W != null && (H.opacity = W);
- var U = {
- inheritColor: Ve(Q) ? Q : "#000"
- }, j = _(I, Zc), Y = Mn(j, null, U, !1, !0);
- Y.text = j.getShallow("show") ? dt(t.getFormattedLabel(I, Zc), jg(e, I)) : null;
- var ne = LC(j, U, !1);
- return $(N, H), H = mX(H, Y, ne), N && P(H, N), H.legacy = !0, H;
- }
- function C(N, I) {
- process.env.NODE_ENV !== "production" && bX("api.styleEmphasis", "Please write literal style directly instead."), I == null && (I = u);
- var B = y(I, Du).getItemStyle(), Q = _(I, Du), W = Mn(Q, null, null, !0, !0);
- W.text = Q.getShallow("show") ? co(t.getFormattedLabel(I, Du), t.getFormattedLabel(I, Zc), jg(e, I)) : null;
- var H = LC(Q, null, !0);
- return $(N, B), B = mX(B, W, H), N && P(B, N), B.legacy = !0, B;
- }
- function P(N, I) {
- for (var B in I)
- Qe(I, B) && (N[B] = I[B]);
- }
- function $(N, I) {
- N && (N.textFill && (I.textFill = N.textFill), N.textPosition && (I.textPosition = N.textPosition));
- }
- function T(N, I) {
- if (I == null && (I = u), Qe(pX, N)) {
- var B = e.getItemVisual(I, "style");
- return B ? B[pX[N]] : null;
- }
- if (Qe(Qot, N))
- return e.getItemVisual(I, N);
- }
- function E(N) {
- if (a.type === "cartesian2d") {
- var I = a.getBaseAxis();
- return Qqe(it({
- axis: I
- }, N));
- }
- }
- function M() {
- return n.getCurrentSeriesIndices();
- }
- function R(N) {
- return G5(N, n);
- }
- }
- function gst(t) {
- var e = {};
- return F(t.dimensions, function(n) {
- var r = t.getDimensionInfo(n);
- if (!r.isExtraCoord) {
- var i = r.coordDim, a = e[i] = e[i] || [];
- a[r.coordDimIndex] = t.getDimensionIndex(n);
- }
- }), e;
- }
- function AI(t, e, n, r, i, a, o) {
- if (!r) {
- a.remove(e);
- return;
- }
- var s = d6(t, e, n, r, i, a);
- return s && o.setItemGraphicEl(n, s), s && ur(s, r.focus, r.blurScope, r.emphasisDisabled), s;
- }
- function d6(t, e, n, r, i, a) {
- process.env.NODE_ENV !== "production" && at(r, "should not have an null/undefined element setting");
- var o = -1, s = e;
- e && Yde(e, r, i) && (o = St(a.childrenRef(), e), e = null);
- var l = !e, u = e;
- u ? u.clearStates() : (u = c6(r), s && dst(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), Ro.normal.cfg = Ro.normal.conOpt = Ro.emphasis.cfg = Ro.emphasis.conOpt = Ro.blur.cfg = Ro.blur.conOpt = Ro.select.cfg = Ro.select.conOpt = null, Ro.isLegacy = !1, yst(u, n, r, i, l, Ro), mst(u, n, r, i, l), f6(t, u, n, r, Ro, i, l), Qe(r, "info") && (Iu(u).info = r.info);
- for (var c = 0; c < xf.length; c++) {
- var f = xf[c];
- if (f !== Zc) {
- var d = dT(r, f), h = h6(r, d, f);
- Xde(f, u, d, h, Ro);
- }
- }
- return pst(u, r, i), r.type === "group" && bst(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
- }
- function Yde(t, e, n) {
- var r = Iu(t), i = e.type, a = e.shape, o = e.style;
- return (
- // Always create new if universal transition is enabled.
- // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
- n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && xst(a) && qde(a) !== r.customPathData || i === "image" && Qe(o, "image") && o.image !== r.customImagePath
- );
- }
- function mst(t, e, n, r, i) {
- var a = n.clipPath;
- if (a === !1)
- t && t.getClipPath() && t.removeClipPath();
- else if (a) {
- var o = t.getClipPath();
- o && Yde(o, a, r) && (o = null), o || (o = c6(a), process.env.NODE_ENV !== "production" && at(fT(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), f6(null, o, e, a, null, r, i);
- }
- }
- function yst(t, e, n, r, i, a) {
- if (!t.isGroup) {
- TX(n, null, a), TX(n, Du, a);
- var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
- if (o != null || s != null || u != null || l != null) {
- var c = t.getTextContent();
- if (o === !1)
- c && t.removeTextContent();
- else {
- o = a.normal.conOpt = o || {
- type: "text"
- }, c ? c.clearStates() : (c = c6(o), t.setTextContent(c)), f6(null, c, e, o, null, r, i);
- for (var f = o && o.style, d = 0; d < xf.length; d++) {
- var h = xf[d];
- if (h !== Zc) {
- var p = a[h].conOpt;
- Xde(h, c, p, h6(o, p, h), null);
- }
- }
- f ? c.dirty() : c.markRedraw();
- }
- }
- }
- }
- function TX(t, e, n) {
- var r = e ? dT(t, e) : t, i = e ? h6(t, r, Du) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? dT(s, e) : s : null;
- if (i && // Because emphasis style has little info to detect legacy,
- // if normal is legacy, emphasis is trade as legacy.
- (n.isLegacy || Wde(i, a, !!o, !!l))) {
- n.isLegacy = !0;
- var u = Qde(i, a, !e);
- !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
- }
- if (!e && l) {
- var c = l;
- !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && at(c.type === "text", 'textContent.type must be "text"');
- }
- var f = e ? n[e] : n.normal;
- f.cfg = o, f.conOpt = l;
- }
- function dT(t, e) {
- return e ? t ? t[e] : null : t;
- }
- function h6(t, e, n) {
- var r = e && e.style;
- return r == null && n === Du && t && (r = t.styleEmphasis), r;
- }
- function bst(t, e, n, r, i) {
- var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
- if (!(!o && !l && !u)) {
- if (l) {
- Ost({
- api: t,
- oldChildren: e.children() || [],
- newChildren: a || [],
- dataIndex: n,
- seriesModel: i,
- group: e
- });
- return;
- }
- u && e.removeAll();
- for (var c = 0; c < o; c++) {
- var f = a[c], d = e.childAt(c);
- f ? (f.ignore == null && (f.ignore = !1), d6(t, d, n, f, i, e)) : (process.env.NODE_ENV !== "production" && at(d, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), d.ignore = !0);
- }
- for (var h = e.childCount() - 1; h >= c; h--) {
- var p = e.childAt(h);
- _st(e, p, i);
- }
- }
- }
- function _st(t, e, n) {
- e && UP(e, Iu(t).option, n);
- }
- function Ost(t) {
- new Qu(t.oldChildren, t.newChildren, PX, PX, t).add($X).update($X).remove(Sst).execute();
- }
- function PX(t, e) {
- var n = t && t.name;
- return n ?? fst + e;
- }
- function $X(t, e) {
- var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
- d6(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
- }
- function Sst(t) {
- var e = this.context, n = e.oldChildren[t];
- n && UP(n, Iu(n).option, e.seriesModel);
- }
- function qde(t) {
- return t && (t.pathData || t.d);
- }
- function xst(t) {
- return t && (Qe(t, "pathData") || Qe(t, "d"));
- }
- function wst(t) {
- t.registerChartView(hst), t.registerSeriesModel(Hot);
- }
- var Zd = Ut(), AX = ot, EI = We, p6 = (
- /** @class */
- function() {
- function t() {
- this._dragging = !1, this.animationThreshold = 15;
- }
- return t.prototype.render = function(e, n, r, i) {
- var a = n.get("value"), o = n.get("status");
- if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
- this._lastValue = a, this._lastStatus = o;
- var s = this._group, l = this._handle;
- if (!o || o === "hide") {
- s && s.hide(), l && l.hide();
- return;
- }
- s && s.show(), l && l.show();
- var u = {};
- this.makeElOption(u, a, e, n, r);
- var c = u.graphicKey;
- c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
- var f = this._moveAnimation = this.determineAnimation(e, n);
- if (!s)
- s = this._group = new ct(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
- else {
- var d = vt(EX, n, f);
- this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
- }
- IX(s, n, !0), this._renderHandle(a);
- }
- }, t.prototype.remove = function(e) {
- this.clear(e);
- }, t.prototype.dispose = function(e) {
- this.clear(e);
- }, t.prototype.determineAnimation = function(e, n) {
- var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
- if (!o && !a)
- return !1;
- if (r === "auto" || r == null) {
- var s = this.animationThreshold;
- if (a && i.getBandWidth() > s)
- return !0;
- if (o) {
- var l = B3(e).seriesDataCount, u = i.getExtent();
- return Math.abs(u[0] - u[1]) / l > s;
- }
- return !1;
- }
- return r === !0;
- }, t.prototype.makeElOption = function(e, n, r, i, a) {
- }, t.prototype.createPointerEl = function(e, n, r, i) {
- var a = n.pointer;
- if (a) {
- var o = Zd(e).pointerEl = new hp[a.type](AX(n.pointer));
- e.add(o);
- }
- }, t.prototype.createLabelEl = function(e, n, r, i) {
- if (n.label) {
- var a = Zd(e).labelEl = new jt(AX(n.label));
- e.add(a), MX(a, i);
- }
- }, t.prototype.updatePointerEl = function(e, n, r) {
- var i = Zd(e).pointerEl;
- i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
- shape: n.pointer.shape
- }));
- }, t.prototype.updateLabelEl = function(e, n, r, i) {
- var a = Zd(e).labelEl;
- a && (a.setStyle(n.label.style), r(a, {
- // Consider text length change in vertical axis, animation should
- // be used on shape, otherwise the effect will be weird.
- // TODOTODO
- // shape: elOption.label.shape,
- x: n.label.x,
- y: n.label.y
- }), MX(a, i));
- }, t.prototype._renderHandle = function(e) {
- if (!(this._dragging || !this.updateHandleTransform)) {
- var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
- if (!a.get("show") || !o || o === "hide") {
- i && r.remove(i), this._handle = null;
- return;
- }
- var s;
- this._handle || (s = !0, i = this._handle = Sm(a.get("icon"), {
- cursor: "move",
- draggable: !0,
- onmousemove: function(u) {
- Vu(u.event);
- },
- onmousedown: EI(this._onHandleDragMove, this, 0, 0),
- drift: EI(this._onHandleDragMove, this),
- ondragend: EI(this._onHandleDragEnd, this)
- }), r.add(i)), IX(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
- var l = a.get("size");
- Se(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Am(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
- }
- }, t.prototype._moveHandleToValue = function(e, n) {
- EX(this._axisPointerModel, !n && this._moveAnimation, this._handle, MI(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
- }, t.prototype._onHandleDragMove = function(e, n) {
- var r = this._handle;
- if (r) {
- this._dragging = !0;
- var i = this.updateHandleTransform(MI(r), [e, n], this._axisModel, this._axisPointerModel);
- this._payloadInfo = i, r.stopAnimation(), r.attr(MI(i)), Zd(r).lastProp = null, this._doDispatchAxisPointer();
- }
- }, t.prototype._doDispatchAxisPointer = function() {
- var e = this._handle;
- if (e) {
- var n = this._payloadInfo, r = this._axisModel;
- this._api.dispatchAction({
- type: "updateAxisPointer",
- x: n.cursorPoint[0],
- y: n.cursorPoint[1],
- tooltipOption: n.tooltipOption,
- axesInfo: [{
- axisDim: r.axis.dim,
- axisIndex: r.componentIndex
- }]
- });
- }
- }, t.prototype._onHandleDragEnd = function() {
- this._dragging = !1;
- var e = this._handle;
- if (e) {
- var n = this._axisPointerModel.get("value");
- this._moveHandleToValue(n), this._api.dispatchAction({
- type: "hideTip"
- });
- }
- }, t.prototype.clear = function(e) {
- this._lastValue = null, this._lastStatus = null;
- var n = e.getZr(), r = this._group, i = this._handle;
- n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), Jb(this, "_doDispatchAxisPointer");
- }, t.prototype.doClear = function() {
- }, t.prototype.buildLabel = function(e, n, r) {
- return r = r || 0, {
- x: e[r],
- y: e[1 - r],
- width: n[r],
- height: n[1 - r]
- };
- }, t;
- }()
- );
- function EX(t, e, n, r) {
- Kde(Zd(n).lastProp, r) || (Zd(n).lastProp = r, e ? tn(n, r, t) : (n.stopAnimation(), n.attr(r)));
- }
- function Kde(t, e) {
- if (nt(t) && nt(e)) {
- var n = !0;
- return F(e, function(r, i) {
- n = n && Kde(t[i], r);
- }), !!n;
- } else
- return t === e;
- }
- function MX(t, e) {
- t[e.get(["label", "show"]) ? "show" : "hide"]();
- }
- function MI(t) {
- return {
- x: t.x || 0,
- y: t.y || 0,
- rotation: t.rotation || 0
- };
- }
- function IX(t, e, n) {
- var r = e.get("z"), i = e.get("zlevel");
- t && t.traverse(function(a) {
- a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
- });
- }
- function v6(t) {
- var e = t.get("type"), n = t.getModel(e + "Style"), r;
- return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
- }
- function Jde(t, e, n, r, i) {
- var a = n.get("value"), o = ehe(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
- precision: n.get(["label", "precision"]),
- formatter: n.get(["label", "formatter"])
- }), s = n.getModel("label"), l = vp(s.get("padding") || 0), u = s.getFont(), c = o1(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
- p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
- var v = i.verticalAlign;
- v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), Cst(f, d, h, r);
- var g = s.get("backgroundColor");
- (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
- // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
- x: f[0],
- y: f[1],
- style: Mn(s, {
- text: o,
- font: u,
- fill: s.getTextColor(),
- padding: l,
- backgroundColor: g
- }),
- // Label should be over axisPointer.
- z2: 10
- };
- }
- function Cst(t, e, n, r) {
- var i = r.getWidth(), a = r.getHeight();
- t[0] = Math.min(t[0] + e, i) - e, t[1] = Math.min(t[1] + n, a) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
- }
- function ehe(t, e, n, r, i) {
- t = e.scale.parse(t);
- var a = e.scale.getLabel({
- value: t
- }, {
- // If `precision` is set, width can be fixed (like '12.00500'), which
- // helps to debounce when when moving label.
- precision: i.precision
- }), o = i.formatter;
- if (o) {
- var s = {
- value: P3(e, {
- value: t
- }),
- axisDimension: e.dim,
- axisIndex: e.index,
- seriesData: []
- };
- F(r, function(l) {
- var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
- f && s.seriesData.push(f);
- }), Ve(o) ? a = o.replace("{value}", a) : qe(o) && (a = o(s));
- }
- return a;
- }
- function g6(t, e, n) {
- var r = Na();
- return Lf(r, r, n.rotation), Gs(r, r, n.position), zs([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
- }
- function the(t, e, n, r, i, a) {
- var o = sa.innerTextLayout(n.rotation, 0, n.labelDirection);
- n.labelMargin = i.get(["label", "margin"]), Jde(e, r, i, a, {
- position: g6(r.axis, t, n),
- align: o.textAlign,
- verticalAlign: o.textVerticalAlign
- });
- }
- function m6(t, e, n) {
- return n = n || 0, {
- x1: t[n],
- y1: t[1 - n],
- x2: e[n],
- y2: e[1 - n]
- };
- }
- function nhe(t, e, n) {
- return n = n || 0, {
- x: t[n],
- y: t[1 - n],
- width: e[n],
- height: e[1 - n]
- };
- }
- function DX(t, e, n, r, i, a) {
- return {
- cx: t,
- cy: e,
- r0: n,
- r,
- startAngle: i,
- endAngle: a,
- clockwise: !0
- };
- }
- var Tst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.makeElOption = function(n, r, i, a, o) {
- var s = i.axis, l = s.grid, u = a.get("type"), c = RX(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
- if (u && u !== "none") {
- var d = v6(a), h = Pst[u](s, f, c);
- h.style = d, n.graphicKey = h.type, n.pointer = h;
- }
- var p = sL(l.model, i);
- the(
- // @ts-ignore
- r,
- n,
- p,
- i,
- a,
- o
- );
- }, e.prototype.getHandleTransform = function(n, r, i) {
- var a = sL(r.axis.grid.model, r, {
- labelInside: !1
- });
- a.labelMargin = i.get(["handle", "margin"]);
- var o = g6(r.axis, n, a);
- return {
- x: o[0],
- y: o[1],
- rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
- };
- }, e.prototype.updateHandleTransform = function(n, r, i, a) {
- var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = RX(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
- f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
- var d = (u[1] + u[0]) / 2, h = [d, d];
- h[c] = f[c];
- var p = [{
- verticalAlign: "middle"
- }, {
- align: "center"
- }];
- return {
- x: f[0],
- y: f[1],
- rotation: n.rotation,
- cursorPoint: h,
- tooltipOption: p[c]
- };
- }, e;
- }(p6)
- );
- function RX(t, e) {
- var n = {};
- return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
- }
- var Pst = {
- line: function(t, e, n) {
- var r = m6([e, n[0]], [e, n[1]], kX(t));
- return {
- type: "Line",
- subPixelOptimize: !0,
- shape: r
- };
- },
- shadow: function(t, e, n) {
- var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
- return {
- type: "Rect",
- shape: nhe([e - r / 2, n[0]], [r, i], kX(t))
- };
- }
- };
- function kX(t) {
- return t.dim === "x" ? 0 : 1;
- }
- var $st = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "axisPointer", e.defaultOption = {
- // 'auto' means that show when triggered by tooltip or handle.
- show: "auto",
- // zlevel: 0,
- z: 50,
- type: "line",
- // axispointer triggered by tootip determine snap automatically,
- // see `modelHelper`.
- snap: !1,
- triggerTooltip: !0,
- triggerEmphasis: !0,
- value: null,
- status: null,
- link: [],
- // Do not set 'auto' here, otherwise global animation: false
- // will not effect at this axispointer.
- animation: null,
- animationDurationUpdate: 200,
- lineStyle: {
- color: "#B9BEC9",
- width: 1,
- type: "dashed"
- },
- shadowStyle: {
- color: "rgba(210,219,238,0.2)"
- },
- label: {
- show: !0,
- formatter: null,
- precision: "auto",
- margin: 3,
- color: "#fff",
- padding: [5, 7, 5, 7],
- backgroundColor: "auto",
- borderColor: null,
- borderWidth: 0,
- borderRadius: 3
- },
- handle: {
- show: !1,
- // eslint-disable-next-line
- icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
- size: 45,
- // handle margin is from symbol center to axis, which is stable when circular move.
- margin: 50,
- // color: '#1b8bbd'
- // color: '#2f4554'
- color: "#333",
- shadowBlur: 3,
- shadowColor: "#aaa",
- shadowOffsetX: 0,
- shadowOffsetY: 2,
- // For mobile performance
- throttle: 40
- }
- }, e;
- }(At)
- ), $u = Ut(), Ast = F;
- function rhe(t, e, n) {
- if (!Gt.node) {
- var r = e.getZr();
- $u(r).records || ($u(r).records = {}), Est(r, e);
- var i = $u(r).records[t] || ($u(r).records[t] = {});
- i.handler = n;
- }
- }
- function Est(t, e) {
- if ($u(t).initialized)
- return;
- $u(t).initialized = !0, n("click", vt(LX, "click")), n("mousemove", vt(LX, "mousemove")), n("globalout", Ist);
- function n(r, i) {
- t.on(r, function(a) {
- var o = Dst(e);
- Ast($u(t).records, function(s) {
- s && i(s, a, o.dispatchAction);
- }), Mst(o.pendings, e);
- });
- }
- }
- function Mst(t, e) {
- var n = t.showTip.length, r = t.hideTip.length, i;
- n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
- }
- function Ist(t, e, n) {
- t.handler("leave", null, n);
- }
- function LX(t, e, n, r) {
- e.handler(t, n, r);
- }
- function Dst(t) {
- var e = {
- showTip: [],
- hideTip: []
- }, n = function(r) {
- var i = e[r.type];
- i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
- };
- return {
- dispatchAction: n,
- pendings: e
- };
- }
- function TL(t, e) {
- if (!Gt.node) {
- var n = e.getZr(), r = ($u(n).records || {})[t];
- r && ($u(n).records[t] = null);
- }
- }
- var Rst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
- rhe("axisPointer", i, function(s, l, u) {
- o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
- type: "updateAxisPointer",
- currTrigger: s,
- x: l && l.offsetX,
- y: l && l.offsetY
- });
- });
- }, e.prototype.remove = function(n, r) {
- TL("axisPointer", r);
- }, e.prototype.dispose = function(n, r) {
- TL("axisPointer", r);
- }, e.type = "axisPointer", e;
- }(Ln)
- );
- function ihe(t, e) {
- var n = [], r = t.seriesIndex, i;
- if (r == null || !(i = e.getSeriesByIndex(r)))
- return {
- point: []
- };
- var a = i.getData(), o = Gh(a, t);
- if (o == null || o < 0 || Se(o))
- return {
- point: []
- };
- var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
- if (i.getTooltipPosition)
- n = i.getTooltipPosition(o) || [];
- else if (l && l.dataToPoint)
- if (t.isStacked) {
- var u = l.getBaseAxis(), c = l.getOtherAxis(u), f = c.dim, d = u.dim, h = f === "x" || f === "radius" ? 1 : 0, p = a.mapDimension(d), v = [];
- v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
- } else
- n = l.dataToPoint(a.getValues(Ce(l.dimensions, function(m) {
- return a.mapDimension(m);
- }), o)) || [];
- else if (s) {
- var g = s.getBoundingRect().clone();
- g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
- }
- return {
- point: n,
- el: s
- };
- }
- var NX = Ut();
- function kst(t, e, n) {
- var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || We(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
- if (s) {
- bw(i) && (i = ihe({
- seriesIndex: a.seriesIndex,
- // Do not use dataIndexInside from other ec instance.
- // FIXME: auto detect it?
- dataIndex: a.dataIndex
- }, e).point);
- var l = bw(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || bw(i), d = {}, h = {}, p = {
- list: [],
- map: {}
- }, v = {
- showPointer: vt(Nst, h),
- showTooltip: vt(Bst, p)
- };
- F(s.coordSysMap, function(m, y) {
- var _ = l || m.containPoint(i);
- F(s.coordSysAxesInfo[y], function(O, S) {
- var x = O.axis, C = Wst(u, O);
- if (!f && _ && (!u || C)) {
- var P = C && C.value;
- P == null && !l && (P = x.pointToData(i)), P != null && BX(O, P, v, !1, d);
- }
- });
- });
- var g = {};
- return F(c, function(m, y) {
- var _ = m.linkGroup;
- _ && !h[y] && F(_.axesInfo, function(O, S) {
- var x = h[S];
- if (O !== m && x) {
- var C = x.value;
- _.mapper && (C = m.axis.scale.parse(_.mapper(C, zX(O), zX(m)))), g[m.key] = C;
- }
- });
- }), F(g, function(m, y) {
- BX(c[y], m, v, !0, d);
- }), zst(h, c, d), Vst(p, i, t, o), Fst(c, o, n), d;
- }
- }
- function BX(t, e, n, r, i) {
- var a = t.axis;
- if (!(a.scale.isBlank() || !a.containData(e))) {
- if (!t.involveSeries) {
- n.showPointer(t, e);
- return;
- }
- var o = Lst(e, t), s = o.payloadBatch, l = o.snapToValue;
- s[0] && i.seriesIndex == null && _e(i, s[0]), !r && t.snap && a.containData(l) && l != null && (e = l), n.showPointer(t, e, s), n.showTooltip(t, o, l);
- }
- }
- function Lst(t, e) {
- var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
- return F(e.seriesModels, function(l, u) {
- var c = l.getData().mapDimensionsAll(r), f, d;
- if (l.getAxisTooltipData) {
- var h = l.getAxisTooltipData(c, t, n);
- d = h.dataIndices, f = h.nestestValue;
- } else {
- if (d = l.getData().indicesOfNearest(
- c[0],
- t,
- // Add a threshold to avoid find the wrong dataIndex
- // when data length is not same.
- // false,
- n.type === "category" ? 0.5 : null
- ), !d.length)
- return;
- f = l.getData().get(c[0], d[0]);
- }
- if (!(f == null || !isFinite(f))) {
- var p = t - f, v = Math.abs(p);
- v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), F(d, function(g) {
- a.push({
- seriesIndex: l.seriesIndex,
- dataIndexInside: g,
- dataIndex: l.getData().getRawIndex(g)
- });
- }));
- }
- }), {
- payloadBatch: a,
- snapToValue: i
- };
- }
- function Nst(t, e, n, r) {
- t[e.key] = {
- value: n,
- payloadBatch: r
- };
- }
- function Bst(t, e, n, r) {
- var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
- if (!(!e.triggerTooltip || !i.length)) {
- var l = e.coordSys.model, u = o_(l), c = t.map[u];
- c || (c = t.map[u] = {
- coordSysId: l.id,
- coordSysIndex: l.componentIndex,
- coordSysType: l.type,
- coordSysMainType: l.mainType,
- dataByAxis: []
- }, t.list.push(c)), c.dataByAxis.push({
- axisDim: a.dim,
- axisIndex: o.componentIndex,
- axisType: o.type,
- axisId: o.id,
- value: r,
- // Caustion: viewHelper.getValueLabel is actually on "view stage", which
- // depends that all models have been updated. So it should not be performed
- // here. Considering axisPointerModel used here is volatile, which is hard
- // to be retrieve in TooltipView, we prepare parameters here.
- valueLabelOpt: {
- precision: s.get(["label", "precision"]),
- formatter: s.get(["label", "formatter"])
- },
- seriesDataIndices: i.slice()
- });
- }
- }
- function zst(t, e, n) {
- var r = n.axesInfo = [];
- F(e, function(i, a) {
- var o = i.axisPointerModel.option, s = t[a];
- s ? (!i.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !i.useHandle && (o.status = "hide"), o.status === "show" && r.push({
- axisDim: i.axis.dim,
- axisIndex: i.axis.model.componentIndex,
- value: o.value
- });
- });
- }
- function Vst(t, e, n, r) {
- if (bw(e) || !t.list.length) {
- r({
- type: "hideTip"
- });
- return;
- }
- var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
- r({
- type: "showTip",
- escapeConnect: !0,
- x: e[0],
- y: e[1],
- tooltipOption: n.tooltipOption,
- position: n.position,
- dataIndexInside: i.dataIndexInside,
- dataIndex: i.dataIndex,
- seriesIndex: i.seriesIndex,
- dataByCoordSys: t.list
- });
- }
- function Fst(t, e, n) {
- var r = n.getZr(), i = "axisPointerLastHighlights", a = NX(r)[i] || {}, o = NX(r)[i] = {};
- F(t, function(u, c) {
- var f = u.axisPointerModel.option;
- f.status === "show" && u.triggerEmphasis && F(f.seriesDataIndices, function(d) {
- var h = d.seriesIndex + " | " + d.dataIndex;
- o[h] = d;
- });
- });
- var s = [], l = [];
- F(a, function(u, c) {
- !o[c] && l.push(u);
- }), F(o, function(u, c) {
- !a[c] && s.push(u);
- }), l.length && n.dispatchAction({
- type: "downplay",
- escapeConnect: !0,
- // Not blur others when highlight in axisPointer.
- notBlur: !0,
- batch: l
- }), s.length && n.dispatchAction({
- type: "highlight",
- escapeConnect: !0,
- // Not blur others when highlight in axisPointer.
- notBlur: !0,
- batch: s
- });
- }
- function Wst(t, e) {
- for (var n = 0; n < (t || []).length; n++) {
- var r = t[n];
- if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
- return r;
- }
- }
- function zX(t) {
- var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
- return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
- }
- function bw(t) {
- return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
- }
- function C1(t) {
- bp.registerAxisPointerClass("CartesianAxisPointer", Tst), t.registerComponentModel($st), t.registerComponentView(Rst), t.registerPreprocessor(function(e) {
- if (e) {
- (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
- var n = e.axisPointer.link;
- n && !Se(n) && (e.axisPointer.link = [n]);
- }
- }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
- e.getComponent("axisPointer").coordSysAxesInfo = Jet(e, n);
- }), t.registerAction({
- type: "updateAxisPointer",
- event: "updateAxisPointer",
- update: ":updateAxisPointer"
- }, kst);
- }
- function Qst(t) {
- Mt(Efe), Mt(C1);
- }
- var Hst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.makeElOption = function(n, r, i, a, o) {
- var s = i.axis;
- s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
- var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
- if (d && d !== "none") {
- var h = v6(a), p = jst[d](s, l, f, c);
- p.style = h, n.graphicKey = p.type, n.pointer = p;
- }
- var v = a.get(["label", "margin"]), g = Gst(r, i, a, l, v);
- Jde(n, i, a, o, g);
- }, e;
- }(p6)
- );
- function Gst(t, e, n, r, i) {
- var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
- s = s / 180 * Math.PI;
- var l = r.getRadiusAxis().getExtent(), u, c, f;
- if (a.dim === "radius") {
- var d = Na();
- Lf(d, d, s), Gs(d, d, [r.cx, r.cy]), u = zs([o, -i], d);
- var h = e.getModel("axisLabel").get("rotate") || 0, p = sa.innerTextLayout(s, h * Math.PI / 180, -1);
- c = p.textAlign, f = p.textVerticalAlign;
- } else {
- var v = l[1];
- u = r.coordToPoint([v + i, o]);
- var g = r.cx, m = r.cy;
- c = Math.abs(u[0] - g) / v < 0.3 ? "center" : u[0] > g ? "left" : "right", f = Math.abs(u[1] - m) / v < 0.3 ? "middle" : u[1] > m ? "top" : "bottom";
- }
- return {
- position: u,
- align: c,
- verticalAlign: f
- };
- }
- var jst = {
- line: function(t, e, n, r) {
- return t.dim === "angle" ? {
- type: "Line",
- shape: m6(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
- } : {
- type: "Circle",
- shape: {
- cx: e.cx,
- cy: e.cy,
- r: n
- }
- };
- },
- shadow: function(t, e, n, r) {
- var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
- return t.dim === "angle" ? {
- type: "Sector",
- shape: DX(
- e.cx,
- e.cy,
- r[0],
- r[1],
- // In ECharts y is negative if angle is positive
- (-n - i / 2) * a,
- (-n + i / 2) * a
- )
- } : {
- type: "Sector",
- shape: DX(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
- };
- }
- }, Zst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.findAxisModel = function(n) {
- var r, i = this.ecModel;
- return i.eachComponent(n, function(a) {
- a.getCoordSysModel() === this && (r = a);
- }, this), r;
- }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
- // zlevel: 0,
- z: 0,
- center: ["50%", "50%"],
- radius: "80%"
- }, e;
- }(At)
- ), y6 = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.getCoordSysModel = function() {
- return this.getReferringComponents("polar", Er).models[0];
- }, e.type = "polarAxis", e;
- }(At)
- );
- vr(y6, Dm);
- var Ust = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "angleAxis", e;
- }(y6)
- ), Xst = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "radiusAxis", e;
- }(y6)
- ), b6 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r) {
- return t.call(this, "radius", n, r) || this;
- }
- return e.prototype.pointToData = function(n, r) {
- return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
- }, e;
- }(vs)
- );
- b6.prototype.dataToRadius = vs.prototype.dataToCoord;
- b6.prototype.radiusToData = vs.prototype.coordToData;
- var Yst = Ut(), _6 = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r) {
- return t.call(this, "angle", n, r || [0, 360]) || this;
- }
- return e.prototype.pointToData = function(n, r) {
- return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
- }, e.prototype.calculateCategoryInterval = function() {
- var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
- if (a[1] - a[0] < 1)
- return 0;
- var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = o1(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
- isNaN(d) && (d = 1 / 0);
- var h = Math.max(0, Math.floor(d)), p = Yst(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
- return v != null && g != null && Math.abs(v - h) <= 1 && Math.abs(g - o) <= 1 && v > h ? h = v : (p.lastTickCount = o, p.lastAutoInterval = h), h;
- }, e;
- }(vs)
- );
- _6.prototype.dataToAngle = vs.prototype.dataToCoord;
- _6.prototype.angleToData = vs.prototype.coordToData;
- var ahe = ["radius", "angle"], qst = (
- /** @class */
- function() {
- function t(e) {
- this.dimensions = ahe, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new b6(), this._angleAxis = new _6(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
- }
- return t.prototype.containPoint = function(e) {
- var n = this.pointToCoord(e);
- return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
- }, t.prototype.containData = function(e) {
- return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
- }, t.prototype.getAxis = function(e) {
- var n = "_" + e + "Axis";
- return this[n];
- }, t.prototype.getAxes = function() {
- return [this._radiusAxis, this._angleAxis];
- }, t.prototype.getAxesByScale = function(e) {
- var n = [], r = this._angleAxis, i = this._radiusAxis;
- return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
- }, t.prototype.getAngleAxis = function() {
- return this._angleAxis;
- }, t.prototype.getRadiusAxis = function() {
- return this._radiusAxis;
- }, t.prototype.getOtherAxis = function(e) {
- var n = this._angleAxis;
- return e === n ? this._radiusAxis : n;
- }, t.prototype.getBaseAxis = function() {
- return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
- }, t.prototype.getTooltipAxes = function(e) {
- var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
- return {
- baseAxes: [n],
- otherAxes: [this.getOtherAxis(n)]
- };
- }, t.prototype.dataToPoint = function(e, n) {
- return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
- }, t.prototype.pointToData = function(e, n) {
- var r = this.pointToCoord(e);
- return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
- }, t.prototype.pointToCoord = function(e) {
- var n = e[0] - this.cx, r = e[1] - this.cy, i = this.getAngleAxis(), a = i.getExtent(), o = Math.min(a[0], a[1]), s = Math.max(a[0], a[1]);
- i.inverse ? o = s - 360 : s = o + 360;
- var l = Math.sqrt(n * n + r * r);
- n /= l, r /= l;
- for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
- u += c * 360;
- return [l, u];
- }, t.prototype.coordToPoint = function(e) {
- var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
- return [i, a];
- }, t.prototype.getArea = function() {
- var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
- r[0] > r[1] && r.reverse();
- var i = e.getExtent(), a = Math.PI / 180;
- return {
- cx: this.cx,
- cy: this.cy,
- r0: r[0],
- r: r[1],
- startAngle: -i[0] * a,
- endAngle: -i[1] * a,
- clockwise: e.inverse,
- contain: function(o, s) {
- var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
- return c <= f * f && c >= d * d;
- }
- };
- }, t.prototype.convertToPixel = function(e, n, r) {
- var i = VX(n);
- return i === this ? this.dataToPoint(r) : null;
- }, t.prototype.convertFromPixel = function(e, n, r) {
- var i = VX(n);
- return i === this ? this.pointToData(r) : null;
- }, t;
- }()
- );
- function VX(t) {
- var e = t.seriesModel, n = t.polarModel;
- return n && n.coordinateSystem || e && e.coordinateSystem;
- }
- const Kst = qst;
- function Jst(t, e, n) {
- var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
- t.cx = ze(r[0], i), t.cy = ze(r[1], a);
- var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
- l == null ? l = [0, "100%"] : Se(l) || (l = [0, l]);
- var u = [ze(l[0], s), ze(l[1], s)];
- o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
- }
- function elt(t, e) {
- var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
- if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
- if (s.coordinateSystem === n) {
- var l = s.getData();
- F(qC(l, "radius"), function(u) {
- i.scale.unionExtentFromData(l, u);
- }), F(qC(l, "angle"), function(u) {
- r.scale.unionExtentFromData(l, u);
- });
- }
- }), Xh(r.scale, r.model), Xh(i.scale, i.model), r.type === "category" && !r.onBand) {
- var a = r.getExtent(), o = 360 / r.scale.count();
- r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
- }
- }
- function tlt(t) {
- return t.mainType === "angleAxis";
- }
- function FX(t, e) {
- var n;
- if (t.type = e.get("type"), t.scale = g1(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), tlt(e)) {
- t.inverse = t.inverse !== e.get("clockwise");
- var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
- t.setExtent(r, i);
- }
- e.axis = t, t.model = e;
- }
- var nlt = {
- dimensions: ahe,
- create: function(t, e) {
- var n = [];
- return t.eachComponent("polar", function(r, i) {
- var a = new Kst(i + "");
- a.update = elt;
- var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
- FX(o, l), FX(s, u), Jst(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
- }), t.eachSeries(function(r) {
- if (r.get("coordinateSystem") === "polar") {
- var i = r.getReferringComponents("polar", Er).models[0];
- if (process.env.NODE_ENV !== "production" && !i)
- throw new Error('Polar "' + Or(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
- r.coordinateSystem = i.coordinateSystem;
- }
- }), n;
- }
- }, rlt = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
- function XS(t, e, n) {
- e[1] > e[0] && (e = e.slice().reverse());
- var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
- return {
- x1: r[0],
- y1: r[1],
- x2: i[0],
- y2: i[1]
- };
- }
- function YS(t) {
- var e = t.getRadiusAxis();
- return e.inverse ? 0 : 1;
- }
- function WX(t) {
- var e = t[0], n = t[t.length - 1];
- e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
- }
- var ilt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
- }
- return e.prototype.render = function(n, r) {
- if (this.group.removeAll(), !!n.get("show")) {
- var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = Ce(i.getViewLabels(), function(c) {
- c = ot(c);
- var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
- return c.coord = i.dataToCoord(d), c;
- });
- WX(u), WX(s), F(rlt, function(c) {
- n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && alt[c](this.group, n, a, s, l, o, u);
- }, this);
- }
- }, e.type = "angleAxis", e;
- }(bp)
- ), alt = {
- axisLine: function(t, e, n, r, i, a) {
- var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = YS(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
- a[f] === 0 ? d = new hp[h]({
- shape: {
- cx: n.cx,
- cy: n.cy,
- r: a[c],
- startAngle: -u[0] * l,
- endAngle: -u[1] * l,
- clockwise: s.inverse
- },
- style: o.getLineStyle(),
- z2: 1,
- silent: !0
- }) : d = new c1({
- shape: {
- cx: n.cx,
- cy: n.cy,
- r: a[c],
- r0: a[f]
- },
- style: o.getLineStyle(),
- z2: 1,
- silent: !0
- }), d.style.fill = null, t.add(d);
- },
- axisTick: function(t, e, n, r, i, a) {
- var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[YS(n)], u = Ce(r, function(c) {
- return new Xr({
- shape: XS(n, [l, l + s], c.coord)
- });
- });
- t.add(no(u, {
- style: it(o.getModel("lineStyle").getLineStyle(), {
- stroke: e.get(["axisLine", "lineStyle", "color"])
- })
- }));
- },
- minorTick: function(t, e, n, r, i, a) {
- if (i.length) {
- for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[YS(n)], c = [], f = 0; f < i.length; f++)
- for (var d = 0; d < i[f].length; d++)
- c.push(new Xr({
- shape: XS(n, [u, u + l], i[f][d].coord)
- }));
- t.add(no(c, {
- style: it(s.getModel("lineStyle").getLineStyle(), it(o.getLineStyle(), {
- stroke: e.get(["axisLine", "lineStyle", "color"])
- }))
- }));
- }
- },
- axisLabel: function(t, e, n, r, i, a, o) {
- var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
- F(o, function(f, d) {
- var h = l, p = f.tickValue, v = a[YS(n)], g = n.coordToPoint([v + u, f.coord]), m = n.cx, y = n.cy, _ = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", O = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom";
- if (s && s[p]) {
- var S = s[p];
- nt(S) && S.textStyle && (h = new wn(S.textStyle, l, l.ecModel));
- }
- var x = new jt({
- silent: sa.isLabelSilent(e),
- style: Mn(h, {
- x: g[0],
- y: g[1],
- fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
- text: f.formattedLabel,
- align: _,
- verticalAlign: O
- })
- });
- if (t.add(x), c) {
- var C = sa.makeAxisEventDataBase(e);
- C.targetType = "axisLabel", C.value = f.rawLabel, ft(x).eventData = C;
- }
- }, this);
- },
- splitLine: function(t, e, n, r, i, a) {
- var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
- l = l instanceof Array ? l : [l];
- for (var c = [], f = 0; f < r.length; f++) {
- var d = u++ % l.length;
- c[d] = c[d] || [], c[d].push(new Xr({
- shape: XS(n, a, r[f].coord)
- }));
- }
- for (var f = 0; f < c.length; f++)
- t.add(no(c[f], {
- style: it({
- stroke: l[f % l.length]
- }, s.getLineStyle()),
- silent: !0,
- z: e.get("z")
- }));
- },
- minorSplitLine: function(t, e, n, r, i, a) {
- if (i.length) {
- for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
- for (var c = 0; c < i[u].length; c++)
- l.push(new Xr({
- shape: XS(n, a, i[u][c].coord)
- }));
- t.add(no(l, {
- style: s.getLineStyle(),
- silent: !0,
- z: e.get("z")
- }));
- }
- },
- splitArea: function(t, e, n, r, i, a) {
- if (r.length) {
- var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
- l = l instanceof Array ? l : [l];
- for (var c = [], f = Math.PI / 180, d = -r[0].coord * f, h = Math.min(a[0], a[1]), p = Math.max(a[0], a[1]), v = e.get("clockwise"), g = 1, m = r.length; g <= m; g++) {
- var y = g === m ? r[0].coord : r[g].coord, _ = u++ % l.length;
- c[_] = c[_] || [], c[_].push(new ha({
- shape: {
- cx: n.cx,
- cy: n.cy,
- r0: h,
- r: p,
- startAngle: d,
- endAngle: -y * f,
- clockwise: v
- },
- silent: !0
- })), d = -y * f;
- }
- for (var g = 0; g < c.length; g++)
- t.add(no(c[g], {
- style: it({
- fill: l[g % l.length]
- }, s.getAreaStyle()),
- silent: !0
- }));
- }
- }
- }, olt = ["axisLine", "axisTickLabel", "axisName"], slt = ["splitLine", "splitArea", "minorSplitLine"], llt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
- }
- return e.prototype.render = function(n, r) {
- if (this.group.removeAll(), !!n.get("show")) {
- var i = this._axisGroup, a = this._axisGroup = new ct();
- this.group.add(a);
- var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = clt(s, n, f), p = new sa(n, h);
- F(olt, p.add, p), a.add(p.getGroup()), h1(i, a, n), F(slt, function(v) {
- n.get([v, "show"]) && !o.scale.isBlank() && ult[v](this.group, n, s, f, d, u, c);
- }, this);
- }
- }, e.type = "radiusAxis", e;
- }(bp)
- ), ult = {
- splitLine: function(t, e, n, r, i, a) {
- var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0, c = n.getAngleAxis(), f = Math.PI / 180, d = c.getExtent(), h = Math.abs(d[1] - d[0]) === 360 ? "Circle" : "Arc";
- l = l instanceof Array ? l : [l];
- for (var p = [], v = 0; v < a.length; v++) {
- var g = u++ % l.length;
- p[g] = p[g] || [], p[g].push(new hp[h]({
- shape: {
- cx: n.cx,
- cy: n.cy,
- // ensure circle radius >= 0
- r: Math.max(a[v].coord, 0),
- startAngle: -d[0] * f,
- endAngle: -d[1] * f,
- clockwise: c.inverse
- }
- }));
- }
- for (var v = 0; v < p.length; v++)
- t.add(no(p[v], {
- style: it({
- stroke: l[v % l.length],
- fill: null
- }, s.getLineStyle()),
- silent: !0
- }));
- },
- minorSplitLine: function(t, e, n, r, i, a, o) {
- if (o.length) {
- for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
- for (var f = 0; f < o[c].length; f++)
- u.push(new ic({
- shape: {
- cx: n.cx,
- cy: n.cy,
- r: o[c][f].coord
- }
- }));
- t.add(no(u, {
- style: it({
- fill: null
- }, l.getLineStyle()),
- silent: !0
- }));
- }
- },
- splitArea: function(t, e, n, r, i, a) {
- if (a.length) {
- var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
- l = l instanceof Array ? l : [l];
- for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
- var h = u++ % l.length;
- c[h] = c[h] || [], c[h].push(new ha({
- shape: {
- cx: n.cx,
- cy: n.cy,
- r0: f,
- r: a[d].coord,
- startAngle: 0,
- endAngle: Math.PI * 2
- },
- silent: !0
- })), f = a[d].coord;
- }
- for (var d = 0; d < c.length; d++)
- t.add(no(c[d], {
- style: it({
- fill: l[d % l.length]
- }, s.getAreaStyle()),
- silent: !0
- }));
- }
- }
- };
- function clt(t, e, n) {
- return {
- position: [t.cx, t.cy],
- rotation: n / 180 * Math.PI,
- labelDirection: -1,
- tickDirection: -1,
- nameDirection: 1,
- labelRotate: e.getModel("axisLabel").get("rotate"),
- // Over splitLine and splitArea
- z2: 1
- };
- }
- function ohe(t) {
- return t.get("stack") || "__ec_stack_" + t.seriesIndex;
- }
- function she(t, e) {
- return e.dim + t.model.componentIndex;
- }
- function flt(t, e, n) {
- var r = {}, i = dlt(yn(e.getSeriesByType(t), function(a) {
- return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
- }));
- e.eachSeriesByType(t, function(a) {
- if (a.coordinateSystem.type === "polar") {
- var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = she(s, l), c = ohe(a), f = i[u][c], d = f.offset, h = f.width, p = s.getOtherAxis(l), v = a.coordinateSystem.cx, g = a.coordinateSystem.cy, m = a.get("barMinHeight") || 0, y = a.get("barMinAngle") || 0;
- r[c] = r[c] || [];
- for (var _ = o.mapDimension(p.dim), O = o.mapDimension(l.dim), S = Hu(
- o,
- _
- /* , baseDim */
- ), x = l.dim !== "radius" || !a.get("roundCap", !0), C = p.model, P = C.get("startValue"), $ = p.dataToCoord(P || 0), T = 0, E = o.count(); T < E; T++) {
- var M = o.get(_, T), R = o.get(O, T), N = M >= 0 ? "p" : "n", I = $;
- S && (r[c][R] || (r[c][R] = {
- p: $,
- n: $
- // Negative stack
- }), I = r[c][R][N]);
- var B = void 0, Q = void 0, W = void 0, H = void 0;
- if (p.dim === "radius") {
- var U = p.dataToCoord(M) - $, j = l.dataToCoord(R);
- Math.abs(U) < m && (U = (U < 0 ? -1 : 1) * m), B = I, Q = I + U, W = j - d, H = W - h, S && (r[c][R][N] = Q);
- } else {
- var Y = p.dataToCoord(M, x) - $, ne = l.dataToCoord(R);
- Math.abs(Y) < y && (Y = (Y < 0 ? -1 : 1) * y), B = ne + d, Q = B + h, W = I, H = I + Y, S && (r[c][R][N] = H);
- }
- o.setItemLayout(T, {
- cx: v,
- cy: g,
- r0: B,
- r: Q,
- // Consider that positive angle is anti-clockwise,
- // while positive radian of sector is clockwise
- startAngle: -W * Math.PI / 180,
- endAngle: -H * Math.PI / 180,
- /**
- * Keep the same logic with bar in catesion: use end value to
- * control direction. Notice that if clockwise is true (by
- * default), the sector will always draw clockwisely, no matter
- * whether endAngle is greater or less than startAngle.
- */
- clockwise: W >= H
- });
- }
- }
- });
- }
- function dlt(t) {
- var e = {};
- F(t, function(r, i) {
- var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = she(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
- bandWidth: c,
- remainedWidth: c,
- autoWidthCount: 0,
- categoryGap: "20%",
- gap: "30%",
- stacks: {}
- }, d = f.stacks;
- e[l] = f;
- var h = ohe(r);
- d[h] || f.autoWidthCount++, d[h] = d[h] || {
- width: 0,
- maxWidth: 0
- };
- var p = ze(r.get("barWidth"), c), v = ze(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
- p && !d[h].width && (p = Math.min(f.remainedWidth, p), d[h].width = p, f.remainedWidth -= p), v && (d[h].maxWidth = v), g != null && (f.gap = g), m != null && (f.categoryGap = m);
- });
- var n = {};
- return F(e, function(r, i) {
- n[i] = {};
- var a = r.stacks, o = r.bandWidth, s = ze(r.categoryGap, o), l = ze(r.gap, 1), u = r.remainedWidth, c = r.autoWidthCount, f = (u - s) / (c + (c - 1) * l);
- f = Math.max(f, 0), F(a, function(v, g) {
- var m = v.maxWidth;
- m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
- }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
- var d = 0, h;
- F(a, function(v, g) {
- v.width || (v.width = f), h = v, d += v.width * (1 + l);
- }), h && (d -= h.width * l);
- var p = -d / 2;
- F(a, function(v, g) {
- n[i][g] = n[i][g] || {
- offset: p,
- width: v.width
- }, p += v.width * (1 + l);
- });
- }), n;
- }
- var hlt = {
- startAngle: 90,
- clockwise: !0,
- splitNumber: 12,
- axisLabel: {
- rotate: 0
- }
- }, plt = {
- splitNumber: 5
- }, vlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "polar", e;
- }(Ln)
- );
- function glt(t) {
- Mt(C1), bp.registerAxisPointerClass("PolarAxisPointer", Hst), t.registerCoordinateSystem("polar", nlt), t.registerComponentModel(Zst), t.registerComponentView(vlt), Zg(t, "angle", Ust, hlt), Zg(t, "radius", Xst, plt), t.registerComponentView(ilt), t.registerComponentView(llt), t.registerLayout(vt(flt, "bar"));
- }
- function PL(t, e) {
- e = e || {};
- var n = t.coordinateSystem, r = t.axis, i = {}, a = r.position, o = r.orient, s = n.getRect(), l = [s.x, s.x + s.width, s.y, s.y + s.height], u = {
- horizontal: {
- top: l[2],
- bottom: l[3]
- },
- vertical: {
- left: l[0],
- right: l[1]
- }
- };
- i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
- var c = {
- horizontal: 0,
- vertical: 1
- };
- i.rotation = Math.PI / 2 * c[o];
- var f = {
- top: -1,
- bottom: 1,
- right: 1,
- left: -1
- };
- i.labelDirection = i.tickDirection = i.nameDirection = f[a], t.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), Or(e.labelInside, t.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
- var d = e.rotate;
- return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
- }
- var mlt = ["axisLine", "axisTickLabel", "axisName"], ylt = ["splitArea", "splitLine"], blt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
- }
- return e.prototype.render = function(n, r, i, a) {
- var o = this.group;
- o.removeAll();
- var s = this._axisGroup;
- this._axisGroup = new ct();
- var l = PL(n), u = new sa(n, l);
- F(mlt, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), F(ylt, function(c) {
- n.get([c, "show"]) && _lt[c](this, this.group, this._axisGroup, n);
- }, this), h1(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
- }, e.prototype.remove = function() {
- Pfe(this);
- }, e.type = "singleAxis", e;
- }(bp)
- ), _lt = {
- splitLine: function(t, e, n, r) {
- var i = r.axis;
- if (!i.scale.isBlank()) {
- var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
- s = s instanceof Array ? s : [s];
- for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
- tickModel: a
- }), p = [], v = [], g = 0; g < h.length; ++g) {
- var m = i.toGlobalCoord(h[g].coord);
- c ? (p[0] = m, p[1] = u.y, v[0] = m, v[1] = u.y + u.height) : (p[0] = u.x, p[1] = m, v[0] = u.x + u.width, v[1] = m);
- var y = new Xr({
- shape: {
- x1: p[0],
- y1: p[1],
- x2: v[0],
- y2: v[1]
- },
- silent: !0
- });
- Qg(y.shape, l);
- var _ = d++ % s.length;
- f[_] = f[_] || [], f[_].push(y);
- }
- for (var O = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
- e.add(no(f[g], {
- style: it({
- stroke: s[g % s.length]
- }, O),
- silent: !0
- }));
- }
- },
- splitArea: function(t, e, n, r) {
- Tfe(t, n, r, r);
- }
- }, _w = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.getCoordSysModel = function() {
- return this;
- }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
- left: "5%",
- top: "5%",
- right: "5%",
- bottom: "5%",
- type: "value",
- position: "bottom",
- orient: "horizontal",
- axisLine: {
- show: !0,
- lineStyle: {
- width: 1,
- type: "solid"
- }
- },
- // Single coordinate system and single axis is the,
- // which is used as the parent tooltip model.
- // same model, so we set default tooltip show as true.
- tooltip: {
- show: !0
- },
- axisTick: {
- show: !0,
- length: 6,
- lineStyle: {
- width: 1
- }
- },
- axisLabel: {
- show: !0,
- interval: "auto"
- },
- splitLine: {
- show: !0,
- lineStyle: {
- type: "dashed",
- opacity: 0.2
- }
- }
- }, e;
- }(At)
- );
- vr(_w, Dm.prototype);
- var Olt = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a, o) {
- var s = t.call(this, n, r, i) || this;
- return s.type = a || "value", s.position = o || "bottom", s;
- }
- return e.prototype.isHorizontal = function() {
- var n = this.position;
- return n === "top" || n === "bottom";
- }, e.prototype.pointToData = function(n, r) {
- return this.coordinateSystem.pointToData(n)[0];
- }, e;
- }(vs)
- ), lhe = ["single"], Slt = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.type = "single", this.dimension = "single", this.dimensions = lhe, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
- }
- return t.prototype._init = function(e, n, r) {
- var i = this.dimension, a = new Olt(i, g1(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
- a.onBand = o && e.get("boundaryGap"), a.inverse = e.get("inverse"), a.orient = e.get("orient"), e.axis = a, a.model = e, a.coordinateSystem = this, this._axis = a;
- }, t.prototype.update = function(e, n) {
- e.eachSeries(function(r) {
- if (r.coordinateSystem === this) {
- var i = r.getData();
- F(i.mapDimensionsAll(this.dimension), function(a) {
- this._axis.scale.unionExtentFromData(i, a);
- }, this), Xh(this._axis.scale, this._axis.model);
- }
- }, this);
- }, t.prototype.resize = function(e, n) {
- this._rect = Mr({
- left: e.get("left"),
- top: e.get("top"),
- right: e.get("right"),
- bottom: e.get("bottom"),
- width: e.get("width"),
- height: e.get("height")
- }, {
- width: n.getWidth(),
- height: n.getHeight()
- }), this._adjustAxis();
- }, t.prototype.getRect = function() {
- return this._rect;
- }, t.prototype._adjustAxis = function() {
- var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
- n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
- }, t.prototype._updateAxisTransform = function(e, n) {
- var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
- e.toGlobalCoord = a ? function(o) {
- return o + n;
- } : function(o) {
- return i - o + n;
- }, e.toLocalCoord = a ? function(o) {
- return o - n;
- } : function(o) {
- return i - o + n;
- };
- }, t.prototype.getAxis = function() {
- return this._axis;
- }, t.prototype.getBaseAxis = function() {
- return this._axis;
- }, t.prototype.getAxes = function() {
- return [this._axis];
- }, t.prototype.getTooltipAxes = function() {
- return {
- baseAxes: [this.getAxis()],
- // Empty otherAxes
- otherAxes: []
- };
- }, t.prototype.containPoint = function(e) {
- var n = this.getRect(), r = this.getAxis(), i = r.orient;
- return i === "horizontal" ? r.contain(r.toLocalCoord(e[0])) && e[1] >= n.y && e[1] <= n.y + n.height : r.contain(r.toLocalCoord(e[1])) && e[0] >= n.y && e[0] <= n.y + n.height;
- }, t.prototype.pointToData = function(e) {
- var n = this.getAxis();
- return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
- }, t.prototype.dataToPoint = function(e) {
- var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
- return e instanceof Array && (e = e[0]), i[a] = n.toGlobalCoord(n.dataToCoord(+e)), i[1 - a] = a === 0 ? r.y + r.height / 2 : r.x + r.width / 2, i;
- }, t.prototype.convertToPixel = function(e, n, r) {
- var i = QX(n);
- return i === this ? this.dataToPoint(r) : null;
- }, t.prototype.convertFromPixel = function(e, n, r) {
- var i = QX(n);
- return i === this ? this.pointToData(r) : null;
- }, t;
- }()
- );
- function QX(t) {
- var e = t.seriesModel, n = t.singleAxisModel;
- return n && n.coordinateSystem || e && e.coordinateSystem;
- }
- function xlt(t, e) {
- var n = [];
- return t.eachComponent("singleAxis", function(r, i) {
- var a = new Slt(r, t, e);
- a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
- }), t.eachSeries(function(r) {
- if (r.get("coordinateSystem") === "singleAxis") {
- var i = r.getReferringComponents("singleAxis", Er).models[0];
- r.coordinateSystem = i && i.coordinateSystem;
- }
- }), n;
- }
- var wlt = {
- create: xlt,
- dimensions: lhe
- }, HX = ["x", "y"], Clt = ["width", "height"], Tlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.makeElOption = function(n, r, i, a, o) {
- var s = i.axis, l = s.coordinateSystem, u = II(l, 1 - hT(s)), c = l.dataToPoint(r)[0], f = a.get("type");
- if (f && f !== "none") {
- var d = v6(a), h = Plt[f](s, c, u);
- h.style = d, n.graphicKey = h.type, n.pointer = h;
- }
- var p = PL(i);
- the(
- // @ts-ignore
- r,
- n,
- p,
- i,
- a,
- o
- );
- }, e.prototype.getHandleTransform = function(n, r, i) {
- var a = PL(r, {
- labelInside: !1
- });
- a.labelMargin = i.get(["handle", "margin"]);
- var o = g6(r.axis, n, a);
- return {
- x: o[0],
- y: o[1],
- rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
- };
- }, e.prototype.updateHandleTransform = function(n, r, i, a) {
- var o = i.axis, s = o.coordinateSystem, l = hT(o), u = II(s, l), c = [n.x, n.y];
- c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
- var f = II(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
- return h[l] = c[l], {
- x: c[0],
- y: c[1],
- rotation: n.rotation,
- cursorPoint: h,
- tooltipOption: {
- verticalAlign: "middle"
- }
- };
- }, e;
- }(p6)
- ), Plt = {
- line: function(t, e, n) {
- var r = m6([e, n[0]], [e, n[1]], hT(t));
- return {
- type: "Line",
- subPixelOptimize: !0,
- shape: r
- };
- },
- shadow: function(t, e, n) {
- var r = t.getBandWidth(), i = n[1] - n[0];
- return {
- type: "Rect",
- shape: nhe([e - r / 2, n[0]], [r, i], hT(t))
- };
- }
- };
- function hT(t) {
- return t.isHorizontal() ? 0 : 1;
- }
- function II(t, e) {
- var n = t.getRect();
- return [n[HX[e]], n[HX[e]] + n[Clt[e]]];
- }
- var $lt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "single", e;
- }(Ln)
- );
- function Alt(t) {
- Mt(C1), bp.registerAxisPointerClass("SingleAxisPointer", Tlt), t.registerComponentView($lt), t.registerComponentView(blt), t.registerComponentModel(_w), Zg(t, "single", _w, _w.defaultOption), t.registerCoordinateSystem("single", wlt);
- }
- var Elt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r, i) {
- var a = Tm(n);
- t.prototype.init.apply(this, arguments), GX(n, a);
- }, e.prototype.mergeOption = function(n) {
- t.prototype.mergeOption.apply(this, arguments), GX(this.option, n);
- }, e.prototype.getCellSize = function() {
- return this.option.cellSize;
- }, e.type = "calendar", e.defaultOption = {
- // zlevel: 0,
- z: 2,
- left: 80,
- top: 60,
- cellSize: 20,
- // horizontal vertical
- orient: "horizontal",
- // month separate line style
- splitLine: {
- show: !0,
- lineStyle: {
- color: "#000",
- width: 1,
- type: "solid"
- }
- },
- // rect style temporarily unused emphasis
- itemStyle: {
- color: "#fff",
- borderWidth: 1,
- borderColor: "#ccc"
- },
- // week text style
- dayLabel: {
- show: !0,
- firstDay: 0,
- // start end
- position: "start",
- margin: "50%",
- color: "#000"
- },
- // month text style
- monthLabel: {
- show: !0,
- // start end
- position: "start",
- margin: 5,
- // center or left
- align: "center",
- formatter: null,
- color: "#000"
- },
- // year text style
- yearLabel: {
- show: !0,
- // top bottom left right
- position: null,
- margin: 30,
- formatter: null,
- color: "#ccc",
- fontFamily: "sans-serif",
- fontWeight: "bolder",
- fontSize: 20
- }
- }, e;
- }(At)
- );
- function GX(t, e) {
- var n = t.cellSize, r;
- Se(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
- var i = Ce([0, 1], function(a) {
- return AUe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
- });
- Of(t, e, {
- type: "box",
- ignoreSize: i
- });
- }
- var Mlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- var a = this.group;
- a.removeAll();
- var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
- this._renderDayRect(n, s, a), this._renderLines(n, s, l, a), this._renderYearText(n, s, l, a), this._renderMonthText(n, u, l, a), this._renderWeekText(n, u, s, l, a);
- }, e.prototype._renderDayRect = function(n, r, i) {
- for (var a = n.coordinateSystem, o = n.getModel("itemStyle").getItemStyle(), s = a.getCellWidth(), l = a.getCellHeight(), u = r.start.time; u <= r.end.time; u = a.getNextNDay(u, 1).time) {
- var c = a.dataToRect([u], !1).tl, f = new Zt({
- shape: {
- x: c[0],
- y: c[1],
- width: s,
- height: l
- },
- cursor: "default",
- style: o
- });
- i.add(f);
- }
- }, e.prototype._renderLines = function(n, r, i, a) {
- var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
- this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
- for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
- p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
- var h = f.date;
- h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
- }
- p(s.getNextNDay(r.end.time, 1).formatedDate);
- function p(v) {
- o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
- var g = o._getLinePointsOfOneWeek(n, v, i);
- o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
- }
- u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
- }, e.prototype._getEdgesPoints = function(n, r, i) {
- var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
- return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
- }, e.prototype._drawSplitline = function(n, r, i) {
- var a = new va({
- z2: 20,
- shape: {
- points: n
- },
- style: r
- });
- i.add(a);
- }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
- for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
- var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
- s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
- }
- return s;
- }, e.prototype._formatterLabel = function(n, r) {
- return Ve(n) && n ? CUe(n, r) : qe(n) ? n(r) : r.nameMap;
- }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
- var s = r[0], l = r[1], u = ["center", "bottom"];
- a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
- var c = 0;
- return (a === "left" || a === "right") && (c = Math.PI / 2), {
- rotation: c,
- x: s,
- y: l,
- style: {
- align: u[0],
- verticalAlign: u[1]
- }
- };
- }, e.prototype._renderYearText = function(n, r, i, a) {
- var o = n.getModel("yearLabel");
- if (o.get("show")) {
- var s = o.get("margin"), l = o.get("position");
- l || (l = i !== "horizontal" ? "top" : "left");
- var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], c = (u[0][0] + u[1][0]) / 2, f = (u[0][1] + u[1][1]) / 2, d = i === "horizontal" ? 0 : 1, h = {
- top: [c, u[d][1]],
- bottom: [c, u[1 - d][1]],
- left: [u[1 - d][0], f],
- right: [u[d][0], f]
- }, p = r.start.y;
- +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
- var v = o.get("formatter"), g = {
- start: r.start.y,
- end: r.end.y,
- nameMap: p
- }, m = this._formatterLabel(v, g), y = new jt({
- z2: 30,
- style: Mn(o, {
- text: m
- })
- });
- y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
- }
- }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
- var s = "left", l = "top", u = n[0], c = n[1];
- return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
- x: u,
- y: c,
- align: s,
- verticalAlign: l
- };
- }, e.prototype._renderMonthText = function(n, r, i, a) {
- var o = n.getModel("monthLabel");
- if (o.get("show")) {
- var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
- (!s || Ve(s)) && (s && (r = kk(s) || r), s = r.get(["time", "monthAbbr"]) || []);
- var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
- l = u === "start" ? -l : l;
- for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
- var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
- if (p) {
- var y = this._firstDayPoints[v];
- g[h] = (y[h] + f[0][v + 1][h]) / 2;
- }
- var _ = o.get("formatter"), O = s[+m.m - 1], S = {
- yyyy: m.y,
- yy: (m.y + "").slice(2),
- MM: m.m,
- M: +m.m,
- nameMap: O
- }, x = this._formatterLabel(_, S), C = new jt({
- z2: 30,
- style: _e(Mn(o, {
- text: x
- }), this._monthTextPositionControl(g, p, i, u, l))
- });
- a.add(C);
- }
- }
- }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
- var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
- return r === "horizontal" ? (u = u + a + (f ? 1 : -1) * o[0] / 2, s = f ? "right" : "left") : (c = c + a + (f ? 1 : -1) * o[1] / 2, l = f ? "bottom" : "top"), {
- x: u,
- y: c,
- align: s,
- verticalAlign: l
- };
- }, e.prototype._renderWeekText = function(n, r, i, a, o) {
- var s = n.getModel("dayLabel");
- if (s.get("show")) {
- var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
- if (!c || Ve(c)) {
- c && (r = kk(c) || r);
- var h = r.get(["time", "dayOfWeekShort"]);
- c = h || Ce(r.get(["time", "dayOfWeekAbbr"]), function(S) {
- return S[0];
- });
- }
- var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
- f = ze(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
- for (var g = 0; g < 7; g++) {
- var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, _ = g;
- _ = Math.abs((g + d) % 7);
- var O = new jt({
- z2: 30,
- style: _e(Mn(s, {
- text: c[_]
- }), this._weekTextPositionControl(y, a, u, f, v))
- });
- o.add(O);
- }
- }
- }, e.type = "calendar", e;
- }(Ln)
- ), DI = 864e5, Ilt = (
- /** @class */
- function() {
- function t(e, n, r) {
- this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
- }
- return t.getDimensionsInfo = function() {
- return [{
- name: "time",
- type: "time"
- }, "value"];
- }, t.prototype.getRangeInfo = function() {
- return this._rangeInfo;
- }, t.prototype.getModel = function() {
- return this._model;
- }, t.prototype.getRect = function() {
- return this._rect;
- }, t.prototype.getCellWidth = function() {
- return this._sw;
- }, t.prototype.getCellHeight = function() {
- return this._sh;
- }, t.prototype.getOrient = function() {
- return this._orient;
- }, t.prototype.getFirstDayOfWeek = function() {
- return this._firstDayOfWeek;
- }, t.prototype.getDateInfo = function(e) {
- e = go(e);
- var n = e.getFullYear(), r = e.getMonth() + 1, i = r < 10 ? "0" + r : "" + r, a = e.getDate(), o = a < 10 ? "0" + a : "" + a, s = e.getDay();
- return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
- y: n + "",
- m: i,
- d: o,
- day: s,
- time: e.getTime(),
- formatedDate: n + "-" + i + "-" + o,
- date: e
- };
- }, t.prototype.getNextNDay = function(e, n) {
- return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
- }, t.prototype.update = function(e, n) {
- 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());
- var r = this._rangeInfo.weeks || 1, i = ["width", "height"], a = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [r, 7] : [7, r];
- F([0, 1], function(f) {
- c(a, f) && (o[i[f]] = a[f] * s[f]);
- });
- var l = {
- width: n.getWidth(),
- height: n.getHeight()
- }, u = this._rect = Mr(o, l);
- F([0, 1], function(f) {
- c(a, f) || (a[f] = u[i[f]] / s[f]);
- });
- function c(f, d) {
- return f[d] != null && f[d] !== "auto";
- }
- this._sw = a[0], this._sh = a[1];
- }, t.prototype.dataToPoint = function(e, n) {
- Se(e) && (e = e[0]), n == null && (n = !0);
- var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
- if (n && !(r.time >= i.start.time && r.time < i.end.time + DI))
- return [NaN, NaN];
- var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
- return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2];
- }, t.prototype.pointToData = function(e) {
- var n = this.pointToDate(e);
- return n && n.time;
- }, t.prototype.dataToRect = function(e, n) {
- var r = this.dataToPoint(e, n);
- return {
- contentShape: {
- x: r[0] - (this._sw - this._lineWidth) / 2,
- y: r[1] - (this._sh - this._lineWidth) / 2,
- width: this._sw - this._lineWidth,
- height: this._sh - this._lineWidth
- },
- center: r,
- tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
- tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
- br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
- bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
- };
- }, t.prototype.pointToDate = function(e) {
- var n = Math.floor((e[0] - this._rect.x) / this._sw) + 1, r = Math.floor((e[1] - this._rect.y) / this._sh) + 1, i = this._rangeInfo.range;
- return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
- }, t.prototype.convertToPixel = function(e, n, r) {
- var i = jX(n);
- return i === this ? i.dataToPoint(r) : null;
- }, t.prototype.convertFromPixel = function(e, n, r) {
- var i = jX(n);
- return i === this ? i.pointToData(r) : null;
- }, t.prototype.containPoint = function(e) {
- return console.warn("Not implemented."), !1;
- }, t.prototype._initRangeOption = function() {
- var e = this._model.get("range"), n;
- if (Se(e) && e.length === 1 && (e = e[0]), Se(e))
- n = e;
- else {
- var r = e.toString();
- if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
- var i = this.getDateInfo(r), a = i.date;
- a.setMonth(a.getMonth() + 1);
- var o = this.getNextNDay(a, -1);
- n = [i.formatedDate, o.formatedDate];
- }
- /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
- }
- if (!n)
- return process.env.NODE_ENV !== "production" && qo("Invalid date range."), e;
- var s = this._getRangeInfo(n);
- return s.start.time > s.end.time && n.reverse(), n;
- }, t.prototype._getRangeInfo = function(e) {
- var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
- n[0].time > n[1].time && (r = !0, n.reverse());
- var i = Math.floor(n[1].time / DI) - Math.floor(n[0].time / DI) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
- a.setDate(o + i - 1);
- var l = a.getDate();
- if (l !== s)
- for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
- i -= u, a.setDate(l - u);
- var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
- return r && n.reverse(), {
- range: [n[0].formatedDate, n[1].formatedDate],
- start: n[0],
- end: n[1],
- allDay: i,
- weeks: c,
- // From 0.
- nthWeek: f,
- fweek: n[0].day,
- lweek: n[1].day
- };
- }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
- var i = this._getRangeInfo(r);
- if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
- return null;
- var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
- return o.setDate(+i.start.d + a), this.getDateInfo(o);
- }, t.create = function(e, n) {
- var r = [];
- return e.eachComponent("calendar", function(i) {
- var a = new t(i);
- r.push(a), i.coordinateSystem = a;
- }), e.eachSeries(function(i) {
- i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
- }), r;
- }, t.dimensions = ["time", "value"], t;
- }()
- );
- function jX(t) {
- var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
- return r;
- }
- function Dlt(t) {
- t.registerComponentModel(Elt), t.registerComponentView(Mlt), t.registerCoordinateSystem("calendar", Ilt);
- }
- function Rlt(t, e) {
- var n = t.existing;
- if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
- var r = e.parentOption;
- r ? e.parentId = r.id : n && (e.parentId = n.parentId);
- }
- e.parentOption = null;
- }
- function ZX(t, e) {
- var n;
- return F(e, function(r) {
- t[r] != null && t[r] !== "auto" && (n = !0);
- }), n;
- }
- function klt(t, e, n) {
- var r = _e({}, n), i = t[e], a = n.$action || "merge";
- if (a === "merge")
- if (i) {
- if (process.env.NODE_ENV !== "production") {
- var o = n.type;
- at(!o || i.type === o, 'Please set $action: "replace" to change `type`');
- }
- mt(i, r, !0), Of(i, r, {
- ignoreSize: !0
- }), qle(n, i), qS(n, i), qS(n, i, "shape"), qS(n, i, "style"), qS(n, i, "extra"), n.clipPath = i.clipPath;
- } else
- t[e] = r;
- else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
- }
- var uhe = ["transition", "enterFrom", "leaveTo"], Llt = uhe.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
- function qS(t, e, n) {
- if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
- for (var r = n ? uhe : Llt, i = 0; i < r.length; i++) {
- var a = r[i];
- t[a] == null && e[a] != null && (t[a] = e[a]);
- }
- }
- function Nlt(t, e) {
- if (t && (t.hv = e.hv = [
- // Rigid body, don't care about `width`.
- ZX(e, ["left", "right"]),
- // Rigid body, don't care about `height`.
- ZX(e, ["top", "bottom"])
- ], t.type === "group")) {
- var n = t, r = e;
- n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
- }
- }
- var Blt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.preventAutoZ = !0, n;
- }
- return e.prototype.mergeOption = function(n, r) {
- var i = this.option.elements;
- this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
- }, e.prototype.optionUpdated = function(n, r) {
- var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
- this._flatten(a, s, null);
- var l = Nse(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
- F(l, function(c, f) {
- var d = c.newOption;
- process.env.NODE_ENV !== "production" && at(nt(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), Rlt(c, d), klt(o, f, d), Nlt(o[f], d));
- }, this), i.elements = yn(o, function(c) {
- return c && delete c.$action, c != null;
- });
- }, e.prototype._flatten = function(n, r, i) {
- F(n, function(a) {
- if (a) {
- i && (a.parentOption = i), r.push(a);
- var o = a.children;
- o && o.length && this._flatten(o, r, a), delete a.children;
- }
- }, this);
- }, e.prototype.useElOptionsToUpdate = function() {
- var n = this._elOptionsToUpdate;
- return this._elOptionsToUpdate = null, n;
- }, e.type = "graphic", e.defaultOption = {
- elements: []
- // parentId: null
- }, e;
- }(At)
- ), UX = {
- // Reserved but not supported in graphic component.
- path: null,
- compoundPath: null,
- // Supported in graphic component.
- group: ct,
- image: ci,
- text: jt
- }, Vo = Ut(), zlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function() {
- this._elMap = Ze();
- }, e.prototype.render = function(n, r, i) {
- n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
- }, e.prototype._updateElements = function(n) {
- var r = n.useElOptionsToUpdate();
- if (r) {
- var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
- F(r, function(l) {
- var u = Br(l.id, null), c = u != null ? i.get(u) : null, f = Br(l.parentId, null), d = f != null ? i.get(f) : a, h = l.type, p = l.style;
- h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
- var v = l.textContent, g = l.textConfig;
- if (p && Wde(p, h, !!g, !!v)) {
- var m = Qde(p, h, !0);
- !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
- }
- var y = Vlt(l);
- process.env.NODE_ENV !== "production" && c && at(d === c.parent, "Changing parent is not supported.");
- var _ = l.$action || "merge", O = _ === "merge", S = _ === "replace";
- if (O) {
- var x = !c, C = c;
- x ? C = XX(u, d, l.type, i) : (C && (Vo(C).isNew = !1), Ude(C)), C && (yw(C, y, n, {
- isInit: x
- }), YX(C, l, o, s));
- } else if (S) {
- Ow(c, l, i, n);
- var P = XX(u, d, l.type, i);
- P && (yw(P, y, n, {
- isInit: !0
- }), YX(P, l, o, s));
- } else _ === "remove" && (Gde(c, l), Ow(c, l, i, n));
- var $ = i.get(u);
- if ($ && v)
- if (O) {
- var T = $.getTextContent();
- T ? T.attr(v) : $.setTextContent(new jt(v));
- } else S && $.setTextContent(new jt(v));
- if ($) {
- var E = l.clipPath;
- if (E) {
- var M = E.type, R = void 0, x = !1;
- if (O) {
- var N = $.getClipPath();
- x = !N || Vo(N).type !== M, R = x ? $L(M) : N;
- } else S && (x = !0, R = $L(M));
- $.setClipPath(R), yw(R, E, n, {
- isInit: x
- }), cT(R, E.keyframeAnimation, n);
- }
- var I = Vo($);
- $.setTextConfig(g), I.option = l, Flt($, n, l), xm({
- el: $,
- componentModel: n,
- itemName: $.name,
- itemTooltipOption: l.tooltip
- }), cT($, l.keyframeAnimation, n);
- }
- });
- }
- }, e.prototype._relocate = function(n, r) {
- for (var i = n.option.elements, a = this.group, o = this._elMap, s = r.getWidth(), l = r.getHeight(), u = ["x", "y"], c = 0; c < i.length; c++) {
- var f = i[c], d = Br(f.id, null), h = d != null ? o.get(d) : null;
- if (!(!h || !h.isGroup)) {
- var p = h.parent, v = p === a, g = Vo(h), m = Vo(p);
- g.width = ze(g.option.width, v ? s : m.width) || 0, g.height = ze(g.option.height, v ? l : m.height) || 0;
- }
- }
- for (var c = i.length - 1; c >= 0; c--) {
- var f = i[c], d = Br(f.id, null), h = d != null ? o.get(d) : null;
- if (h) {
- var p = h.parent, m = Vo(p), y = p === a ? {
- width: s,
- height: l
- } : {
- width: m.width,
- height: m.height
- }, _ = {}, O = MP(h, f, y, null, {
- hv: f.hv,
- boundingMode: f.bounding
- }, _);
- if (!Vo(h).isNew && O) {
- for (var S = f.transition, x = {}, C = 0; C < u.length; C++) {
- var P = u[C], $ = _[P];
- S && (Ah(S) || St(S, P) >= 0) ? x[P] = $ : h[P] = $;
- }
- tn(h, x, n, 0);
- } else
- h.attr(_);
- }
- }
- }, e.prototype._clear = function() {
- var n = this, r = this._elMap;
- r.each(function(i) {
- Ow(i, Vo(i).option, r, n._lastGraphicModel);
- }), this._elMap = Ze();
- }, e.prototype.dispose = function() {
- this._clear();
- }, e.type = "graphic", e;
- }(Ln)
- );
- function $L(t) {
- process.env.NODE_ENV !== "production" && at(t, "graphic type MUST be set");
- var e = Qe(UX, t) ? UX[t] : wP(t);
- process.env.NODE_ENV !== "production" && at(e, "graphic type " + t + " can not be found");
- var n = new e({});
- return Vo(n).type = t, n;
- }
- function XX(t, e, n, r) {
- var i = $L(n);
- return e.add(i), r.set(t, i), Vo(i).id = t, Vo(i).isNew = !0, i;
- }
- function Ow(t, e, n, r) {
- var i = t && t.parent;
- i && (t.type === "group" && t.traverse(function(a) {
- Ow(a, e, n, r);
- }), UP(t, e, r), n.removeKey(Vo(t).id));
- }
- function YX(t, e, n, r) {
- t.isGroup || F([
- ["cursor", ls.prototype.cursor],
- // We should not support configure z and zlevel in the element level.
- // But seems we didn't limit it previously. So here still use it to avoid breaking.
- ["zlevel", r || 0],
- ["z", n || 0],
- // z2 must not be null/undefined, otherwise sort error may occur.
- ["z2", 0]
- ], function(i) {
- var a = i[0];
- Qe(e, a) ? t[a] = dt(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
- }), F(kt(e), function(i) {
- if (i.indexOf("on") === 0) {
- var a = e[i];
- t[i] = qe(a) ? a : null;
- }
- }), Qe(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
- }
- function Vlt(t) {
- return t = _e({}, t), F(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(Yle), function(e) {
- delete t[e];
- }), t;
- }
- function Flt(t, e, n) {
- var r = ft(t).eventData;
- !t.silent && !t.ignore && !r && (r = ft(t).eventData = {
- componentType: "graphic",
- componentIndex: e.componentIndex,
- name: t.name
- }), r && (r.info = n.info);
- }
- function Wlt(t) {
- t.registerComponentModel(Blt), t.registerComponentView(zlt), t.registerPreprocessor(function(e) {
- var n = e.graphic;
- Se(n) ? !n[0] || !n[0].elements ? e.graphic = [{
- elements: n
- }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
- elements: [n]
- }]);
- });
- }
- var qX = ["x", "y", "radius", "angle", "single"], Qlt = ["cartesian2d", "polar", "singleAxis"];
- function Hlt(t) {
- var e = t.get("coordinateSystem");
- return St(Qlt, e) >= 0;
- }
- function Uc(t) {
- return process.env.NODE_ENV !== "production" && at(t), t + "Axis";
- }
- function Glt(t, e) {
- var n = Ze(), r = [], i = Ze();
- t.eachComponent({
- mainType: "dataZoom",
- query: e
- }, function(c) {
- i.get(c.uid) || s(c);
- });
- var a;
- do
- a = !1, t.eachComponent("dataZoom", o);
- while (a);
- function o(c) {
- !i.get(c.uid) && l(c) && (s(c), a = !0);
- }
- function s(c) {
- i.set(c.uid, !0), r.push(c), u(c);
- }
- function l(c) {
- var f = !1;
- return c.eachTargetAxis(function(d, h) {
- var p = n.get(d);
- p && p[h] && (f = !0);
- }), f;
- }
- function u(c) {
- c.eachTargetAxis(function(f, d) {
- (n.get(f) || n.set(f, []))[d] = !0;
- });
- }
- return r;
- }
- function che(t) {
- var e = t.ecModel, n = {
- infoList: [],
- infoMap: Ze()
- };
- return t.eachTargetAxis(function(r, i) {
- var a = e.getComponent(Uc(r), i);
- if (a) {
- var o = a.getCoordSysModel();
- if (o) {
- var s = o.uid, l = n.infoMap.get(s);
- l || (l = {
- model: o,
- axisModels: []
- }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
- }
- }
- }), n;
- }
- var RI = (
- /** @class */
- function() {
- function t() {
- this.indexList = [], this.indexMap = [];
- }
- return t.prototype.add = function(e) {
- this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
- }, t;
- }()
- ), d_ = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
- }
- return e.prototype.init = function(n, r, i) {
- var a = KX(n);
- this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
- }, e.prototype.mergeOption = function(n) {
- var r = KX(n);
- mt(this.option, n, !0), mt(this.settledOption, r, !0), this._doInit(r);
- }, e.prototype._doInit = function(n) {
- var r = this.option;
- this._setDefaultThrottle(n), this._updateRangeUse(n);
- var i = this.settledOption;
- F([["start", "startValue"], ["end", "endValue"]], function(a, o) {
- this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
- }, this), this._resetTarget();
- }, e.prototype._resetTarget = function() {
- var n = this.get("orient", !0), r = this._targetAxisInfoMap = Ze(), i = this._fillSpecifiedTargetAxis(r);
- i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
- a.indexList.length && (this._noTarget = !1);
- }, this);
- }, e.prototype._fillSpecifiedTargetAxis = function(n) {
- var r = !1;
- return F(qX, function(i) {
- var a = this.getReferringComponents(Uc(i), dje);
- if (a.specified) {
- r = !0;
- var o = new RI();
- F(a.models, function(s) {
- o.add(s.componentIndex);
- }), n.set(i, o);
- }
- }, this), r;
- }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
- var i = this.ecModel, a = !0;
- if (a) {
- var o = r === "vertical" ? "y" : "x", s = i.findComponents({
- mainType: o + "Axis"
- });
- l(s, o);
- }
- if (a) {
- var s = i.findComponents({
- mainType: "singleAxis",
- filter: function(c) {
- return c.get("orient", !0) === r;
- }
- });
- l(s, "single");
- }
- function l(u, c) {
- var f = u[0];
- if (f) {
- var d = new RI();
- if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
- var h = f.getReferringComponents("grid", Er).models[0];
- h && F(u, function(p) {
- f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Er).models[0] && d.add(p.componentIndex);
- });
- }
- }
- }
- a && F(qX, function(u) {
- if (a) {
- var c = i.findComponents({
- mainType: Uc(u),
- filter: function(d) {
- return d.get("type", !0) === "category";
- }
- });
- if (c[0]) {
- var f = new RI();
- f.add(c[0].componentIndex), n.set(u, f), a = !1;
- }
- }
- }, this);
- }, e.prototype._makeAutoOrientByTargetAxis = function() {
- var n;
- return this.eachTargetAxis(function(r) {
- !n && (n = r);
- }, this), n === "y" ? "vertical" : "horizontal";
- }, e.prototype._setDefaultThrottle = function(n) {
- if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
- var r = this.ecModel.option;
- this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
- }
- }, e.prototype._updateRangeUse = function(n) {
- var r = this._rangePropMode, i = this.get("rangeMode");
- F([["start", "startValue"], ["end", "endValue"]], function(a, o) {
- var s = n[a[0]] != null, l = n[a[1]] != null;
- s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
- });
- }, e.prototype.noTarget = function() {
- return this._noTarget;
- }, e.prototype.getFirstTargetAxisModel = function() {
- var n;
- return this.eachTargetAxis(function(r, i) {
- n == null && (n = this.ecModel.getComponent(Uc(r), i));
- }, this), n;
- }, e.prototype.eachTargetAxis = function(n, r) {
- this._targetAxisInfoMap.each(function(i, a) {
- F(i.indexList, function(o) {
- n.call(r, a, o);
- });
- });
- }, e.prototype.getAxisProxy = function(n, r) {
- var i = this.getAxisModel(n, r);
- if (i)
- return i.__dzAxisProxy;
- }, e.prototype.getAxisModel = function(n, r) {
- process.env.NODE_ENV !== "production" && at(n && r != null);
- var i = this._targetAxisInfoMap.get(n);
- if (i && i.indexMap[r])
- return this.ecModel.getComponent(Uc(n), r);
- }, e.prototype.setRawRange = function(n) {
- var r = this.option, i = this.settledOption;
- F([["start", "startValue"], ["end", "endValue"]], function(a) {
- (n[a[0]] != null || n[a[1]] != null) && (r[a[0]] = i[a[0]] = n[a[0]], r[a[1]] = i[a[1]] = n[a[1]]);
- }, this), this._updateRangeUse(n);
- }, e.prototype.setCalculatedRange = function(n) {
- var r = this.option;
- F(["start", "startValue", "end", "endValue"], function(i) {
- r[i] = n[i];
- });
- }, e.prototype.getPercentRange = function() {
- var n = this.findRepresentativeAxisProxy();
- if (n)
- return n.getDataPercentWindow();
- }, e.prototype.getValueRange = function(n, r) {
- if (n == null && r == null) {
- var i = this.findRepresentativeAxisProxy();
- if (i)
- return i.getDataValueWindow();
- } else
- return this.getAxisProxy(n, r).getDataValueWindow();
- }, e.prototype.findRepresentativeAxisProxy = function(n) {
- if (n)
- return n.__dzAxisProxy;
- for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
- for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
- var u = this.getAxisProxy(o, s.indexList[l]);
- if (u.hostedBy(this))
- return u;
- r || (r = u);
- }
- return r;
- }, e.prototype.getRangePropMode = function() {
- return this._rangePropMode.slice();
- }, e.prototype.getOrient = function() {
- return process.env.NODE_ENV !== "production" && at(this._orient), this._orient;
- }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
- // zlevel: 0,
- z: 4,
- filterMode: "filter",
- start: 0,
- end: 100
- }, e;
- }(At)
- );
- function KX(t) {
- var e = {};
- return F(["start", "end", "startValue", "endValue", "throttle"], function(n) {
- t.hasOwnProperty(n) && (e[n] = t[n]);
- }), e;
- }
- var jlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "dataZoom.select", e;
- }(d_)
- ), O6 = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i, a) {
- this.dataZoomModel = n, this.ecModel = r, this.api = i;
- }, e.type = "dataZoom", e;
- }(Ln)
- ), Zlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "dataZoom.select", e;
- }(O6)
- ), xv = F, JX = ao, Ult = (
- /** @class */
- function() {
- function t(e, n, r, i) {
- this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
- }
- return t.prototype.hostedBy = function(e) {
- return this._dataZoomModel === e;
- }, t.prototype.getDataValueWindow = function() {
- return this._valueWindow.slice();
- }, t.prototype.getDataPercentWindow = function() {
- return this._percentWindow.slice();
- }, t.prototype.getTargetSeriesModels = function() {
- var e = [];
- return this.ecModel.eachSeries(function(n) {
- if (Hlt(n)) {
- var r = Uc(this._dimName), i = n.getReferringComponents(r, Er).models[0];
- i && this._axisIndex === i.componentIndex && e.push(n);
- }
- }, this), e;
- }, t.prototype.getAxisModel = function() {
- return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
- }, t.prototype.getMinMaxSpan = function() {
- return ot(this._minMaxSpan);
- }, t.prototype.calculateDataWindow = function(e) {
- var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
- xv(["start", "end"], function(d, h) {
- var p = e[d], v = e[d + "Value"];
- a[h] === "percent" ? (p == null && (p = o[h]), v = i.parse(gn(p, o, n))) : (u = !0, v = v == null ? n[h] : i.parse(v), p = gn(v, n, o)), l[h] = v == null || isNaN(v) ? n[h] : v, s[h] = p == null || isNaN(p) ? o[h] : p;
- }), JX(l), JX(s);
- var c = this._minMaxSpan;
- u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
- function f(d, h, p, v, g) {
- var m = g ? "Span" : "ValueSpan";
- _p(0, d, p, "all", c["min" + m], c["max" + m]);
- for (var y = 0; y < 2; y++)
- h[y] = gn(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
- }
- return {
- valueWindow: l,
- percentWindow: s
- };
- }, t.prototype.reset = function(e) {
- if (e === this._dataZoomModel) {
- var n = this.getTargetSeriesModels();
- this._dataExtent = Xlt(this, this._dimName, n), this._updateMinMaxSpan();
- var r = this.calculateDataWindow(e.settledOption);
- this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
- }
- }, t.prototype.filterData = function(e, n) {
- if (e !== this._dataZoomModel)
- return;
- var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
- if (a === "none")
- return;
- xv(i, function(l) {
- var u = l.getData(), c = u.mapDimensionsAll(r);
- if (c.length) {
- if (a === "weakFilter") {
- var f = u.getStore(), d = Ce(c, function(h) {
- return u.getDimensionIndex(h);
- }, u);
- u.filterSelf(function(h) {
- for (var p, v, g, m = 0; m < c.length; m++) {
- var y = f.get(d[m], h), _ = !isNaN(y), O = y < o[0], S = y > o[1];
- if (_ && !O && !S)
- return !0;
- _ && (g = !0), O && (p = !0), S && (v = !0);
- }
- return g && p && v;
- });
- } else
- xv(c, function(h) {
- if (a === "empty")
- l.setData(u = u.map(h, function(v) {
- return s(v) ? v : NaN;
- }));
- else {
- var p = {};
- p[h] = o, u.selectRange(p);
- }
- });
- xv(c, function(h) {
- u.setApproximateExtent(o, h);
- });
- }
- });
- function s(l) {
- return l >= o[0] && l <= o[1];
- }
- }, t.prototype._updateMinMaxSpan = function() {
- var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
- xv(["min", "max"], function(i) {
- var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
- o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = gn(r[0] + o, r, [0, 100], !0) : a != null && (o = gn(a, [0, 100], r, !0) - r[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o;
- }, this);
- }, t.prototype._setAxisModel = function() {
- var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
- if (n) {
- var i = T5(r, [0, 500]);
- i = Math.min(i, 20);
- var a = e.axis.scale.rawExtentInfo;
- n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
- }
- }, t;
- }()
- );
- function Xlt(t, e, n) {
- var r = [1 / 0, -1 / 0];
- xv(n, function(o) {
- fKe(r, o.getData(), e);
- });
- var i = t.getAxisModel(), a = Tce(i.axis.scale, i, r).calculate();
- return [a.min, a.max];
- }
- var Ylt = {
- // `dataZoomProcessor` will only be performed in needed series. Consider if
- // there is a line series and a pie series, it is better not to update the
- // line series if only pie series is needed to be updated.
- getTargetSeries: function(t) {
- function e(i) {
- t.eachComponent("dataZoom", function(a) {
- a.eachTargetAxis(function(o, s) {
- var l = t.getComponent(Uc(o), s);
- i(o, s, l, a);
- });
- });
- }
- e(function(i, a, o, s) {
- o.__dzAxisProxy = null;
- });
- var n = [];
- e(function(i, a, o, s) {
- o.__dzAxisProxy || (o.__dzAxisProxy = new Ult(i, a, s, t), n.push(o.__dzAxisProxy));
- });
- var r = Ze();
- return F(n, function(i) {
- F(i.getTargetSeriesModels(), function(a) {
- r.set(a.uid, a);
- });
- }), r;
- },
- // Consider appendData, where filter should be performed. Because data process is
- // in block mode currently, it is not need to worry about that the overallProgress
- // execute every frame.
- overallReset: function(t, e) {
- t.eachComponent("dataZoom", function(n) {
- n.eachTargetAxis(function(r, i) {
- n.getAxisProxy(r, i).reset(n);
- }), n.eachTargetAxis(function(r, i) {
- n.getAxisProxy(r, i).filterData(n, e);
- });
- }), t.eachComponent("dataZoom", function(n) {
- var r = n.findRepresentativeAxisProxy();
- if (r) {
- var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
- n.setCalculatedRange({
- start: i[0],
- end: i[1],
- startValue: a[0],
- endValue: a[1]
- });
- }
- });
- }
- };
- function qlt(t) {
- t.registerAction("dataZoom", function(e, n) {
- var r = Glt(n, e);
- F(r, function(i) {
- i.setRawRange({
- start: e.start,
- end: e.end,
- startValue: e.startValue,
- endValue: e.endValue
- });
- });
- });
- }
- var eY = !1;
- function S6(t) {
- eY || (eY = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, Ylt), qlt(t), t.registerSubTypeDefaulter("dataZoom", function() {
- return "slider";
- }));
- }
- function Klt(t) {
- t.registerComponentModel(jlt), t.registerComponentView(Zlt), S6(t);
- }
- var Ho = (
- /** @class */
- /* @__PURE__ */ function() {
- function t() {
- }
- return t;
- }()
- ), fhe = {};
- function wv(t, e) {
- fhe[t] = e;
- }
- function dhe(t) {
- return fhe[t];
- }
- var Jlt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.optionUpdated = function() {
- t.prototype.optionUpdated.apply(this, arguments);
- var n = this.ecModel;
- F(this.option.feature, function(r, i) {
- var a = dhe(i);
- a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), mt(r, a.defaultOption));
- });
- }, e.type = "toolbox", e.layoutMode = {
- type: "box",
- ignoreSize: !0
- }, e.defaultOption = {
- show: !0,
- z: 6,
- // zlevel: 0,
- orient: "horizontal",
- left: "right",
- top: "top",
- // right
- // bottom
- backgroundColor: "transparent",
- borderColor: "#ccc",
- borderRadius: 0,
- borderWidth: 0,
- padding: 5,
- itemSize: 15,
- itemGap: 8,
- showTitle: !0,
- iconStyle: {
- borderColor: "#666",
- color: "none"
- },
- emphasis: {
- iconStyle: {
- borderColor: "#3E98C5"
- }
- },
- // textStyle: {},
- // feature
- tooltip: {
- show: !1,
- position: "bottom"
- }
- }, e;
- }(At)
- );
- function eut(t, e, n) {
- var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
- width: n.getWidth(),
- height: n.getHeight()
- }, o = Mr(r, a, i);
- Th(e.get("orient"), t, e.get("itemGap"), o.width, o.height), MP(t, r, a, i);
- }
- function hhe(t, e) {
- var n = vp(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
- return r.fill = e.get("backgroundColor"), t = new Zt({
- shape: {
- x: t.x - n[3],
- y: t.y - n[0],
- width: t.width + n[1] + n[3],
- height: t.height + n[0] + n[2],
- r: e.get("borderRadius")
- },
- style: r,
- silent: !0,
- z2: -1
- }), t;
- }
- var tut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.render = function(n, r, i, a) {
- var o = this.group;
- if (o.removeAll(), !n.get("show"))
- return;
- var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
- F(u, function(p, v) {
- f.push(v);
- }), new Qu(this._featureNames || [], f).add(d).update(d).remove(vt(d, null)).execute(), this._featureNames = f;
- function d(p, v) {
- var g = f[p], m = f[v], y = u[g], _ = new wn(y, n, n.ecModel), O;
- if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
- if (nut(g))
- O = {
- onclick: _.option.onclick,
- featureName: g
- };
- else {
- var S = dhe(g);
- if (!S)
- return;
- O = new S();
- }
- c[g] = O;
- } else if (O = c[m], !O)
- return;
- O.uid = Cm("toolbox-feature"), O.model = _, O.ecModel = r, O.api = i;
- var x = O instanceof Ho;
- if (!g && m) {
- x && O.dispose && O.dispose(r, i);
- return;
- }
- if (!_.get("show") || x && O.unusable) {
- x && O.remove && O.remove(r, i);
- return;
- }
- h(_, O, g), _.setIconStatus = function(C, P) {
- var $ = this.option, T = this.iconPaths;
- $.iconStatus = $.iconStatus || {}, $.iconStatus[C] = P, T[C] && (P === "emphasis" ? Fu : Wu)(T[C]);
- }, O instanceof Ho && O.render && O.render(_, r, i, a);
- }
- function h(p, v, g) {
- var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), _ = v instanceof Ho && v.getIcons ? v.getIcons() : p.get("icon"), O = p.get("title") || {}, S, x;
- Ve(_) ? (S = {}, S[g] = _) : S = _, Ve(O) ? (x = {}, x[g] = O) : x = O;
- var C = p.iconPaths = {};
- F(S, function(P, $) {
- var T = Sm(P, {}, {
- x: -s / 2,
- y: -s / 2,
- width: s,
- height: s
- });
- T.setStyle(m.getItemStyle());
- var E = T.ensureState("emphasis");
- E.style = y.getItemStyle();
- var M = new jt({
- style: {
- text: x[$],
- align: y.get("textAlign"),
- borderRadius: y.get("textBorderRadius"),
- padding: y.get("textPadding"),
- fill: null,
- font: G5({
- fontStyle: y.get("textFontStyle"),
- fontFamily: y.get("textFontFamily"),
- fontSize: y.get("textFontSize"),
- fontWeight: y.get("textFontWeight")
- }, r)
- },
- ignore: !0
- });
- T.setTextContent(M), xm({
- el: T,
- componentModel: n,
- itemName: $,
- formatterParamsExtra: {
- title: x[$]
- }
- }), T.__title = x[$], T.on("mouseover", function() {
- var R = y.getItemStyle(), N = l ? n.get("right") == null && n.get("left") !== "right" ? "right" : "left" : n.get("bottom") == null && n.get("top") !== "bottom" ? "bottom" : "top";
- M.setStyle({
- fill: y.get("textFill") || R.fill || R.stroke || "#000",
- backgroundColor: y.get("textBackgroundColor")
- }), T.setTextConfig({
- position: y.get("textPosition") || N
- }), M.ignore = !n.get("showTitle"), i.enterEmphasis(this);
- }).on("mouseout", function() {
- p.get(["iconStatus", $]) !== "emphasis" && i.leaveEmphasis(this), M.hide();
- }), (p.get(["iconStatus", $]) === "emphasis" ? Fu : Wu)(T), o.add(T), T.on("click", We(v.onclick, v, r, i, $)), C[$] = T;
- });
- }
- eut(o, n, i), o.add(hhe(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
- var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), _ = y && y.ensureState("emphasis");
- if (_ && !qe(_) && v) {
- var O = _.style || (_.style = {}), S = o1(v, jt.makeFont(O)), x = p.x + o.x, C = p.y + o.y + s, P = !1;
- C + S.height > i.getHeight() && (m.position = "top", P = !0);
- var $ = P ? -5 - S.height : s + 10;
- x + S.width / 2 > i.getWidth() ? (m.position = ["100%", $], O.align = "right") : x - S.width / 2 < 0 && (m.position = [0, $], O.align = "left");
- }
- });
- }, e.prototype.updateView = function(n, r, i, a) {
- F(this._features, function(o) {
- o instanceof Ho && o.updateView && o.updateView(o.model, r, i, a);
- });
- }, e.prototype.remove = function(n, r) {
- F(this._features, function(i) {
- i instanceof Ho && i.remove && i.remove(n, r);
- }), this.group.removeAll();
- }, e.prototype.dispose = function(n, r) {
- F(this._features, function(i) {
- i instanceof Ho && i.dispose && i.dispose(n, r);
- });
- }, e.type = "toolbox", e;
- }(Ln)
- );
- function nut(t) {
- return t.indexOf("my") === 0;
- }
- var rut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.onclick = function(n, r) {
- var i = this.model, a = i.get("name") || n.get("title.0.text") || "echarts", o = r.getZr().painter.getType() === "svg", s = o ? "svg" : i.get("type", !0) || "png", l = r.getConnectedDataURL({
- type: s,
- backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
- connectedBackgroundColor: i.get("connectedBackgroundColor"),
- excludeComponents: i.get("excludeComponents"),
- pixelRatio: i.get("pixelRatio")
- }), u = Gt.browser;
- if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
- var c = document.createElement("a");
- c.download = a + "." + s, c.target = "_blank", c.href = l;
- var f = new MouseEvent("click", {
- // some micro front-end framework, window maybe is a Proxy
- view: document.defaultView,
- bubbles: !0,
- cancelable: !1
- });
- c.dispatchEvent(f);
- } else if (window.navigator.msSaveOrOpenBlob || o) {
- var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
- h && (p = window.atob(p));
- var v = a + "." + s;
- if (window.navigator.msSaveOrOpenBlob) {
- for (var g = p.length, m = new Uint8Array(g); g--; )
- m[g] = p.charCodeAt(g);
- var y = new Blob([m]);
- window.navigator.msSaveOrOpenBlob(y, v);
- } else {
- var _ = document.createElement("iframe");
- document.body.appendChild(_);
- var O = _.contentWindow, S = O.document;
- S.open("image/svg+xml", "replace"), S.write(p), S.close(), O.focus(), S.execCommand("SaveAs", !0, v), document.body.removeChild(_);
- }
- } else {
- var x = i.get("lang"), C = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (x && x[0] || "") + '" /></body>', P = window.open();
- P.document.write(C), P.document.title = a;
- }
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- 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",
- title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
- type: "png",
- // Default use option.backgroundColor
- // backgroundColor: '#fff',
- connectedBackgroundColor: "#fff",
- name: "",
- excludeComponents: ["toolbox"],
- // use current pixel ratio of device by default
- // pixelRatio: 1,
- lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
- };
- return r;
- }, e;
- }(Ho)
- ), tY = "__ec_magicType_stack__", iut = [["line", "bar"], ["stack"]], aut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.getIcons = function() {
- var n = this.model, r = n.get("icon"), i = {};
- return F(n.get("type"), function(a) {
- r[a] && (i[a] = r[a]);
- }), i;
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- type: [],
- // Icon group
- icon: {
- line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
- bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
- // eslint-disable-next-line
- 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"
- // jshint ignore:line
- },
- // `line`, `bar`, `stack`, `tiled`
- title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
- option: {},
- seriesIndex: {}
- };
- return r;
- }, e.prototype.onclick = function(n, r, i) {
- var a = this.model, o = a.get(["seriesIndex", i]);
- if (nY[i]) {
- var s = {
- series: []
- }, l = function(f) {
- var d = f.subType, h = f.id, p = nY[i](d, h, f, a);
- p && (it(p, f.option), s.series.push(p));
- var v = f.coordinateSystem;
- if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
- var g = v.getAxesByScale("ordinal")[0];
- if (g) {
- var m = g.dim, y = m + "Axis", _ = f.getReferringComponents(y, Er).models[0], O = _.componentIndex;
- s[y] = s[y] || [];
- for (var S = 0; S <= O; S++)
- s[y][O] = s[y][O] || {};
- s[y][O].boundaryGap = i === "bar";
- }
- }
- };
- F(iut, function(f) {
- St(f, i) >= 0 && F(f, function(d) {
- a.setIconStatus(d, "normal");
- });
- }), a.setIconStatus(i, "emphasis"), n.eachComponent({
- mainType: "series",
- query: o == null ? null : {
- seriesIndex: o
- }
- }, l);
- var u, c = i;
- i === "stack" && (u = mt({
- stack: a.option.title.tiled,
- tiled: a.option.title.stack
- }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
- type: "changeMagicType",
- currentType: c,
- newOption: s,
- newTitle: u,
- featureName: "magicType"
- });
- }
- }, e;
- }(Ho)
- ), nY = {
- line: function(t, e, n, r) {
- if (t === "bar")
- return mt({
- id: e,
- type: "line",
- // Preserve data related option
- data: n.get("data"),
- stack: n.get("stack"),
- markPoint: n.get("markPoint"),
- markLine: n.get("markLine")
- }, r.get(["option", "line"]) || {}, !0);
- },
- bar: function(t, e, n, r) {
- if (t === "line")
- return mt({
- id: e,
- type: "bar",
- // Preserve data related option
- data: n.get("data"),
- stack: n.get("stack"),
- markPoint: n.get("markPoint"),
- markLine: n.get("markLine")
- }, r.get(["option", "bar"]) || {}, !0);
- },
- stack: function(t, e, n, r) {
- var i = n.get("stack") === tY;
- if (t === "line" || t === "bar")
- return r.setIconStatus("stack", i ? "normal" : "emphasis"), mt({
- id: e,
- stack: i ? "" : tY
- }, r.get(["option", "stack"]) || {}, !0);
- }
- };
- Js({
- type: "changeMagicType",
- event: "magicTypeChanged",
- update: "prepareAndUpdate"
- }, function(t, e) {
- e.mergeOption(t.newOption);
- });
- var XP = new Array(60).join("-"), Yg = " ";
- function out(t) {
- var e = {}, n = [], r = [];
- return t.eachRawSeries(function(i) {
- var a = i.coordinateSystem;
- if (a && (a.type === "cartesian2d" || a.type === "polar")) {
- var o = a.getBaseAxis();
- if (o.type === "category") {
- var s = o.dim + "_" + o.index;
- e[s] || (e[s] = {
- categoryAxis: o,
- valueAxis: a.getOtherAxis(o),
- series: []
- }, r.push({
- axisDim: o.dim,
- axisIndex: o.index
- })), e[s].series.push(i);
- } else
- n.push(i);
- } else
- n.push(i);
- }), {
- seriesGroupByCategoryAxis: e,
- other: n,
- meta: r
- };
- }
- function sut(t) {
- var e = [];
- return F(t, function(n, r) {
- var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(Ce(n.series, function(h) {
- return h.name;
- })), l = [i.model.getCategories()];
- F(n.series, function(h) {
- var p = h.getRawData();
- l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
- return v;
- }));
- });
- for (var u = [s.join(Yg)], c = 0; c < l[0].length; c++) {
- for (var f = [], d = 0; d < l.length; d++)
- f.push(l[d][c]);
- u.push(f.join(Yg));
- }
- e.push(u.join(`
- `));
- }), e.join(`
- ` + XP + `
- `);
- }
- function lut(t) {
- return Ce(t, function(e) {
- var n = e.getRawData(), r = [e.name], i = [];
- return n.each(n.dimensions, function() {
- for (var a = arguments.length, o = arguments[a - 1], s = n.getName(o), l = 0; l < a - 1; l++)
- i[l] = arguments[l];
- r.push((s ? s + Yg : "") + i.join(Yg));
- }), r.join(`
- `);
- }).join(`
- ` + XP + `
- `);
- }
- function uut(t) {
- var e = out(t);
- return {
- value: yn([sut(e.seriesGroupByCategoryAxis), lut(e.other)], function(n) {
- return !!n.replace(/[\n\t\s]/g, "");
- }).join(`
- ` + XP + `
- `),
- meta: e.meta
- };
- }
- function pT(t) {
- return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
- }
- function cut(t) {
- var e = t.slice(0, t.indexOf(`
- `));
- if (e.indexOf(Yg) >= 0)
- return !0;
- }
- var AL = new RegExp("[" + Yg + "]+", "g");
- function fut(t) {
- for (var e = t.split(/\n+/g), n = pT(e.shift()).split(AL), r = [], i = Ce(n, function(l) {
- return {
- name: l,
- data: []
- };
- }), a = 0; a < e.length; a++) {
- var o = pT(e[a]).split(AL);
- r.push(o.shift());
- for (var s = 0; s < o.length; s++)
- i[s] && (i[s].data[a] = o[s]);
- }
- return {
- series: i,
- categories: r
- };
- }
- function dut(t) {
- for (var e = t.split(/\n+/g), n = pT(e.shift()), r = [], i = 0; i < e.length; i++) {
- var a = pT(e[i]);
- if (a) {
- var o = a.split(AL), s = "", l = void 0, u = !1;
- isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
- name: s,
- value: []
- }, l = r[i].value) : l = r[i] = [];
- for (var c = 0; c < o.length; c++)
- l.push(+o[c]);
- l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
- }
- }
- return {
- name: n,
- data: r
- };
- }
- function hut(t, e) {
- var n = t.split(new RegExp(`
- *` + XP + `
- *`, "g")), r = {
- series: []
- };
- return F(n, function(i, a) {
- if (cut(i)) {
- var o = fut(i), s = e[a], l = s.axisDim + "Axis";
- s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
- data: o.categories
- }, r.series = r.series.concat(o.series));
- } else {
- var o = dut(i);
- r.series.push(o);
- }
- }), r;
- }
- var put = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.onclick = function(n, r) {
- setTimeout(function() {
- r.dispatchAction({
- type: "hideTip"
- });
- });
- var i = r.getDom(), a = this.model;
- this._dom && i.removeChild(this._dom);
- var o = document.createElement("div");
- o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
- var s = document.createElement("h4"), l = a.get("lang") || [];
- s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
- var u = document.createElement("div"), c = document.createElement("textarea");
- u.style.cssText = "overflow:auto";
- var f = a.get("optionToContent"), d = a.get("contentToOption"), h = uut(n);
- if (qe(f)) {
- var p = f(r.getOption());
- Ve(p) ? u.innerHTML = p : gf(p) && u.appendChild(p);
- } else {
- c.readOnly = a.get("readOnly");
- var v = c.style;
- v.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", v.color = a.get("textColor"), v.borderColor = a.get("textareaBorderColor"), v.backgroundColor = a.get("textareaColor"), c.value = h.value, u.appendChild(c);
- }
- var g = h.meta, m = document.createElement("div");
- m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
- var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", _ = document.createElement("div"), O = document.createElement("div");
- y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
- var S = this;
- function x() {
- i.removeChild(o), S._dom = null;
- }
- ok(_, "click", x), ok(O, "click", function() {
- if (d == null && f != null || d != null && f == null) {
- process.env.NODE_ENV !== "production" && nr("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), x();
- return;
- }
- var C;
- try {
- qe(d) ? C = d(u, r.getOption()) : C = hut(c.value, g);
- } catch (P) {
- throw x(), new Error("Data view format error " + P);
- }
- C && r.dispatchAction({
- type: "changeDataView",
- newOption: C
- }), x();
- }), _.innerHTML = l[1], O.innerHTML = l[2], O.style.cssText = _.style.cssText = y, !a.get("readOnly") && m.appendChild(O), m.appendChild(_), o.appendChild(s), o.appendChild(u), o.appendChild(m), u.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o;
- }, e.prototype.remove = function(n, r) {
- this._dom && r.getDom().removeChild(this._dom);
- }, e.prototype.dispose = function(n, r) {
- this.remove(n, r);
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- readOnly: !1,
- optionToContent: null,
- contentToOption: null,
- // eslint-disable-next-line
- 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",
- title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
- lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
- backgroundColor: "#fff",
- textColor: "#000",
- textareaColor: "#fff",
- textareaBorderColor: "#333",
- buttonColor: "#c23531",
- buttonTextColor: "#fff"
- };
- return r;
- }, e;
- }(Ho)
- );
- function vut(t, e) {
- return Ce(t, function(n, r) {
- var i = e && e[r];
- if (nt(i) && !Se(i)) {
- var a = nt(n) && !Se(n);
- a || (n = {
- value: n
- });
- var o = i.name != null && n.name == null;
- return n = it(n, i), o && delete n.name, n;
- } else
- return n;
- });
- }
- Js({
- type: "changeDataView",
- event: "dataViewChanged",
- update: "prepareAndUpdate"
- }, function(t, e) {
- var n = [];
- F(t.newOption.series, function(r) {
- var i = e.getSeriesByName(r.name)[0];
- if (!i)
- n.push(_e({
- // Default is scatter
- type: "scatter"
- }, r));
- else {
- var a = i.get("data");
- n.push({
- name: r.name,
- data: vut(r.data, a)
- });
- }
- }), e.mergeOption(it({
- series: n
- }, t.newOption));
- });
- var phe = F, vhe = Ut();
- function gut(t, e) {
- var n = x6(t);
- phe(e, function(r, i) {
- for (var a = n.length - 1; a >= 0; a--) {
- var o = n[a];
- if (o[i])
- break;
- }
- if (a < 0) {
- var s = t.queryComponents({
- mainType: "dataZoom",
- subType: "select",
- id: i
- })[0];
- if (s) {
- var l = s.getPercentRange();
- n[0][i] = {
- dataZoomId: i,
- start: l[0],
- end: l[1]
- };
- }
- }
- }), n.push(e);
- }
- function mut(t) {
- var e = x6(t), n = e[e.length - 1];
- e.length > 1 && e.pop();
- var r = {};
- return phe(n, function(i, a) {
- for (var o = e.length - 1; o >= 0; o--)
- if (i = e[o][a], i) {
- r[a] = i;
- break;
- }
- }), r;
- }
- function yut(t) {
- vhe(t).snapshots = null;
- }
- function but(t) {
- return x6(t).length;
- }
- function x6(t) {
- var e = vhe(t);
- return e.snapshots || (e.snapshots = [{}]), e.snapshots;
- }
- var _ut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.onclick = function(n, r) {
- yut(n), r.dispatchAction({
- type: "restore",
- from: this.uid
- });
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- // eslint-disable-next-line
- 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",
- title: n.getLocaleModel().get(["toolbox", "restore", "title"])
- };
- return r;
- }, e;
- }(Ho)
- );
- Js({
- type: "restore",
- event: "restore",
- update: "prepareAndUpdate"
- }, function(t, e) {
- e.resetOption("recreate");
- });
- var Out = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], w6 = (
- /** @class */
- function() {
- function t(e, n, r) {
- var i = this;
- this._targetInfoList = [];
- var a = rY(n, e);
- F(Sut, function(o, s) {
- (!r || !r.include || St(r.include, s) >= 0) && o(a, i._targetInfoList);
- });
- }
- return t.prototype.setOutputRanges = function(e, n) {
- return this.matchOutputRanges(e, n, function(r, i, a) {
- if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
- r.coordRange = i;
- var o = kI[r.brushType](0, a, i);
- r.__rangeOffset = {
- offset: sY[r.brushType](o.values, r.range, [1, 1]),
- xyMinMax: o.xyMinMax
- };
- }
- }), e;
- }, t.prototype.matchOutputRanges = function(e, n, r) {
- F(e, function(i) {
- var a = this.findTargetInfo(i, n);
- a && a !== !0 && F(a.coordSyses, function(o) {
- var s = kI[i.brushType](1, o, i.range, !0);
- r(i, s.values, o, n);
- });
- }, this);
- }, t.prototype.setInputRanges = function(e, n) {
- F(e, function(r) {
- var i = this.findTargetInfo(r, n);
- if (process.env.NODE_ENV !== "production" && (at(!i || i === !0 || r.coordRange, "coordRange must be specified when coord index specified."), at(!i || i !== !0 || r.range, "range must be specified in global brush.")), r.range = r.range || [], i && i !== !0) {
- r.panelId = i.panelId;
- var a = kI[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
- r.range = o ? sY[r.brushType](a.values, o.offset, xut(a.xyMinMax, o.xyMinMax)) : a.values;
- }
- }, this);
- }, t.prototype.makePanelOpts = function(e, n) {
- return Ce(this._targetInfoList, function(r) {
- var i = r.getPanelRect();
- return {
- panelId: r.panelId,
- defaultBrushType: n ? n(r) : null,
- clipPath: Sde(i),
- isTargetByCursor: wde(i, e, r.coordSysModel),
- getLinearBrushOtherExtent: xde(i)
- };
- });
- }, t.prototype.controlSeries = function(e, n, r) {
- var i = this.findTargetInfo(e, r);
- return i === !0 || i && St(i.coordSyses, n.coordinateSystem) >= 0;
- }, t.prototype.findTargetInfo = function(e, n) {
- for (var r = this._targetInfoList, i = rY(n, e), a = 0; a < r.length; a++) {
- var o = r[a], s = e.panelId;
- if (s) {
- if (o.panelId === s)
- return o;
- } else
- for (var l = 0; l < iY.length; l++)
- if (iY[l](i, o))
- return o;
- }
- return !0;
- }, t;
- }()
- );
- function EL(t) {
- return t[0] > t[1] && t.reverse(), t;
- }
- function rY(t, e) {
- return tb(t, e, {
- includeMainTypes: Out
- });
- }
- var Sut = {
- grid: function(t, e) {
- var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Ze(), o = {}, s = {};
- !n && !r && !i || (F(n, function(l) {
- var u = l.axis.grid.model;
- a.set(u.id, u), o[u.id] = !0;
- }), F(r, function(l) {
- var u = l.axis.grid.model;
- a.set(u.id, u), s[u.id] = !0;
- }), F(i, function(l) {
- a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
- }), a.each(function(l) {
- var u = l.coordinateSystem, c = [];
- F(u.getCartesians(), function(f, d) {
- (St(n, f.getAxis("x").model) >= 0 || St(r, f.getAxis("y").model) >= 0) && c.push(f);
- }), e.push({
- panelId: "grid--" + l.id,
- gridModel: l,
- coordSysModel: l,
- // Use the first one as the representitive coordSys.
- coordSys: c[0],
- coordSyses: c,
- getPanelRect: aY.grid,
- xAxisDeclared: o[l.id],
- yAxisDeclared: s[l.id]
- });
- }));
- },
- geo: function(t, e) {
- F(t.geoModels, function(n) {
- var r = n.coordinateSystem;
- e.push({
- panelId: "geo--" + n.id,
- geoModel: n,
- coordSysModel: n,
- coordSys: r,
- coordSyses: [r],
- getPanelRect: aY.geo
- });
- });
- }
- }, iY = [
- // grid
- function(t, e) {
- var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
- return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
- },
- // geo
- function(t, e) {
- var n = t.geoModel;
- return n && n === e.geoModel;
- }
- ], aY = {
- grid: function() {
- return this.coordSys.master.getRect().clone();
- },
- geo: function() {
- var t = this.coordSys, e = t.getBoundingRect().clone();
- return e.applyTransform(of(t)), e;
- }
- }, kI = {
- lineX: vt(oY, 0),
- lineY: vt(oY, 1),
- rect: function(t, e, n, r) {
- var i = t ? e.pointToData([n[0][0], n[1][0]], r) : e.dataToPoint([n[0][0], n[1][0]], r), a = t ? e.pointToData([n[0][1], n[1][1]], r) : e.dataToPoint([n[0][1], n[1][1]], r), o = [EL([i[0], a[0]]), EL([i[1], a[1]])];
- return {
- values: o,
- xyMinMax: o
- };
- },
- polygon: function(t, e, n, r) {
- var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = Ce(n, function(o) {
- var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
- return i[0][0] = Math.min(i[0][0], s[0]), i[1][0] = Math.min(i[1][0], s[1]), i[0][1] = Math.max(i[0][1], s[0]), i[1][1] = Math.max(i[1][1], s[1]), s;
- });
- return {
- values: a,
- xyMinMax: i
- };
- }
- };
- function oY(t, e, n, r) {
- process.env.NODE_ENV !== "production" && at(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
- var i = n.getAxis(["x", "y"][t]), a = EL(Ce([0, 1], function(s) {
- return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
- })), o = [];
- return o[t] = a, o[1 - t] = [NaN, NaN], {
- values: a,
- xyMinMax: o
- };
- }
- var sY = {
- lineX: vt(lY, 0),
- lineY: vt(lY, 1),
- rect: function(t, e, n) {
- return [[t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]], [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]];
- },
- polygon: function(t, e, n) {
- return Ce(t, function(r, i) {
- return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
- });
- }
- };
- function lY(t, e, n, r) {
- return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
- }
- function xut(t, e) {
- var n = uY(t), r = uY(e), i = [n[0] / r[0], n[1] / r[1]];
- return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
- }
- function uY(t) {
- return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
- }
- var ML = F, wut = sje("toolbox-dataZoom_"), Cut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.render = function(n, r, i, a) {
- this._brushController || (this._brushController = new J3(i.getZr()), this._brushController.on("brush", We(this._onBrush, this)).mount()), $ut(n, r, this, a, i), Put(n, r);
- }, e.prototype.onclick = function(n, r, i) {
- Tut[i].call(this);
- }, e.prototype.remove = function(n, r) {
- this._brushController && this._brushController.unmount();
- }, e.prototype.dispose = function(n, r) {
- this._brushController && this._brushController.dispose();
- }, e.prototype._onBrush = function(n) {
- var r = n.areas;
- if (!n.isEnd || !r.length)
- return;
- var i = {}, a = this.ecModel;
- this._brushController.updateCovers([]);
- var o = new w6(C6(this.model), a, {
- include: ["grid"]
- });
- o.matchOutputRanges(r, a, function(u, c, f) {
- if (f.type === "cartesian2d") {
- var d = u.brushType;
- d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
- lineX: "x",
- lineY: "y"
- }[d], f, c);
- }
- }), gut(a, i), this._dispatchZoomAction(i);
- function s(u, c, f) {
- var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
- (v.minValueSpan != null || v.maxValueSpan != null) && (f = _p(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
- dataZoomId: p.id,
- startValue: f[0],
- endValue: f[1]
- });
- }
- function l(u, c, f) {
- var d;
- return f.eachComponent({
- mainType: "dataZoom",
- subType: "select"
- }, function(h) {
- var p = h.getAxisModel(u, c.componentIndex);
- p && (d = h);
- }), d;
- }
- }, e.prototype._dispatchZoomAction = function(n) {
- var r = [];
- ML(n, function(i, a) {
- r.push(ot(i));
- }), r.length && this.api.dispatchAction({
- type: "dataZoom",
- from: this.uid,
- batch: r
- });
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- filterMode: "filter",
- // Icon group
- icon: {
- zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
- back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
- },
- // `zoom`, `back`
- title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
- brushStyle: {
- borderWidth: 0,
- color: "rgba(210,219,238,0.2)"
- }
- };
- return r;
- }, e;
- }(Ho)
- ), Tut = {
- zoom: function() {
- var t = !this._isZoomActive;
- this.api.dispatchAction({
- type: "takeGlobalCursor",
- key: "dataZoomSelect",
- dataZoomSelectActive: t
- });
- },
- back: function() {
- this._dispatchZoomAction(mut(this.ecModel));
- }
- };
- function C6(t) {
- var e = {
- xAxisIndex: t.get("xAxisIndex", !0),
- yAxisIndex: t.get("yAxisIndex", !0),
- xAxisId: t.get("xAxisId", !0),
- yAxisId: t.get("yAxisId", !0)
- };
- return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
- }
- function Put(t, e) {
- t.setIconStatus("back", but(e) > 1 ? "emphasis" : "normal");
- }
- function $ut(t, e, n, r, i) {
- var a = n._isZoomActive;
- r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
- var o = new w6(C6(t), e, {
- include: ["grid"]
- }), s = o.makePanelOpts(i, function(l) {
- return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
- });
- n._brushController.setPanels(s).enableBrush(a && s.length ? {
- brushType: "auto",
- brushStyle: t.getModel("brushStyle").getItemStyle()
- } : !1);
- }
- kUe("dataZoom", function(t) {
- var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
- if (!e || e.get(n) == null)
- return;
- var r = e.getModel(n), i = [], a = C6(r), o = tb(t, a);
- ML(o.xAxisModels, function(l) {
- return s(l, "xAxis", "xAxisIndex");
- }), ML(o.yAxisModels, function(l) {
- return s(l, "yAxis", "yAxisIndex");
- });
- function s(l, u, c) {
- var f = l.componentIndex, d = {
- type: "select",
- $fromToolbox: !0,
- // Default to be filter
- filterMode: r.get("filterMode", !0) || "filter",
- // Id for merge mapping.
- id: wut + u + f
- };
- d[c] = f, i.push(d);
- }
- return i;
- });
- function Aut(t) {
- t.registerComponentModel(Jlt), t.registerComponentView(tut), wv("saveAsImage", rut), wv("magicType", aut), wv("dataView", put), wv("dataZoom", Cut), wv("restore", _ut), Mt(Klt);
- }
- var Eut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
- // zlevel: 0,
- z: 60,
- show: !0,
- // tooltip main content
- showContent: !0,
- // 'trigger' only works on coordinate system.
- // 'item' | 'axis' | 'none'
- trigger: "item",
- // 'click' | 'mousemove' | 'none'
- triggerOn: "mousemove|click",
- alwaysShowContent: !1,
- displayMode: "single",
- renderMode: "auto",
- // whether restraint content inside viewRect.
- // If renderMode: 'richText', default true.
- // If renderMode: 'html', defaut false (for backward compat).
- confine: null,
- showDelay: 0,
- hideDelay: 100,
- // Animation transition time, unit is second
- transitionDuration: 0.4,
- enterable: !1,
- backgroundColor: "#fff",
- // box shadow
- shadowBlur: 10,
- shadowColor: "rgba(0, 0, 0, .2)",
- shadowOffsetX: 1,
- shadowOffsetY: 2,
- // tooltip border radius, unit is px, default is 4
- borderRadius: 4,
- // tooltip border width, unit is px, default is 0 (no border)
- borderWidth: 1,
- // Tooltip inside padding, default is 5 for all direction
- // Array is allowed to set up, right, bottom, left, same with css
- // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
- padding: null,
- // Extra css text
- extraCssText: "",
- // axis indicator, trigger by axis
- axisPointer: {
- // default is line
- // legal values: 'line' | 'shadow' | 'cross'
- type: "line",
- // Valid when type is line, appoint tooltip line locate on which line. Optional
- // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
- // default is 'auto', chose the axis which type is category.
- // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
- axis: "auto",
- animation: "auto",
- animationDurationUpdate: 200,
- animationEasingUpdate: "exponentialOut",
- crossStyle: {
- color: "#999",
- width: 1,
- type: "dashed",
- // TODO formatter
- textStyle: {}
- }
- // lineStyle and shadowStyle should not be specified here,
- // otherwise it will always override those styles on option.axisPointer.
- },
- textStyle: {
- color: "#666",
- fontSize: 14
- }
- }, e;
- }(At)
- );
- function ghe(t) {
- var e = t.get("confine");
- return e != null ? !!e : t.get("renderMode") === "richText";
- }
- function mhe(t) {
- if (Gt.domSupported) {
- for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
- if (t[n] in e)
- return t[n];
- }
- }
- var yhe = mhe(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), Mut = mhe(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
- function bhe(t, e) {
- if (!t)
- return e;
- e = J5(e, !0);
- var n = t.indexOf(e);
- return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
- }
- function Iut(t, e) {
- var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
- return n ? n[e] : null;
- }
- var Dut = bhe(Mut, "transition"), T6 = bhe(yhe, "transform"), Rut = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (Gt.transform3dSupported ? "will-change:transform;" : "");
- function kut(t) {
- return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
- }
- function Lut(t, e, n) {
- if (!Ve(n) || n === "inside")
- return "";
- var r = t.get("backgroundColor"), i = t.get("borderWidth");
- e = Uh(e);
- var a = kut(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = T6 + ":", u;
- St(["left", "right"], a) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = a === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = a === "top" ? 225 : 45) + "deg)");
- var c = u * Math.PI / 180, f = o + i, d = f * Math.abs(Math.cos(c)) + f * Math.abs(Math.sin(c)), h = Math.round(((d - Math.SQRT2 * i) / 2 + Math.SQRT2 * i - (d - f) / 2) * 100) / 100;
- s += ";" + a + ":-" + h + "px";
- var p = e + " solid " + i + "px;", v = ["position:absolute;width:" + o + "px;height:" + o + "px;z-index:-1;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + r + ";"];
- return '<div style="' + v.join("") + '"></div>';
- }
- function Nut(t, e) {
- var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
- return e || (r = " " + t + "s " + n, i += Gt.transformSupported ? "," + T6 + r : ",left" + r + ",top" + r), Dut + ":" + i;
- }
- function cY(t, e, n) {
- var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
- if (!Gt.transformSupported)
- return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
- var a = Gt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
- return n ? "top:0;left:0;" + T6 + ":" + o + ";" : [["top", 0], ["left", 0], [yhe, o]];
- }
- function But(t) {
- var e = [], n = t.get("fontSize"), r = t.getTextColor();
- r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
- var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
- return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), F(["decoration", "align"], function(l) {
- var u = t.get(l);
- u && e.push("text-" + l + ":" + u);
- }), e.join(";");
- }
- function zut(t, e, n) {
- var r = [], i = t.get("transitionDuration"), a = t.get("backgroundColor"), o = t.get("shadowBlur"), s = t.get("shadowColor"), l = t.get("shadowOffsetX"), u = t.get("shadowOffsetY"), c = t.getModel("textStyle"), f = Pue(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
- return r.push("box-shadow:" + d), e && i && r.push(Nut(i, n)), a && r.push("background-color:" + a), F(["width", "color", "radius"], function(h) {
- var p = "border-" + h, v = J5(p), g = t.get(v);
- g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
- }), r.push(But(c)), f != null && r.push("padding:" + vp(f).join("px ") + "px"), r.join(";") + ";";
- }
- function fY(t, e, n, r, i) {
- var a = e && e.painter;
- if (n) {
- var o = a && a.getViewportRoot();
- o && EHe(t, o, n, r, i);
- } else {
- t[0] = r, t[1] = i;
- var s = a && a.getViewportRootOffset();
- s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
- }
- t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
- }
- var Vut = (
- /** @class */
- function() {
- function t(e, n) {
- if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, Gt.wxa)
- return null;
- var r = document.createElement("div");
- r.domBelongToZr = !0, this.el = r;
- var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Ve(a) ? document.querySelector(a) : gf(a) ? a : qe(a) && a(e.getDom()));
- fY(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
- var s = this;
- r.onmouseenter = function() {
- s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
- }, r.onmousemove = function(l) {
- if (l = l || window.event, !s._enterable) {
- var u = i.handler, c = i.painter.getViewportRoot();
- No(c, l, !0), u.dispatch("mousemove", l);
- }
- }, r.onmouseleave = function() {
- s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
- };
- }
- return t.prototype.update = function(e) {
- if (!this._container) {
- var n = this._api.getDom(), r = Iut(n, "position"), i = n.style;
- i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
- }
- var a = e.get("alwaysShowContent");
- a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
- }, t.prototype.show = function(e, n) {
- clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
- var r = this.el, i = r.style, a = this._styleCoord;
- r.innerHTML ? i.cssText = Rut + zut(e, !this._firstShow, this._longHide) + cY(a[0], a[1], !0) + ("border-color:" + Uh(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
- }, t.prototype.setContent = function(e, n, r, i, a) {
- var o = this.el;
- if (e == null) {
- o.innerHTML = "";
- return;
- }
- var s = "";
- if (Ve(a) && r.get("trigger") === "item" && !ghe(r) && (s = Lut(r, i, a)), Ve(e))
- o.innerHTML = e + s;
- else if (e) {
- o.innerHTML = "", Se(e) || (e = [e]);
- for (var l = 0; l < e.length; l++)
- gf(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
- if (s && o.childNodes.length) {
- var u = document.createElement("div");
- u.innerHTML = s, o.appendChild(u);
- }
- }
- }, t.prototype.setEnterable = function(e) {
- this._enterable = e;
- }, t.prototype.getSize = function() {
- var e = this.el;
- return [e.offsetWidth, e.offsetHeight];
- }, t.prototype.moveTo = function(e, n) {
- var r = this._styleCoord;
- if (fY(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
- var i = this.el.style, a = cY(r[0], r[1]);
- F(a, function(o) {
- i[o[0]] = o[1];
- });
- }
- }, t.prototype._moveIfResized = function() {
- var e = this._styleCoord[2], n = this._styleCoord[3];
- this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
- }, t.prototype.hide = function() {
- var e = this, n = this.el.style;
- n.visibility = "hidden", n.opacity = "0", Gt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
- return e._longHide = !0;
- }, 500);
- }, t.prototype.hideLater = function(e) {
- this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(We(this.hide, this), e)) : this.hide());
- }, t.prototype.isShow = function() {
- return this._show;
- }, t.prototype.dispose = function() {
- clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
- var e = this.el.parentNode;
- e && e.removeChild(this.el), this.el = this._container = null;
- }, t;
- }()
- ), Fut = (
- /** @class */
- function() {
- function t(e) {
- this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), hY(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
- }
- return t.prototype.update = function(e) {
- var n = e.get("alwaysShowContent");
- n && this._moveIfResized(), this._alwaysShowContent = n;
- }, t.prototype.show = function() {
- this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
- }, t.prototype.setContent = function(e, n, r, i, a) {
- var o = this;
- nt(e) && fn(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
- var s = r.getModel("textStyle");
- this.el = new jt({
- style: {
- rich: n.richTextStyles,
- text: e,
- lineHeight: 22,
- borderWidth: 1,
- borderColor: i,
- textShadowColor: s.get("textShadowColor"),
- fill: r.get(["textStyle", "color"]),
- padding: Pue(r, "richText"),
- verticalAlign: "top",
- align: "left"
- },
- z: r.get("z")
- }), F(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
- o.el.style[u] = r.get(u);
- }), F(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
- o.el.style[u] = s.get(u) || 0;
- }), this._zr.add(this.el);
- var l = this;
- this.el.on("mouseover", function() {
- l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
- }), this.el.on("mouseout", function() {
- l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
- });
- }, t.prototype.setEnterable = function(e) {
- this._enterable = e;
- }, t.prototype.getSize = function() {
- var e = this.el, n = this.el.getBoundingRect(), r = dY(e.style);
- return [n.width + r.left + r.right, n.height + r.top + r.bottom];
- }, t.prototype.moveTo = function(e, n) {
- var r = this.el;
- if (r) {
- var i = this._styleCoord;
- hY(i, this._zr, e, n), e = i[0], n = i[1];
- var a = r.style, o = Ec(a.borderWidth || 0), s = dY(a);
- r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
- }
- }, t.prototype._moveIfResized = function() {
- var e = this._styleCoord[2], n = this._styleCoord[3];
- this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
- }, t.prototype.hide = function() {
- this.el && this.el.hide(), this._show = !1;
- }, t.prototype.hideLater = function(e) {
- this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(We(this.hide, this), e)) : this.hide());
- }, t.prototype.isShow = function() {
- return this._show;
- }, t.prototype.dispose = function() {
- this._zr.remove(this.el);
- }, t;
- }()
- );
- function Ec(t) {
- return Math.max(0, t);
- }
- function dY(t) {
- var e = Ec(t.shadowBlur || 0), n = Ec(t.shadowOffsetX || 0), r = Ec(t.shadowOffsetY || 0);
- return {
- left: Ec(e - n),
- right: Ec(e + n),
- top: Ec(e - r),
- bottom: Ec(e + r)
- };
- }
- function hY(t, e, n, r) {
- t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
- }
- var Wut = new Zt({
- shape: {
- x: -1,
- y: -1,
- width: 2,
- height: 2
- }
- }), Qut = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r) {
- if (!(Gt.node || !r.getDom())) {
- var i = n.getComponent("tooltip"), a = this._renderMode = pje(i.get("renderMode"));
- this._tooltipContent = a === "richText" ? new Fut(r) : new Vut(r, {
- appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
- });
- }
- }, e.prototype.render = function(n, r, i) {
- if (!(Gt.node || !i.getDom())) {
- this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
- var a = this._tooltipContent;
- a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Am(this, "_updatePosition", 50, "fixRate") : Jb(this, "_updatePosition");
- }
- }, e.prototype._initGlobalListener = function() {
- var n = this._tooltipModel, r = n.get("triggerOn");
- rhe("itemTooltip", this._api, We(function(i, a, o) {
- r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
- }, this));
- }, e.prototype._keepShow = function() {
- var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
- if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
- var o = this;
- clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
- !i.isDisposed() && o.manuallyShowTip(n, r, i, {
- x: o._lastX,
- y: o._lastY,
- dataByCoordSys: o._lastDataByCoordSys
- });
- });
- }
- }, e.prototype.manuallyShowTip = function(n, r, i, a) {
- if (!(a.from === this.uid || Gt.node || !i.getDom())) {
- var o = pY(a, i);
- this._ticket = "";
- var s = a.dataByCoordSys, l = Zut(a, r, i);
- if (l) {
- var u = l.el.getBoundingRect().clone();
- u.applyTransform(l.el.transform), this._tryShow({
- offsetX: u.x + u.width / 2,
- offsetY: u.y + u.height / 2,
- target: l.el,
- position: a.position,
- // When manully trigger, the mouse is not on the el, so we'd better to
- // position tooltip on the bottom of the el and display arrow is possible.
- positionDefault: "bottom"
- }, o);
- } else if (a.tooltip && a.x != null && a.y != null) {
- var c = Wut;
- c.x = a.x, c.y = a.y, c.update(), ft(c).tooltipConfig = {
- name: null,
- option: a.tooltip
- }, this._tryShow({
- offsetX: a.x,
- offsetY: a.y,
- target: c
- }, o);
- } else if (s)
- this._tryShow({
- offsetX: a.x,
- offsetY: a.y,
- position: a.position,
- dataByCoordSys: s,
- tooltipOption: a.tooltipOption
- }, o);
- else if (a.seriesIndex != null) {
- if (this._manuallyAxisShowTip(n, r, i, a))
- return;
- var f = ihe(a, r), d = f.point[0], h = f.point[1];
- d != null && h != null && this._tryShow({
- offsetX: d,
- offsetY: h,
- target: f.el,
- position: a.position,
- // When manully trigger, the mouse is not on the el, so we'd better to
- // position tooltip on the bottom of the el and display arrow is possible.
- positionDefault: "bottom"
- }, o);
- } else a.x != null && a.y != null && (i.dispatchAction({
- type: "updateAxisPointer",
- x: a.x,
- y: a.y
- }), this._tryShow({
- offsetX: a.x,
- offsetY: a.y,
- position: a.position,
- target: i.getZr().findHover(a.x, a.y).target
- }, o));
- }
- }, e.prototype.manuallyHideTip = function(n, r, i, a) {
- var o = this._tooltipContent;
- this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(pY(a, i));
- }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
- var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
- if (!(o == null || s == null || l == null)) {
- var u = r.getSeriesByIndex(o);
- if (u) {
- var c = u.getData(), f = U0([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
- if (f.get("trigger") === "axis")
- return i.dispatchAction({
- type: "updateAxisPointer",
- seriesIndex: o,
- dataIndex: s,
- position: a.position
- }), !0;
- }
- }
- }, e.prototype._tryShow = function(n, r) {
- var i = n.target, a = this._tooltipModel;
- if (a) {
- this._lastX = n.offsetX, this._lastY = n.offsetY;
- var o = n.dataByCoordSys;
- if (o && o.length)
- this._showAxisTooltip(o, n);
- else if (i) {
- var s = ft(i);
- if (s.ssrType === "legend")
- return;
- this._lastDataByCoordSys = null;
- var l, u;
- sh(i, function(c) {
- if (ft(c).dataIndex != null)
- return l = c, !0;
- if (ft(c).tooltipConfig != null)
- return u = c, !0;
- }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
- } else
- this._lastDataByCoordSys = null, this._hide(r);
- }
- }, e.prototype._showOrMove = function(n, r) {
- var i = n.get("showDelay");
- r = We(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
- }, e.prototype._showAxisTooltip = function(n, r) {
- var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = U0([r.tooltipOption], a), l = this._renderMode, u = [], c = ti("section", {
- blocks: [],
- noHeader: !0
- }), f = [], d = new bM();
- F(n, function(y) {
- F(y.dataByAxis, function(_) {
- var O = i.getComponent(_.axisDim + "Axis", _.axisIndex), S = _.value;
- if (!(!O || S == null)) {
- var x = ehe(S, O.axis, i, _.seriesDataIndices, _.valueLabelOpt), C = ti("section", {
- header: x,
- noHeader: !Zo(x),
- sortBlocks: !0,
- blocks: []
- });
- c.blocks.push(C), F(_.seriesDataIndices, function(P) {
- var $ = i.getSeriesByIndex(P.seriesIndex), T = P.dataIndexInside, E = $.getDataParams(T);
- if (!(E.dataIndex < 0)) {
- E.axisDim = _.axisDim, E.axisIndex = _.axisIndex, E.axisType = _.axisType, E.axisId = _.axisId, E.axisValue = P3(O.axis, {
- value: S
- }), E.axisValueLabel = x, E.marker = d.makeTooltipMarker("item", Uh(E.color), l);
- var M = qG($.formatTooltip(T, !0, null)), R = M.frag;
- if (R) {
- var N = U0([$], a).get("valueFormatter");
- C.blocks.push(N ? _e({
- valueFormatter: N
- }, R) : R);
- }
- M.text && f.push(M.text), u.push(E);
- }
- });
- }
- });
- }), c.blocks.reverse(), f.reverse();
- var h = r.position, p = s.get("order"), v = rj(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
- v && f.unshift(v);
- var g = l === "richText" ? `
- ` : "<br/>", m = f.join(g);
- this._showOrMove(s, function() {
- this._updateContentNotChangedOnAxis(n, u) ? this._updatePosition(s, h, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, m, u, Math.random() + "", o[0], o[1], h, null, d);
- });
- }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
- var a = this._ecModel, o = ft(r), s = o.seriesIndex, l = a.getSeriesByIndex(s), u = o.dataModel || l, c = o.dataIndex, f = o.dataType, d = u.getData(f), h = this._renderMode, p = n.positionDefault, v = U0([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
- position: p
- } : null), g = v.get("trigger");
- if (!(g != null && g !== "item")) {
- var m = u.getDataParams(c, f), y = new bM();
- m.marker = y.makeTooltipMarker("item", Uh(m.color), h);
- var _ = qG(u.formatTooltip(c, !1, f)), O = v.get("order"), S = v.get("valueFormatter"), x = _.frag, C = x ? rj(S ? _e({
- valueFormatter: S
- }, x) : x, y, h, O, a.get("useUTC"), v.get("textStyle")) : _.text, P = "item_" + u.name + "_" + c;
- this._showOrMove(v, function() {
- this._showTooltipContent(v, C, m, P, n.offsetX, n.offsetY, n.position, n.target, y);
- }), i({
- type: "showTip",
- dataIndexInside: c,
- dataIndex: d.getRawIndex(c),
- seriesIndex: s,
- from: this.uid
- });
- }
- }, e.prototype._showComponentItemTooltip = function(n, r, i) {
- var a = this._renderMode === "html", o = ft(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
- if (Ve(l)) {
- var c = l;
- l = {
- content: c,
- // Fixed formatter
- formatter: c
- }, u = !0;
- }
- u && a && l.content && (l = ot(l), l.content = ta(l.content));
- var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
- d && f.push(d), f.push({
- formatter: l.content
- });
- var h = n.positionDefault, p = U0(f, this._tooltipModel, h ? {
- position: h
- } : null), v = p.get("content"), g = Math.random() + "", m = new bM();
- this._showOrMove(p, function() {
- var y = ot(p.get("formatterParams") || {});
- this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
- }), i({
- type: "showTip",
- from: this.uid
- });
- }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
- if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
- var f = this._tooltipContent;
- f.setEnterable(n.get("enterable"));
- var d = n.get("formatter");
- l = l || n.get("position");
- var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
- if (d)
- if (Ve(d)) {
- var g = n.ecModel.get("useUTC"), m = Se(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
- h = d, y && (h = p1(m.axisValue, h, g)), h = e3(h, i, !0);
- } else if (qe(d)) {
- var _ = We(function(O, S) {
- O === this._ticket && (f.setContent(S, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
- }, this);
- this._ticket = a, h = d(i, a, _);
- } else
- h = d;
- f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
- }
- }, e.prototype._getNearestPoint = function(n, r, i, a) {
- if (i === "axis" || Se(r))
- return {
- color: a || (this._renderMode === "html" ? "#fff" : "none")
- };
- if (!Se(r))
- return {
- color: a || r.color || r.borderColor
- };
- }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
- var u = this._api.getWidth(), c = this._api.getHeight();
- r = r || n.get("position");
- var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
- if (l && p.applyTransform(l.transform), qe(r) && (r = r([i, a], s, o.el, p, {
- viewSize: [u, c],
- contentSize: f.slice()
- })), Se(r))
- i = ze(r[0], u), a = ze(r[1], c);
- else if (nt(r)) {
- var v = r;
- v.width = f[0], v.height = f[1];
- var g = Mr(v, {
- width: u,
- height: c
- });
- i = g.x, a = g.y, d = null, h = null;
- } else if (Ve(r) && l) {
- var m = jut(r, p, f, n.get("borderWidth"));
- i = m[0], a = m[1];
- } else {
- var m = Hut(i, a, o, u, c, d ? null : 20, h ? null : 20);
- i = m[0], a = m[1];
- }
- if (d && (i -= vY(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= vY(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), ghe(n)) {
- var m = Gut(i, a, o, u, c);
- i = m[0], a = m[1];
- }
- o.moveTo(i, a);
- }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
- var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
- return o && F(i, function(s, l) {
- var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
- o = o && u.length === f.length, o && F(u, function(d, h) {
- var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
- o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && F(v, function(m, y) {
- var _ = g[y];
- o = o && m.seriesIndex === _.seriesIndex && m.dataIndex === _.dataIndex;
- }), a && F(d.seriesDataIndices, function(m) {
- var y = m.seriesIndex, _ = r[y], O = a[y];
- _ && O && O.data !== _.data && (o = !1);
- });
- });
- }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
- }, e.prototype._hide = function(n) {
- this._lastDataByCoordSys = null, n({
- type: "hideTip",
- from: this.uid
- });
- }, e.prototype.dispose = function(n, r) {
- Gt.node || !r.getDom() || (Jb(this, "_updatePosition"), this._tooltipContent.dispose(), TL("itemTooltip", r));
- }, e.type = "tooltip", e;
- }(Ln)
- );
- function U0(t, e, n) {
- var r = e.ecModel, i;
- n ? (i = new wn(n, r, r), i = new wn(e.option, i, r)) : i = e;
- for (var a = t.length - 1; a >= 0; a--) {
- var o = t[a];
- o && (o instanceof wn && (o = o.get("tooltip", !0)), Ve(o) && (o = {
- formatter: o
- }), o && (i = new wn(o, i, r)));
- }
- return i;
- }
- function pY(t, e) {
- return t.dispatchAction || We(e.dispatchAction, e);
- }
- function Hut(t, e, n, r, i, a, o) {
- var s = n.getSize(), l = s[0], u = s[1];
- return a != null && (t + l + a + 2 > r ? t -= l + a : t += a), o != null && (e + u + o > i ? e -= u + o : e += o), [t, e];
- }
- function Gut(t, e, n, r, i) {
- var a = n.getSize(), o = a[0], s = a[1];
- return t = Math.min(t + o, r) - o, e = Math.min(e + s, i) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
- }
- function jut(t, e, n, r) {
- var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
- switch (t) {
- case "inside":
- s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
- break;
- case "top":
- s = e.x + u / 2 - i / 2, l = e.y - a - o;
- break;
- case "bottom":
- s = e.x + u / 2 - i / 2, l = e.y + c + o;
- break;
- case "left":
- s = e.x - i - o, l = e.y + c / 2 - a / 2;
- break;
- case "right":
- s = e.x + u + o, l = e.y + c / 2 - a / 2;
- }
- return [s, l];
- }
- function vY(t) {
- return t === "center" || t === "middle";
- }
- function Zut(t, e, n) {
- var r = E5(t).queryOptionMap, i = r.keys()[0];
- if (!(!i || i === "series")) {
- var a = l1(e, i, r.get(i), {
- useDefault: !1,
- enableAll: !1,
- enableNone: !1
- }), o = a.models[0];
- if (o) {
- var s = n.getViewOfComponentModel(o), l;
- if (s.group.traverse(function(u) {
- var c = ft(u).tooltipConfig;
- if (c && c.name === t.name)
- return l = u, !0;
- }), l)
- return {
- componentMainType: i,
- componentIndex: o.componentIndex,
- el: l
- };
- }
- }
- }
- function Uut(t) {
- Mt(C1), t.registerComponentModel(Eut), t.registerComponentView(Qut), t.registerAction({
- type: "showTip",
- event: "showTip",
- update: "tooltip:manuallyShowTip"
- }, fr), t.registerAction({
- type: "hideTip",
- event: "hideTip",
- update: "tooltip:manuallyHideTip"
- }, fr);
- }
- var Xut = ["rect", "polygon", "keep", "clear"];
- function Yut(t, e) {
- var n = Cn(t ? t.brush : []);
- if (n.length) {
- var r = [];
- F(n, function(l) {
- var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
- u instanceof Array && (r = r.concat(u));
- });
- var i = t && t.toolbox;
- Se(i) && (i = i[0]), i || (i = {
- feature: {}
- }, t.toolbox = [i]);
- var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
- s.push.apply(s, r), qut(s), e && !s.length && s.push.apply(s, Xut);
- }
- }
- function qut(t) {
- var e = {};
- F(t, function(n) {
- e[n] = 1;
- }), t.length = 0, F(e, function(n, r) {
- t.push(r);
- });
- }
- var gY = F;
- function mY(t) {
- if (t) {
- for (var e in t)
- if (t.hasOwnProperty(e))
- return !0;
- }
- }
- function IL(t, e, n) {
- var r = {};
- return gY(e, function(a) {
- var o = r[a] = i();
- gY(t[a], function(s, l) {
- if (Kr.isValidType(l)) {
- var u = {
- type: l,
- visual: s
- };
- n && n(u, a), o[l] = new Kr(u), l === "opacity" && (u = ot(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new Kr(u));
- }
- });
- }), r;
- function i() {
- var a = function() {
- };
- a.prototype.__hidden = a.prototype;
- var o = new a();
- return o;
- }
- }
- function _he(t, e, n) {
- var r;
- F(n, function(i) {
- e.hasOwnProperty(i) && mY(e[i]) && (r = !0);
- }), r && F(n, function(i) {
- e.hasOwnProperty(i) && mY(e[i]) ? t[i] = ot(e[i]) : delete t[i];
- });
- }
- function Kut(t, e, n, r, i, a) {
- var o = {};
- F(t, function(f) {
- var d = Kr.prepareVisualTypes(e[f]);
- o[f] = d;
- });
- var s;
- function l(f) {
- return c3(n, s, f);
- }
- function u(f, d) {
- Nue(n, s, f, d);
- }
- n.each(c);
- function c(f, d) {
- s = f;
- var h = n.getRawDataItem(s);
- if (!(h && h.visualMap === !1))
- for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
- var _ = g[m];
- v[_] && v[_].applyVisual(f, l, u);
- }
- }
- }
- function Jut(t, e, n, r) {
- var i = {};
- return F(t, function(a) {
- var o = Kr.prepareVisualTypes(e[a]);
- i[a] = o;
- }), {
- progress: function(o, s) {
- var l;
- r != null && (l = s.getDimensionIndex(r));
- function u(S) {
- return c3(s, f, S);
- }
- function c(S, x) {
- Nue(s, f, S, x);
- }
- for (var f, d = s.getStore(); (f = o.next()) != null; ) {
- var h = s.getRawDataItem(f);
- if (!(h && h.visualMap === !1))
- for (var p = r != null ? d.get(l, f) : f, v = n(p), g = e[v], m = i[v], y = 0, _ = m.length; y < _; y++) {
- var O = m[y];
- g[O] && g[O].applyVisual(p, u, c);
- }
- }
- }
- };
- }
- function ect(t) {
- var e = t.brushType, n = {
- point: function(r) {
- return yY[e].point(r, n, t);
- },
- rect: function(r) {
- return yY[e].rect(r, n, t);
- }
- };
- return n;
- }
- var yY = {
- lineX: bY(0),
- lineY: bY(1),
- rect: {
- point: function(t, e, n) {
- return t && n.boundingRect.contain(t[0], t[1]);
- },
- rect: function(t, e, n) {
- return t && n.boundingRect.intersect(t);
- }
- },
- polygon: {
- point: function(t, e, n) {
- return t && n.boundingRect.contain(t[0], t[1]) && Gd(n.range, t[0], t[1]);
- },
- rect: function(t, e, n) {
- var r = n.range;
- if (!t || r.length <= 1)
- return !1;
- var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
- if (Gd(r, i, a) || Gd(r, i + o, a) || Gd(r, i, a + s) || Gd(r, i + o, a + s) || bt.create(t).contain(l[0], l[1]) || yy(i, a, i + o, a, r) || yy(i, a, i, a + s, r) || yy(i + o, a, i + o, a + s, r) || yy(i, a + s, i + o, a + s, r))
- return !0;
- }
- }
- };
- function bY(t) {
- var e = ["x", "y"], n = ["width", "height"];
- return {
- point: function(r, i, a) {
- if (r) {
- var o = a.range, s = r[t];
- return X0(s, o);
- }
- },
- rect: function(r, i, a) {
- if (r) {
- var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
- return s[1] < s[0] && s.reverse(), X0(s[0], o) || X0(s[1], o) || X0(o[0], s) || X0(o[1], s);
- }
- }
- };
- }
- function X0(t, e) {
- return e[0] <= t && t <= e[1];
- }
- var _Y = ["inBrush", "outOfBrush"], LI = "__ecBrushSelect", DL = "__ecInBrushSelectEvent";
- function Ohe(t) {
- t.eachComponent({
- mainType: "brush"
- }, function(e) {
- var n = e.brushTargetManager = new w6(e.option, t);
- n.setInputRanges(e.areas, t);
- });
- }
- function tct(t, e, n) {
- var r = [], i, a;
- t.eachComponent({
- mainType: "brush"
- }, function(o) {
- n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
- brushType: !1
- });
- }), Ohe(t), t.eachComponent({
- mainType: "brush"
- }, function(o, s) {
- var l = {
- brushId: o.id,
- brushIndex: s,
- brushName: o.name,
- areas: ot(o.areas),
- selected: []
- };
- r.push(l);
- var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
- s || (i = u.throttleType, a = u.throttleDelay);
- var v = Ce(o.areas, function(S) {
- var x = act[S.brushType], C = it({
- boundingRect: x ? x(S) : void 0
- }, S);
- return C.selectors = ect(C), C;
- }), g = IL(o.option, _Y, function(S) {
- S.mappingMethod = "fixed";
- });
- Se(c) && F(c, function(S) {
- f[S] = 1;
- });
- function m(S) {
- return c === "all" || !!f[S];
- }
- function y(S) {
- return !!S.length;
- }
- t.eachSeries(function(S, x) {
- var C = h[x] = [];
- S.subType === "parallel" ? _(S, x) : O(S, x, C);
- });
- function _(S, x) {
- var C = S.coordinateSystem;
- p = p || C.hasAxisBrushed(), m(x) && C.eachActiveState(S.getData(), function(P, $) {
- P === "active" && (d[$] = 1);
- });
- }
- function O(S, x, C) {
- if (!(!S.brushSelector || ict(o, x)) && (F(v, function($) {
- o.brushTargetManager.controlSeries($, S, t) && C.push($), p = p || y(C);
- }), m(x) && y(C))) {
- var P = S.getData();
- P.each(function($) {
- OY(S, C, P, $) && (d[$] = 1);
- });
- }
- }
- t.eachSeries(function(S, x) {
- var C = {
- seriesId: S.id,
- seriesIndex: x,
- seriesName: S.name,
- dataIndex: []
- };
- l.selected.push(C);
- var P = h[x], $ = S.getData(), T = m(x) ? function(E) {
- return d[E] ? (C.dataIndex.push($.getRawIndex(E)), "inBrush") : "outOfBrush";
- } : function(E) {
- return OY(S, P, $, E) ? (C.dataIndex.push($.getRawIndex(E)), "inBrush") : "outOfBrush";
- };
- (m(x) ? p : y(P)) && Kut(_Y, g, $, T);
- });
- }), nct(e, i, a, r, n);
- }
- function nct(t, e, n, r, i) {
- if (i) {
- var a = t.getZr();
- if (!a[DL]) {
- a[LI] || (a[LI] = rct);
- var o = Am(a, LI, n, e);
- o(t, r);
- }
- }
- }
- function rct(t, e) {
- if (!t.isDisposed()) {
- var n = t.getZr();
- n[DL] = !0, t.dispatchAction({
- type: "brushSelect",
- batch: e
- }), n[DL] = !1;
- }
- }
- function OY(t, e, n, r) {
- for (var i = 0, a = e.length; i < a; i++) {
- var o = e[i];
- if (t.brushSelector(r, n, o.selectors, o))
- return !0;
- }
- }
- function ict(t, e) {
- var n = t.option.seriesIndex;
- return n != null && n !== "all" && (Se(n) ? St(n, e) < 0 : e !== n);
- }
- var act = {
- rect: function(t) {
- return SY(t.range);
- },
- polygon: function(t) {
- for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
- e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
- var a = n[r];
- a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]);
- }
- return e && SY(e);
- }
- };
- function SY(t) {
- return new bt(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
- }
- var oct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r) {
- this.ecModel = n, this.api = r, this.model, (this._brushController = new J3(r.getZr())).on("brush", We(this._onBrush, this)).mount();
- }, e.prototype.render = function(n, r, i, a) {
- this.model = n, this._updateController(n, r, i, a);
- }, e.prototype.updateTransform = function(n, r, i, a) {
- Ohe(r), this._updateController(n, r, i, a);
- }, e.prototype.updateVisual = function(n, r, i, a) {
- this.updateTransform(n, r, i, a);
- }, e.prototype.updateView = function(n, r, i, a) {
- this._updateController(n, r, i, a);
- }, e.prototype._updateController = function(n, r, i, a) {
- (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
- }, e.prototype.dispose = function() {
- this._brushController.dispose();
- }, e.prototype._onBrush = function(n) {
- var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
- (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
- type: "brush",
- brushId: r,
- areas: ot(i),
- $from: r
- }), n.isEnd && this.api.dispatchAction({
- type: "brushEnd",
- brushId: r,
- areas: ot(i),
- $from: r
- });
- }, e.type = "brush", e;
- }(Ln)
- ), sct = "#ddd", lct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.areas = [], n.brushOption = {}, n;
- }
- return e.prototype.optionUpdated = function(n, r) {
- var i = this.option;
- !r && _he(i, n, ["inBrush", "outOfBrush"]);
- var a = i.inBrush = i.inBrush || {};
- i.outOfBrush = i.outOfBrush || {
- color: sct
- }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
- }, e.prototype.setAreas = function(n) {
- process.env.NODE_ENV !== "production" && (at(Se(n)), F(n, function(r) {
- at(r.brushType, "Illegal areas");
- })), n && (this.areas = Ce(n, function(r) {
- return xY(this.option, r);
- }, this));
- }, e.prototype.setBrushOption = function(n) {
- this.brushOption = xY(this.option, n), this.brushType = this.brushOption.brushType;
- }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
- seriesIndex: "all",
- brushType: "rect",
- brushMode: "single",
- transformable: !0,
- brushStyle: {
- borderWidth: 1,
- color: "rgba(210,219,238,0.3)",
- borderColor: "#D2DBEE"
- },
- throttleType: "fixRate",
- throttleDelay: 0,
- removeOnClick: !0,
- z: 1e4
- }, e;
- }(At)
- );
- function xY(t, e) {
- return mt({
- brushType: t.brushType,
- brushMode: t.brushMode,
- transformable: t.transformable,
- brushStyle: new wn(t.brushStyle).getItemStyle(),
- removeOnClick: t.removeOnClick,
- z: t.z
- }, e, !0);
- }
- var uct = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], cct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- return t !== null && t.apply(this, arguments) || this;
- }
- return e.prototype.render = function(n, r, i) {
- var a, o, s;
- r.eachComponent({
- mainType: "brush"
- }, function(l) {
- a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
- }), this._brushType = a, this._brushMode = o, F(n.get("type", !0), function(l) {
- n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
- });
- }, e.prototype.updateView = function(n, r, i) {
- this.render(n, r, i);
- }, e.prototype.getIcons = function() {
- var n = this.model, r = n.get("icon", !0), i = {};
- return F(n.get("type", !0), function(a) {
- r[a] && (i[a] = r[a]);
- }), i;
- }, e.prototype.onclick = function(n, r, i) {
- var a = this._brushType, o = this._brushMode;
- i === "clear" ? (r.dispatchAction({
- type: "axisAreaSelect",
- intervals: []
- }), r.dispatchAction({
- type: "brush",
- command: "clear",
- // Clear all areas of all brush components.
- areas: []
- })) : r.dispatchAction({
- type: "takeGlobalCursor",
- key: "brush",
- brushOption: {
- brushType: i === "keep" ? a : a === i ? !1 : i,
- brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
- }
- });
- }, e.getDefaultOption = function(n) {
- var r = {
- show: !0,
- type: uct.slice(),
- icon: {
- /* eslint-disable */
- 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",
- 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",
- 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",
- 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",
- 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",
- 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"
- // jshint ignore:line
- /* eslint-enable */
- },
- // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
- title: n.getLocaleModel().get(["toolbox", "brush", "title"])
- };
- return r;
- }, e;
- }(Ho)
- );
- function fct(t) {
- t.registerComponentView(oct), t.registerComponentModel(lct), t.registerPreprocessor(Yut), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, tct), t.registerAction({
- type: "brush",
- event: "brush",
- update: "updateVisual"
- }, function(e, n) {
- n.eachComponent({
- mainType: "brush",
- query: e
- }, function(r) {
- r.setAreas(e.areas);
- });
- }), t.registerAction({
- type: "brushSelect",
- event: "brushSelected",
- update: "none"
- }, fr), t.registerAction({
- type: "brushEnd",
- event: "brushEnd",
- update: "none"
- }, fr), wv("brush", cct);
- }
- var dct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.layoutMode = {
- type: "box",
- ignoreSize: !0
- }, n;
- }
- return e.type = "title", e.defaultOption = {
- // zlevel: 0,
- z: 6,
- show: !0,
- text: "",
- target: "blank",
- subtext: "",
- subtarget: "blank",
- left: 0,
- top: 0,
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- borderWidth: 0,
- padding: 5,
- itemGap: 10,
- textStyle: {
- fontSize: 18,
- fontWeight: "bold",
- color: "#464646"
- },
- subtextStyle: {
- fontSize: 12,
- color: "#6E7079"
- }
- }, e;
- }(At)
- ), hct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.render = function(n, r, i) {
- if (this.group.removeAll(), !!n.get("show")) {
- var a = this.group, o = n.getModel("textStyle"), s = n.getModel("subtextStyle"), l = n.get("textAlign"), u = dt(n.get("textBaseline"), n.get("textVerticalAlign")), c = new jt({
- style: Mn(o, {
- text: n.get("text"),
- fill: o.getTextColor()
- }, {
- disableBox: !0
- }),
- z2: 10
- }), f = c.getBoundingRect(), d = n.get("subtext"), h = new jt({
- style: Mn(s, {
- text: d,
- fill: s.getTextColor(),
- y: f.height + n.get("itemGap"),
- verticalAlign: "top"
- }, {
- disableBox: !0
- }),
- z2: 10
- }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
- c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
- BC(p, "_" + n.get("target"));
- }), v && h.on("click", function() {
- BC(v, "_" + n.get("subtarget"));
- }), ft(c).eventData = ft(h).eventData = g ? {
- componentType: "title",
- componentIndex: n.componentIndex
- } : null, a.add(c), d && a.add(h);
- var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
- y.width = m.width, y.height = m.height;
- var _ = Mr(y, {
- width: i.getWidth(),
- height: i.getHeight()
- }, n.get("padding"));
- l || (l = n.get("left") || n.get("right"), l === "middle" && (l = "center"), l === "right" ? _.x += _.width : l === "center" && (_.x += _.width / 2)), u || (u = n.get("top") || n.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? _.y += _.height : u === "middle" && (_.y += _.height / 2), u = u || "top"), a.x = _.x, a.y = _.y, a.markRedraw();
- var O = {
- align: l,
- verticalAlign: u
- };
- c.setStyle(O), h.setStyle(O), m = a.getBoundingRect();
- var S = _.margin, x = n.getItemStyle(["color", "opacity"]);
- x.fill = n.get("backgroundColor");
- var C = new Zt({
- shape: {
- x: m.x - S[3],
- y: m.y - S[0],
- width: m.width + S[1] + S[3],
- height: m.height + S[0] + S[2],
- r: n.get("borderRadius")
- },
- style: x,
- subPixelOptimize: !0,
- silent: !0
- });
- a.add(C);
- }
- }, e.type = "title", e;
- }(Ln)
- );
- function pct(t) {
- t.registerComponentModel(dct), t.registerComponentView(hct);
- }
- var wY = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.layoutMode = "box", n;
- }
- return e.prototype.init = function(n, r, i) {
- this.mergeDefaultAndTheme(n, i), this._initData();
- }, e.prototype.mergeOption = function(n) {
- t.prototype.mergeOption.apply(this, arguments), this._initData();
- }, e.prototype.setCurrentIndex = function(n) {
- n == null && (n = this.option.currentIndex);
- var r = this._data.count();
- this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
- }, e.prototype.getCurrentIndex = function() {
- return this.option.currentIndex;
- }, e.prototype.isIndexMax = function() {
- return this.getCurrentIndex() >= this._data.count() - 1;
- }, e.prototype.setPlayState = function(n) {
- this.option.autoPlay = !!n;
- }, e.prototype.getPlayState = function() {
- return !!this.option.autoPlay;
- }, e.prototype._initData = function() {
- var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
- i === "category" ? (o = [], F(r, function(u, c) {
- var f = Br(ym(u), ""), d;
- nt(u) ? (d = ot(u), d.value = c) : d = c, o.push(d), a.push(f);
- })) : o = r;
- var s = {
- category: "ordinal",
- time: "time",
- value: "number"
- }[i] || "number", l = this._data = new Wi([{
- name: "value",
- type: s
- }], this);
- l.initData(o, a);
- }, e.prototype.getData = function() {
- return this._data;
- }, e.prototype.getCategories = function() {
- if (this.get("axisType") === "category")
- return this._names.slice();
- }, e.type = "timeline", e.defaultOption = {
- // zlevel: 0, // 一级层叠
- z: 4,
- show: !0,
- axisType: "time",
- realtime: !0,
- left: "20%",
- top: null,
- right: "20%",
- bottom: 0,
- width: null,
- height: 40,
- padding: 5,
- controlPosition: "left",
- autoPlay: !1,
- rewind: !1,
- loop: !0,
- playInterval: 2e3,
- currentIndex: 0,
- itemStyle: {},
- label: {
- color: "#000"
- },
- data: []
- }, e;
- }(At)
- ), She = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "timeline.slider", e.defaultOption = Bf(wY.defaultOption, {
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- borderWidth: 0,
- orient: "horizontal",
- inverse: !1,
- tooltip: {
- trigger: "item"
- // data item may also have tootip attr.
- },
- symbol: "circle",
- symbolSize: 12,
- lineStyle: {
- show: !0,
- width: 2,
- color: "#DAE1F5"
- },
- label: {
- position: "auto",
- // When using number, label position is not
- // restricted by viewRect.
- // positive: right/bottom, negative: left/top
- show: !0,
- interval: "auto",
- rotate: 0,
- // formatter: null,
- // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: "#A4B1D7"
- },
- itemStyle: {
- color: "#A4B1D7",
- borderWidth: 1
- },
- checkpointStyle: {
- symbol: "circle",
- symbolSize: 15,
- color: "#316bf3",
- borderColor: "#fff",
- borderWidth: 2,
- shadowBlur: 2,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: "rgba(0, 0, 0, 0.3)",
- // borderColor: 'rgba(194,53,49, 0.5)',
- animation: !0,
- animationDuration: 300,
- animationEasing: "quinticInOut"
- },
- controlStyle: {
- show: !0,
- showPlayBtn: !0,
- showPrevBtn: !0,
- showNextBtn: !0,
- itemSize: 24,
- itemGap: 12,
- position: "left",
- 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",
- 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",
- // eslint-disable-next-line max-len
- 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",
- // eslint-disable-next-line max-len
- 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",
- prevBtnSize: 18,
- nextBtnSize: 18,
- color: "#A4B1D7",
- borderColor: "#A4B1D7",
- borderWidth: 1
- },
- emphasis: {
- label: {
- show: !0,
- // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: "#6f778d"
- },
- itemStyle: {
- color: "#316BF3"
- },
- controlStyle: {
- color: "#316BF3",
- borderColor: "#316BF3",
- borderWidth: 2
- }
- },
- progress: {
- lineStyle: {
- color: "#316BF3"
- },
- itemStyle: {
- color: "#316BF3"
- },
- label: {
- color: "#6f778d"
- }
- },
- data: []
- }), e;
- }(wY)
- );
- vr(She, DP.prototype);
- var vct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "timeline", e;
- }(Ln)
- ), gct = (
- /** @class */
- function(t) {
- le(e, t);
- function e(n, r, i, a) {
- var o = t.call(this, n, r, i) || this;
- return o.type = a || "value", o;
- }
- return e.prototype.getLabelModel = function() {
- return this.model.getModel("label");
- }, e.prototype.isHorizontal = function() {
- return this.model.get("orient") === "horizontal";
- }, e;
- }(vs)
- ), NI = Math.PI, CY = Ut(), mct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function(n, r) {
- this.api = r;
- }, e.prototype.render = function(n, r, i) {
- if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
- var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
- n.formatTooltip = function(u) {
- var c = l.scale.getLabel({
- value: u
- });
- return ti("nameValue", {
- noName: !0,
- value: c
- });
- }, F(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
- this["_render" + u](a, o, l, n);
- }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
- }
- this._doPlayStop(), this._updateTicksStatus();
- }, e.prototype.remove = function() {
- this._clearTimer(), this.group.removeAll();
- }, e.prototype.dispose = function() {
- this._clearTimer();
- }, e.prototype._layout = function(n, r) {
- var i = n.get(["label", "position"]), a = n.get("orient"), o = bct(n, r), s;
- i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < r.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < r.getWidth() / 2 ? "+" : "-" : Ve(i) ? s = {
- horizontal: {
- top: "-",
- bottom: "+"
- },
- vertical: {
- left: "-",
- right: "+"
- }
- }[a][i] : s = i;
- var l = {
- horizontal: "center",
- vertical: s >= 0 || s === "+" ? "left" : "right"
- }, u = {
- horizontal: s >= 0 || s === "+" ? "top" : "bottom",
- vertical: "middle"
- }, c = {
- horizontal: 0,
- vertical: NI / 2
- }, f = a === "vertical" ? o.height : o.width, d = n.getModel("controlStyle"), h = d.get("show", !0), p = h ? d.get("itemSize") : 0, v = h ? d.get("itemGap") : 0, g = p + v, m = n.get(["label", "rotate"]) || 0;
- m = m * NI / 180;
- var y, _, O, S = d.get("position", !0), x = h && d.get("showPlayBtn", !0), C = h && d.get("showPrevBtn", !0), P = h && d.get("showNextBtn", !0), $ = 0, T = f;
- S === "left" || S === "bottom" ? (x && (y = [0, 0], $ += g), C && (_ = [$, 0], $ += g), P && (O = [T - p, 0], T -= g)) : (x && (y = [T - p, 0], T -= g), C && (_ = [0, 0], $ += g), P && (O = [T - p, 0], T -= g));
- var E = [$, T];
- return n.get("inverse") && E.reverse(), {
- viewRect: o,
- mainLength: f,
- orient: a,
- rotation: c[a],
- labelRotation: m,
- labelPosOpt: s,
- labelAlign: n.get(["label", "align"]) || l[a],
- labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
- // Based on mainGroup.
- playPosition: y,
- prevBtnPosition: _,
- nextBtnPosition: O,
- axisExtent: E,
- controlSize: p,
- controlGap: v
- };
- }, e.prototype._position = function(n, r) {
- var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
- if (n.orient === "vertical") {
- var s = Na(), l = o.x, u = o.y + o.height;
- Gs(s, s, [-l, -u]), Lf(s, s, -NI / 2), Gs(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
- }
- var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
- p[0] = h[0] = c[0][0];
- var v = n.labelPosOpt;
- if (v == null || Ve(v)) {
- var g = v === "+" ? 0 : 1;
- _(h, f, c, 1, g), _(p, d, c, 1, 1 - g);
- } else {
- var g = v >= 0 ? 0 : 1;
- _(h, f, c, 1, g), p[1] = h[1] + v;
- }
- i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
- function m(O) {
- O.originX = c[0][0] - O.x, O.originY = c[1][0] - O.y;
- }
- function y(O) {
- return [[O.x, O.x + O.width], [O.y, O.y + O.height]];
- }
- function _(O, S, x, C, P) {
- O[C] += x[C][P] - S[C][P];
- }
- }, e.prototype._createAxis = function(n, r) {
- var i = r.getData(), a = r.get("axisType"), o = yct(r, a);
- o.getTicks = function() {
- return i.mapArray(["value"], function(u) {
- return {
- value: u
- };
- });
- };
- var s = i.getDataExtent("value");
- o.setExtent(s[0], s[1]), o.calcNiceTicks();
- var l = new gct("value", o, n.axisExtent, a);
- return l.model = r, l;
- }, e.prototype._createGroup = function(n) {
- var r = this[n] = new ct();
- return this.group.add(r), r;
- }, e.prototype._renderAxisLine = function(n, r, i, a) {
- var o = i.getExtent();
- if (a.get(["lineStyle", "show"])) {
- var s = new Xr({
- shape: {
- x1: o[0],
- y1: 0,
- x2: o[1],
- y2: 0
- },
- style: _e({
- lineCap: "round"
- }, a.getModel("lineStyle").getLineStyle()),
- silent: !0,
- z2: 1
- });
- r.add(s);
- var l = this._progressLine = new Xr({
- shape: {
- x1: o[0],
- x2: this._currentPointer ? this._currentPointer.x : o[0],
- y1: 0,
- y2: 0
- },
- style: it({
- lineCap: "round",
- lineWidth: s.style.lineWidth
- }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
- silent: !0,
- z2: 1
- });
- r.add(l);
- }
- }, e.prototype._renderAxisTick = function(n, r, i, a) {
- var o = this, s = a.getData(), l = i.scale.getTicks();
- this._tickSymbols = [], F(l, function(u) {
- var c = i.dataToCoord(u.value), f = s.getItemModel(u.value), d = f.getModel("itemStyle"), h = f.getModel(["emphasis", "itemStyle"]), p = f.getModel(["progress", "itemStyle"]), v = {
- x: c,
- y: 0,
- onclick: We(o._changeTimeline, o, u.value)
- }, g = TY(f, d, r, v);
- g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), af(g);
- var m = ft(g);
- f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
- });
- }, e.prototype._renderAxisLabel = function(n, r, i, a) {
- var o = this, s = i.getLabelModel();
- if (s.get("show")) {
- var l = a.getData(), u = i.getViewLabels();
- this._tickLabels = [], F(u, function(c) {
- var f = c.tickValue, d = l.getItemModel(f), h = d.getModel("label"), p = d.getModel(["emphasis", "label"]), v = d.getModel(["progress", "label"]), g = i.dataToCoord(c.tickValue), m = new jt({
- x: g,
- y: 0,
- rotation: n.labelRotation - n.rotation,
- onclick: We(o._changeTimeline, o, f),
- silent: !1,
- style: Mn(h, {
- text: c.formattedLabel,
- align: n.labelAlign,
- verticalAlign: n.labelBaseline
- })
- });
- m.ensureState("emphasis").style = Mn(p), m.ensureState("progress").style = Mn(v), r.add(m), af(m), CY(m).dataIndex = f, o._tickLabels.push(m);
- });
- }
- }, e.prototype._renderControl = function(n, r, i, a) {
- var o = n.controlSize, s = n.rotation, l = a.getModel("controlStyle").getItemStyle(), u = a.getModel(["emphasis", "controlStyle"]).getItemStyle(), c = a.getPlayState(), f = a.get("inverse", !0);
- d(n.nextBtnPosition, "next", We(this._changeTimeline, this, f ? "-" : "+")), d(n.prevBtnPosition, "prev", We(this._changeTimeline, this, f ? "+" : "-")), d(n.playPosition, c ? "stop" : "play", We(this._handlePlayClick, this, !c), !0);
- function d(h, p, v, g) {
- if (h) {
- var m = js(dt(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], _ = _ct(a, p + "Icon", y, {
- x: h[0],
- y: h[1],
- originX: o / 2,
- originY: 0,
- rotation: g ? -s : 0,
- rectHover: !0,
- style: l,
- onclick: v
- });
- _.ensureState("emphasis").style = u, r.add(_), af(_);
- }
- }
- }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
- var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
- onCreate: function(f) {
- f.draggable = !0, f.drift = We(u._handlePointerDrag, u), f.ondragend = We(u._handlePointerDragend, u), PY(f, u._progressLine, s, i, a, !0);
- },
- onUpdate: function(f) {
- PY(f, u._progressLine, s, i, a);
- }
- };
- this._currentPointer = TY(l, l, this._mainGroup, {}, this._currentPointer, c);
- }, e.prototype._handlePlayClick = function(n) {
- this._clearTimer(), this.api.dispatchAction({
- type: "timelinePlayChange",
- playState: n,
- from: this.uid
- });
- }, e.prototype._handlePointerDrag = function(n, r, i) {
- this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
- }, e.prototype._handlePointerDragend = function(n) {
- this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
- }, e.prototype._pointerChangeTimeline = function(n, r) {
- var i = this._toAxisCoord(n)[0], a = this._axis, o = ao(a.getExtent().slice());
- i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
- var s = this._progressLine;
- s && (s.shape.x2 = i, s.dirty());
- var l = this._findNearestTick(i), u = this.model;
- (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
- }, e.prototype._doPlayStop = function() {
- var n = this;
- this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
- var r = n.model;
- n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
- }, this.model.get("playInterval")));
- }, e.prototype._toAxisCoord = function(n) {
- var r = this._mainGroup.getLocalTransform();
- return zs(n, r, !0);
- }, e.prototype._findNearestTick = function(n) {
- var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
- return r.each(["value"], function(s, l) {
- var u = o.dataToCoord(s), c = Math.abs(u - n);
- c < i && (i = c, a = l);
- }), a;
- }, e.prototype._clearTimer = function() {
- this._timer && (clearTimeout(this._timer), this._timer = null);
- }, e.prototype._changeTimeline = function(n) {
- var r = this.model.getCurrentIndex();
- n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
- type: "timelineChange",
- currentIndex: n,
- from: this.uid
- });
- }, e.prototype._updateTicksStatus = function() {
- var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
- if (r)
- for (var a = 0; a < r.length; a++)
- r && r[a] && r[a].toggleState("progress", a < n);
- if (i)
- for (var a = 0; a < i.length; a++)
- i && i[a] && i[a].toggleState("progress", CY(i[a]).dataIndex <= n);
- }, e.type = "timeline.slider", e;
- }(vct)
- );
- function yct(t, e) {
- if (e = e || t.get("type"), e)
- switch (e) {
- case "category":
- return new FP({
- ordinalMeta: t.getCategories(),
- extent: [1 / 0, -1 / 0]
- });
- case "time":
- return new C3({
- locale: t.ecModel.getLocaleModel(),
- useUTC: t.ecModel.get("useUTC")
- });
- default:
- return new Gu();
- }
- }
- function bct(t, e) {
- return Mr(t.getBoxLayoutParams(), {
- width: e.getWidth(),
- height: e.getHeight()
- }, t.get("padding"));
- }
- function _ct(t, e, n, r) {
- var i = r.style, a = Sm(t.get(["controlStyle", e]), r || {}, new bt(n[0], n[1], n[2], n[3]));
- return i && a.setStyle(i), a;
- }
- function TY(t, e, n, r, i, a) {
- var o = e.get("color");
- if (i)
- i.setColor(o), n.add(i), a && a.onUpdate(i);
- else {
- var s = t.get("symbol");
- i = wr(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
- }
- var l = e.getItemStyle(["color"]);
- i.setStyle(l), r = mt({
- rectHover: !0,
- z2: 100
- }, r, !0);
- var u = Em(t.get("symbolSize"));
- r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
- var c = mp(t.get("symbolOffset"), u);
- c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
- var f = t.get("symbolRotate");
- return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
- }
- function PY(t, e, n, r, i, a) {
- if (!t.dragging) {
- var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
- if (a || !o.get("animation", !0))
- t.attr({
- x: s,
- y: 0
- }), e && e.attr({
- shape: {
- x2: s
- }
- });
- else {
- var l = {
- duration: o.get("animationDuration", !0),
- easing: o.get("animationEasing", !0)
- };
- t.stopAnimation(null, !0), t.animateTo({
- x: s,
- y: 0
- }, l), e && e.animateTo({
- shape: {
- x2: s
- }
- }, l);
- }
- }
- }
- function Oct(t) {
- t.registerAction({
- type: "timelineChange",
- event: "timelineChanged",
- update: "prepareAndUpdate"
- }, function(e, n, r) {
- var i = n.getComponent("timeline");
- return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
- type: "timelinePlayChange",
- playState: !1,
- from: e.from
- }))), n.resetOption("timeline", {
- replaceMerge: i.get("replaceMerge", !0)
- }), it({
- currentIndex: i.option.currentIndex
- }, e);
- }), t.registerAction({
- type: "timelinePlayChange",
- event: "timelinePlayChanged",
- update: "update"
- }, function(e, n) {
- var r = n.getComponent("timeline");
- r && e.playState != null && r.setPlayState(e.playState);
- });
- }
- function Sct(t) {
- var e = t && t.timeline;
- Se(e) || (e = e ? [e] : []), F(e, function(n) {
- n && xct(n);
- });
- }
- function xct(t) {
- var e = t.type, n = {
- number: "value",
- time: "time"
- };
- if (n[e] && (t.axisType = n[e], delete t.type), $Y(t), Ud(t, "controlPosition")) {
- var r = t.controlStyle || (t.controlStyle = {});
- Ud(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Ud(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
- }
- F(t.data || [], function(i) {
- nt(i) && !Se(i) && (!Ud(i, "value") && Ud(i, "name") && (i.value = i.name), $Y(i));
- });
- }
- function $Y(t) {
- var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
- normal: 1,
- emphasis: 1
- };
- F(r, function(o, s) {
- !a[s] && !Ud(i, s) && (i[s] = o);
- }), n.label && !Ud(r, "emphasis") && (r.emphasis = n.label, delete n.label);
- }
- function Ud(t, e) {
- return t.hasOwnProperty(e);
- }
- function wct(t) {
- t.registerComponentModel(She), t.registerComponentView(mct), t.registerSubTypeDefaulter("timeline", function() {
- return "slider";
- }), Oct(t), t.registerPreprocessor(Sct);
- }
- function P6(t, e) {
- if (!t)
- return !1;
- for (var n = Se(t) ? t : [t], r = 0; r < n.length; r++)
- if (n[r] && n[r][e])
- return !0;
- return !1;
- }
- function KS(t) {
- Hh(t, "label", ["show"]);
- }
- var JS = Ut(), Zu = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.createdBySelf = !1, n;
- }
- return e.prototype.init = function(n, r, i) {
- if (process.env.NODE_ENV !== "production" && this.type === "marker")
- throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
- this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
- }, e.prototype.isAnimationEnabled = function() {
- if (Gt.node)
- return !1;
- var n = this.__hostSeries;
- return this.getShallow("animation") && n && n.isAnimationEnabled();
- }, e.prototype.mergeOption = function(n, r) {
- this._mergeOption(n, r, !1, !1);
- }, e.prototype._mergeOption = function(n, r, i, a) {
- var o = this.mainType;
- i || r.eachSeries(function(s) {
- var l = s.get(this.mainType, !0), u = JS(s)[o];
- if (!l || !l.data) {
- JS(s)[o] = null;
- return;
- }
- u ? u._mergeOption(l, r, !0) : (a && KS(l), F(l.data, function(c) {
- c instanceof Array ? (KS(c[0]), KS(c[1])) : KS(c);
- }), u = this.createMarkerModelFromSeries(l, this, r), _e(u, {
- mainType: this.mainType,
- // Use the same series index and name
- seriesIndex: s.seriesIndex,
- name: s.name,
- createdBySelf: !0
- }), u.__hostSeries = s), JS(s)[o] = u;
- }, this);
- }, e.prototype.formatTooltip = function(n, r, i) {
- var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
- return ti("section", {
- header: this.name,
- blocks: [ti("nameValue", {
- name: s,
- value: o,
- noName: !s,
- noValue: o == null
- })]
- });
- }, e.prototype.getData = function() {
- return this._data;
- }, e.prototype.setData = function(n) {
- this._data = n;
- }, e.prototype.getDataParams = function(n, r) {
- var i = DP.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
- return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
- }, e.getMarkerModelFromSeries = function(n, r) {
- return JS(n)[r];
- }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
- }(At)
- );
- vr(Zu, DP.prototype);
- var Cct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
- return new e(n, r, i);
- }, e.type = "markPoint", e.defaultOption = {
- // zlevel: 0,
- z: 5,
- symbol: "pin",
- symbolSize: 50,
- // symbolRotate: 0,
- // symbolOffset: [0, 0]
- tooltip: {
- trigger: "item"
- },
- label: {
- show: !0,
- position: "inside"
- },
- itemStyle: {
- borderWidth: 2
- },
- emphasis: {
- label: {
- show: !0
- }
- }
- }, e;
- }(Zu)
- );
- function RL(t) {
- return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
- }
- function Tct(t) {
- return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
- }
- function ex(t, e, n, r, i, a) {
- var o = [], s = Hu(
- e,
- r
- /* , otherDataDim */
- ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = $6(e, l, t), c = e.indicesOfNearest(l, u)[0];
- o[i] = e.get(n, c), o[a] = e.get(l, c);
- var f = e.get(r, c), d = Ms(e.get(r, c));
- return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
- }
- var BI = {
- min: vt(ex, "min"),
- max: vt(ex, "max"),
- average: vt(ex, "average"),
- median: vt(ex, "median")
- };
- function h_(t, e) {
- if (e) {
- var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
- if (!Tct(e) && !Se(e.coord) && Se(i)) {
- var a = xhe(e, n, r, t);
- if (e = ot(e), e.type && BI[e.type] && a.baseAxis && a.valueAxis) {
- var o = St(i, a.baseAxis.dim), s = St(i, a.valueAxis.dim), l = BI[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
- e.coord = l[0], e.value = l[1];
- } else
- e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
- }
- if (e.coord == null || !Se(i))
- e.coord = [];
- else
- for (var u = e.coord, c = 0; c < 2; c++)
- BI[u[c]] && (u[c] = $6(n, n.mapDimension(i[c]), u[c]));
- return e;
- }
- }
- function xhe(t, e, n, r) {
- var i = {};
- return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(Pct(r, i.valueDataDim)), i.baseAxis = n.getOtherAxis(i.valueAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim)) : (i.baseAxis = r.getBaseAxis(), i.valueAxis = n.getOtherAxis(i.baseAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim), i.valueDataDim = e.mapDimension(i.valueAxis.dim)), i;
- }
- function Pct(t, e) {
- var n = t.getData().getDimensionInfo(e);
- return n && n.coordDim;
- }
- function p_(t, e) {
- return t && t.containData && e.coord && !RL(e) ? t.containData(e.coord) : !0;
- }
- function $ct(t, e, n) {
- return t && t.containZone && e.coord && n.coord && !RL(e) && !RL(n) ? t.containZone(e.coord, n.coord) : !0;
- }
- function whe(t, e) {
- return t ? function(n, r, i, a) {
- var o = a < 2 ? n.coord && n.coord[a] : n.value;
- return sf(o, e[a]);
- } : function(n, r, i, a) {
- return sf(n.value, e[a]);
- };
- }
- function $6(t, e, n) {
- if (n === "average") {
- var r = 0, i = 0;
- return t.each(e, function(a, o) {
- isNaN(a) || (r += a, i++);
- }), r / i;
- } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
- }
- var zI = Ut(), A6 = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.init = function() {
- this.markerGroupMap = Ze();
- }, e.prototype.render = function(n, r, i) {
- var a = this, o = this.markerGroupMap;
- o.each(function(s) {
- zI(s).keep = !1;
- }), r.eachSeries(function(s) {
- var l = Zu.getMarkerModelFromSeries(s, a.type);
- l && a.renderSeries(s, l, r, i);
- }), o.each(function(s) {
- !zI(s).keep && a.group.remove(s.group);
- });
- }, e.prototype.markKeep = function(n) {
- zI(n).keep = !0;
- }, e.prototype.toggleBlurSeries = function(n, r) {
- var i = this;
- F(n, function(a) {
- var o = Zu.getMarkerModelFromSeries(a, i.type);
- if (o) {
- var s = o.getData();
- s.eachItemGraphicEl(function(l) {
- l && (r ? ole(l) : N5(l));
- });
- }
- });
- }, e.type = "marker", e;
- }(Ln)
- );
- function AY(t, e, n) {
- var r = e.coordinateSystem;
- t.each(function(i) {
- var a = t.getItemModel(i), o, s = ze(a.get("x"), n.getWidth()), l = ze(a.get("y"), n.getHeight());
- if (!isNaN(s) && !isNaN(l))
- o = [s, l];
- else if (e.getMarkerPosition)
- o = e.getMarkerPosition(t.getValues(t.dimensions, i));
- else if (r) {
- var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
- o = r.dataToPoint([u, c]);
- }
- isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
- });
- }
- var Act = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.updateTransform = function(n, r, i) {
- r.eachSeries(function(a) {
- var o = Zu.getMarkerModelFromSeries(a, "markPoint");
- o && (AY(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
- }, this);
- }, e.prototype.renderSeries = function(n, r, i, a) {
- var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new y1()), f = Ect(o, n, r);
- r.setData(f), AY(r.getData(), n, a), f.each(function(d) {
- var h = f.getItemModel(d), p = h.getShallow("symbol"), v = h.getShallow("symbolSize"), g = h.getShallow("symbolRotate"), m = h.getShallow("symbolOffset"), y = h.getShallow("symbolKeepAspect");
- if (qe(p) || qe(v) || qe(g) || qe(m)) {
- var _ = r.getRawValue(d), O = r.getDataParams(d);
- qe(p) && (p = p(_, O)), qe(v) && (v = v(_, O)), qe(g) && (g = g(_, O)), qe(m) && (m = m(_, O));
- }
- var S = h.getModel("itemStyle").getItemStyle(), x = v1(l, "color");
- S.fill || (S.fill = x), f.setItemVisual(d, {
- symbol: p,
- symbolSize: v,
- symbolRotate: g,
- symbolOffset: m,
- symbolKeepAspect: y,
- style: S
- });
- }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
- d.traverse(function(h) {
- ft(h).dataModel = r;
- });
- }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
- }, e.type = "markPoint", e;
- }(A6)
- );
- function Ect(t, e, n) {
- var r;
- t ? r = Ce(t && t.dimensions, function(s) {
- var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
- return _e(_e({}, l), {
- name: s,
- // DON'T use ordinalMeta to parse and collect ordinal.
- ordinalMeta: null
- });
- }) : r = [{
- name: "value",
- type: "float"
- }];
- var i = new Wi(r, n), a = Ce(n.get("data"), vt(h_, e));
- t && (a = yn(a, vt(p_, t)));
- var o = whe(!!t, r);
- return i.initData(a, null, o), i;
- }
- function Mct(t) {
- t.registerComponentModel(Cct), t.registerComponentView(Act), t.registerPreprocessor(function(e) {
- P6(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
- });
- }
- var Ict = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
- return new e(n, r, i);
- }, e.type = "markLine", e.defaultOption = {
- // zlevel: 0,
- z: 5,
- symbol: ["circle", "arrow"],
- symbolSize: [8, 16],
- // symbolRotate: 0,
- symbolOffset: 0,
- precision: 2,
- tooltip: {
- trigger: "item"
- },
- label: {
- show: !0,
- position: "end",
- distance: 5
- },
- lineStyle: {
- type: "dashed"
- },
- emphasis: {
- label: {
- show: !0
- },
- lineStyle: {
- width: 3
- }
- },
- animationEasing: "linear"
- }, e;
- }(Zu)
- ), tx = Ut(), Dct = function(t, e, n, r) {
- var i = t.getData(), a;
- if (Se(r))
- a = r;
- else {
- var o = r.type;
- if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
- var s = void 0, l = void 0;
- if (r.yAxis != null || r.xAxis != null)
- s = e.getAxis(r.yAxis != null ? "y" : "x"), l = Or(r.yAxis, r.xAxis);
- else {
- var u = xhe(r, i, e, t);
- s = u.valueAxis;
- var c = S3(i, u.valueDataDim);
- l = $6(i, c, o);
- }
- var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = ot(r), p = {
- coord: []
- };
- h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
- var v = n.get("precision");
- v >= 0 && Kt(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
- type: o,
- valueIndex: r.valueIndex,
- // Force to use the value of calculated value.
- value: l
- }];
- } else
- process.env.NODE_ENV !== "production" && qo("Invalid markLine data."), a = [];
- }
- var g = [h_(t, a[0]), h_(t, a[1]), _e({}, a[2])];
- return g[2].type = g[2].type || null, mt(g[2], g[0]), mt(g[2], g[1]), g;
- };
- function vT(t) {
- return !isNaN(t) && !isFinite(t);
- }
- function EY(t, e, n, r) {
- var i = 1 - t, a = r.dimensions[t];
- return vT(e[i]) && vT(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
- }
- function Rct(t, e) {
- if (t.type === "cartesian2d") {
- var n = e[0].coord, r = e[1].coord;
- if (n && r && (EY(1, n, r, t) || EY(0, n, r, t)))
- return !0;
- }
- return p_(t, e[0]) && p_(t, e[1]);
- }
- function VI(t, e, n, r, i) {
- var a = r.coordinateSystem, o = t.getItemModel(e), s, l = ze(o.get("x"), i.getWidth()), u = ze(o.get("y"), i.getHeight());
- if (!isNaN(l) && !isNaN(u))
- s = [l, u];
- else {
- if (r.getMarkerPosition)
- s = r.getMarkerPosition(t.getValues(t.dimensions, e));
- else {
- var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
- s = a.dataToPoint([f, d]);
- }
- if (yp(a, "cartesian2d")) {
- var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
- vT(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : vT(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
- }
- isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
- }
- t.setItemLayout(e, s);
- }
- var kct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.updateTransform = function(n, r, i) {
- r.eachSeries(function(a) {
- var o = Zu.getMarkerModelFromSeries(a, "markLine");
- if (o) {
- var s = o.getData(), l = tx(o).from, u = tx(o).to;
- l.each(function(c) {
- VI(l, c, !0, a, i), VI(u, c, !1, a, i);
- }), s.each(function(c) {
- s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
- }), this.markerGroupMap.get(a.id).updateLayout();
- }
- }, this);
- }, e.prototype.renderSeries = function(n, r, i, a) {
- var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new K3());
- this.group.add(c.group);
- var f = Lct(o, n, r), d = f.from, h = f.to, p = f.line;
- tx(r).from = d, tx(r).to = h, r.setData(p);
- var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
- Se(v) || (v = [v, v]), Se(g) || (g = [g, g]), Se(m) || (m = [m, m]), Se(y) || (y = [y, y]), f.from.each(function(O) {
- _(d, O, !0), _(h, O, !1);
- }), p.each(function(O) {
- var S = p.getItemModel(O).getModel("lineStyle").getLineStyle();
- p.setItemLayout(O, [d.getItemLayout(O), h.getItemLayout(O)]), S.stroke == null && (S.stroke = d.getItemVisual(O, "style").fill), p.setItemVisual(O, {
- fromSymbolKeepAspect: d.getItemVisual(O, "symbolKeepAspect"),
- fromSymbolOffset: d.getItemVisual(O, "symbolOffset"),
- fromSymbolRotate: d.getItemVisual(O, "symbolRotate"),
- fromSymbolSize: d.getItemVisual(O, "symbolSize"),
- fromSymbol: d.getItemVisual(O, "symbol"),
- toSymbolKeepAspect: h.getItemVisual(O, "symbolKeepAspect"),
- toSymbolOffset: h.getItemVisual(O, "symbolOffset"),
- toSymbolRotate: h.getItemVisual(O, "symbolRotate"),
- toSymbolSize: h.getItemVisual(O, "symbolSize"),
- toSymbol: h.getItemVisual(O, "symbol"),
- style: S
- });
- }), c.updateData(p), f.line.eachItemGraphicEl(function(O) {
- ft(O).dataModel = r, O.traverse(function(S) {
- ft(S).dataModel = r;
- });
- });
- function _(O, S, x) {
- var C = O.getItemModel(S);
- VI(O, S, x, n, a);
- var P = C.getModel("itemStyle").getItemStyle();
- P.fill == null && (P.fill = v1(l, "color")), O.setItemVisual(S, {
- symbolKeepAspect: C.get("symbolKeepAspect"),
- // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
- symbolOffset: dt(C.get("symbolOffset", !0), y[x ? 0 : 1]),
- symbolRotate: dt(C.get("symbolRotate", !0), m[x ? 0 : 1]),
- // TODO: when 2d array is supported, it should ignore parent
- symbolSize: dt(C.get("symbolSize"), g[x ? 0 : 1]),
- symbol: dt(C.get("symbol", !0), v[x ? 0 : 1]),
- style: P
- });
- }
- this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
- }, e.type = "markLine", e;
- }(A6)
- );
- function Lct(t, e, n) {
- var r;
- t ? r = Ce(t && t.dimensions, function(u) {
- var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
- return _e(_e({}, c), {
- name: u,
- // DON'T use ordinalMeta to parse and collect ordinal.
- ordinalMeta: null
- });
- }) : r = [{
- name: "value",
- type: "float"
- }];
- var i = new Wi(r, n), a = new Wi(r, n), o = new Wi([], n), s = Ce(n.get("data"), vt(Dct, e, t, n));
- t && (s = yn(s, vt(Rct, t)));
- var l = whe(!!t, r);
- return i.initData(Ce(s, function(u) {
- return u[0];
- }), null, l), a.initData(Ce(s, function(u) {
- return u[1];
- }), null, l), o.initData(Ce(s, function(u) {
- return u[2];
- })), o.hasItemOption = !0, {
- from: i,
- to: a,
- line: o
- };
- }
- function Nct(t) {
- t.registerComponentModel(Ict), t.registerComponentView(kct), t.registerPreprocessor(function(e) {
- P6(e.series, "markLine") && (e.markLine = e.markLine || {});
- });
- }
- var Bct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
- return new e(n, r, i);
- }, e.type = "markArea", e.defaultOption = {
- // zlevel: 0,
- // PENDING
- z: 1,
- tooltip: {
- trigger: "item"
- },
- // markArea should fixed on the coordinate system
- animation: !1,
- label: {
- show: !0,
- position: "top"
- },
- itemStyle: {
- // color and borderColor default to use color from series
- // color: 'auto'
- // borderColor: 'auto'
- borderWidth: 0
- },
- emphasis: {
- label: {
- show: !0,
- position: "top"
- }
- }
- }, e;
- }(Zu)
- ), nx = Ut(), zct = function(t, e, n, r) {
- var i = r[0], a = r[1];
- if (!(!i || !a)) {
- var o = h_(t, i), s = h_(t, a), l = o.coord, u = s.coord;
- l[0] = Or(l[0], -1 / 0), l[1] = Or(l[1], -1 / 0), u[0] = Or(u[0], 1 / 0), u[1] = Or(u[1], 1 / 0);
- var c = aP([{}, o, s]);
- return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
- }
- };
- function gT(t) {
- return !isNaN(t) && !isFinite(t);
- }
- function MY(t, e, n, r) {
- var i = 1 - t;
- return gT(e[i]) && gT(n[i]);
- }
- function Vct(t, e) {
- var n = e.coord[0], r = e.coord[1], i = {
- coord: n,
- x: e.x0,
- y: e.y0
- }, a = {
- coord: r,
- x: e.x1,
- y: e.y1
- };
- return yp(t, "cartesian2d") ? n && r && (MY(1, n, r) || MY(0, n, r)) ? !0 : $ct(t, i, a) : p_(t, i) || p_(t, a);
- }
- function IY(t, e, n, r, i) {
- var a = r.coordinateSystem, o = t.getItemModel(e), s, l = ze(o.get(n[0]), i.getWidth()), u = ze(o.get(n[1]), i.getHeight());
- if (!isNaN(l) && !isNaN(u))
- s = [l, u];
- else {
- if (r.getMarkerPosition) {
- var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
- n[0] === "x0" ? p[0] = d[0] > h[0] ? f[0] : c[0] : p[0] = d[0] > h[0] ? c[0] : f[0], n[1] === "y0" ? p[1] = d[1] > h[1] ? f[1] : c[1] : p[1] = d[1] > h[1] ? c[1] : f[1], s = r.getMarkerPosition(p, n, !0);
- } else {
- var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
- a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
- }
- if (yp(a, "cartesian2d")) {
- var y = a.getAxis("x"), _ = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
- gT(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : gT(g) && (s[1] = _.toGlobalCoord(_.getExtent()[n[1] === "y0" ? 0 : 1]));
- }
- isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
- }
- return s;
- }
- var DY = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], Fct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.updateTransform = function(n, r, i) {
- r.eachSeries(function(a) {
- var o = Zu.getMarkerModelFromSeries(a, "markArea");
- if (o) {
- var s = o.getData();
- s.each(function(l) {
- var u = Ce(DY, function(f) {
- return IY(s, l, f, a, i);
- });
- s.setItemLayout(l, u);
- var c = s.getItemGraphicEl(l);
- c.setShape("points", u);
- });
- }
- }, this);
- }, e.prototype.renderSeries = function(n, r, i, a) {
- var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
- group: new ct()
- });
- this.group.add(c.group), this.markKeep(c);
- var f = Wct(o, n, r);
- r.setData(f), f.each(function(d) {
- var h = Ce(DY, function(P) {
- return IY(f, d, P, n, a);
- }), p = o.getAxis("x").scale, v = o.getAxis("y").scale, g = p.getExtent(), m = v.getExtent(), y = [p.parse(f.get("x0", d)), p.parse(f.get("x1", d))], _ = [v.parse(f.get("y0", d)), v.parse(f.get("y1", d))];
- ao(y), ao(_);
- var O = !(g[0] > y[1] || g[1] < y[0] || m[0] > _[1] || m[1] < _[0]), S = !O;
- f.setItemLayout(d, {
- points: h,
- allClipped: S
- });
- var x = f.getItemModel(d).getModel("itemStyle").getItemStyle(), C = v1(l, "color");
- x.fill || (x.fill = C, Ve(x.fill) && (x.fill = Gb(x.fill, 0.4))), x.stroke || (x.stroke = C), f.setItemVisual(d, "style", x);
- }), f.diff(nx(c).data).add(function(d) {
- var h = f.getItemLayout(d);
- if (!h.allClipped) {
- var p = new pa({
- shape: {
- points: h.points
- }
- });
- f.setItemGraphicEl(d, p), c.group.add(p);
- }
- }).update(function(d, h) {
- var p = nx(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
- v.allClipped ? p && c.group.remove(p) : (p ? tn(p, {
- shape: {
- points: v.points
- }
- }, r, d) : p = new pa({
- shape: {
- points: v.points
- }
- }), f.setItemGraphicEl(d, p), c.group.add(p));
- }).remove(function(d) {
- var h = nx(c).data.getItemGraphicEl(d);
- c.group.remove(h);
- }).execute(), f.eachItemGraphicEl(function(d, h) {
- var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
- d.useStyle(f.getItemVisual(h, "style")), Ei(d, ei(p), {
- labelFetcher: r,
- labelDataIndex: h,
- defaultText: f.getName(h) || "",
- inheritColor: Ve(v.fill) ? Gb(v.fill, 1) : "#000"
- }), Ai(d, p), ur(d, null, null, p.get(["emphasis", "disabled"])), ft(d).dataModel = r;
- }), nx(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
- }, e.type = "markArea", e;
- }(A6)
- );
- function Wct(t, e, n) {
- var r, i, a = ["x0", "y0", "x1", "y1"];
- if (t) {
- var o = Ce(t && t.dimensions, function(u) {
- var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
- return _e(_e({}, f), {
- name: u,
- // DON'T use ordinalMeta to parse and collect ordinal.
- ordinalMeta: null
- });
- });
- i = Ce(a, function(u, c) {
- return {
- name: u,
- type: o[c % 2].type
- };
- }), r = new Wi(i, n);
- } else
- i = [{
- name: "value",
- type: "float"
- }], r = new Wi(i, n);
- var s = Ce(n.get("data"), vt(zct, e, t, n));
- t && (s = yn(s, vt(Vct, t)));
- var l = t ? function(u, c, f, d) {
- var h = u.coord[Math.floor(d / 2)][d % 2];
- return sf(h, i[d]);
- } : function(u, c, f, d) {
- return sf(u.value, i[d]);
- };
- return r.initData(s, null, l), r.hasItemOption = !0, r;
- }
- function Qct(t) {
- t.registerComponentModel(Bct), t.registerComponentView(Fct), t.registerPreprocessor(function(e) {
- P6(e.series, "markArea") && (e.markArea = e.markArea || {});
- });
- }
- var Hct = function(t, e) {
- if (e === "all")
- return {
- type: "all",
- title: t.getLocaleModel().get(["legend", "selector", "all"])
- };
- if (e === "inverse")
- return {
- type: "inverse",
- title: t.getLocaleModel().get(["legend", "selector", "inverse"])
- };
- }, kL = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.layoutMode = {
- type: "box",
- // legend.width/height are maxWidth/maxHeight actually,
- // whereas real width/height is calculated by its content.
- // (Setting {left: 10, right: 10} does not make sense).
- // So consider the case:
- // `setOption({legend: {left: 10});`
- // then `setOption({legend: {right: 10});`
- // The previous `left` should be cleared by setting `ignoreSize`.
- ignoreSize: !0
- }, n;
- }
- return e.prototype.init = function(n, r, i) {
- this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
- }, e.prototype.mergeOption = function(n, r) {
- t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
- }, e.prototype._updateSelector = function(n) {
- var r = n.selector, i = this.ecModel;
- r === !0 && (r = n.selector = ["all", "inverse"]), Se(r) && F(r, function(a, o) {
- Ve(a) && (a = {
- type: a
- }), r[o] = mt(a, Hct(i, a.type));
- });
- }, e.prototype.optionUpdated = function() {
- this._updateData(this.ecModel);
- var n = this._data;
- if (n[0] && this.get("selectedMode") === "single") {
- for (var r = !1, i = 0; i < n.length; i++) {
- var a = n[i].get("name");
- if (this.isSelected(a)) {
- this.select(a), r = !0;
- break;
- }
- }
- !r && this.select(n[0].get("name"));
- }
- }, e.prototype._updateData = function(n) {
- var r = [], i = [];
- n.eachRawSeries(function(l) {
- var u = l.name;
- i.push(u);
- var c;
- if (l.legendVisualProvider) {
- var f = l.legendVisualProvider, d = f.getAllNames();
- n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
- } else
- c = !0;
- c && A5(l) && r.push(l.name);
- }), this._availableNames = i;
- var a = this.get("data") || r, o = Ze(), s = Ce(a, function(l) {
- return (Ve(l) || Kt(l)) && (l = {
- name: l
- }), o.get(l.name) ? null : (o.set(l.name, !0), new wn(l, this, this.ecModel));
- }, this);
- this._data = yn(s, function(l) {
- return !!l;
- });
- }, e.prototype.getData = function() {
- return this._data;
- }, e.prototype.select = function(n) {
- var r = this.option.selected, i = this.get("selectedMode");
- if (i === "single") {
- var a = this._data;
- F(a, function(o) {
- r[o.get("name")] = !1;
- });
- }
- r[n] = !0;
- }, e.prototype.unSelect = function(n) {
- this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
- }, e.prototype.toggleSelected = function(n) {
- var r = this.option.selected;
- r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
- }, e.prototype.allSelect = function() {
- var n = this._data, r = this.option.selected;
- F(n, function(i) {
- r[i.get("name", !0)] = !0;
- });
- }, e.prototype.inverseSelect = function() {
- var n = this._data, r = this.option.selected;
- F(n, function(i) {
- var a = i.get("name", !0);
- r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
- });
- }, e.prototype.isSelected = function(n) {
- var r = this.option.selected;
- return !(r.hasOwnProperty(n) && !r[n]) && St(this._availableNames, n) >= 0;
- }, e.prototype.getOrient = function() {
- return this.get("orient") === "vertical" ? {
- index: 1,
- name: "vertical"
- } : {
- index: 0,
- name: "horizontal"
- };
- }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
- // zlevel: 0,
- z: 4,
- show: !0,
- orient: "horizontal",
- left: "center",
- // right: 'center',
- top: 0,
- // bottom: null,
- align: "auto",
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- borderRadius: 0,
- borderWidth: 0,
- padding: 5,
- itemGap: 10,
- itemWidth: 25,
- itemHeight: 14,
- symbolRotate: "inherit",
- symbolKeepAspect: !0,
- inactiveColor: "#ccc",
- inactiveBorderColor: "#ccc",
- inactiveBorderWidth: "auto",
- itemStyle: {
- color: "inherit",
- opacity: "inherit",
- borderColor: "inherit",
- borderWidth: "auto",
- borderCap: "inherit",
- borderJoin: "inherit",
- borderDashOffset: "inherit",
- borderMiterLimit: "inherit"
- },
- lineStyle: {
- width: "auto",
- color: "inherit",
- inactiveColor: "#ccc",
- inactiveWidth: 2,
- opacity: "inherit",
- type: "inherit",
- cap: "inherit",
- join: "inherit",
- dashOffset: "inherit",
- miterLimit: "inherit"
- },
- textStyle: {
- color: "#333"
- },
- selectedMode: !0,
- selector: !1,
- selectorLabel: {
- show: !0,
- borderRadius: 10,
- padding: [3, 5, 3, 5],
- fontSize: 12,
- fontFamily: "sans-serif",
- color: "#666",
- borderWidth: 1,
- borderColor: "#666"
- },
- emphasis: {
- selectorLabel: {
- show: !0,
- color: "#eee",
- backgroundColor: "#666"
- }
- },
- selectorPosition: "auto",
- selectorItemGap: 7,
- selectorButtonGap: 10,
- tooltip: {
- show: !1
- }
- }, e;
- }(At)
- ), fv = vt, LL = F, rx = ct, Che = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.newlineDisabled = !1, n;
- }
- return e.prototype.init = function() {
- this.group.add(this._contentGroup = new rx()), this.group.add(this._selectorGroup = new rx()), this._isFirstRender = !0;
- }, e.prototype.getContentGroup = function() {
- return this._contentGroup;
- }, e.prototype.getSelectorGroup = function() {
- return this._selectorGroup;
- }, e.prototype.render = function(n, r, i) {
- var a = this._isFirstRender;
- if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
- var o = n.get("align"), s = n.get("orient");
- (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
- var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
- l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
- var c = n.getBoxLayoutParams(), f = {
- width: i.getWidth(),
- height: i.getHeight()
- }, d = n.get("padding"), h = Mr(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Mr(it({
- width: p.width,
- height: p.height
- }, c), f, d);
- this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = hhe(p, n));
- }
- }, e.prototype.resetInner = function() {
- this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
- }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
- var u = this.getContentGroup(), c = Ze(), f = r.get("selectedMode"), d = [];
- i.eachRawSeries(function(h) {
- !h.get("legendHoverLink") && d.push(h.id);
- }), LL(r.getData(), function(h, p) {
- var v = h.get("name");
- if (!this.newlineDisabled && (v === "" || v === `
- `)) {
- var g = new rx();
- g.newline = !0, u.add(g);
- return;
- }
- var m = i.getSeriesByName(v)[0];
- if (!c.get(v)) {
- if (m) {
- var y = m.getData(), _ = y.getVisual("legendLineStyle") || {}, O = y.getVisual("legendIcon"), S = y.getVisual("style"), x = this._createItem(m, v, p, h, r, n, _, S, O, f, a);
- x.on("click", fv(RY, v, null, a, d)).on("mouseover", fv(NL, m.name, null, a, d)).on("mouseout", fv(BL, m.name, null, a, d)), i.ssr && x.eachChild(function(C) {
- var P = ft(C);
- P.seriesIndex = m.seriesIndex, P.dataIndex = p, P.ssrType = "legend";
- }), c.set(v, !0);
- } else
- i.eachRawSeries(function(C) {
- if (!c.get(v) && C.legendVisualProvider) {
- var P = C.legendVisualProvider;
- if (!P.containName(v))
- return;
- var $ = P.indexOfName(v), T = P.getItemVisual($, "style"), E = P.getItemVisual($, "legendIcon"), M = oa(T.fill);
- M && M[3] === 0 && (M[3] = 0.2, T = _e(_e({}, T), {
- fill: Bs(M, "rgba")
- }));
- var R = this._createItem(C, v, p, h, r, n, {}, T, E, f, a);
- R.on("click", fv(RY, null, v, a, d)).on("mouseover", fv(NL, null, v, a, d)).on("mouseout", fv(BL, null, v, a, d)), i.ssr && R.eachChild(function(N) {
- var I = ft(N);
- I.seriesIndex = C.seriesIndex, I.dataIndex = p, I.ssrType = "legend";
- }), c.set(v, !0);
- }
- }, this);
- process.env.NODE_ENV !== "production" && (c.get(v) || console.warn(v + " series not exists. Legend data should be same with series name or data name."));
- }
- }, this), o && this._createSelector(o, r, a, s, l);
- }, e.prototype._createSelector = function(n, r, i, a, o) {
- var s = this.getSelectorGroup();
- LL(n, function(u) {
- var c = u.type, f = new jt({
- style: {
- x: 0,
- y: 0,
- align: "center",
- verticalAlign: "middle"
- },
- onclick: function() {
- i.dispatchAction({
- type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
- });
- }
- });
- s.add(f);
- var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
- Ei(f, {
- normal: d,
- emphasis: h
- }, {
- defaultText: u.title
- }), af(f);
- });
- }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
- var h = n.visualDrawType, p = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(r), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), _ = a.get("icon");
- c = _ || c || "roundRect";
- var O = Gct(c, a, l, u, h, g, d), S = new rx(), x = a.getModel("textStyle");
- if (qe(n.getLegendIcon) && (!_ || _ === "inherit"))
- S.add(n.getLegendIcon({
- itemWidth: p,
- itemHeight: v,
- icon: c,
- iconRotate: m,
- itemStyle: O.itemStyle,
- lineStyle: O.lineStyle,
- symbolKeepAspect: y
- }));
- else {
- var C = _ === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
- S.add(jct({
- itemWidth: p,
- itemHeight: v,
- icon: c,
- iconRotate: C,
- itemStyle: O.itemStyle,
- lineStyle: O.lineStyle,
- symbolKeepAspect: y
- }));
- }
- var P = s === "left" ? p + 5 : -5, $ = s, T = o.get("formatter"), E = r;
- Ve(T) && T ? E = T.replace("{name}", r ?? "") : qe(T) && (E = T(r));
- var M = g ? x.getTextColor() : a.get("inactiveColor");
- S.add(new jt({
- style: Mn(x, {
- text: E,
- x: P,
- y: v / 2,
- fill: M,
- align: $,
- verticalAlign: "middle"
- }, {
- inheritColor: M
- })
- }));
- var R = new Zt({
- shape: S.getBoundingRect(),
- style: {
- // Cannot use 'invisible' because SVG SSR will miss the node
- fill: "transparent"
- }
- }), N = a.getModel("tooltip");
- return N.get("show") && xm({
- el: R,
- componentModel: o,
- itemName: r,
- itemTooltipOption: N.option
- }), S.add(R), S.eachChild(function(I) {
- I.silent = !0;
- }), R.silent = !f, this.getContentGroup().add(S), af(S), S.__legendDataIndex = i, S;
- }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
- var l = this.getContentGroup(), u = this.getSelectorGroup();
- Th(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
- var c = l.getBoundingRect(), f = [-c.x, -c.y];
- if (u.markRedraw(), l.markRedraw(), o) {
- Th(
- // Buttons in selectorGroup always layout horizontally
- "horizontal",
- u,
- n.get("selectorItemGap", !0)
- );
- var d = u.getBoundingRect(), h = [-d.x, -d.y], p = n.get("selectorButtonGap", !0), v = n.getOrient().index, g = v === 0 ? "width" : "height", m = v === 0 ? "height" : "width", y = v === 0 ? "y" : "x";
- s === "end" ? h[v] += c[g] + p : f[v] += d[g] + p, h[1 - v] += c[m] / 2 - d[m] / 2, u.x = h[0], u.y = h[1], l.x = f[0], l.y = f[1];
- var _ = {
- x: 0,
- y: 0
- };
- return _[g] = c[g] + p + d[g], _[m] = Math.max(c[m], d[m]), _[y] = Math.min(0, d[y] + h[1 - v]), _;
- } else
- return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
- }, e.prototype.remove = function() {
- this.getContentGroup().removeAll(), this._isFirstRender = !0;
- }, e.type = "legend.plain", e;
- }(Ln)
- );
- function Gct(t, e, n, r, i, a, o) {
- function s(g, m) {
- g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), LL(g, function(y, _) {
- g[_] === "inherit" && (g[_] = m[_]);
- });
- }
- var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
- u.decal = !f || f === "inherit" ? r.decal : Gg(f, o), u.fill === "inherit" && (u.fill = r[i]), u.stroke === "inherit" && (u.stroke = r[c]), u.opacity === "inherit" && (u.opacity = (i === "fill" ? r : n).opacity), s(u, r);
- var d = e.getModel("lineStyle"), h = d.getLineStyle();
- if (s(h, n), u.fill === "auto" && (u.fill = r.fill), u.stroke === "auto" && (u.stroke = r.fill), h.stroke === "auto" && (h.stroke = r.fill), !a) {
- var p = e.get("inactiveBorderWidth"), v = u[c];
- u.lineWidth = p === "auto" ? r.lineWidth > 0 && v ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), h.stroke = d.get("inactiveColor"), h.lineWidth = d.get("inactiveWidth");
- }
- return {
- itemStyle: u,
- lineStyle: h
- };
- }
- function jct(t) {
- var e = t.icon || "roundRect", n = wr(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
- return 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), n;
- }
- function RY(t, e, n, r) {
- BL(t, e, n, r), n.dispatchAction({
- type: "legendToggleSelect",
- name: t ?? e
- }), NL(t, e, n, r);
- }
- function The(t) {
- for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
- r++;
- return n && n.hoverLayer;
- }
- function NL(t, e, n, r) {
- The(n) || n.dispatchAction({
- type: "highlight",
- seriesName: t,
- name: e,
- excludeSeriesId: r
- });
- }
- function BL(t, e, n, r) {
- The(n) || n.dispatchAction({
- type: "downplay",
- seriesName: t,
- name: e,
- excludeSeriesId: r
- });
- }
- function Zct(t) {
- var e = t.findComponents({
- mainType: "legend"
- });
- e && e.length && t.filterSeries(function(n) {
- for (var r = 0; r < e.length; r++)
- if (!e[r].isSelected(n.name))
- return !1;
- return !0;
- });
- }
- function Y0(t, e, n) {
- var r = {}, i = t === "toggleSelected", a;
- return n.eachComponent("legend", function(o) {
- i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
- var s = o.getData();
- F(s, function(l) {
- var u = l.get("name");
- if (!(u === `
- ` || u === "")) {
- var c = o.isSelected(u);
- r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
- }
- });
- }), t === "allSelect" || t === "inverseSelect" ? {
- selected: r
- } : {
- name: e.name,
- selected: r
- };
- }
- function Uct(t) {
- t.registerAction("legendToggleSelect", "legendselectchanged", vt(Y0, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", vt(Y0, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", vt(Y0, "inverseSelect")), t.registerAction("legendSelect", "legendselected", vt(Y0, "select")), t.registerAction("legendUnSelect", "legendunselected", vt(Y0, "unSelect"));
- }
- function Phe(t) {
- t.registerComponentModel(kL), t.registerComponentView(Che), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, Zct), t.registerSubTypeDefaulter("legend", function() {
- return "plain";
- }), Uct(t);
- }
- var Xct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.setScrollDataIndex = function(n) {
- this.option.scrollDataIndex = n;
- }, e.prototype.init = function(n, r, i) {
- var a = Tm(n);
- t.prototype.init.call(this, n, r, i), kY(this, n, a);
- }, e.prototype.mergeOption = function(n, r) {
- t.prototype.mergeOption.call(this, n, r), kY(this, this.option, n);
- }, e.type = "legend.scroll", e.defaultOption = Bf(kL.defaultOption, {
- scrollDataIndex: 0,
- pageButtonItemGap: 5,
- pageButtonGap: null,
- pageButtonPosition: "end",
- pageFormatter: "{current}/{total}",
- pageIcons: {
- horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
- vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
- },
- pageIconColor: "#2f4554",
- pageIconInactiveColor: "#aaa",
- pageIconSize: 15,
- pageTextStyle: {
- color: "#333"
- },
- animationDurationUpdate: 800
- }), e;
- }(kL)
- );
- function kY(t, e, n) {
- var r = t.getOrient(), i = [1, 1];
- i[r.index] = 0, Of(e, n, {
- type: "box",
- ignoreSize: !!i
- });
- }
- var LY = ct, FI = ["width", "height"], WI = ["x", "y"], Yct = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
- }
- return e.prototype.init = function() {
- t.prototype.init.call(this), this.group.add(this._containerGroup = new LY()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new LY());
- }, e.prototype.resetInner = function() {
- t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
- }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
- var u = this;
- t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
- var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = Se(f) ? f : [f, f];
- p("pagePrev", 0);
- var h = r.getModel("pageTextStyle");
- c.add(new jt({
- name: "pageText",
- style: {
- // Placeholder to calculate a proper layout.
- text: "xx/xx",
- fill: h.getTextColor(),
- font: h.getFont(),
- verticalAlign: "middle",
- align: "center"
- },
- silent: !0
- })), p("pageNext", 1);
- function p(v, g) {
- var m = v + "DataIndex", y = Sm(r.get("pageIcons", !0)[r.getOrient().name][g], {
- // Buttons will be created in each render, so we do not need
- // to worry about avoiding using legendModel kept in scope.
- onclick: We(u._pageGo, u, m, r, a)
- }, {
- x: -d[0] / 2,
- y: -d[1] / 2,
- width: d[0],
- height: d[1]
- });
- y.name = v, c.add(y);
- }
- }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
- var l = this.getSelectorGroup(), u = n.getOrient().index, c = FI[u], f = WI[u], d = FI[1 - u], h = WI[1 - u];
- o && Th(
- // Buttons in selectorGroup always layout horizontally
- "horizontal",
- l,
- n.get("selectorItemGap", !0)
- );
- var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = ot(i);
- o && (m[c] = i[c] - v[c] - p);
- var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
- if (o) {
- if (s === "end")
- g[u] += y[c] + p;
- else {
- var _ = v[c] + p;
- g[u] -= _, y[f] -= _;
- }
- y[c] += v[c] + p, g[1 - u] += y[h] + y[d] / 2 - v[d] / 2, y[d] = Math.max(y[d], v[d]), y[h] = Math.min(y[h], v[h] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
- }
- return y;
- }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
- var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
- Th(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), Th(
- // Buttons in controller are layout always horizontally.
- "horizontal",
- d,
- n.get("pageButtonItemGap", !0)
- );
- var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
- r || (g[a] = c[u]);
- var m = [0, 0], y = [-p.x, -p.y], _ = dt(n.get("pageButtonGap", !0), n.get("itemGap", !0));
- if (v) {
- var O = n.get("pageButtonPosition", !0);
- O === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + _;
- }
- y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
- var S = {
- x: 0,
- y: 0
- };
- if (S[o] = v ? i[o] : h[o], S[s] = Math.max(h[s], p[s]), S[l] = Math.min(0, p[l] + y[1 - a]), f.__rectSize = i[o], v) {
- var x = {
- x: 0,
- y: 0
- };
- x[o] = Math.max(i[o] - p[o] - _, 0), x[s] = S[s], f.setClipPath(new Zt({
- shape: x
- })), f.__rectSize = x[o];
- } else
- d.eachChild(function(P) {
- P.attr({
- invisible: !0,
- silent: !0
- });
- });
- var C = this._getPageInfo(n);
- return C.pageIndex != null && tn(
- c,
- {
- x: C.contentPosition[0],
- y: C.contentPosition[1]
- },
- // When switch from "show controller" to "not show controller", view should be
- // updated immediately without animation, otherwise causes weird effect.
- v ? n : null
- ), this._updatePageInfoView(n, C), S;
- }, e.prototype._pageGo = function(n, r, i) {
- var a = this._getPageInfo(r)[n];
- a != null && i.dispatchAction({
- type: "legendScroll",
- scrollDataIndex: a,
- legendId: r.id
- });
- }, e.prototype._updatePageInfoView = function(n, r) {
- var i = this._controllerGroup;
- F(["pagePrev", "pageNext"], function(c) {
- var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
- h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
- });
- var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
- a && o && a.setStyle("text", Ve(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
- current: l,
- total: u
- }));
- }, e.prototype._getPageInfo = function(n) {
- var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = FI[o], l = WI[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
- contentPosition: [i.x, i.y],
- pageCount: h,
- pageIndex: h - 1,
- pagePrevDataIndex: null,
- pageNextDataIndex: null
- };
- if (!f)
- return p;
- var v = O(f);
- p.contentPosition[o] = -v.s;
- for (var g = u + 1, m = v, y = v, _ = null; g <= d; ++g)
- _ = O(c[g]), // Half of the last item is out of the window.
- (!_ && y.e > m.s + a || _ && !S(_, m.s)) && (y.i > m.i ? m = y : m = _, m && (p.pageNextDataIndex == null && (p.pageNextDataIndex = m.i), ++p.pageCount)), y = _;
- for (var g = u - 1, m = v, y = v, _ = null; g >= -1; --g)
- _ = O(c[g]), // If the the end item does not intersect with the window started
- // from the current item, a page can be settled.
- (!_ || !S(y, _.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = _;
- return p;
- function O(x) {
- if (x) {
- var C = x.getBoundingRect(), P = C[l] + x[l];
- return {
- s: P,
- e: P + C[s],
- i: x.__legendDataIndex
- };
- }
- }
- function S(x, C) {
- return x.e >= C && x.s <= C + a;
- }
- }, e.prototype._findTargetItemIndex = function(n) {
- if (!this._showController)
- return 0;
- var r, i = this.getContentGroup(), a;
- return i.eachChild(function(o, s) {
- var l = o.__legendDataIndex;
- a == null && l != null && (a = s), l === n && (r = s);
- }), r ?? a;
- }, e.type = "legend.scroll", e;
- }(Che)
- );
- function qct(t) {
- t.registerAction("legendScroll", "legendscroll", function(e, n) {
- var r = e.scrollDataIndex;
- r != null && n.eachComponent({
- mainType: "legend",
- subType: "scroll",
- query: e
- }, function(i) {
- i.setScrollDataIndex(r);
- });
- });
- }
- function Kct(t) {
- Mt(Phe), t.registerComponentModel(Xct), t.registerComponentView(Yct), qct(t);
- }
- function Jct(t) {
- Mt(Phe), Mt(Kct);
- }
- var eft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "dataZoom.inside", e.defaultOption = Bf(d_.defaultOption, {
- disabled: !1,
- zoomLock: !1,
- zoomOnMouseWheel: !0,
- moveOnMouseMove: !0,
- moveOnMouseWheel: !1,
- preventDefaultMouseMove: !0
- }), e;
- }(d_)
- ), E6 = Ut();
- function tft(t, e, n) {
- E6(t).coordSysRecordMap.each(function(r) {
- var i = r.dataZoomInfoMap.get(e.uid);
- i && (i.getRange = n);
- });
- }
- function nft(t, e) {
- for (var n = E6(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
- var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
- if (s) {
- var l = e.uid, u = s.get(l);
- u && (s.removeKey(l), s.keys().length || $he(n, o));
- }
- }
- }
- function $he(t, e) {
- if (e) {
- t.removeKey(e.model.uid);
- var n = e.controller;
- n && n.dispose();
- }
- }
- function rft(t, e) {
- var n = {
- model: e,
- containsPoint: vt(aft, e),
- dispatchAction: vt(ift, t),
- dataZoomInfoMap: null,
- controller: null
- }, r = n.controller = new x1(t.getZr());
- return F(["pan", "zoom", "scrollMove"], function(i) {
- r.on(i, function(a) {
- var o = [];
- n.dataZoomInfoMap.each(function(s) {
- if (a.isAvailableBehavior(s.model.option)) {
- var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
- !s.model.get("disabled", !0) && u && o.push({
- dataZoomId: s.model.id,
- start: u[0],
- end: u[1]
- });
- }
- }), o.length && n.dispatchAction(o);
- });
- }), n;
- }
- function ift(t, e) {
- t.isDisposed() || t.dispatchAction({
- type: "dataZoom",
- animation: {
- easing: "cubicOut",
- duration: 100
- },
- batch: e
- });
- }
- function aft(t, e, n, r) {
- return t.coordinateSystem.containPoint([n, r]);
- }
- function oft(t) {
- var e, n = "type_", r = {
- type_true: 2,
- type_move: 1,
- type_false: 0,
- type_undefined: -1
- }, i = !0;
- return t.each(function(a) {
- var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
- r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
- }), {
- controlType: e,
- opt: {
- // RoamController will enable all of these functionalities,
- // and the final behavior is determined by its event listener
- // provided by each inside zoom.
- zoomOnMouseWheel: !0,
- moveOnMouseMove: !0,
- moveOnMouseWheel: !0,
- preventDefaultMouseMove: !!i
- }
- };
- }
- function sft(t) {
- t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
- var r = E6(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Ze());
- i.each(function(a) {
- a.dataZoomInfoMap = null;
- }), e.eachComponent({
- mainType: "dataZoom",
- subType: "inside"
- }, function(a) {
- var o = che(a);
- F(o.infoList, function(s) {
- var l = s.model.uid, u = i.get(l) || i.set(l, rft(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Ze());
- c.set(a.uid, {
- dzReferCoordSysInfo: s,
- model: a,
- getRange: null
- });
- });
- }), i.each(function(a) {
- var o = a.controller, s, l = a.dataZoomInfoMap;
- if (l) {
- var u = l.keys()[0];
- u != null && (s = l.get(u));
- }
- if (!s) {
- $he(i, a);
- return;
- }
- var c = oft(l);
- o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Am(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
- });
- });
- }
- var lft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "dataZoom.inside", n;
- }
- return e.prototype.render = function(n, r, i) {
- if (t.prototype.render.apply(this, arguments), n.noTarget()) {
- this._clear();
- return;
- }
- this.range = n.getPercentRange(), tft(i, n, {
- pan: We(QI.pan, this),
- zoom: We(QI.zoom, this),
- scrollMove: We(QI.scrollMove, this)
- });
- }, e.prototype.dispose = function() {
- this._clear(), t.prototype.dispose.apply(this, arguments);
- }, e.prototype._clear = function() {
- nft(this.api, this.dataZoomModel), this.range = null;
- }, e.type = "dataZoom.inside", e;
- }(O6)
- ), QI = {
- zoom: function(t, e, n, r) {
- var i = this.range, a = i.slice(), o = t.axisModels[0];
- if (o) {
- var s = HI[e](null, [r.originX, r.originY], o, n, t), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0], u = Math.max(1 / r.scale, 0);
- a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
- var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
- if (_p(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
- return a;
- }
- },
- pan: NY(function(t, e, n, r, i, a) {
- var o = HI[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
- return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
- }),
- scrollMove: NY(function(t, e, n, r, i, a) {
- var o = HI[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
- return o.signal * (t[1] - t[0]) * a.scrollDelta;
- })
- };
- function NY(t) {
- return function(e, n, r, i) {
- var a = this.range, o = a.slice(), s = e.axisModels[0];
- if (s) {
- var l = t(o, s, e, n, r, i);
- if (_p(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
- return o;
- }
- };
- }
- var HI = {
- grid: function(t, e, n, r, i) {
- var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
- return t = t || [0, 0], a.dim === "x" ? (o.pixel = e[0] - t[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = a.inverse ? -1 : 1), o;
- },
- polar: function(t, e, n, r, i) {
- var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
- return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), n.mainType === "radiusAxis" ? (o.pixel = e[0] - t[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = a.inverse ? -1 : 1), o;
- },
- singleAxis: function(t, e, n, r, i) {
- var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
- return t = t || [0, 0], a.orient === "horizontal" ? (s.pixel = e[0] - t[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = a.inverse ? -1 : 1), s;
- }
- };
- function Ahe(t) {
- S6(t), t.registerComponentModel(eft), t.registerComponentView(lft), sft(t);
- }
- var uft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Bf(d_.defaultOption, {
- show: !0,
- // deault value can only be drived in view stage.
- right: "ph",
- top: "ph",
- width: "ph",
- height: "ph",
- left: null,
- bottom: null,
- borderColor: "#d2dbee",
- borderRadius: 3,
- backgroundColor: "rgba(47,69,84,0)",
- // dataBackgroundColor: '#ddd',
- dataBackground: {
- lineStyle: {
- color: "#d2dbee",
- width: 0.5
- },
- areaStyle: {
- color: "#d2dbee",
- opacity: 0.2
- }
- },
- selectedDataBackground: {
- lineStyle: {
- color: "#8fb0f7",
- width: 0.5
- },
- areaStyle: {
- color: "#8fb0f7",
- opacity: 0.2
- }
- },
- // Color of selected window.
- fillerColor: "rgba(135,175,274,0.2)",
- 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",
- // Percent of the slider height
- handleSize: "100%",
- handleStyle: {
- color: "#fff",
- borderColor: "#ACB8D1"
- },
- moveHandleSize: 7,
- 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",
- moveHandleStyle: {
- color: "#D2DBEE",
- opacity: 0.7
- },
- showDetail: !0,
- showDataShadow: "auto",
- realtime: !0,
- zoomLock: !1,
- textStyle: {
- color: "#6E7079"
- },
- brushSelect: !0,
- brushStyle: {
- color: "rgba(135,175,274,0.15)"
- },
- emphasis: {
- handleStyle: {
- borderColor: "#8FB0F7"
- },
- moveHandleStyle: {
- color: "#8FB0F7"
- }
- }
- }), e;
- }(d_)
- ), q0 = Zt, BY = 7, cft = 1, GI = 30, fft = 7, K0 = "horizontal", zY = "vertical", dft = 5, hft = ["line", "bar", "candlestick", "scatter"], pft = {
- easing: "cubicOut",
- duration: 100,
- delay: 0
- }, vft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._displayables = {}, n;
- }
- return e.prototype.init = function(n, r) {
- this.api = r, this._onBrush = We(this._onBrush, this), this._onBrushEnd = We(this._onBrushEnd, this);
- }, e.prototype.render = function(n, r, i, a) {
- if (t.prototype.render.apply(this, arguments), Am(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
- this.group.removeAll();
- return;
- }
- if (n.noTarget()) {
- this._clear(), this.group.removeAll();
- return;
- }
- (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
- }, e.prototype.dispose = function() {
- this._clear(), t.prototype.dispose.apply(this, arguments);
- }, e.prototype._clear = function() {
- Jb(this, "_dispatchZoomAction");
- var n = this.api.getZr();
- n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
- }, e.prototype._buildView = function() {
- var n = this.group;
- n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
- var r = this._displayables.sliderGroup = new ct();
- this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
- }, e.prototype._resetLocation = function() {
- var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? fft : 0, o = this._findCoordRect(), s = {
- width: r.getWidth(),
- height: r.getHeight()
- }, l = this._orient === K0 ? {
- // Why using 'right', because right should be used in vertical,
- // and it is better to be consistent for dealing with position param merge.
- right: s.width - o.x - o.width,
- top: s.height - GI - BY - a,
- width: o.width,
- height: GI
- } : {
- right: BY,
- top: o.y,
- width: GI,
- height: o.height
- }, u = Tm(n.option);
- F(["right", "top", "width", "height"], function(f) {
- u[f] === "ph" && (u[f] = l[f]);
- });
- var c = Mr(u, s);
- this._location = {
- x: c.x,
- y: c.y
- }, this._size = [c.width, c.height], this._orient === zY && this._size.reverse();
- }, e.prototype._positionGroup = function() {
- var n = this.group, r = this._location, i = this._orient, a = this.dataZoomModel.getFirstTargetAxisModel(), o = a && a.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
- s.attr(i === K0 && !o ? {
- scaleY: l ? 1 : -1,
- scaleX: 1
- } : i === K0 && o ? {
- scaleY: l ? 1 : -1,
- scaleX: -1
- } : i === zY && !o ? {
- scaleY: l ? -1 : 1,
- scaleX: 1,
- rotation: Math.PI / 2
- } : {
- scaleY: l ? -1 : 1,
- scaleX: -1,
- rotation: Math.PI / 2
- });
- var u = n.getBoundingRect([s]);
- n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
- }, e.prototype._getViewExtent = function() {
- return [0, this._size[0]];
- }, e.prototype._renderBackground = function() {
- var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
- i.add(new q0({
- silent: !0,
- shape: {
- x: 0,
- y: 0,
- width: r[0],
- height: r[1]
- },
- style: {
- fill: n.get("backgroundColor")
- },
- z2: -40
- }));
- var o = new q0({
- shape: {
- x: 0,
- y: 0,
- width: r[0],
- height: r[1]
- },
- style: {
- fill: "transparent"
- },
- z2: 0,
- onclick: We(this._onClickPanel, this)
- }), s = this.api.getZr();
- a ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), i.add(o);
- }, e.prototype._renderDataShadow = function() {
- var n = this._dataShadowInfo = this._prepareDataShadowInfo();
- if (this._displayables.dataShadowSegs = [], !n)
- return;
- var r = this._size, i = this._shadowSize || [], a = n.series, o = a.getRawData(), s = a.getShadowDim && a.getShadowDim(), l = s && o.getDimensionInfo(s) ? a.getShadowDim() : n.otherDim;
- if (l == null)
- return;
- var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
- if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
- var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
- f = [f[0] - d, f[1] + d];
- var h = [0, r[1]], p = [0, r[0]], v = [[r[0], 0], [0, 0]], g = [], m = p[1] / (o.count() - 1), y = 0, _ = Math.round(o.count() / r[0]), O;
- o.each([l], function($, T) {
- if (_ > 0 && T % _) {
- y += m;
- return;
- }
- var E = $ == null || isNaN($) || $ === "", M = E ? 0 : gn($, f, h, !0);
- E && !O && T ? (v.push([v[v.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !E && O && (v.push([y, 0]), g.push([y, 0])), v.push([y, M]), g.push([y, M]), y += m, O = E;
- }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
- }
- this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
- var S = this.dataZoomModel;
- function x($) {
- var T = S.getModel($ ? "selectedDataBackground" : "dataBackground"), E = new ct(), M = new pa({
- shape: {
- points: u
- },
- segmentIgnoreThreshold: 1,
- style: T.getModel("areaStyle").getAreaStyle(),
- silent: !0,
- z2: -20
- }), R = new va({
- shape: {
- points: c
- },
- segmentIgnoreThreshold: 1,
- style: T.getModel("lineStyle").getLineStyle(),
- silent: !0,
- z2: -19
- });
- return E.add(M), E.add(R), E;
- }
- for (var C = 0; C < 3; C++) {
- var P = x(C === 1);
- this._displayables.sliderGroup.add(P), this._displayables.dataShadowSegs.push(P);
- }
- }, e.prototype._prepareDataShadowInfo = function() {
- var n = this.dataZoomModel, r = n.get("showDataShadow");
- if (r !== !1) {
- var i, a = this.ecModel;
- return n.eachTargetAxis(function(o, s) {
- var l = n.getAxisProxy(o, s).getTargetSeriesModels();
- F(l, function(u) {
- if (!i && !(r !== !0 && St(hft, u.get("type")) < 0)) {
- var c = a.getComponent(Uc(o), s).axis, f = gft(o), d, h = u.coordinateSystem;
- f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
- thisAxis: c,
- series: u,
- thisDim: o,
- otherDim: f,
- otherAxisInverse: d
- };
- }
- }, this);
- }, this), i;
- }
- }, e.prototype._renderHandle = function() {
- var n = this.group, r = this._displayables, i = r.handles = [null, null], a = r.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, c = l.get("borderRadius") || 0, f = l.get("brushSelect"), d = r.filler = new q0({
- silent: f,
- style: {
- fill: l.get("fillerColor")
- },
- textConfig: {
- position: "inside"
- }
- });
- o.add(d), o.add(new q0({
- silent: !0,
- subPixelOptimize: !0,
- shape: {
- x: 0,
- y: 0,
- width: s[0],
- height: s[1],
- r: c
- },
- style: {
- // deprecated option
- stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
- lineWidth: cft,
- fill: "rgba(0,0,0,0)"
- }
- })), F([0, 1], function(_) {
- var O = l.get("handleIcon");
- !WC[O] && O.indexOf("path://") < 0 && O.indexOf("image://") < 0 && (O = "path://" + O, process.env.NODE_ENV !== "production" && ss("handleIcon now needs 'path://' prefix when using a path string"));
- var S = wr(O, -1, 0, 2, 2, null, !0);
- S.attr({
- cursor: VY(this._orient),
- draggable: !0,
- drift: We(this._onDragMove, this, _),
- ondragend: We(this._onDragEnd, this),
- onmouseover: We(this._showDataInfo, this, !0),
- onmouseout: We(this._showDataInfo, this, !1),
- z2: 5
- });
- var x = S.getBoundingRect(), C = l.get("handleSize");
- this._handleHeight = ze(C, this._size[1]), this._handleWidth = x.width / x.height * this._handleHeight, S.setStyle(l.getModel("handleStyle").getItemStyle()), S.style.strokeNoScale = !0, S.rectHover = !0, S.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), af(S);
- var P = l.get("handleColor");
- P != null && (S.style.fill = P), o.add(i[_] = S);
- var $ = l.getModel("textStyle");
- n.add(a[_] = new jt({
- silent: !0,
- invisible: !0,
- style: Mn($, {
- x: 0,
- y: 0,
- text: "",
- verticalAlign: "middle",
- align: "center",
- fill: $.getTextColor(),
- font: $.getFont()
- }),
- z2: 10
- }));
- }, this);
- var h = d;
- if (f) {
- var p = ze(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new Zt({
- style: l.getModel("moveHandleStyle").getItemStyle(),
- silent: !0,
- shape: {
- r: [0, 0, 2, 2],
- y: s[1] - 0.5,
- height: p
- }
- }), g = p * 0.8, m = r.moveHandleIcon = wr(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
- m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
- var y = Math.min(s[1] / 2, Math.max(p, 10));
- h = r.moveZone = new Zt({
- invisible: !0,
- shape: {
- y: s[1] - y,
- height: p + y
- }
- }), h.on("mouseover", function() {
- u.enterEmphasis(v);
- }).on("mouseout", function() {
- u.leaveEmphasis(v);
- }), o.add(v), o.add(m), o.add(h);
- }
- h.attr({
- draggable: !0,
- cursor: VY(this._orient),
- drift: We(this._onDragMove, this, "all"),
- ondragstart: We(this._showDataInfo, this, !0),
- ondragend: We(this._onDragEnd, this),
- onmouseover: We(this._showDataInfo, this, !0),
- onmouseout: We(this._showDataInfo, this, !1)
- });
- }, e.prototype._resetInterval = function() {
- var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
- this._handleEnds = [gn(n[0], [0, 100], r, !0), gn(n[1], [0, 100], r, !0)];
- }, e.prototype._updateInterval = function(n, r) {
- var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
- _p(r, a, o, i.get("zoomLock") ? "all" : n, s.minSpan != null ? gn(s.minSpan, l, o, !0) : null, s.maxSpan != null ? gn(s.maxSpan, l, o, !0) : null);
- var u = this._range, c = this._range = ao([gn(a[0], o, l, !0), gn(a[1], o, l, !0)]);
- return !u || u[0] !== c[0] || u[1] !== c[1];
- }, e.prototype._updateView = function(n) {
- var r = this._displayables, i = this._handleEnds, a = ao(i.slice()), o = this._size;
- F([0, 1], function(h) {
- var p = r.handles[h], v = this._handleHeight;
- p.attr({
- scaleX: v / 2,
- scaleY: v / 2,
- // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
- // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
- x: i[h] + (h ? -1 : 1),
- y: o[1] / 2 - v / 2
- });
- }, this), r.filler.setShape({
- x: a[0],
- y: 0,
- width: a[1] - a[0],
- height: o[1]
- });
- var s = {
- x: a[0],
- width: a[1] - a[0]
- };
- r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
- for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
- var f = l[c], d = f.getClipPath();
- d || (d = new Zt(), f.setClipPath(d)), d.setShape({
- x: u[c],
- y: 0,
- width: u[c + 1] - u[c],
- height: o[1]
- });
- }
- this._updateDataInfo(n);
- }, e.prototype._updateDataInfo = function(n) {
- var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
- if (r.get("showDetail")) {
- var l = r.findRepresentativeAxisProxy();
- if (l) {
- var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
- start: c[0],
- end: c[1]
- }).valueWindow : l.getDataValueWindow();
- s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
- }
- }
- var d = ao(this._handleEnds.slice());
- h.call(this, 0), h.call(this, 1);
- function h(p) {
- var v = of(i.handles[p].parent, this.group), g = CP(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + dft, y = zs([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
- a[p].setStyle({
- x: y[0],
- y: y[1],
- verticalAlign: o === K0 ? "middle" : g,
- align: o === K0 ? g : "center",
- text: s[p]
- });
- }
- }, e.prototype._formatLabel = function(n, r) {
- var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
- (o == null || o === "auto") && (o = r.getPixelPrecision());
- var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
- value: Math.round(n)
- }) : n.toFixed(Math.min(o, 20));
- return qe(a) ? a(n, s) : Ve(a) ? a.replace("{value}", s) : s;
- }, e.prototype._showDataInfo = function(n) {
- n = this._dragging || n;
- var r = this._displayables, i = r.handleLabels;
- i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
- }, e.prototype._onDragMove = function(n, r, i, a) {
- this._dragging = !0, Vu(a.event);
- var o = this._displayables.sliderGroup.getLocalTransform(), s = zs([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
- this._updateView(!u), l && u && this._dispatchZoomAction(!0);
- }, e.prototype._onDragEnd = function() {
- this._dragging = !1, this._showDataInfo(!1);
- var n = this.dataZoomModel.get("realtime");
- !n && this._dispatchZoomAction(!1);
- }, e.prototype._onClickPanel = function(n) {
- var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
- if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
- var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
- this._updateView(), s && this._dispatchZoomAction(!1);
- }
- }, e.prototype._onBrushStart = function(n) {
- var r = n.offsetX, i = n.offsetY;
- this._brushStart = new yt(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
- }, e.prototype._onBrushEnd = function(n) {
- if (this._brushing) {
- var r = this._displayables.brushRect;
- if (this._brushing = !1, !!r) {
- r.attr("ignore", !0);
- var i = r.shape, a = +/* @__PURE__ */ new Date();
- if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
- var o = this._getViewExtent(), s = [0, 100];
- this._range = ao([gn(i.x, o, s, !0), gn(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1);
- }
- }
- }
- }, e.prototype._onBrush = function(n) {
- this._brushing && (Vu(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
- }, e.prototype._updateBrushRect = function(n, r) {
- var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
- o || (o = i.brushRect = new q0({
- silent: !0,
- style: a.getModel("brushStyle").getItemStyle()
- }), i.sliderGroup.add(o)), o.attr("ignore", !1);
- var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
- u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
- x: c[0],
- y: 0,
- width: u[0] - c[0],
- height: f[1]
- });
- }, e.prototype._dispatchZoomAction = function(n) {
- var r = this._range;
- this.api.dispatchAction({
- type: "dataZoom",
- from: this.uid,
- dataZoomId: this.dataZoomModel.id,
- animation: n ? pft : null,
- start: r[0],
- end: r[1]
- });
- }, e.prototype._findCoordRect = function() {
- var n, r = che(this.dataZoomModel).infoList;
- if (!n && r.length) {
- var i = r[0].model.coordinateSystem;
- n = i.getRect && i.getRect();
- }
- if (!n) {
- var a = this.api.getWidth(), o = this.api.getHeight();
- n = {
- x: a * 0.2,
- y: o * 0.2,
- width: a * 0.6,
- height: o * 0.6
- };
- }
- return n;
- }, e.type = "dataZoom.slider", e;
- }(O6)
- );
- function gft(t) {
- var e = {
- x: "y",
- y: "x",
- radius: "angle",
- angle: "radius"
- };
- return e[t];
- }
- function VY(t) {
- return t === "vertical" ? "ns-resize" : "ew-resize";
- }
- function Ehe(t) {
- t.registerComponentModel(uft), t.registerComponentView(vft), S6(t);
- }
- function mft(t) {
- Mt(Ahe), Mt(Ehe);
- }
- var Mhe = {
- /**
- * @public
- */
- get: function(t, e, n) {
- var r = ot((yft[t] || {})[e]);
- return n && Se(r) ? r[r.length - 1] : r;
- }
- }, yft = {
- color: {
- active: ["#006edd", "#e0ffff"],
- inactive: ["rgba(0,0,0,0)"]
- },
- colorHue: {
- active: [0, 360],
- inactive: [0, 0]
- },
- colorSaturation: {
- active: [0.3, 1],
- inactive: [0, 0]
- },
- colorLightness: {
- active: [0.9, 0.5],
- inactive: [0, 0]
- },
- colorAlpha: {
- active: [0.3, 1],
- inactive: [0, 0]
- },
- opacity: {
- active: [0.3, 1],
- inactive: [0, 0]
- },
- symbol: {
- active: ["circle", "roundRect", "diamond"],
- inactive: ["none"]
- },
- symbolSize: {
- active: [10, 50],
- inactive: [0, 0]
- }
- }, FY = Kr.mapVisual, bft = Kr.eachVisual, _ft = Se, WY = F, Oft = ao, Sft = gn, mT = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
- type: "box",
- ignoreSize: !0
- }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
- }
- return e.prototype.init = function(n, r, i) {
- this.mergeDefaultAndTheme(n, i);
- }, e.prototype.optionUpdated = function(n, r) {
- var i = this.option;
- !r && _he(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
- }, e.prototype.resetVisual = function(n) {
- var r = this.stateList;
- n = We(n, this), this.controllerVisuals = IL(this.option.controller, r, n), this.targetVisuals = IL(this.option.target, r, n);
- }, e.prototype.getItemSymbol = function() {
- return null;
- }, e.prototype.getTargetSeriesIndices = function() {
- var n = this.option.seriesIndex, r = [];
- return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
- r.push(a);
- }) : r = Cn(n), r;
- }, e.prototype.eachTargetSeries = function(n, r) {
- F(this.getTargetSeriesIndices(), function(i) {
- var a = this.ecModel.getSeriesByIndex(i);
- a && n.call(r, a);
- }, this);
- }, e.prototype.isTargetSeries = function(n) {
- var r = !1;
- return this.eachTargetSeries(function(i) {
- i === n && (r = !0);
- }), r;
- }, e.prototype.formatValueText = function(n, r, i) {
- var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
- i = i || ["<", ">"], Se(n) && (n = n.slice(), u = !0);
- var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
- if (Ve(l))
- return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
- if (qe(l))
- return u ? l(n[0], n[1]) : l(n);
- if (u)
- return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
- return c;
- function f(d) {
- return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
- }
- }, e.prototype.resetExtent = function() {
- var n = this.option, r = Oft([n.min, n.max]);
- this._dataExtent = r;
- }, e.prototype.getDataDimensionIndex = function(n) {
- var r = this.option.dimension;
- if (r != null)
- return n.getDimensionIndex(r);
- for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
- var o = i[a], s = n.getDimensionInfo(o);
- if (!s.isCalculationCoord)
- return s.storeDimIndex;
- }
- }, e.prototype.getExtent = function() {
- return this._dataExtent.slice();
- }, e.prototype.completeVisualOption = function() {
- var n = this.ecModel, r = this.option, i = {
- inRange: r.inRange,
- outOfRange: r.outOfRange
- }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
- mt(a, i), mt(o, i);
- var s = this.isCategory();
- l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
- function l(f) {
- _ft(r.color) && !f.inRange && (f.inRange = {
- color: r.color.slice().reverse()
- }), f.inRange = f.inRange || {
- color: n.get("gradientColor")
- };
- }
- function u(f, d, h) {
- var p = f[d], v = f[h];
- p && !v && (v = f[h] = {}, WY(p, function(g, m) {
- if (Kr.isValidType(m)) {
- var y = Mhe.get(m, "inactive", s);
- y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
- }
- }));
- }
- function c(f) {
- var d = (f.inRange || {}).symbol || (f.outOfRange || {}).symbol, h = (f.inRange || {}).symbolSize || (f.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), v = this.getItemSymbol(), g = v || "roundRect";
- WY(this.stateList, function(m) {
- var y = this.itemSize, _ = f[m];
- _ || (_ = f[m] = {
- color: s ? p : [p]
- }), _.symbol == null && (_.symbol = d && ot(d) || (s ? g : [g])), _.symbolSize == null && (_.symbolSize = h && ot(h) || (s ? y[0] : [y[0], y[0]])), _.symbol = FY(_.symbol, function(x) {
- return x === "none" ? g : x;
- });
- var O = _.symbolSize;
- if (O != null) {
- var S = -1 / 0;
- bft(O, function(x) {
- x > S && (S = x);
- }), _.symbolSize = FY(O, function(x) {
- return Sft(x, [0, S], [0, y[0]], !0);
- });
- }
- }, this);
- }
- }, e.prototype.resetItemSize = function() {
- this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
- }, e.prototype.isCategory = function() {
- return !!this.option.categories;
- }, e.prototype.setSelected = function(n) {
- }, e.prototype.getSelected = function() {
- return null;
- }, e.prototype.getValueState = function(n) {
- return null;
- }, e.prototype.getVisualMeta = function(n) {
- return null;
- }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
- show: !0,
- // zlevel: 0,
- z: 4,
- seriesIndex: "all",
- min: 0,
- max: 200,
- left: 0,
- right: null,
- top: null,
- bottom: 0,
- itemWidth: null,
- itemHeight: null,
- inverse: !1,
- orient: "vertical",
- backgroundColor: "rgba(0,0,0,0)",
- borderColor: "#ccc",
- contentColor: "#5793f3",
- inactiveColor: "#aaa",
- borderWidth: 0,
- padding: 5,
- // 接受数组分别设定上右下左边距,同css
- textGap: 10,
- precision: 0,
- textStyle: {
- color: "#333"
- // 值域文字颜色
- }
- }, e;
- }(At)
- ), QY = [20, 140], xft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.optionUpdated = function(n, r) {
- t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
- i.mappingMethod = "linear", i.dataExtent = this.getExtent();
- }), this._resetRange();
- }, e.prototype.resetItemSize = function() {
- t.prototype.resetItemSize.apply(this, arguments);
- var n = this.itemSize;
- (n[0] == null || isNaN(n[0])) && (n[0] = QY[0]), (n[1] == null || isNaN(n[1])) && (n[1] = QY[1]);
- }, e.prototype._resetRange = function() {
- var n = this.getExtent(), r = this.option.range;
- !r || r.auto ? (n.auto = 1, this.option.range = n) : Se(r) && (r[0] > r[1] && r.reverse(), r[0] = Math.max(r[0], n[0]), r[1] = Math.min(r[1], n[1]));
- }, e.prototype.completeVisualOption = function() {
- t.prototype.completeVisualOption.apply(this, arguments), F(this.stateList, function(n) {
- var r = this.option.controller[n].symbolSize;
- r && r[0] !== r[1] && (r[0] = r[1] / 3);
- }, this);
- }, e.prototype.setSelected = function(n) {
- this.option.range = n.slice(), this._resetRange();
- }, e.prototype.getSelected = function() {
- var n = this.getExtent(), r = ao((this.get("range") || []).slice());
- return r[0] > n[1] && (r[0] = n[1]), r[1] > n[1] && (r[1] = n[1]), r[0] < n[0] && (r[0] = n[0]), r[1] < n[0] && (r[1] = n[0]), r;
- }, e.prototype.getValueState = function(n) {
- var r = this.option.range, i = this.getExtent();
- return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
- }, e.prototype.findTargetDataIndices = function(n) {
- var r = [];
- return this.eachTargetSeries(function(i) {
- var a = [], o = i.getData();
- o.each(this.getDataDimensionIndex(o), function(s, l) {
- n[0] <= s && s <= n[1] && a.push(l);
- }, this), r.push({
- seriesId: i.id,
- dataIndex: a
- });
- }, this), r;
- }, e.prototype.getVisualMeta = function(n) {
- var r = HY(this, "outOfRange", this.getExtent()), i = HY(this, "inRange", this.option.range.slice()), a = [];
- function o(h, p) {
- a.push({
- value: h,
- color: n(h, p)
- });
- }
- for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
- r[l] < i[s] && o(r[l], "outOfRange");
- for (var f = 1; s < u; s++, f = 0)
- f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
- for (var f = 1; l < c; l++)
- (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
- var d = a.length;
- return {
- stops: a,
- outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
- };
- }, e.type = "visualMap.continuous", e.defaultOption = Bf(mT.defaultOption, {
- align: "auto",
- calculable: !1,
- hoverLink: !0,
- realtime: !0,
- 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",
- handleSize: "120%",
- handleStyle: {
- borderColor: "#fff",
- borderWidth: 1
- },
- indicatorIcon: "circle",
- indicatorSize: "50%",
- indicatorStyle: {
- borderColor: "#fff",
- borderWidth: 2,
- shadowBlur: 2,
- shadowOffsetX: 1,
- shadowOffsetY: 1,
- shadowColor: "rgba(0,0,0,0.2)"
- }
- // emphasis: {
- // handleStyle: {
- // shadowBlur: 3,
- // shadowOffsetX: 1,
- // shadowOffsetY: 1,
- // shadowColor: 'rgba(0,0,0,0.2)'
- // }
- // }
- }), e;
- }(mT)
- );
- function HY(t, e, n) {
- if (n[0] === n[1])
- return n.slice();
- for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
- o.push(a), a += i;
- return o.push(n[1]), o;
- }
- var Ihe = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n.autoPositionValues = {
- left: 1,
- right: 1,
- top: 1,
- bottom: 1
- }, n;
- }
- return e.prototype.init = function(n, r) {
- this.ecModel = n, this.api = r;
- }, e.prototype.render = function(n, r, i, a) {
- if (this.visualMapModel = n, n.get("show") === !1) {
- this.group.removeAll();
- return;
- }
- this.doRender(n, r, i, a);
- }, e.prototype.renderBackground = function(n) {
- var r = this.visualMapModel, i = vp(r.get("padding") || 0), a = n.getBoundingRect();
- n.add(new Zt({
- z2: -1,
- silent: !0,
- shape: {
- x: a.x - i[3],
- y: a.y - i[0],
- width: a.width + i[3] + i[1],
- height: a.height + i[0] + i[2]
- },
- style: {
- fill: r.get("backgroundColor"),
- stroke: r.get("borderColor"),
- lineWidth: r.get("borderWidth")
- }
- }));
- }, e.prototype.getControllerVisual = function(n, r, i) {
- i = i || {};
- var a = i.forceState, o = this.visualMapModel, s = {};
- if (r === "color") {
- var l = o.get("contentColor");
- s.color = l;
- }
- function u(h) {
- return s[h];
- }
- function c(h, p) {
- s[h] = p;
- }
- var f = o.controllerVisuals[a || o.getValueState(n)], d = Kr.prepareVisualTypes(f);
- return F(d, function(h) {
- var p = f[h];
- i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), Kr.dependsOn(h, r) && p && p.applyVisual(n, u, c);
- }), s[r];
- }, e.prototype.positionGroup = function(n) {
- var r = this.visualMapModel, i = this.api;
- MP(n, r.getBoxLayoutParams(), {
- width: i.getWidth(),
- height: i.getHeight()
- });
- }, e.prototype.doRender = function(n, r, i, a) {
- }, e.type = "visualMap", e;
- }(Ln)
- ), GY = [["left", "right", "width"], ["top", "bottom", "height"]];
- function Dhe(t, e, n) {
- var r = t.option, i = r.align;
- if (i != null && i !== "auto")
- return i;
- for (var a = {
- width: e.getWidth(),
- height: e.getHeight()
- }, o = r.orient === "horizontal" ? 1 : 0, s = GY[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
- u[GY[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
- var f = [["x", "width", 3], ["y", "height", 0]][o], d = Mr(u, a, r.padding);
- return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
- }
- function Sw(t, e) {
- return F(t || [], function(n) {
- n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
- }), t;
- }
- var ml = gn, wft = F, jY = Math.min, jI = Math.max, Cft = 12, Tft = 6, Pft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
- }
- return e.prototype.init = function(n, r) {
- t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = We(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = We(this._hideIndicator, this);
- }, e.prototype.doRender = function(n, r, i, a) {
- (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
- }, e.prototype._buildView = function() {
- this.group.removeAll();
- var n = this.visualMapModel, r = this.group;
- this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
- var i = n.get("text");
- this._renderEndsText(r, i, 0), this._renderEndsText(r, i, 1), this._updateView(!0), this.renderBackground(r), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(r);
- }, e.prototype._renderEndsText = function(n, r, i) {
- if (r) {
- var a = r[1 - i];
- a = a != null ? a + "" : "";
- var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, c = this._applyTransform([l[0] / 2, i === 0 ? -s : l[1] + s], u), f = this._applyTransform(i === 0 ? "bottom" : "top", u), d = this._orient, h = this.visualMapModel.textStyleModel;
- this.group.add(new jt({
- style: Mn(h, {
- x: c[0],
- y: c[1],
- verticalAlign: d === "horizontal" ? "middle" : f,
- align: d === "horizontal" ? f : "center",
- text: a
- })
- }));
- }
- }, e.prototype._renderBar = function(n) {
- var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = Dhe(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new ct();
- u.add(c), c.add(i.outOfRange = ZY()), c.add(i.inRange = ZY(null, s ? XY(this._orient) : null, We(this._dragHandle, this, "all", !1), We(this._dragHandle, this, "all", !0))), c.setClipPath(new Zt({
- shape: {
- x: 0,
- y: 0,
- width: a[0],
- height: a[1],
- r: 3
- }
- }));
- var f = r.textStyleModel.getTextRect("国"), d = jI(f.width, f.height);
- s && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(r, u, 0, a, d, o), this._createHandle(r, u, 1, a, d, o)), this._createIndicator(r, u, a, d, o), n.add(u);
- }, e.prototype._createHandle = function(n, r, i, a, o, s) {
- var l = We(this._dragHandle, this, i, !1), u = We(this._dragHandle, this, i, !0), c = js(n.get("handleSize"), a[0]), f = wr(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = XY(this._orient);
- f.attr({
- cursor: d,
- draggable: !0,
- drift: l,
- ondragend: u,
- onmousemove: function(m) {
- Vu(m.event);
- }
- }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
- strokeNoScale: !0,
- strokeFirst: !0
- }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), ah(f, !0), r.add(f);
- var h = this.visualMapModel.textStyleModel, p = new jt({
- cursor: d,
- draggable: !0,
- drift: l,
- onmousemove: function(m) {
- Vu(m.event);
- },
- ondragend: u,
- style: Mn(h, {
- x: 0,
- y: 0,
- text: ""
- })
- });
- p.ensureState("blur").style = {
- opacity: 0.1
- }, p.stateTransition = {
- duration: 200
- }, this.group.add(p);
- var v = [c, 0], g = this._shapes;
- g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
- }, e.prototype._createIndicator = function(n, r, i, a, o) {
- var s = js(n.get("indicatorSize"), i[0]), l = wr(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
- l.attr({
- cursor: "move",
- invisible: !0,
- silent: !0,
- x: i[0] / 2
- });
- var u = n.getModel("indicatorStyle").getItemStyle();
- if (l instanceof ci) {
- var c = l.style;
- l.useStyle(_e({
- // TODO other properties like x, y ?
- image: c.image,
- x: c.x,
- y: c.y,
- width: c.width,
- height: c.height
- }, u));
- } else
- l.useStyle(u);
- r.add(l);
- var f = this.visualMapModel.textStyleModel, d = new jt({
- silent: !0,
- invisible: !0,
- style: Mn(f, {
- x: 0,
- y: 0,
- text: ""
- })
- });
- this.group.add(d);
- var h = [(o === "horizontal" ? a / 2 : Tft) + i[0] / 2, 0], p = this._shapes;
- p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
- }, e.prototype._dragHandle = function(n, r, i, a) {
- if (this._useHandle) {
- if (this._dragging = !r, !r) {
- var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
- this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
- }
- r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
- type: "selectDataRange",
- from: this.uid,
- visualMapId: this.visualMapModel.id,
- selected: this._dataInterval.slice()
- }), r ? !this._hovering && this._clearHoverLinkToSeries() : UY(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
- }
- }, e.prototype._resetInterval = function() {
- var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
- this._handleEnds = [ml(r[0], i, a, !0), ml(r[1], i, a, !0)];
- }, e.prototype._updateInterval = function(n, r) {
- r = r || 0;
- var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
- _p(
- r,
- a,
- o,
- n,
- // cross is forbidden
- 0
- );
- var s = i.getExtent();
- this._dataInterval = [ml(a[0], o, s, !0), ml(a[1], o, s, !0)];
- }, e.prototype._updateView = function(n) {
- var r = this.visualMapModel, i = r.getExtent(), a = this._shapes, o = [0, r.itemSize[1]], s = n ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, i, s, "inRange"), u = this._createBarVisual(i, i, o, "outOfRange");
- a.inRange.setStyle({
- fill: l.barColor
- // opacity: visualInRange.opacity
- }).setShape("points", l.barPoints), a.outOfRange.setStyle({
- fill: u.barColor
- // opacity: visualOutOfRange.opacity
- }).setShape("points", u.barPoints), this._updateHandle(s, l);
- }, e.prototype._createBarVisual = function(n, r, i, a) {
- var o = {
- forceState: a,
- convertOpacityToAlpha: !0
- }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
- return {
- barColor: new _m(0, 0, 0, 1, s),
- barPoints: u,
- handlesColor: [s[0].color, s[s.length - 1].color]
- };
- }, e.prototype._makeColorGradient = function(n, r) {
- var i = 100, a = [], o = (n[1] - n[0]) / i;
- a.push({
- color: this.getControllerVisual(n[0], "color", r),
- offset: 0
- });
- for (var s = 1; s < i; s++) {
- var l = n[0] + o * s;
- if (l > n[1])
- break;
- a.push({
- color: this.getControllerVisual(l, "color", r),
- offset: s / i
- });
- }
- return a.push({
- color: this.getControllerVisual(n[1], "color", r),
- offset: 1
- }), a;
- }, e.prototype._createBarPoints = function(n, r) {
- var i = this.visualMapModel.itemSize;
- return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
- }, e.prototype._createBarGroup = function(n) {
- var r = this._orient, i = this.visualMapModel.get("inverse");
- return new ct(r === "horizontal" && !i ? {
- scaleX: n === "bottom" ? 1 : -1,
- rotation: Math.PI / 2
- } : r === "horizontal" && i ? {
- scaleX: n === "bottom" ? -1 : 1,
- rotation: -Math.PI / 2
- } : r === "vertical" && !i ? {
- scaleX: n === "left" ? 1 : -1,
- scaleY: -1
- } : {
- scaleX: n === "left" ? 1 : -1
- });
- }, e.prototype._updateHandle = function(n, r) {
- if (this._useHandle) {
- var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
- wft([0, 1], function(c) {
- var f = o[c];
- f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
- var d = ml(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
- f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
- var p = zs(i.handleLabelPoints[c], of(f, this.group));
- s[c].setStyle({
- x: p[0],
- y: p[1],
- text: a.formatValueText(this._dataInterval[c]),
- verticalAlign: "middle",
- align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
- });
- }, this);
- }
- }, e.prototype._showIndicator = function(n, r, i, a) {
- var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
- if (f) {
- f.attr("invisible", !1);
- var d = {
- convertOpacityToAlpha: !0
- }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = ml(n, s, u, !0), g = l[0] - p / 2, m = {
- x: f.x,
- y: f.y
- };
- f.y = v, f.x = g;
- var y = zs(c.indicatorLabelPoint, of(f, this.group)), _ = c.indicatorLabel;
- _.attr("invisible", !1);
- var O = this._applyTransform("left", c.mainGroup), S = this._orient, x = S === "horizontal";
- _.setStyle({
- text: (i || "") + o.formatValueText(r),
- verticalAlign: x ? O : "middle",
- align: x ? "center" : O
- });
- var C = {
- x: g,
- y: v,
- style: {
- fill: h
- }
- }, P = {
- style: {
- x: y[0],
- y: y[1]
- }
- };
- if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
- var $ = {
- duration: 100,
- easing: "cubicInOut",
- additive: !0
- };
- f.x = m.x, f.y = m.y, f.animateTo(C, $), _.animateTo(P, $);
- } else
- f.attr(C), _.attr(P);
- this._firstShowIndicator = !1;
- var T = this._shapes.handleLabels;
- if (T)
- for (var E = 0; E < T.length; E++)
- this.api.enterBlur(T[E]);
- }
- }, e.prototype._enableHoverLinkToSeries = function() {
- var n = this;
- this._shapes.mainGroup.on("mousemove", function(r) {
- if (n._hovering = !0, !n._dragging) {
- var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
- a[1] = jY(jI(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
- }
- }).on("mouseout", function() {
- n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
- });
- }, e.prototype._enableHoverLinkFromSeries = function() {
- var n = this.api.getZr();
- this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
- }, e.prototype._doHoverLinkToSeries = function(n, r) {
- var i = this.visualMapModel, a = i.itemSize;
- if (i.option.hoverLink) {
- var o = [0, a[1]], s = i.getExtent();
- n = jY(jI(o[0], n), o[1]);
- var l = $ft(i, s, o), u = [n - l, n + l], c = ml(n, o, s, !0), f = [ml(u[0], o, s, !0), ml(u[1], o, s, !0)];
- u[0] < o[0] && (f[0] = -1 / 0), u[1] > o[1] && (f[1] = 1 / 0), r && (f[0] === -1 / 0 ? this._showIndicator(c, f[1], "< ", l) : f[1] === 1 / 0 ? this._showIndicator(c, f[0], "> ", l) : this._showIndicator(c, c, "≈ ", l));
- var d = this._hoverLinkDataIndices, h = [];
- (r || UY(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
- var p = cje(d, h);
- this._dispatchHighDown("downplay", Sw(p[0], i)), this._dispatchHighDown("highlight", Sw(p[1], i));
- }
- }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
- var r;
- if (sh(n.target, function(l) {
- var u = ft(l);
- if (u.dataIndex != null)
- return r = u, !0;
- }, !0), !!r) {
- var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
- if (a.isTargetSeries(i)) {
- var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
- isNaN(s) || this._showIndicator(s, s);
- }
- }
- }, e.prototype._hideIndicator = function() {
- var n = this._shapes;
- n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
- var r = this._shapes.handleLabels;
- if (r)
- for (var i = 0; i < r.length; i++)
- this.api.leaveBlur(r[i]);
- }, e.prototype._clearHoverLinkToSeries = function() {
- this._hideIndicator();
- var n = this._hoverLinkDataIndices;
- this._dispatchHighDown("downplay", Sw(n, this.visualMapModel)), n.length = 0;
- }, e.prototype._clearHoverLinkFromSeries = function() {
- this._hideIndicator();
- var n = this.api.getZr();
- n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
- }, e.prototype._applyTransform = function(n, r, i, a) {
- var o = of(r, a ? null : this.group);
- return Se(n) ? zs(n, o, i) : CP(n, o, i);
- }, e.prototype._dispatchHighDown = function(n, r) {
- r && r.length && this.api.dispatchAction({
- type: n,
- batch: r
- });
- }, e.prototype.dispose = function() {
- this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
- }, e.type = "visualMap.continuous", e;
- }(Ihe)
- );
- function ZY(t, e, n, r) {
- return new pa({
- shape: {
- points: t
- },
- draggable: !!n,
- cursor: e,
- drift: n,
- onmousemove: function(i) {
- Vu(i.event);
- },
- ondragend: r
- });
- }
- function $ft(t, e, n) {
- var r = Cft / 2, i = t.get("hoverLinkDataSize");
- return i && (r = ml(i, e, n, !0) / 2), r;
- }
- function UY(t) {
- var e = t.get("hoverLinkOnHandle");
- return !!(e ?? t.get("realtime"));
- }
- function XY(t) {
- return t === "vertical" ? "ns-resize" : "ew-resize";
- }
- var Aft = {
- type: "selectDataRange",
- event: "dataRangeSelected",
- // FIXME use updateView appears wrong
- update: "update"
- }, Eft = function(t, e) {
- e.eachComponent({
- mainType: "visualMap",
- query: t
- }, function(n) {
- n.setSelected(t.selected);
- });
- }, Mft = [
- {
- createOnAllSeries: !0,
- reset: function(t, e) {
- var n = [];
- return e.eachComponent("visualMap", function(r) {
- var i = t.pipelineContext;
- !r.isTargetSeries(t) || i && i.large || n.push(Jut(r.stateList, r.targetVisuals, We(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
- }), n;
- }
- },
- // Only support color.
- {
- createOnAllSeries: !0,
- reset: function(t, e) {
- var n = t.getData(), r = [];
- e.eachComponent("visualMap", function(i) {
- if (i.isTargetSeries(t)) {
- var a = i.getVisualMeta(We(Ift, null, t, i)) || {
- stops: [],
- outerColors: []
- }, o = i.getDataDimensionIndex(n);
- o >= 0 && (a.dimension = o, r.push(a));
- }
- }), t.getData().setVisual("visualMeta", r);
- }
- }
- ];
- function Ift(t, e, n, r) {
- for (var i = e.targetVisuals[r], a = Kr.prepareVisualTypes(i), o = {
- color: v1(t.getData(), "color")
- // default color.
- }, s = 0, l = a.length; s < l; s++) {
- var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
- c && c.applyVisual(n, f, d);
- }
- return o.color;
- function f(h) {
- return o[h];
- }
- function d(h, p) {
- o[h] = p;
- }
- }
- var YY = F;
- function Dft(t) {
- var e = t && t.visualMap;
- Se(e) || (e = e ? [e] : []), YY(e, function(n) {
- if (n) {
- dv(n, "splitList") && !dv(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
- var r = n.pieces;
- r && Se(r) && YY(r, function(i) {
- nt(i) && (dv(i, "start") && !dv(i, "min") && (i.min = i.start), dv(i, "end") && !dv(i, "max") && (i.max = i.end));
- });
- }
- });
- }
- function dv(t, e) {
- return t && t.hasOwnProperty && t.hasOwnProperty(e);
- }
- var qY = !1;
- function Rhe(t) {
- qY || (qY = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
- return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
- }), t.registerAction(Aft, Eft), F(Mft, function(e) {
- t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
- }), t.registerPreprocessor(Dft));
- }
- function khe(t) {
- t.registerComponentModel(xft), t.registerComponentView(Pft), Rhe(t);
- }
- var Rft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n._pieceList = [], n;
- }
- return e.prototype.optionUpdated = function(n, r) {
- t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
- var i = this._mode = this._determineMode();
- this._pieceList = [], kft[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
- var a = this.option.categories;
- this.resetVisual(function(o, s) {
- i === "categories" ? (o.mappingMethod = "category", o.categories = ot(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = Ce(this._pieceList, function(l) {
- return l = ot(l), s !== "inRange" && (l.visual = null), l;
- }));
- });
- }, e.prototype.completeVisualOption = function() {
- var n = this.option, r = {}, i = Kr.listVisualTypes(), a = this.isCategory();
- F(n.pieces, function(s) {
- F(i, function(l) {
- s.hasOwnProperty(l) && (r[l] = 1);
- });
- }), F(r, function(s, l) {
- var u = !1;
- F(this.stateList, function(c) {
- u = u || o(n, c, l) || o(n.target, c, l);
- }, this), !u && F(this.stateList, function(c) {
- (n[c] || (n[c] = {}))[l] = Mhe.get(l, c === "inRange" ? "active" : "inactive", a);
- });
- }, this);
- function o(s, l, u) {
- return s && s[l] && s[l].hasOwnProperty(u);
- }
- t.prototype.completeVisualOption.apply(this, arguments);
- }, e.prototype._resetSelected = function(n, r) {
- var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
- if (i.selected = o, F(a, function(l, u) {
- var c = this.getSelectedMapKey(l);
- o.hasOwnProperty(c) || (o[c] = !0);
- }, this), i.selectedMode === "single") {
- var s = !1;
- F(a, function(l, u) {
- var c = this.getSelectedMapKey(l);
- o[c] && (s ? o[c] = !1 : s = !0);
- }, this);
- }
- }, e.prototype.getItemSymbol = function() {
- return this.get("itemSymbol");
- }, e.prototype.getSelectedMapKey = function(n) {
- return this._mode === "categories" ? n.value + "" : n.index + "";
- }, e.prototype.getPieceList = function() {
- return this._pieceList;
- }, e.prototype._determineMode = function() {
- var n = this.option;
- return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
- }, e.prototype.setSelected = function(n) {
- this.option.selected = ot(n);
- }, e.prototype.getValueState = function(n) {
- var r = Kr.findPieceIndex(n, this._pieceList);
- return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
- }, e.prototype.findTargetDataIndices = function(n) {
- var r = [], i = this._pieceList;
- return this.eachTargetSeries(function(a) {
- var o = [], s = a.getData();
- s.each(this.getDataDimensionIndex(s), function(l, u) {
- var c = Kr.findPieceIndex(l, i);
- c === n && o.push(u);
- }, this), r.push({
- seriesId: a.id,
- dataIndex: o
- });
- }, this), r;
- }, e.prototype.getRepresentValue = function(n) {
- var r;
- if (this.isCategory())
- r = n.value;
- else if (n.value != null)
- r = n.value;
- else {
- var i = n.interval || [];
- r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
- }
- return r;
- }, e.prototype.getVisualMeta = function(n) {
- if (this.isCategory())
- return;
- var r = [], i = ["", ""], a = this;
- function o(c, f) {
- var d = a.getRepresentValue({
- interval: c
- });
- f || (f = a.getValueState(d));
- var h = n(d, f);
- c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
- value: c[0],
- color: h
- }, {
- value: c[1],
- color: h
- });
- }
- var s = this._pieceList.slice();
- if (!s.length)
- s.push({
- interval: [-1 / 0, 1 / 0]
- });
- else {
- var l = s[0].interval[0];
- l !== -1 / 0 && s.unshift({
- interval: [-1 / 0, l]
- }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
- interval: [l, 1 / 0]
- });
- }
- var u = -1 / 0;
- return F(s, function(c) {
- var f = c.interval;
- f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
- }, this), {
- stops: r,
- outerColors: i
- };
- }, e.type = "visualMap.piecewise", e.defaultOption = Bf(mT.defaultOption, {
- selected: null,
- minOpen: !1,
- maxOpen: !1,
- align: "auto",
- itemWidth: 20,
- itemHeight: 14,
- itemSymbol: "roundRect",
- pieces: null,
- categories: null,
- splitNumber: 5,
- selectedMode: "multiple",
- itemGap: 10,
- hoverLink: !0
- // Enable hover highlight.
- }), e;
- }(mT)
- ), kft = {
- splitNumber: function(t) {
- var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
- i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
- for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
- n++;
- e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
- interval: [-1 / 0, r[0]],
- close: [0, 0]
- });
- for (var o = 0, s = r[0]; o < i; s += a, o++) {
- var l = o === i - 1 ? r[1] : s + a;
- t.push({
- interval: [s, l],
- close: [1, 1]
- });
- }
- e.maxOpen && t.push({
- interval: [r[1], 1 / 0],
- close: [0, 0]
- }), Sk(t), F(t, function(u, c) {
- u.index = c, u.text = this.formatValueText(u.interval);
- }, this);
- },
- categories: function(t) {
- var e = this.option;
- F(e.categories, function(n) {
- t.push({
- text: this.formatValueText(n, !0),
- value: n
- });
- }, this), KY(e, t);
- },
- pieces: function(t) {
- var e = this.option;
- F(e.pieces, function(n, r) {
- nt(n) || (n = {
- value: n
- });
- var i = {
- text: "",
- index: r
- };
- if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
- var a = i.value = n.value;
- i.interval = [a, a], i.close = [1, 1];
- } else {
- for (var o = i.interval = [], s = i.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], c = [], f = 0; f < 2; f++) {
- for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
- o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
- o[f] == null && (o[f] = u[f]);
- }
- c[0] && o[1] === 1 / 0 && (s[0] = 0), c[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + r + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (i.value = o[0]);
- }
- i.visual = Kr.retrieveVisuals(n), t.push(i);
- }, this), KY(e, t), Sk(t), F(t, function(n) {
- var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
- n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
- }, this);
- }
- };
- function KY(t, e) {
- var n = t.inverse;
- (t.orient === "vertical" ? !n : n) && e.reverse();
- }
- var Lft = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = e.type, n;
- }
- return e.prototype.doRender = function() {
- var n = this.group;
- n.removeAll();
- var r = this.visualMapModel, i = r.get("textGap"), a = r.textStyleModel, o = a.getFont(), s = a.getTextColor(), l = this._getItemAlign(), u = r.itemSize, c = this._getViewData(), f = c.endsText, d = Or(r.get("showLabel", !0), !f);
- f && this._renderEndsText(n, f[0], u, d, l), F(c.viewPieceList, function(h) {
- var p = h.piece, v = new ct();
- v.onclick = We(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
- var g = r.getRepresentValue(p);
- if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
- var m = this.visualMapModel.getValueState(g);
- v.add(new jt({
- style: {
- x: l === "right" ? -i : u[0] + i,
- y: u[1] / 2,
- text: p.text,
- verticalAlign: "middle",
- align: l,
- font: o,
- fill: s,
- opacity: m === "outOfRange" ? 0.5 : 1
- }
- }));
- }
- n.add(v);
- }, this), f && this._renderEndsText(n, f[1], u, d, l), Th(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
- }, e.prototype._enableHoverLink = function(n, r) {
- var i = this;
- n.on("mouseover", function() {
- return a("highlight");
- }).on("mouseout", function() {
- return a("downplay");
- });
- var a = function(o) {
- var s = i.visualMapModel;
- s.option.hoverLink && i.api.dispatchAction({
- type: o,
- batch: Sw(s.findTargetDataIndices(r), s)
- });
- };
- }, e.prototype._getItemAlign = function() {
- var n = this.visualMapModel, r = n.option;
- if (r.orient === "vertical")
- return Dhe(n, this.api, n.itemSize);
- var i = r.align;
- return (!i || i === "auto") && (i = "left"), i;
- }, e.prototype._renderEndsText = function(n, r, i, a, o) {
- if (r) {
- var s = new ct(), l = this.visualMapModel.textStyleModel;
- s.add(new jt({
- style: Mn(l, {
- x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
- y: i[1] / 2,
- verticalAlign: "middle",
- align: a ? o : "center",
- text: r
- })
- })), n.add(s);
- }
- }, e.prototype._getViewData = function() {
- var n = this.visualMapModel, r = Ce(n.getPieceList(), function(s, l) {
- return {
- piece: s,
- indexInModelPieceList: l
- };
- }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
- return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
- viewPieceList: r,
- endsText: i
- };
- }, e.prototype._createItemSymbol = function(n, r, i) {
- n.add(wr(
- // symbol will be string
- this.getControllerVisual(r, "symbol"),
- i[0],
- i[1],
- i[2],
- i[3],
- // color will be string
- this.getControllerVisual(r, "color")
- ));
- }, e.prototype._onItemClick = function(n) {
- var r = this.visualMapModel, i = r.option, a = i.selectedMode;
- if (a) {
- var o = ot(i.selected), s = r.getSelectedMapKey(n);
- a === "single" || a === !0 ? (o[s] = !0, F(o, function(l, u) {
- o[u] = u === s;
- })) : o[s] = !o[s], this.api.dispatchAction({
- type: "selectDataRange",
- from: this.uid,
- visualMapId: this.visualMapModel.id,
- selected: o
- });
- }
- }, e.type = "visualMap.piecewise", e;
- }(Ihe)
- );
- function Lhe(t) {
- t.registerComponentModel(Rft), t.registerComponentView(Lft), Rhe(t);
- }
- function Nft(t) {
- Mt(khe), Mt(Lhe);
- }
- var Bft = {
- label: {
- enabled: !0
- },
- decal: {
- show: !1
- }
- }, JY = Ut(), zft = {};
- function Vft(t, e) {
- var n = t.getModel("aria");
- if (!n.get("enabled"))
- return;
- var r = ot(Bft);
- mt(r.label, t.getLocaleModel().get("aria"), !1), mt(n.option, r, !1), i(), a();
- function i() {
- var u = n.getModel("decal"), c = u.get("show");
- if (c) {
- var f = Ze();
- t.eachSeries(function(d) {
- if (!d.isColorBySeries()) {
- var h = f.get(d.type);
- h || (h = {}, f.set(d.type, h)), JY(d).scope = h;
- }
- }), t.eachRawSeries(function(d) {
- if (t.isSeriesFiltered(d))
- return;
- if (qe(d.enableAriaDecal)) {
- d.enableAriaDecal();
- return;
- }
- var h = d.getData();
- if (d.isColorBySeries()) {
- var y = zk(d.ecModel, d.name, zft, t.getSeriesCount()), _ = h.getVisual("decal");
- h.setVisual("decal", O(_, y));
- } else {
- var p = d.getRawData(), v = {}, g = JY(d).scope;
- h.each(function(S) {
- var x = h.getRawIndex(S);
- v[x] = S;
- });
- var m = p.count();
- p.each(function(S) {
- var x = v[S], C = p.getName(S) || S + "", P = zk(d.ecModel, C, g, m), $ = h.getItemVisual(x, "decal");
- h.setItemVisual(x, "decal", O($, P));
- });
- }
- function O(S, x) {
- var C = S ? _e(_e({}, x), S) : x;
- return C.dirty = !0, C;
- }
- });
- }
- }
- function a() {
- var u = e.getZr().dom;
- if (u) {
- var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
- if (f.option = it(f.option, c), !!f.get("enabled")) {
- if (f.get("description")) {
- u.setAttribute("aria-label", f.get("description"));
- return;
- }
- var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
- if (!(d < 1)) {
- var m = s();
- if (m) {
- var y = f.get(["general", "withTitle"]);
- g = o(y, {
- title: m
- });
- } else
- g = f.get(["general", "withoutTitle"]);
- var _ = [], O = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
- g += o(O, {
- seriesCount: d
- }), t.eachSeries(function(P, $) {
- if ($ < v) {
- var T = void 0, E = P.get("name"), M = E ? "withName" : "withoutName";
- T = d > 1 ? f.get(["series", "multiple", M]) : f.get(["series", "single", M]), T = o(T, {
- seriesId: P.seriesIndex,
- seriesName: P.get("name"),
- seriesType: l(P.subType)
- });
- var R = P.getData();
- if (R.count() > h) {
- var N = f.get(["data", "partialData"]);
- T += o(N, {
- displayCnt: h
- });
- } else
- T += f.get(["data", "allData"]);
- for (var I = f.get(["data", "separator", "middle"]), B = f.get(["data", "separator", "end"]), Q = [], W = 0; W < R.count(); W++)
- if (W < h) {
- var H = R.getName(W), U = R.getValues(W), j = f.get(["data", H ? "withName" : "withoutName"]);
- Q.push(o(j, {
- name: H,
- value: U.join(I)
- }));
- }
- T += Q.join(I) + B, _.push(T);
- }
- });
- var S = f.getModel(["series", "multiple", "separator"]), x = S.get("middle"), C = S.get("end");
- g += _.join(x) + C, u.setAttribute("aria-label", g);
- }
- }
- }
- }
- function o(u, c) {
- if (!Ve(u))
- return u;
- var f = u;
- return F(c, function(d, h) {
- f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
- }), f;
- }
- function s() {
- var u = t.get("title");
- return u && u.length && (u = u[0]), u && u.text;
- }
- function l(u) {
- var c = t.getLocaleModel().get(["series", "typeNames"]);
- return c[u] || c.chart;
- }
- }
- function Fft(t) {
- if (!(!t || !t.aria)) {
- var e = t.aria;
- e.show != null && (e.enabled = e.show), e.label = e.label || {}, F(["description", "general", "series", "data"], function(n) {
- e[n] != null && (e.label[n] = e[n]);
- });
- }
- }
- function Wft(t) {
- t.registerPreprocessor(Fft), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Vft);
- }
- var eq = {
- value: "eq",
- // PENDING: not good for literal semantic?
- "<": "lt",
- "<=": "lte",
- ">": "gt",
- ">=": "gte",
- "=": "eq",
- "!=": "ne",
- "<>": "ne"
- // Might be misleading for sake of the difference between '==' and '===',
- // so don't support them.
- // '==': 'eq',
- // '===': 'seq',
- // '!==': 'sne'
- // PENDING: Whether support some common alias "ge", "le", "neq"?
- // ge: 'gte',
- // le: 'lte',
- // neq: 'ne',
- }, Qft = (
- /** @class */
- function() {
- function t(e) {
- var n = this._condVal = Ve(e) ? new RegExp(e) : y5(e) ? e : null;
- if (n == null) {
- var r = "";
- process.env.NODE_ENV !== "production" && (r = fa("Illegal regexp", e, "in")), fn(r);
- }
- }
- return t.prototype.evaluate = function(e) {
- var n = typeof e;
- return Ve(n) ? this._condVal.test(e) : Kt(n) ? this._condVal.test(e + "") : !1;
- }, t;
- }()
- ), Hft = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.evaluate = function() {
- return this.value;
- }, t;
- }()
- ), Gft = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.evaluate = function() {
- for (var e = this.children, n = 0; n < e.length; n++)
- if (!e[n].evaluate())
- return !1;
- return !0;
- }, t;
- }()
- ), jft = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.evaluate = function() {
- for (var e = this.children, n = 0; n < e.length; n++)
- if (e[n].evaluate())
- return !0;
- return !1;
- }, t;
- }()
- ), Zft = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.evaluate = function() {
- return !this.child.evaluate();
- }, t;
- }()
- ), Uft = (
- /** @class */
- function() {
- function t() {
- }
- return t.prototype.evaluate = function() {
- for (var e = !!this.valueParser, n = this.getValue, r = n(this.valueGetterParam), i = e ? this.valueParser(r) : null, a = 0; a < this.subCondList.length; a++)
- if (!this.subCondList[a].evaluate(e ? i : r))
- return !1;
- return !0;
- }, t;
- }()
- );
- function M6(t, e) {
- if (t === !0 || t === !1) {
- var n = new Hft();
- return n.value = t, n;
- }
- var r = "";
- return Nhe(t) || (process.env.NODE_ENV !== "production" && (r = fa("Illegal config. Expect a plain object but actually", t)), fn(r)), t.and ? tq("and", t, e) : t.or ? tq("or", t, e) : t.not ? Xft(t, e) : Yft(t, e);
- }
- function tq(t, e, n) {
- var r = e[t], i = "";
- process.env.NODE_ENV !== "production" && (i = fa('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), Se(r) || fn(i), r.length || fn(i);
- var a = t === "and" ? new Gft() : new jft();
- return a.children = Ce(r, function(o) {
- return M6(o, n);
- }), a.children.length || fn(i), a;
- }
- function Xft(t, e) {
- var n = t.not, r = "";
- process.env.NODE_ENV !== "production" && (r = fa('"not" condition should only be `not: {}`.', "Illegal condition:", t)), Nhe(n) || fn(r);
- var i = new Zft();
- return i.child = M6(n, e), i.child || fn(r), i;
- }
- function Yft(t, e) {
- for (var n = "", r = e.prepareGetValue(t), i = [], a = kt(t), o = t.parser, s = o ? pue(o) : null, l = 0; l < a.length; l++) {
- var u = a[l];
- if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
- var c = Qe(eq, u) ? eq[u] : u, f = t[u], d = s ? s(f) : f, h = yXe(c, d) || c === "reg" && new Qft(d);
- h || (process.env.NODE_ENV !== "production" && (n = fa('Illegal relational operation: "' + u + '" in condition:', t)), fn(n)), i.push(h);
- }
- }
- i.length || (process.env.NODE_ENV !== "production" && (n = fa("Relational condition must have at least one operator.", "Illegal condition:", t)), fn(n));
- var p = new Uft();
- return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
- }
- function Nhe(t) {
- return nt(t) && !Pi(t);
- }
- var qft = (
- /** @class */
- function() {
- function t(e, n) {
- this._cond = M6(e, n);
- }
- return t.prototype.evaluate = function() {
- return this._cond.evaluate();
- }, t;
- }()
- );
- function Kft(t, e) {
- return new qft(t, e);
- }
- var Jft = {
- type: "echarts:filter",
- // PENDING: enhance to filter by index rather than create new data
- transform: function(t) {
- for (var e = t.upstream, n, r = Kft(t.config, {
- valueGetterAttrMap: Ze({
- dimension: !0
- }),
- prepareGetValue: function(s) {
- var l = "", u = s.dimension;
- Qe(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = fa('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), fn(l));
- var c = e.getDimensionInfo(u);
- return c || (process.env.NODE_ENV !== "production" && (l = fa("Can not find dimension info via: " + u + `.
- `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
- `, "Illegal condition:", s, `.
- `)), fn(l)), {
- dimIdx: c.index
- };
- },
- getValue: function(s) {
- return e.retrieveValueFromItem(n, s.dimIdx);
- }
- }), i = [], a = 0, o = e.count(); a < o; a++)
- n = e.getRawDataItem(a), r.evaluate() && i.push(n);
- return {
- data: i
- };
- }
- }, zL = "";
- process.env.NODE_ENV !== "production" && (zL = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
- var edt = {
- type: "echarts:sort",
- transform: function(t) {
- var e = t.upstream, n = t.config, r = "", i = Cn(n);
- i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), fn(r));
- var a = [];
- F(i, function(c) {
- var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
- if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + zL), fn(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + zL), fn(r)), p && p !== "min" && p !== "max") {
- var v = "";
- process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), fn(v);
- }
- if (d !== "asc" && d !== "desc") {
- var g = "";
- process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), fn(g);
- }
- var m = e.getDimensionInfo(f);
- m || (process.env.NODE_ENV !== "production" && (r = fa("Can not find dimension info via: " + f + `.
- `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
- `, "Illegal config:", c, `.
- `)), fn(r));
- var y = h ? pue(h) : null;
- h && !y && (process.env.NODE_ENV !== "production" && (r = fa("Invalid parser name " + h + `.
- `, "Illegal config:", c, `.
- `)), fn(r)), a.push({
- dimIdx: m.index,
- parser: y,
- comparator: new gue(d, p)
- });
- });
- var o = e.sourceFormat;
- o !== Hi && o !== ps && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), fn(r));
- for (var s = [], l = 0, u = e.count(); l < u; l++)
- s.push(e.getRawDataItem(l));
- return s.sort(function(c, f) {
- for (var d = 0; d < a.length; d++) {
- var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
- h.parser && (p = h.parser(p), v = h.parser(v));
- var g = h.comparator.evaluate(p, v);
- if (g !== 0)
- return g;
- }
- return 0;
- }), {
- data: s
- };
- }
- };
- function tdt(t) {
- t.registerTransform(Jft), t.registerTransform(edt);
- }
- var ndt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "dataset", n;
- }
- return e.prototype.init = function(n, r, i) {
- t.prototype.init.call(this, n, r, i), this._sourceManager = new _ue(this), tj(this);
- }, e.prototype.mergeOption = function(n, r) {
- t.prototype.mergeOption.call(this, n, r), tj(this);
- }, e.prototype.optionUpdated = function() {
- this._sourceManager.dirty();
- }, e.prototype.getSourceManager = function() {
- return this._sourceManager;
- }, e.type = "dataset", e.defaultOption = {
- seriesLayoutBy: Nl
- }, e;
- }(At)
- ), rdt = (
- /** @class */
- function(t) {
- le(e, t);
- function e() {
- var n = t !== null && t.apply(this, arguments) || this;
- return n.type = "dataset", n;
- }
- return e.type = "dataset", e;
- }(Ln)
- );
- function idt(t) {
- t.registerComponentModel(ndt), t.registerComponentView(rdt);
- }
- var fl = jl.CMD;
- function kv(t, e) {
- return Math.abs(t - e) < 1e-5;
- }
- function VL(t) {
- var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
- function u(R, N) {
- i && i.length > 2 && r.push(i), i = [R, N];
- }
- function c(R, N, I, B) {
- kv(R, I) && kv(N, B) || i.push(R, N, I, B, I, B);
- }
- function f(R, N, I, B, Q, W) {
- var H = Math.abs(N - R), U = Math.tan(H / 4) * 4 / 3, j = N < R ? -1 : 1, Y = Math.cos(R), ne = Math.sin(R), fe = Math.cos(N), ue = Math.sin(N), ye = Y * Q + I, se = ne * W + B, he = fe * Q + I, re = ue * W + B, q = Q * U * j, K = W * U * j;
- i.push(ye - q * ne, se + K * Y, he + q * ue, re - K * fe, he, re);
- }
- for (var d, h, p, v, g = 0; g < n; ) {
- var m = e[g++], y = g === 1;
- switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === fl.L || m === fl.C || m === fl.Q) && (i = [s, l])), m) {
- case fl.M:
- a = s = e[g++], o = l = e[g++], u(s, l);
- break;
- case fl.L:
- d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
- break;
- case fl.C:
- i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
- break;
- case fl.Q:
- d = e[g++], h = e[g++], p = e[g++], v = e[g++], i.push(a + 2 / 3 * (d - a), o + 2 / 3 * (h - o), p + 2 / 3 * (d - p), v + 2 / 3 * (h - v), p, v), a = p, o = v;
- break;
- case fl.A:
- var _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++], P = e[g++] + C;
- g += 1;
- var $ = !e[g++];
- d = Math.cos(C) * S + _, h = Math.sin(C) * x + O, y ? (s = d, l = h, u(s, l)) : c(a, o, d, h), a = Math.cos(P) * S + _, o = Math.sin(P) * x + O;
- for (var T = ($ ? -1 : 1) * Math.PI / 2, E = C; $ ? E > P : E < P; E += T) {
- var M = $ ? Math.max(E + T, P) : Math.min(E + T, P);
- f(E, M, _, O, S, x);
- }
- break;
- case fl.R:
- s = a = e[g++], l = o = e[g++], d = s + e[g++], h = l + e[g++], u(d, l), c(d, l, d, h), c(d, h, s, h), c(s, h, s, l), c(s, l, d, l);
- break;
- case fl.Z:
- i && c(a, o, s, l), a = s, o = l;
- break;
- }
- }
- return i && i.length > 2 && r.push(i), r;
- }
- function FL(t, e, n, r, i, a, o, s, l, u) {
- if (kv(t, n) && kv(e, r) && kv(i, o) && kv(a, s)) {
- l.push(o, s);
- return;
- }
- var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
- d /= p, h /= p;
- var v = n - t, g = r - e, m = i - o, y = a - s, _ = v * v + g * g, O = m * m + y * y;
- if (_ < f && O < f) {
- l.push(o, s);
- return;
- }
- var S = d * v + h * g, x = -d * m - h * y, C = _ - S * S, P = O - x * x;
- if (C < f && S >= 0 && P < f && x >= 0) {
- l.push(o, s);
- return;
- }
- var $ = [], T = [];
- yf(t, n, i, o, 0.5, $), yf(e, r, a, s, 0.5, T), FL($[0], T[0], $[1], T[1], $[2], T[2], $[3], T[3], l, u), FL($[4], T[4], $[5], T[5], $[6], T[6], $[7], T[7], l, u);
- }
- function adt(t, e) {
- var n = VL(t), r = [];
- e = e || 1;
- for (var i = 0; i < n.length; i++) {
- var a = n[i], o = [], s = a[0], l = a[1];
- o.push(s, l);
- for (var u = 2; u < a.length; ) {
- var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
- FL(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
- }
- r.push(o);
- }
- return r;
- }
- function Bhe(t, e, n) {
- var r = t[e], i = t[1 - e], a = Math.abs(r / i), o = Math.ceil(Math.sqrt(a * n)), s = Math.floor(n / o);
- s === 0 && (s = 1, o = n);
- for (var l = [], u = 0; u < o; u++)
- l.push(s);
- var c = o * s, f = n - c;
- if (f > 0)
- for (var u = 0; u < f; u++)
- l[u % o] += 1;
- return l;
- }
- function nq(t, e, n) {
- for (var r = t.r0, i = t.r, a = t.startAngle, o = t.endAngle, s = Math.abs(o - a), l = s * i, u = i - r, c = l > Math.abs(u), f = Bhe([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
- for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
- var g = {};
- c ? (g.startAngle = a + d * h, g.endAngle = a + d * (h + 1), g.r0 = r + p * v, g.r = r + p * (v + 1)) : (g.startAngle = a + p * v, g.endAngle = a + p * (v + 1), g.r0 = r + d * h, g.r = r + d * (h + 1)), g.clockwise = t.clockwise, g.cx = t.cx, g.cy = t.cy, n.push(g);
- }
- }
- function odt(t, e, n) {
- for (var r = t.width, i = t.height, a = r > i, o = Bhe([r, i], a ? 0 : 1, e), s = a ? "width" : "height", l = a ? "height" : "width", u = a ? "x" : "y", c = a ? "y" : "x", f = t[s] / o.length, d = 0; d < o.length; d++)
- for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
- var v = {};
- v[u] = d * f, v[c] = p * h, v[s] = f, v[l] = h, v.x += t.x, v.y += t.y, n.push(v);
- }
- }
- function rq(t, e, n, r) {
- return t * r - n * e;
- }
- function sdt(t, e, n, r, i, a, o, s) {
- var l = n - t, u = r - e, c = o - i, f = s - a, d = rq(c, f, l, u);
- if (Math.abs(d) < 1e-6)
- return null;
- var h = t - i, p = e - a, v = rq(h, p, c, f) / d;
- return v < 0 || v > 1 ? null : new yt(v * l + t, v * u + e);
- }
- function ldt(t, e, n) {
- var r = new yt();
- yt.sub(r, n, e), r.normalize();
- var i = new yt();
- yt.sub(i, t, e);
- var a = i.dot(r);
- return a;
- }
- function hv(t, e) {
- var n = t[t.length - 1];
- n && n[0] === e[0] && n[1] === e[1] || t.push(e);
- }
- function udt(t, e, n) {
- for (var r = t.length, i = [], a = 0; a < r; a++) {
- var o = t[a], s = t[(a + 1) % r], l = sdt(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
- l && i.push({
- projPt: ldt(l, e, n),
- pt: l,
- idx: a
- });
- }
- if (i.length < 2)
- return [{ points: t }, { points: t }];
- i.sort(function(g, m) {
- return g.projPt - m.projPt;
- });
- var u = i[0], c = i[i.length - 1];
- if (c.idx < u.idx) {
- var f = u;
- u = c, c = f;
- }
- for (var d = [u.pt.x, u.pt.y], h = [c.pt.x, c.pt.y], p = [d], v = [h], a = u.idx + 1; a <= c.idx; a++)
- hv(p, t[a].slice());
- hv(p, h), hv(p, d);
- for (var a = c.idx + 1; a <= u.idx + r; a++)
- hv(v, t[a % r].slice());
- return hv(v, d), hv(v, h), [{
- points: p
- }, {
- points: v
- }];
- }
- function iq(t) {
- var e = t.points, n = [], r = [];
- yP(e, n, r);
- var i = new bt(n[0], n[1], r[0] - n[0], r[1] - n[1]), a = i.width, o = i.height, s = i.x, l = i.y, u = new yt(), c = new yt();
- return a > o ? (u.x = c.x = s + a / 2, u.y = l, c.y = l + o) : (u.y = c.y = l + o / 2, u.x = s, c.x = s + a), udt(e, u, c);
- }
- function yT(t, e, n, r) {
- if (n === 1)
- r.push(e);
- else {
- var i = Math.floor(n / 2), a = t(e);
- yT(t, a[0], i, r), yT(t, a[1], n - i, r);
- }
- return r;
- }
- function cdt(t, e) {
- for (var n = [], r = 0; r < e; r++)
- n.push(z5(t));
- return n;
- }
- function fdt(t, e) {
- e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
- }
- function ddt(t) {
- for (var e = [], n = 0; n < t.length; )
- e.push([t[n++], t[n++]]);
- return e;
- }
- function hdt(t, e) {
- var n = [], r = t.shape, i;
- switch (t.type) {
- case "rect":
- odt(r, e, n), i = Zt;
- break;
- case "sector":
- nq(r, e, n), i = ha;
- break;
- case "circle":
- nq({
- r0: 0,
- r: r.r,
- startAngle: 0,
- endAngle: Math.PI * 2,
- cx: r.cx,
- cy: r.cy
- }, e, n), i = ha;
- break;
- default:
- var a = t.getComputedTransform(), o = a ? Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3])) : 1, s = Ce(adt(t.getUpdatedPathProxy(), o), function(m) {
- return ddt(m);
- }), l = s.length;
- if (l === 0)
- yT(iq, {
- points: s[0]
- }, e, n);
- else if (l === e)
- for (var u = 0; u < l; u++)
- n.push({
- points: s[u]
- });
- else {
- var c = 0, f = Ce(s, function(m) {
- var y = [], _ = [];
- yP(m, y, _);
- var O = (_[1] - y[1]) * (_[0] - y[0]);
- return c += O, { poly: m, area: O };
- });
- f.sort(function(m, y) {
- return y.area - m.area;
- });
- for (var d = e, u = 0; u < l; u++) {
- var h = f[u];
- if (d <= 0)
- break;
- var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
- p < 0 || (yT(iq, {
- points: h.poly
- }, p, n), d -= p);
- }
- }
- i = pa;
- break;
- }
- if (!i)
- return cdt(t, e);
- for (var v = [], u = 0; u < n.length; u++) {
- var g = new i();
- g.setShape(n[u]), fdt(t, g), v.push(g);
- }
- return v;
- }
- function pdt(t, e) {
- var n = t.length, r = e.length;
- if (n === r)
- return [t, e];
- for (var i = [], a = [], o = n < r ? t : e, s = Math.min(n, r), l = Math.abs(r - n) / 6, u = (s - 2) / 6, c = Math.ceil(l / u) + 1, f = [o[0], o[1]], d = l, h = 2; h < s; ) {
- var p = o[h - 2], v = o[h - 1], g = o[h++], m = o[h++], y = o[h++], _ = o[h++], O = o[h++], S = o[h++];
- if (d <= 0) {
- f.push(g, m, y, _, O, S);
- continue;
- }
- for (var x = Math.min(d, c - 1) + 1, C = 1; C <= x; C++) {
- var P = C / x;
- yf(p, g, y, O, P, i), yf(v, m, _, S, P, a), p = i[3], v = a[3], f.push(i[1], a[1], i[2], a[2], p, v), g = i[5], m = a[5], y = i[6], _ = a[6];
- }
- d -= x - 1;
- }
- return o === t ? [f, e] : [t, f];
- }
- function aq(t, e) {
- for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
- a[o++] = r, a[o++] = i;
- return a;
- }
- function vdt(t, e) {
- for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
- var l = t[s], u = e[s], c = void 0, f = void 0;
- l ? u ? (n = pdt(l, u), c = n[0], f = n[1], r = c, i = f) : (f = aq(i || l, l), c = l) : (c = aq(r || u, u), f = u), a.push(c), o.push(f);
- }
- return [a, o];
- }
- function oq(t) {
- for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
- var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
- e += f, n += (s + u) * f, r += (l + c) * f;
- }
- return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
- }
- function gdt(t, e, n, r) {
- for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
- for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
- var h = d === 0 ? c : (c + d - 2) % l + 2, p = t[h] - n[0], v = t[h + 1] - n[1], g = e[d] - r[0], m = e[d + 1] - r[1], y = g - p, _ = m - v;
- f += y * y + _ * _;
- }
- f < a && (a = f, o = u);
- }
- return o;
- }
- function mdt(t) {
- for (var e = [], n = t.length, r = 0; r < n; r += 2)
- e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
- return e;
- }
- function ydt(t, e, n, r) {
- for (var i = [], a, o = 0; o < t.length; o++) {
- var s = t[o], l = e[o], u = oq(s), c = oq(l);
- a == null && (a = u[2] < 0 != c[2] < 0);
- var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
- a && (s = mdt(s));
- for (var m = gdt(s, l, u, c) * 6, y = g - 2, _ = 0; _ < y; _ += 2) {
- var O = (m + _) % y + 2;
- f[_ + 2] = s[O] - u[0], f[_ + 3] = s[O + 1] - u[1];
- }
- f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
- for (var S = r / n, x = -r / 2; x <= r / 2; x += S) {
- for (var C = Math.sin(x), P = Math.cos(x), $ = 0, _ = 0; _ < s.length; _ += 2) {
- var T = f[_], E = f[_ + 1], M = l[_] - c[0], R = l[_ + 1] - c[1], N = M * P - R * C, I = M * C + R * P;
- v[_] = N, v[_ + 1] = I;
- var B = N - T, Q = I - E;
- $ += B * B + Q * Q;
- }
- if ($ < p) {
- p = $, h = x;
- for (var W = 0; W < v.length; W++)
- d[W] = v[W];
- }
- }
- i.push({
- from: f,
- to: d,
- fromCp: u,
- toCp: c,
- rotation: -h
- });
- }
- return i;
- }
- function bT(t) {
- return t.__isCombineMorphing;
- }
- var zhe = "__mOriginal_";
- function _T(t, e, n) {
- var r = zhe + e, i = t[r] || t[e];
- t[r] || (t[r] = t[e]);
- var a = n.replace, o = n.after, s = n.before;
- t[e] = function() {
- var l = arguments, u;
- return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
- };
- }
- function cb(t, e) {
- var n = zhe + e;
- t[n] && (t[e] = t[n], t[n] = null);
- }
- function sq(t, e) {
- for (var n = 0; n < t.length; n++)
- for (var r = t[n], i = 0; i < r.length; ) {
- var a = r[i], o = r[i + 1];
- r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
- }
- }
- function Vhe(t, e) {
- var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = vdt(VL(n), VL(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
- function u() {
- this.transform = null;
- }
- s && sq(a, s), l && sq(o, l), _T(e, "updateTransform", { replace: u }), e.transform = null;
- var c = ydt(a, o, 10, Math.PI), f = [];
- _T(e, "buildPath", { replace: function(d) {
- for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
- var m = c[g], y = m.from, _ = m.to, O = m.rotation * h, S = m.fromCp, x = m.toCp, C = Math.sin(O), P = Math.cos(O);
- Yy(v, S, x, h);
- for (var $ = 0; $ < y.length; $ += 2) {
- var T = y[$], E = y[$ + 1], M = _[$], R = _[$ + 1], N = T * p + M * h, I = E * p + R * h;
- f[$] = N * P - I * C + v[0], f[$ + 1] = N * C + I * P + v[1];
- }
- var B = f[0], Q = f[1];
- d.moveTo(B, Q);
- for (var $ = 2; $ < y.length; ) {
- var M = f[$++], R = f[$++], W = f[$++], H = f[$++], U = f[$++], j = f[$++];
- B === M && Q === R && W === U && H === j ? d.lineTo(U, j) : d.bezierCurveTo(M, R, W, H, U, j), B = U, Q = j;
- }
- }
- } });
- }
- function I6(t, e, n) {
- if (!t || !e)
- return e;
- var r = n.done, i = n.during;
- Vhe(t, e), e.__morphT = 0;
- function a() {
- cb(e, "buildPath"), cb(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
- }
- return e.animateTo({
- __morphT: 1
- }, it({
- during: function(o) {
- e.dirtyShape(), i && i(o);
- },
- done: function() {
- a(), r && r();
- }
- }, n)), e;
- }
- function bdt(t, e, n, r, i, a) {
- var o = 16;
- t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
- for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
- var c = 0, f = 0;
- (t & u) > 0 && (c = 1), (e & u) > 0 && (f = 1), s += u * u * (3 * c ^ f), f === 0 && (c === 1 && (t = u - 1 - t, e = u - 1 - e), l = t, t = e, e = l);
- }
- return s;
- }
- function OT(t) {
- var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = Ce(t, function(s) {
- var l = s.getBoundingRect(), u = s.getComputedTransform(), c = l.x + l.width / 2 + (u ? u[4] : 0), f = l.y + l.height / 2 + (u ? u[5] : 0);
- return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
- }), o = Ce(a, function(s, l) {
- return {
- cp: s,
- z: bdt(s[0], s[1], e, n, r, i),
- path: t[l]
- };
- });
- return o.sort(function(s, l) {
- return s.z - l.z;
- }).map(function(s) {
- return s.path;
- });
- }
- function Fhe(t) {
- return hdt(t.path, t.count);
- }
- function WL() {
- return {
- fromIndividuals: [],
- toIndividuals: [],
- count: 0
- };
- }
- function _dt(t, e, n) {
- var r = [];
- function i(S) {
- for (var x = 0; x < S.length; x++) {
- var C = S[x];
- bT(C) ? i(C.childrenRef()) : C instanceof Dt && r.push(C);
- }
- }
- i(t);
- var a = r.length;
- if (!a)
- return WL();
- var o = n.dividePath || Fhe, s = o({
- path: e,
- count: a
- });
- if (s.length !== a)
- return console.error("Invalid morphing: unmatched splitted path"), WL();
- r = OT(r), s = OT(s);
- for (var l = n.done, u = n.during, c = n.individualDelay, f = new Pu(), d = 0; d < a; d++) {
- var h = r[d], p = s[d];
- p.parent = e, p.copyTransform(f), c || Vhe(h, p);
- }
- e.__isCombineMorphing = !0, e.childrenRef = function() {
- return s;
- };
- function v(S) {
- for (var x = 0; x < s.length; x++)
- s[x].addSelfToZr(S);
- }
- _T(e, "addSelfToZr", {
- after: function(S) {
- v(S);
- }
- }), _T(e, "removeSelfFromZr", {
- after: function(S) {
- for (var x = 0; x < s.length; x++)
- s[x].removeSelfFromZr(S);
- }
- });
- function g() {
- e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, cb(e, "addSelfToZr"), cb(e, "removeSelfFromZr");
- }
- var m = s.length;
- if (c)
- for (var y = m, _ = function() {
- y--, y === 0 && (g(), l && l());
- }, d = 0; d < m; d++) {
- var O = c ? it({
- delay: (n.delay || 0) + c(d, m, r[d], s[d]),
- done: _
- }, n) : n;
- I6(r[d], s[d], O);
- }
- else
- e.__morphT = 0, e.animateTo({
- __morphT: 1
- }, it({
- during: function(S) {
- for (var x = 0; x < m; x++) {
- var C = s[x];
- C.__morphT = e.__morphT, C.dirtyShape();
- }
- u && u(S);
- },
- done: function() {
- g();
- for (var S = 0; S < t.length; S++)
- cb(t[S], "updateTransform");
- l && l();
- }
- }, n));
- return e.__zr && v(e.__zr), {
- fromIndividuals: r,
- toIndividuals: s,
- count: m
- };
- }
- function Odt(t, e, n) {
- var r = e.length, i = [], a = n.dividePath || Fhe;
- function o(h) {
- for (var p = 0; p < h.length; p++) {
- var v = h[p];
- bT(v) ? o(v.childrenRef()) : v instanceof Dt && i.push(v);
- }
- }
- if (bT(t)) {
- o(t.childrenRef());
- var s = i.length;
- if (s < r)
- for (var l = 0, u = s; u < r; u++)
- i.push(z5(i[l++ % s]));
- i.length = r;
- } else {
- i = a({ path: t, count: r });
- for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
- i[u].setLocalTransform(c);
- if (i.length !== r)
- return console.error("Invalid morphing: unmatched splitted path"), WL();
- }
- i = OT(i), e = OT(e);
- for (var f = n.individualDelay, u = 0; u < r; u++) {
- var d = f ? it({
- delay: (n.delay || 0) + f(u, r, i[u], e[u])
- }, n) : n;
- I6(i[u], e[u], d);
- }
- return {
- fromIndividuals: i,
- toIndividuals: e,
- count: e.length
- };
- }
- function lq(t) {
- return Se(t[0]);
- }
- function uq(t, e) {
- for (var n = [], r = t.length, i = 0; i < r; i++)
- n.push({
- one: t[i],
- many: []
- });
- for (var i = 0; i < e.length; i++) {
- var a = e[i].length, o = void 0;
- for (o = 0; o < a; o++)
- n[o % r].many.push(e[i][o]);
- }
- for (var s = 0, i = r - 1; i >= 0; i--)
- if (!n[i].many.length) {
- var l = n[s].many;
- if (l.length <= 1)
- if (s)
- s = 0;
- else
- return n;
- var a = l.length, u = Math.ceil(a / 2);
- n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
- }
- return n;
- }
- var Sdt = {
- clone: function(t) {
- for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
- var i = z5(t.path);
- i.setStyle("opacity", n), e.push(i);
- }
- return e;
- },
- // Use the default divider
- split: null
- };
- function ZI(t, e, n, r, i, a) {
- if (!t.length || !e.length)
- return;
- var o = Om("update", r, i);
- if (!(o && o.duration > 0))
- return;
- var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
- // Need to setToFinal so the further calculation based on the style can be correct.
- // Like emphasis color.
- setToFinal: !0
- }, o), u, c;
- lq(t) && (u = t, c = e), lq(e) && (u = e, c = t);
- function f(m, y, _, O, S) {
- var x = m.many, C = m.one;
- if (x.length === 1 && !S) {
- var P = y ? x[0] : C, $ = y ? C : x[0];
- if (bT(P))
- f({
- many: [P],
- one: $
- }, !0, _, O, !0);
- else {
- var T = s ? it({
- delay: s(_, O)
- }, l) : l;
- I6(P, $, T), a(P, $, P, $, T);
- }
- } else
- for (var E = it({
- dividePath: Sdt[n],
- individualDelay: s && function(Q, W, H, U) {
- return s(Q + _, O);
- }
- }, l), M = y ? _dt(x, C, E) : Odt(C, x, E), R = M.fromIndividuals, N = M.toIndividuals, I = R.length, B = 0; B < I; B++) {
- var T = s ? it({
- delay: s(B, I)
- }, l) : l;
- a(R[B], N[B], y ? x[B] : m.one, y ? m.one : x[B], T);
- }
- }
- for (var d = u ? u === t : t.length > e.length, h = u ? uq(c, u) : uq(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
- p += h[v].many.length;
- for (var g = 0, v = 0; v < h.length; v++)
- f(h[v], d, g, p), g += h[v].many.length;
- }
- function Vd(t) {
- if (!t)
- return [];
- if (Se(t)) {
- for (var e = [], n = 0; n < t.length; n++)
- e.push(Vd(t[n]));
- return e;
- }
- var r = [];
- return t.traverse(function(i) {
- i instanceof Dt && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
- }), r;
- }
- var Whe = 1e4, xdt = 0, cq = 1, fq = 2, wdt = Ut();
- function Cdt(t, e) {
- for (var n = t.dimensions, r = 0; r < n.length; r++) {
- var i = t.getDimensionInfo(n[r]);
- if (i && i.otherDims[e] === 0)
- return n[r];
- }
- }
- function Tdt(t, e, n) {
- var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
- if (r) {
- var a = t.get(r.name, e);
- return i && i.categories[a] || a + "";
- }
- }
- function dq(t, e, n, r) {
- var i = r ? "itemChildGroupId" : "itemGroupId", a = Cdt(t, i);
- if (a) {
- var o = Tdt(t, e, a);
- return o;
- }
- var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
- if (s && s[l])
- return s[l] + "";
- if (!r)
- return n || t.getId(e);
- }
- function hq(t) {
- var e = [];
- return F(t, function(n) {
- var r = n.data, i = n.dataGroupId;
- if (r.count() > Whe) {
- process.env.NODE_ENV !== "production" && nr("Universal transition is disabled on large data > 10k.");
- return;
- }
- for (var a = r.getIndices(), o = 0; o < a.length; o++)
- e.push({
- data: r,
- groupId: dq(r, o, i, !1),
- childGroupId: dq(r, o, i, !0),
- divide: n.divide,
- dataIndex: o
- });
- }), e;
- }
- function UI(t, e, n) {
- t.traverse(function(r) {
- r instanceof Dt && Vn(r, {
- style: {
- opacity: 0
- }
- }, e, {
- dataIndex: n,
- isFrom: !0
- });
- });
- }
- function XI(t) {
- if (t.parent) {
- var e = t.getComputedTransform();
- t.setLocalTransform(e), t.parent.remove(t);
- }
- }
- function pv(t) {
- t.stopAnimation(), t.isGroup && t.traverse(function(e) {
- e.stopAnimation();
- });
- }
- function Pdt(t, e, n) {
- var r = Om("update", n, e);
- r && t.traverse(function(i) {
- if (i instanceof ls) {
- var a = eUe(i);
- a && i.animateFrom({
- style: a
- }, r);
- }
- });
- }
- function $dt(t, e) {
- var n = t.length;
- if (n !== e.length)
- return !1;
- for (var r = 0; r < n; r++) {
- var i = t[r], a = e[r];
- if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
- return !1;
- }
- return !0;
- }
- function Qhe(t, e, n) {
- var r = hq(t), i = hq(e);
- function a(_, O, S, x, C) {
- (S || _) && O.animateFrom({
- style: S && S !== _ ? _e(_e({}, S.style), _.style) : _.style
- }, C);
- }
- var o = !1, s = xdt, l = Ze(), u = Ze();
- r.forEach(function(_) {
- _.groupId && l.set(_.groupId, !0), _.childGroupId && u.set(_.childGroupId, !0);
- });
- for (var c = 0; c < i.length; c++) {
- var f = i[c].groupId;
- if (u.get(f)) {
- s = cq;
- break;
- }
- var d = i[c].childGroupId;
- if (d && l.get(d)) {
- s = fq;
- break;
- }
- }
- function h(_, O) {
- return function(S) {
- var x = S.data, C = S.dataIndex;
- return O ? x.getId(C) : _ ? s === cq ? S.childGroupId : S.groupId : s === fq ? S.childGroupId : S.groupId;
- };
- }
- var p = $dt(r, i), v = {};
- if (!p)
- for (var c = 0; c < i.length; c++) {
- var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
- m && (v[m.id] = !0);
- }
- function y(_, O) {
- var S = r[O], x = i[_], C = x.data.hostModel, P = S.data.getItemGraphicEl(S.dataIndex), $ = x.data.getItemGraphicEl(x.dataIndex);
- if (P === $) {
- $ && Pdt($, x.dataIndex, C);
- return;
- }
- // We can't use the elements that already being morphed
- P && v[P.id] || $ && (pv($), P ? (pv(P), XI(P), o = !0, ZI(Vd(P), Vd($), x.divide, C, _, a)) : UI($, C, _));
- }
- new Qu(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(_, O) {
- var S = i[_], x = S.data, C = x.hostModel, P = x.getItemGraphicEl(S.dataIndex), $ = yn(Ce(O, function(T) {
- return r[T].data.getItemGraphicEl(r[T].dataIndex);
- }), function(T) {
- return T && T !== P && !v[T.id];
- });
- P && (pv(P), $.length ? (F($, function(T) {
- pv(T), XI(T);
- }), o = !0, ZI(Vd($), Vd(P), S.divide, C, _, a)) : UI(P, C, S.dataIndex));
- }).updateOneToMany(function(_, O) {
- var S = r[O], x = S.data.getItemGraphicEl(S.dataIndex);
- if (!(x && v[x.id])) {
- var C = yn(Ce(_, function($) {
- return i[$].data.getItemGraphicEl(i[$].dataIndex);
- }), function($) {
- return $ && $ !== x;
- }), P = i[_[0]].data.hostModel;
- C.length && (F(C, function($) {
- return pv($);
- }), x ? (pv(x), XI(x), o = !0, ZI(
- Vd(x),
- Vd(C),
- S.divide,
- // Use divide on old.
- P,
- _[0],
- a
- )) : F(C, function($) {
- return UI($, P, _[0]);
- }));
- }
- }).updateManyToMany(function(_, O) {
- new Qu(O, _, function(S) {
- return r[S].data.getId(r[S].dataIndex);
- }, function(S) {
- return i[S].data.getId(i[S].dataIndex);
- }).update(function(S, x) {
- y(_[S], O[x]);
- }).execute();
- }).execute(), o && F(e, function(_) {
- var O = _.data, S = O.hostModel, x = S && n.getViewOfSeriesModel(S), C = Om("update", S, 0);
- x && S.isAnimationEnabled() && C && C.duration > 0 && x.group.traverse(function(P) {
- P instanceof Dt && !P.animators.length && P.animateFrom({
- style: {
- opacity: 0
- }
- }, C);
- });
- });
- }
- function pq(t) {
- var e = t.getModel("universalTransition").get("seriesKey");
- return e || t.id;
- }
- function vq(t) {
- return Se(t) ? t.sort().join(",") : t;
- }
- function Ic(t) {
- if (t.hostModel)
- return t.hostModel.getModel("universalTransition").get("divideShape");
- }
- function Adt(t, e) {
- var n = Ze(), r = Ze(), i = Ze();
- F(t.oldSeries, function(o, s) {
- var l = t.oldDataGroupIds[s], u = t.oldData[s], c = pq(o), f = vq(c);
- r.set(f, {
- dataGroupId: l,
- data: u
- }), Se(c) && F(c, function(d) {
- i.set(d, {
- key: f,
- dataGroupId: l,
- data: u
- });
- });
- });
- function a(o) {
- n.get(o) && nr("Duplicated seriesKey in universalTransition " + o);
- }
- return F(e.updatedSeries, function(o) {
- if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
- var s = o.get("dataGroupId"), l = o.getData(), u = pq(o), c = vq(u), f = r.get(c);
- if (f)
- process.env.NODE_ENV !== "production" && a(c), n.set(c, {
- oldSeries: [{
- dataGroupId: f.dataGroupId,
- divide: Ic(f.data),
- data: f.data
- }],
- newSeries: [{
- dataGroupId: s,
- divide: Ic(l),
- data: l
- }]
- });
- else if (Se(u)) {
- process.env.NODE_ENV !== "production" && a(c);
- var d = [];
- F(u, function(v) {
- var g = r.get(v);
- g.data && d.push({
- dataGroupId: g.dataGroupId,
- divide: Ic(g.data),
- data: g.data
- });
- }), d.length && n.set(c, {
- oldSeries: d,
- newSeries: [{
- dataGroupId: s,
- data: l,
- divide: Ic(l)
- }]
- });
- } else {
- var h = i.get(u);
- if (h) {
- var p = n.get(h.key);
- p || (p = {
- oldSeries: [{
- dataGroupId: h.dataGroupId,
- data: h.data,
- divide: Ic(h.data)
- }],
- newSeries: []
- }, n.set(h.key, p)), p.newSeries.push({
- dataGroupId: s,
- data: l,
- divide: Ic(l)
- });
- }
- }
- }
- }), n;
- }
- function gq(t, e) {
- for (var n = 0; n < t.length; n++) {
- var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
- if (r)
- return n;
- }
- }
- function Edt(t, e, n, r) {
- var i = [], a = [];
- F(Cn(t.from), function(o) {
- var s = gq(e.oldSeries, o);
- s >= 0 && i.push({
- dataGroupId: e.oldDataGroupIds[s],
- data: e.oldData[s],
- // TODO can specify divideShape in transition.
- divide: Ic(e.oldData[s]),
- groupIdDim: o.dimension
- });
- }), F(Cn(t.to), function(o) {
- var s = gq(n.updatedSeries, o);
- if (s >= 0) {
- var l = n.updatedSeries[s].getData();
- a.push({
- dataGroupId: e.oldDataGroupIds[s],
- data: l,
- divide: Ic(l),
- groupIdDim: o.dimension
- });
- }
- }), i.length > 0 && a.length > 0 && Qhe(i, a, r);
- }
- function Mdt(t) {
- t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
- F(Cn(r.seriesTransition), function(i) {
- F(Cn(i.to), function(a) {
- for (var o = r.updatedSeries, s = 0; s < o.length; s++)
- (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][vw] = !0);
- });
- });
- }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
- var i = wdt(n);
- if (i.oldSeries && r.updatedSeries && r.optionChanged) {
- var a = r.seriesTransition;
- if (a)
- F(Cn(a), function(h) {
- Edt(h, i, r, n);
- });
- else {
- var o = Adt(i, r);
- F(o.keys(), function(h) {
- var p = o.get(h);
- Qhe(p.oldSeries, p.newSeries, n);
- });
- }
- F(r.updatedSeries, function(h) {
- h[vw] && (h[vw] = !1);
- });
- }
- for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
- var d = s[f].getData();
- d.count() < Whe && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
- }
- });
- }
- Mt([zJe]);
- Mt([RJe]);
- Mt([aet, Oet, Iet, ftt, Stt, lnt, Lnt, brt, Frt, Zrt, nit, Yit, Oat, Iat, Uat, Kat, lot, vot, Tot, Iot, Wot, wst]);
- Mt(Qst);
- Mt(glt);
- Mt(Vfe);
- Mt(Alt);
- Mt(Cde);
- Mt(Dlt);
- Mt(Wlt);
- Mt(Aut);
- Mt(Uut);
- Mt(C1);
- Mt(fct);
- Mt(pct);
- Mt(wct);
- Mt(Mct);
- Mt(Nct);
- Mt(Qct);
- Mt(Jct);
- Mt(mft);
- Mt(Ahe);
- Mt(Ehe);
- Mt(Nft);
- Mt(khe);
- Mt(Lhe);
- Mt(Wft);
- Mt(tdt);
- Mt(idt);
- Mt(Mdt);
- Mt(eJe);
- const Idt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Axis: vs,
- ChartView: _n,
- ComponentModel: At,
- ComponentView: Ln,
- List: Wi,
- Model: wn,
- PRIORITY: Uue,
- SeriesModel: Tn,
- color: cGe,
- connect: oqe,
- dataTool: hqe,
- dependencies: QYe,
- disConnect: sqe,
- disconnect: rce,
- dispose: lqe,
- env: Gt,
- extendChartView: FKe,
- extendComponentModel: BKe,
- extendComponentView: zKe,
- extendSeriesModel: VKe,
- format: TKe,
- getCoordinateSystemDimensions: cqe,
- getInstanceByDom: g3,
- getInstanceById: uqe,
- getMap: dqe,
- graphic: CKe,
- helper: mKe,
- init: nce,
- innerDrawElementOnCanvas: d3,
- matrix: FHe,
- number: xKe,
- parseGeoJSON: eL,
- parseGeoJson: eL,
- registerAction: Js,
- registerCoordinateSystem: oce,
- registerLayout: sce,
- registerLoading: O3,
- registerLocale: U5,
- registerMap: lce,
- registerPostInit: ice,
- registerPostUpdate: ace,
- registerPreprocessor: y3,
- registerProcessor: b3,
- registerTheme: m3,
- registerTransform: uce,
- registerUpdateLifecycle: NP,
- registerVisual: zf,
- setCanvasCreator: fqe,
- setPlatformAPI: Goe,
- throttle: kP,
- time: wKe,
- use: Mt,
- util: PKe,
- vector: PHe,
- version: WYe,
- zrUtil: _He,
- zrender: jGe
- }, Symbol.toStringTag, { value: "Module" }));
- function Ddt(t) {
- return Tee() ? (im(t), !0) : !1;
- }
- function ST(t) {
- return typeof t == "function" ? t() : z(t);
- }
- const Rdt = typeof window < "u" && typeof document < "u";
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
- const kdt = Object.prototype.toString, Ldt = (t) => kdt.call(t) === "[object Object]", QL = () => {
- };
- function Ndt(t, e) {
- function n(...r) {
- return new Promise((i, a) => {
- Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
- });
- }
- return n;
- }
- function Bdt(t, e = {}) {
- let n, r, i = QL;
- const a = (s) => {
- clearTimeout(s), i(), i = QL;
- };
- return (s) => {
- const l = ST(t), u = ST(e.maxWait);
- return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
- i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
- n && a(n), r = null, c(s());
- }, u)), n = setTimeout(() => {
- r && a(r), r = null, c(s());
- }, l);
- });
- };
- }
- function zdt(t) {
- return In();
- }
- function Vdt(t, e = 200, n = {}) {
- return Ndt(
- Bdt(e, n),
- t
- );
- }
- function Fdt(t, e) {
- zdt() && qu(t, e);
- }
- function Wdt(t) {
- var e;
- const n = ST(t);
- return (e = n == null ? void 0 : n.$el) != null ? e : n;
- }
- const Qdt = Rdt ? window : void 0;
- function Hdt(...t) {
- let e, n, r, i;
- if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = Qdt) : [e, n, r, i] = t, !e)
- return QL;
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
- const a = [], o = () => {
- a.forEach((c) => c()), a.length = 0;
- }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = me(
- () => [Wdt(e), ST(i)],
- ([c, f]) => {
- if (o(), !c)
- return;
- const d = Ldt(f) ? { ...f } : f;
- a.push(
- ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
- );
- },
- { immediate: !0, flush: "post" }
- ), u = () => {
- l(), o();
- };
- return Ddt(u), u;
- }
- function Gdt(t, e = "default") {
- let n = null, r = s;
- const i = ee({});
- let a;
- const o = V(() => i.value);
- r = Vdt(s, 200);
- function s() {
- n == null || n.resize({
- animation: {
- duration: 300,
- easing: "quadraticIn"
- }
- });
- }
- function l(f = e) {
- const d = z(t);
- if (!d || !z(d))
- return;
- n = nce(d, f), a = Hdt(window, "resize", r);
- }
- function u(f, d = !1) {
- return i.value = f, new Promise((h) => {
- var p;
- ((p = z(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
- u(z(o)), h(null);
- }, 30), Bt(() => {
- setTimeout(() => {
- !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(z(o)), h(null));
- }, 30);
- });
- });
- }
- me(
- () => e,
- (f) => {
- n && (n.dispose(), l(f), u(i.value));
- }
- ), Fdt(() => {
- n && (a(), n.dispose(), n = null);
- });
- function c() {
- return n || l("default"), n;
- }
- return {
- setOptions: u,
- resize: s,
- echarts: Idt,
- getInstance: c
- };
- }
- const D6 = /* @__PURE__ */ ae({
- __name: "Charts",
- props: {
- echartsOptions: {},
- width: {},
- height: {},
- loading: { type: Boolean }
- },
- setup(t) {
- const e = t, n = ee(null), { setOptions: r, resize: i } = Gdt(n), a = ff(Ql, {
- style: {
- fontSize: "24px"
- }
- });
- return me(
- () => [e.width, e.height],
- u$e(async () => {
- i();
- }, 200)
- ), me(
- () => e,
- async () => {
- await Bt();
- const { echartsOptions: o } = e;
- r(o);
- },
- {
- immediate: !0,
- deep: !0
- }
- ), (o, s) => (be(), Je(z(Zy), {
- spinning: o.loading,
- indicator: z(a)
- }, {
- default: ke(() => [
- tt("div", {
- ref_key: "chartRef",
- ref: n,
- style: dr({ width: o.width + "px", height: o.height + "px" })
- }, null, 4)
- ]),
- _: 1
- }, 8, ["spinning", "indicator"]));
- }
- });
- function R6(t) {
- return pte(t, k9e);
- }
- const k6 = {
- type: Object,
- default: () => ({
- sourceType: kr.STATIC,
- data: [],
- url: "",
- method: "GET",
- params: {},
- headers: {},
- refreshTime: 0,
- dataProcess: () => []
- })
- }, jdt = (t, e) => new Promise((n, r) => {
- const i = new Blob([`
- self.onmessage = function(e) {
- self.postMessage((${t}).call(null, e.data));
- }
- `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
- a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
- a.terminate(), n(o.data);
- }, a.onerror = (o) => {
- a.terminate(), r(o);
- };
- }), L6 = {
- width: {
- type: Number,
- default: 400
- },
- height: {
- type: Number,
- default: 260
- },
- dataSource: k6,
- // 标题
- title: {
- type: Object
- },
- // 图例
- legend: {
- type: Object
- },
- // 背景
- backgroundColor: {
- type: String
- },
- // 边框
- grid: {
- type: Object
- },
- // 提示框
- tooltip: {
- type: Object
- },
- // x轴数据
- xAxis: {
- type: Object
- },
- // y轴数据
- yAxis: {
- type: Object
- },
- // 折线
- series: {
- type: Array
- },
- // 系列设置
- seriesExtend: {
- type: Object,
- default: () => Hhe
- }
- }, Zdt = [], Hhe = {
- lineStyle: {
- type: "solid",
- width: 1
- },
- symbol: "rect",
- symbolSize: 4,
- symbolRotate: 0,
- smooth: !1,
- step: !1
- }, Udt = R6({
- title: {
- text: "折线图标题"
- },
- xAxis: {
- data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
- },
- series: Zdt,
- seriesExtend: Hhe
- }), Xdt = {
- container: {
- props: {
- width: 400,
- height: 260
- }
- },
- props: {
- // 数据源
- dataSource: {
- sourceType: kr.STATIC,
- data: {
- xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
- series: [
- {
- type: "line",
- name: "系列1",
- data: [89.3, 92.1, 94.4, 85.4]
- },
- {
- type: "line",
- name: "系列2",
- data: [95.8, 89.4, 91.2, 76.9]
- }
- ]
- },
- url: location.origin + "/mock/api/get/example/line",
- method: "POST",
- params: {},
- headers: {},
- refreshTime: 0,
- dataProcess: `
- (res) => {
- // 取出列表
- const data = res.data;
- // x轴数据
- const xData = data.map((item) => item.name);
- // 系列数据
- const series = [
- { type: 'line', name: '苹果', data: data.map(item => item.apple) },
- { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
- { type: 'line', name: '小米', data: data.map(item => item.mi) },
- ];
- // 返回图表数据
- return { xData, series };
- }
- `
- },
- ...Udt
- }
- }, Ghe = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
- const a = ee(!1);
- return Vt(() => {
- !e && t.options.refreshDeps !== !0 && (a.value = z(n));
- }), r instanceof Array ? me(
- [a, ...r],
- ([o]) => {
- o && !e && o && (i ? i() : t.refresh());
- },
- {
- deep: !0,
- immediate: !1
- }
- ) : me(a, (o) => {
- !e && o && (i ? i() : t.refresh());
- }), {
- name: "autoRunPlugin",
- onBefore: () => {
- if (!z(n))
- return {
- stopNow: !0
- };
- }
- };
- };
- Ghe.onInit = ({ ready: t = !0, manual: e }) => ({
- loading: !e && z(t)
- });
- const xw = /* @__PURE__ */ new Map(), Ydt = (t, e, n) => {
- const r = xw.get(t);
- r != null && r.timer && clearTimeout(r.timer);
- let i;
- e > -1 && (i = setTimeout(() => {
- xw.delete(t);
- }, e)), xw.set(t, {
- ...n,
- timer: i
- });
- }, qdt = (t) => xw.get(t), ww = /* @__PURE__ */ new Map(), Kdt = (t) => ww.get(t), Jdt = (t, e) => {
- ww.set(t, e), e.then((n) => (ww.delete(t), n)).catch((n) => {
- throw ww.delete(t), n;
- });
- }, Xd = {}, eht = [], tht = (t, e) => {
- Xd[t] && (Xd[t].forEach((n) => n(e)), eht.forEach((n) => n({
- type: t,
- data: e
- })));
- }, YI = (t, e) => (Xd[t] || (Xd[t] = []), Xd[t].push(e), function() {
- const r = Xd[t].indexOf(e);
- Xd[t].splice(r, 1);
- }), nht = (t, {
- cacheKey: e,
- cacheTime: n = 5 * 60 * 1e3,
- staleTime: r = 0,
- setCache: i,
- getCache: a
- }) => {
- const o = ee(), s = ee(), l = (c, f) => {
- i ? i(f) : Ydt(c, n, f), tht(c, f.data);
- }, u = (c, f = []) => a ? a(f) : qdt(c);
- return Vt(() => {
- if (!e)
- return;
- const c = u(e);
- c && Object.hasOwnProperty.call(c, "data") && (t.state.data = c.data, t.state.params = c.params, (r === -1 || (/* @__PURE__ */ new Date()).getTime() - c.time <= r) && (t.state.loading = !1)), o.value = YI(e, (f) => {
- t.setState({ data: f });
- });
- }), im(() => {
- var c;
- (c = o.value) == null || c.call(o);
- }), e ? {
- name: "cachePlugin",
- onBefore: (c) => {
- const f = u(e, c);
- return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
- loading: !1,
- data: f == null ? void 0 : f.data,
- returnNow: !0
- } : {
- data: f == null ? void 0 : f.data
- };
- },
- onRequest: (c, f) => {
- let d = Kdt(e);
- return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, Jdt(e, d), { servicePromise: d });
- },
- onSuccess: (c, f) => {
- var d;
- e && ((d = o.value) == null || d.call(o), l(e, {
- data: c,
- params: f,
- time: (/* @__PURE__ */ new Date()).getTime()
- }), o.value = YI(e, (h) => {
- t.setState({ data: h });
- }));
- },
- onMutate: (c) => {
- var f;
- e && ((f = o.value) == null || f.call(o), l(e, {
- data: c,
- params: t.state.params,
- time: (/* @__PURE__ */ new Date()).getTime()
- }), o.value = YI(e, (d) => {
- t.setState({ data: d });
- }));
- }
- } : {};
- };
- function rht(t) {
- var e = typeof t;
- return t != null && (e == "object" || e == "function");
- }
- var el = rht, iht = typeof Su == "object" && Su && Su.Object === Object && Su, jhe = iht, aht = jhe, oht = typeof self == "object" && self && self.Object === Object && self, sht = aht || oht || Function("return this")(), tl = sht, lht = tl, uht = function() {
- return lht.Date.now();
- }, cht = uht, fht = /\s/;
- function dht(t) {
- for (var e = t.length; e-- && fht.test(t.charAt(e)); )
- ;
- return e;
- }
- var hht = dht, pht = hht, vht = /^\s+/;
- function ght(t) {
- return t && t.slice(0, pht(t) + 1).replace(vht, "");
- }
- var mht = ght, yht = tl, bht = yht.Symbol, YP = bht, mq = YP, Zhe = Object.prototype, _ht = Zhe.hasOwnProperty, Oht = Zhe.toString, J0 = mq ? mq.toStringTag : void 0;
- function Sht(t) {
- var e = _ht.call(t, J0), n = t[J0];
- try {
- t[J0] = void 0;
- var r = !0;
- } catch {
- }
- var i = Oht.call(t);
- return r && (e ? t[J0] = n : delete t[J0]), i;
- }
- var xht = Sht, wht = Object.prototype, Cht = wht.toString;
- function Tht(t) {
- return Cht.call(t);
- }
- var Pht = Tht, yq = YP, $ht = xht, Aht = Pht, Eht = "[object Null]", Mht = "[object Undefined]", bq = yq ? yq.toStringTag : void 0;
- function Iht(t) {
- return t == null ? t === void 0 ? Mht : Eht : bq && bq in Object(t) ? $ht(t) : Aht(t);
- }
- var km = Iht;
- function Dht(t) {
- return t != null && typeof t == "object";
- }
- var Vf = Dht, Rht = km, kht = Vf, Lht = "[object Symbol]";
- function Nht(t) {
- return typeof t == "symbol" || kht(t) && Rht(t) == Lht;
- }
- var Bht = Nht, zht = mht, _q = el, Vht = Bht, Oq = NaN, Fht = /^[-+]0x[0-9a-f]+$/i, Wht = /^0b[01]+$/i, Qht = /^0o[0-7]+$/i, Hht = parseInt;
- function Ght(t) {
- if (typeof t == "number")
- return t;
- if (Vht(t))
- return Oq;
- if (_q(t)) {
- var e = typeof t.valueOf == "function" ? t.valueOf() : t;
- t = _q(e) ? e + "" : e;
- }
- if (typeof t != "string")
- return t === 0 ? t : +t;
- t = zht(t);
- var n = Wht.test(t);
- return n || Qht.test(t) ? Hht(t.slice(2), n ? 2 : 8) : Fht.test(t) ? Oq : +t;
- }
- var jht = Ght, Zht = el, qI = cht, Sq = jht, Uht = "Expected a function", Xht = Math.max, Yht = Math.min;
- function qht(t, e, n) {
- var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
- if (typeof t != "function")
- throw new TypeError(Uht);
- e = Sq(e) || 0, Zht(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? Xht(Sq(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
- function h(x) {
- var C = r, P = i;
- return r = i = void 0, u = x, o = t.apply(P, C), o;
- }
- function p(x) {
- return u = x, s = setTimeout(m, e), c ? h(x) : o;
- }
- function v(x) {
- var C = x - l, P = x - u, $ = e - C;
- return f ? Yht($, a - P) : $;
- }
- function g(x) {
- var C = x - l, P = x - u;
- return l === void 0 || C >= e || C < 0 || f && P >= a;
- }
- function m() {
- var x = qI();
- if (g(x))
- return y(x);
- s = setTimeout(m, v(x));
- }
- function y(x) {
- return s = void 0, d && r ? h(x) : (r = i = void 0, o);
- }
- function _() {
- s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
- }
- function O() {
- return s === void 0 ? o : y(qI());
- }
- function S() {
- var x = qI(), C = g(x);
- if (r = arguments, i = this, l = x, C) {
- if (s === void 0)
- return p(l);
- if (f)
- return clearTimeout(s), s = setTimeout(m, e), h(l);
- }
- return s === void 0 && (s = setTimeout(m, e)), o;
- }
- return S.cancel = _, S.flush = O, S;
- }
- var Uhe = qht;
- const Kht = /* @__PURE__ */ g2(Uhe), Jht = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
- const a = ee(), o = V(() => {
- const s = {}, l = z(n), u = z(r), c = z(i);
- return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
- });
- return Vt((s) => {
- if (z(e)) {
- const l = t.runAsync.bind(t);
- a.value = Kht(
- (u) => {
- u();
- },
- z(e),
- o.value
- ), t.runAsync = (...u) => new Promise((c, f) => {
- var d;
- (d = a.value) == null || d.call(a, () => {
- l(...u).then(c).catch(f);
- });
- }), s(() => {
- var u;
- (u = a.value) == null || u.cancel(), t.runAsync = l;
- });
- }
- }), z(e) ? {
- name: "debouncePlugin",
- onCancel: () => {
- var s;
- (s = a.value) == null || s.cancel();
- }
- } : {};
- };
- var ept = Object.defineProperty, tpt = (t, e, n) => e in t ? ept(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, xq = (t, e, n) => (tpt(t, typeof e != "symbol" ? e + "" : e, n), n);
- class npt {
- constructor() {
- xq(this, "table", {}), xq(this, "hashTable", {});
- }
- insert(e) {
- const n = Symbol(e);
- return this.table[e] = !0, this.hashTable[n] = e, n;
- }
- find(e) {
- return this.hashTable[e];
- }
- }
- new npt();
- function rpt(t) {
- const n = t.toString().match(/^function\s+([^\s(]+)/);
- return n ? n[1] : "";
- }
- function ipt(t) {
- const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
- return r ? r[1].trim() : "";
- }
- var apt = Object.defineProperty, opt = (t, e, n) => e in t ? apt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, wq = (t, e, n) => (opt(t, typeof e != "symbol" ? e + "" : e, n), n);
- class spt {
- constructor() {
- wq(this, "requestInstances", /* @__PURE__ */ new Map()), wq(this, "listeners", []);
- }
- emit(e) {
- this.listeners.forEach((n) => n(e));
- }
- subscribe(e) {
- return this.listeners.push(e), () => {
- const n = this.listeners.indexOf(e);
- this.listeners.splice(n, 1);
- };
- }
- insert(e, n) {
- this.requestInstances.set(e, { ...n }), this.emit({
- key: e,
- ...n
- });
- }
- update(e, n) {
- this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
- }
- has(e) {
- return this.requestInstances.has(e);
- }
- reset(e) {
- if (this.requestInstances.has(e)) {
- const n = this.requestInstances.get(e);
- this.requestInstances.clear(), this.insert(e, n);
- } else
- this.requestInstances.clear();
- }
- getAll() {
- return this.requestInstances;
- }
- }
- const Sa = new spt(), lpt = (t, { ready: e = !0, debugKey: n, ...r }) => {
- const i = () => {
- if (n && !Sa.has(n)) {
- const o = t.serviceRef.value.toString().includes("function") ? rpt(t.serviceRef.value.toString()) : ipt(t.serviceRef.value.toString());
- Sa.insert(n, {
- instance: t,
- requestName: o,
- time: Date.now()
- });
- }
- }, a = V(
- () => Object.fromEntries(
- Object.entries({ ready: e, ...r }).map(([o, s]) => [o, z(s)])
- )
- );
- return Vt(() => {
- n && Sa.has(n) && Sa.emit({
- ...t,
- options: { ...t.options, ...a.value }
- });
- }), {
- name: "devtoolsPlugin",
- onBefore: (o) => {
- i(), n && Sa.has(n) && Sa.emit({
- ...t.state,
- key: n,
- params: o,
- loading: !0,
- time: Date.now(),
- type: "pending"
- });
- },
- onSuccess(o, s) {
- i(), n && Sa.has(n) && Sa.emit({
- ...t.state,
- key: n,
- data: o,
- params: s,
- loading: !1,
- time: Date.now(),
- type: "done"
- });
- },
- onCancel() {
- i(), n && Sa.has(n) && Sa.emit({
- ...t.state,
- key: n,
- loading: !1,
- time: Date.now(),
- type: "cancel"
- });
- },
- onError(o, s) {
- i(), n && Sa.has(n) && Sa.emit({
- ...t.state,
- key: n,
- params: s,
- loading: !1,
- error: o,
- time: Date.now(),
- type: "error"
- });
- },
- onMutate(o) {
- i(), n && Sa.has(n) && Sa.emit({
- ...t.state,
- key: n,
- data: o,
- loading: !1,
- time: Date.now(),
- type: "mutate"
- });
- }
- };
- }, upt = (t, { loadingDelay: e }) => {
- const n = ee(), r = () => {
- n.value && (clearTimeout(z(n.value)), n.value = void 0);
- };
- return {
- name: "loadingDelayPlugin",
- onFinally: () => {
- r();
- const i = z(e);
- i && (t.setState({
- loading: !0
- }), n.value = setTimeout(() => {
- t.setState({
- loading: !1
- });
- }, i));
- },
- onError: () => {
- r();
- }
- };
- };
- function N6() {
- return !!(typeof window < "u" && window.document && window.document.createElement);
- }
- const cpt = !!(typeof window < "u" && window.document && window.document.createElement);
- function B6() {
- return N6() ? document.visibilityState !== "hidden" : !0;
- }
- const fb = [];
- function fpt(t) {
- return fb.push(t), function() {
- const n = fb.indexOf(t);
- fb.splice(n, 1);
- };
- }
- if (N6()) {
- const t = () => {
- if (B6())
- for (let e = 0; e < fb.length; e++) {
- const n = fb[e];
- n();
- }
- };
- window.addEventListener("visibilitychange", t, !1);
- }
- const dpt = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
- let i;
- const a = ee(), o = ee(0), s = () => {
- var l;
- i && clearTimeout(i), (l = a.value) == null || l.call(a);
- };
- return Vt(() => {
- z(e) || s();
- }), z(e) ? {
- name: "pollingPlugin",
- onBefore: () => {
- s();
- },
- onError: () => {
- o.value += 1;
- },
- onSuccess: () => {
- o.value = 0;
- },
- onFinally: () => {
- r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
- !n && !B6() ? a.value = fpt(() => {
- t.refresh();
- }) : t.refresh();
- }, z(e)) : o.value = 0;
- },
- onCancel: () => {
- s();
- }
- } : {};
- };
- function hpt(t, e) {
- let n = !1;
- return (...r) => {
- n || (n = !0, t(...r), setTimeout(() => {
- n = !1;
- }, e));
- };
- }
- function ppt() {
- return N6() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
- }
- const db = [];
- function vpt(t) {
- return db.push(t), function() {
- const n = db.indexOf(t);
- n > -1 && db.splice(n, 1);
- };
- }
- if (cpt) {
- const t = () => {
- if (!(!B6() || !ppt()))
- for (let e = 0; e < db.length; e++) {
- const n = db[e];
- n();
- }
- };
- window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
- }
- const gpt = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
- const r = ee(), i = () => {
- var a;
- (a = r.value) == null || a.call(r);
- };
- return Vt((a) => {
- if (z(e)) {
- const o = hpt(
- t.refresh.bind(t),
- z(n)
- );
- r.value = vpt(() => {
- o();
- });
- }
- a(() => {
- i();
- });
- }), im(() => {
- i();
- }), {
- name: "refreshOnWindowFocusPlugin"
- };
- }, mpt = (t, { retryInterval: e, retryCount: n }) => {
- const r = ee(), i = ee(0), a = ee(!1);
- return n ? {
- name: "retryPlugin",
- onBefore: () => {
- a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
- },
- onSuccess: () => {
- i.value = 0;
- },
- onError: () => {
- if (i.value += 1, n === -1 || i.value <= n) {
- const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
- r.value = setTimeout(() => {
- a.value = !0, t.refresh();
- }, o);
- } else
- i.value = 0;
- },
- onCancel: () => {
- i.value = 0, r.value && clearTimeout(r.value);
- }
- } : {};
- };
- var ypt = Uhe, bpt = el, _pt = "Expected a function";
- function Opt(t, e, n) {
- var r = !0, i = !0;
- if (typeof t != "function")
- throw new TypeError(_pt);
- return bpt(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), ypt(t, e, {
- leading: r,
- maxWait: e,
- trailing: i
- });
- }
- var Spt = Opt;
- const xpt = /* @__PURE__ */ g2(Spt), wpt = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
- const i = V(() => {
- const o = {};
- return z(n) !== void 0 && (o.leading = z(n)), z(r) !== void 0 && (o.trailing = z(r)), o;
- }), a = V(
- () => xpt(
- (o) => {
- o();
- },
- z(e),
- i.value
- )
- );
- return Vt((o) => {
- if (z(e)) {
- const s = t.runAsync.bind(t);
- t.runAsync = (...l) => new Promise((u, c) => {
- var f;
- (f = a.value) == null || f.call(a, () => {
- s(...l).then(u).catch(c);
- });
- }), o(() => {
- var l;
- t.runAsync = s, (l = a.value) == null || l.cancel();
- });
- }
- }), z(e) ? {
- name: "throttlePlugin",
- onCancel: () => {
- var o;
- (o = a.value) == null || o.cancel();
- }
- } : {};
- }, Cq = (t) => typeof t == "function", Cpt = (t) => typeof t == "boolean";
- var Tpt = Object.defineProperty, Ppt = (t, e, n) => e in t ? Tpt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ix = (t, e, n) => (Ppt(t, typeof e != "symbol" ? e + "" : e, n), n);
- class $pt {
- constructor(e, n, r, i = {}) {
- ix(this, "pluginImpls"), ix(this, "count", 0), ix(this, "state", {
- loading: !1,
- params: void 0,
- data: void 0,
- error: void 0
- }), ix(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
- ...this.state,
- loading: !n.manual,
- ...i
- };
- }
- setState(e = {}) {
- this.state = {
- ...this.state,
- ...e
- }, this.setUpdateData(this.state);
- }
- setData(e, n) {
- console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
- this.state[r] = e, this.setUpdateData(e, r);
- }) : (this.state[n] = e, this.setUpdateData(e, n));
- }
- setFetchState(e, n) {
- n instanceof Array ? n.forEach((r) => {
- this.state[r] = e, this.setUpdateData(e, r);
- }) : (this.state[n] = e, this.setUpdateData(e, n));
- }
- runPluginHandler(e, ...n) {
- var r, i, a;
- const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
- var l;
- return (l = s[e]) == null ? void 0 : l.call(s, ...n);
- })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
- return Object.assign({}, ...o);
- }
- async runAsync(...e) {
- var n, r, i, a, o, s, l, u, c, f, d;
- this.count += 1;
- const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
- "onBefore",
- e
- );
- if (p)
- return new Promise(() => {
- });
- if (this.setState({
- loading: !0,
- params: e,
- ...g
- }), v)
- return Promise.resolve(g.data);
- try {
- (r = (n = this.options).onBefore) == null || r.call(n, e);
- } catch (m) {
- return this.setState({
- error: m,
- loading: !1
- }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
- });
- }
- try {
- let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
- const y = (O) => {
- var S, x, C, P;
- if (h !== this.count)
- return new Promise(() => {
- });
- const $ = this.options.formatResult ? this.options.formatResult(O) : O;
- return this.setState({
- data: $,
- error: void 0,
- loading: !1
- }), (x = (S = this.options).onSuccess) == null || x.call(S, $, e), this.runPluginHandler("onSuccess", $, e), this.previousValidData = $, (P = (C = this.options).onFinally) == null || P.call(C, e, $, void 0), h === this.count && this.runPluginHandler("onFinally", e, $, void 0), $;
- };
- m || (m = this.serviceRef.value(...e));
- const _ = await m;
- return y(_);
- } catch (m) {
- if (h !== this.count)
- return new Promise(() => {
- });
- throw this.setState({
- error: m,
- loading: !1
- }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (Cq((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || Cpt((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
- data: this.previousValidData
- }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
- }
- }
- run(...e) {
- this.runAsync(...e).catch((n) => {
- this.options.onError || console.error(n);
- });
- }
- cancel() {
- this.count += 1, this.setState({
- loading: !1
- }), this.runPluginHandler("onCancel");
- }
- refresh() {
- this.run(...this.state.params || []);
- }
- refreshAsync() {
- return this.runAsync(...this.state.params || []);
- }
- mutate(e) {
- const n = Cq(e) ? e(this.state.data) : e;
- this.runPluginHandler("onMutate", n), this.setState({
- data: n
- });
- }
- }
- const Apt = Symbol(
- "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
- );
- function Ept(t) {
- return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
- }
- function Mpt(t, e = {}, n = []) {
- const r = et(
- Apt,
- {}
- ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
- ...r ?? {},
- ...e ?? {}
- }, l = {
- manual: a,
- ready: o,
- initialData: i,
- ...s
- }, u = ee(t), c = zn({
- data: i,
- loading: !1,
- params: void 0,
- error: void 0
- }), f = (v, g) => {
- g ? c[g] = v : Ept(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
- }, d = n.map((v) => {
- var g;
- return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
- }).filter(Boolean), h = new $pt(
- u,
- l,
- f,
- Object.assign({}, ...d, c)
- );
- h.options = l, h.pluginImpls = n.map((v) => v(h, l));
- const p = V(() => Vs(o) ? o.value : o);
- if (Vt(() => {
- if (!a) {
- const v = h.state.params || e.defaultParams || [];
- p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
- }
- }), !a && h.options.refreshDeps !== !0) {
- const v = h.state.params || e.defaultParams || [];
- z(o) && h.run(...v);
- }
- return im(() => {
- h.cancel();
- }), {
- ...k_(c),
- cancel: h.cancel.bind(h),
- refresh: h.refresh.bind(h),
- refreshAsync: h.refreshAsync.bind(h),
- run: h.run.bind(h),
- runAsync: h.runAsync.bind(h),
- mutate: h.mutate.bind(h)
- };
- }
- const Ipt = (t, e) => function(r, i = {}, a = []) {
- let o = t;
- const s = e || [];
- for (let l = s.length; l--; )
- o = s[l](o);
- return o(r, i, a);
- };
- function Dpt(t, e, n) {
- var r;
- const i = (r = [
- process.env.NODE_ENV === "development" ? lpt : null,
- Jht,
- upt,
- dpt,
- gpt,
- wpt,
- Ghe,
- nht,
- mpt
- ]) == null ? void 0 : r.filter(Boolean);
- return Ipt(Mpt, e == null ? void 0 : e.use)(t, e, [
- ...i
- ]);
- }
- /*! js-cookie v3.0.5 | MIT */
- function ax(t) {
- for (var e = 1; e < arguments.length; e++) {
- var n = arguments[e];
- for (var r in n)
- t[r] = n[r];
- }
- return t;
- }
- var Rpt = {
- read: function(t) {
- return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
- },
- write: function(t) {
- return encodeURIComponent(t).replace(
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
- decodeURIComponent
- );
- }
- };
- function HL(t, e) {
- function n(i, a, o) {
- if (!(typeof document > "u")) {
- o = ax({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
- var s = "";
- for (var l in o)
- o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
- return document.cookie = i + "=" + t.write(a, i) + s;
- }
- }
- function r(i) {
- if (!(typeof document > "u" || arguments.length && !i)) {
- for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
- var l = a[s].split("="), u = l.slice(1).join("=");
- try {
- var c = decodeURIComponent(l[0]);
- if (o[c] = t.read(u, c), i === c)
- break;
- } catch {
- }
- }
- return i ? o[i] : o;
- }
- }
- return Object.create(
- {
- set: n,
- get: r,
- remove: function(i, a) {
- n(
- i,
- "",
- ax({}, a, {
- expires: -1
- })
- );
- },
- withAttributes: function(i) {
- return HL(this.converter, ax({}, this.attributes, i));
- },
- withConverter: function(i) {
- return HL(ax({}, this.converter, i), this.attributes);
- }
- },
- {
- attributes: { value: Object.freeze(e) },
- converter: { value: Object.freeze(t) }
- }
- );
- }
- HL(Rpt, { path: "/" });
- function kpt() {
- this.__data__ = [], this.size = 0;
- }
- var Lpt = kpt;
- function Npt(t, e) {
- return t === e || t !== t && e !== e;
- }
- var qP = Npt, Bpt = qP;
- function zpt(t, e) {
- for (var n = t.length; n--; )
- if (Bpt(t[n][0], e))
- return n;
- return -1;
- }
- var KP = zpt, Vpt = KP, Fpt = Array.prototype, Wpt = Fpt.splice;
- function Qpt(t) {
- var e = this.__data__, n = Vpt(e, t);
- if (n < 0)
- return !1;
- var r = e.length - 1;
- return n == r ? e.pop() : Wpt.call(e, n, 1), --this.size, !0;
- }
- var Hpt = Qpt, Gpt = KP;
- function jpt(t) {
- var e = this.__data__, n = Gpt(e, t);
- return n < 0 ? void 0 : e[n][1];
- }
- var Zpt = jpt, Upt = KP;
- function Xpt(t) {
- return Upt(this.__data__, t) > -1;
- }
- var Ypt = Xpt, qpt = KP;
- function Kpt(t, e) {
- var n = this.__data__, r = qpt(n, t);
- return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
- }
- var Jpt = Kpt, evt = Lpt, tvt = Hpt, nvt = Zpt, rvt = Ypt, ivt = Jpt;
- function Lm(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- Lm.prototype.clear = evt;
- Lm.prototype.delete = tvt;
- Lm.prototype.get = nvt;
- Lm.prototype.has = rvt;
- Lm.prototype.set = ivt;
- var JP = Lm, avt = JP;
- function ovt() {
- this.__data__ = new avt(), this.size = 0;
- }
- var svt = ovt;
- function lvt(t) {
- var e = this.__data__, n = e.delete(t);
- return this.size = e.size, n;
- }
- var uvt = lvt;
- function cvt(t) {
- return this.__data__.get(t);
- }
- var fvt = cvt;
- function dvt(t) {
- return this.__data__.has(t);
- }
- var hvt = dvt, pvt = km, vvt = el, gvt = "[object AsyncFunction]", mvt = "[object Function]", yvt = "[object GeneratorFunction]", bvt = "[object Proxy]";
- function _vt(t) {
- if (!vvt(t))
- return !1;
- var e = pvt(t);
- return e == mvt || e == yvt || e == gvt || e == bvt;
- }
- var z6 = _vt, Ovt = tl, Svt = Ovt["__core-js_shared__"], xvt = Svt, KI = xvt, Tq = function() {
- var t = /[^.]+$/.exec(KI && KI.keys && KI.keys.IE_PROTO || "");
- return t ? "Symbol(src)_1." + t : "";
- }();
- function wvt(t) {
- return !!Tq && Tq in t;
- }
- var Cvt = wvt, Tvt = Function.prototype, Pvt = Tvt.toString;
- function $vt(t) {
- if (t != null) {
- try {
- return Pvt.call(t);
- } catch {
- }
- try {
- return t + "";
- } catch {
- }
- }
- return "";
- }
- var Xhe = $vt, Avt = z6, Evt = Cvt, Mvt = el, Ivt = Xhe, Dvt = /[\\^$.*+?()[\]{}|]/g, Rvt = /^\[object .+?Constructor\]$/, kvt = Function.prototype, Lvt = Object.prototype, Nvt = kvt.toString, Bvt = Lvt.hasOwnProperty, zvt = RegExp(
- "^" + Nvt.call(Bvt).replace(Dvt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- );
- function Vvt(t) {
- if (!Mvt(t) || Evt(t))
- return !1;
- var e = Avt(t) ? zvt : Rvt;
- return e.test(Ivt(t));
- }
- var Fvt = Vvt;
- function Wvt(t, e) {
- return t == null ? void 0 : t[e];
- }
- var Qvt = Wvt, Hvt = Fvt, Gvt = Qvt;
- function jvt(t, e) {
- var n = Gvt(t, e);
- return Hvt(n) ? n : void 0;
- }
- var Op = jvt, Zvt = Op, Uvt = tl, Xvt = Zvt(Uvt, "Map"), V6 = Xvt, Yvt = Op, qvt = Yvt(Object, "create"), e$ = qvt, Pq = e$;
- function Kvt() {
- this.__data__ = Pq ? Pq(null) : {}, this.size = 0;
- }
- var Jvt = Kvt;
- function egt(t) {
- var e = this.has(t) && delete this.__data__[t];
- return this.size -= e ? 1 : 0, e;
- }
- var tgt = egt, ngt = e$, rgt = "__lodash_hash_undefined__", igt = Object.prototype, agt = igt.hasOwnProperty;
- function ogt(t) {
- var e = this.__data__;
- if (ngt) {
- var n = e[t];
- return n === rgt ? void 0 : n;
- }
- return agt.call(e, t) ? e[t] : void 0;
- }
- var sgt = ogt, lgt = e$, ugt = Object.prototype, cgt = ugt.hasOwnProperty;
- function fgt(t) {
- var e = this.__data__;
- return lgt ? e[t] !== void 0 : cgt.call(e, t);
- }
- var dgt = fgt, hgt = e$, pgt = "__lodash_hash_undefined__";
- function vgt(t, e) {
- var n = this.__data__;
- return this.size += this.has(t) ? 0 : 1, n[t] = hgt && e === void 0 ? pgt : e, this;
- }
- var ggt = vgt, mgt = Jvt, ygt = tgt, bgt = sgt, _gt = dgt, Ogt = ggt;
- function Nm(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- Nm.prototype.clear = mgt;
- Nm.prototype.delete = ygt;
- Nm.prototype.get = bgt;
- Nm.prototype.has = _gt;
- Nm.prototype.set = Ogt;
- var Sgt = Nm, $q = Sgt, xgt = JP, wgt = V6;
- function Cgt() {
- this.size = 0, this.__data__ = {
- hash: new $q(),
- map: new (wgt || xgt)(),
- string: new $q()
- };
- }
- var Tgt = Cgt;
- function Pgt(t) {
- var e = typeof t;
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
- }
- var $gt = Pgt, Agt = $gt;
- function Egt(t, e) {
- var n = t.__data__;
- return Agt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
- }
- var t$ = Egt, Mgt = t$;
- function Igt(t) {
- var e = Mgt(this, t).delete(t);
- return this.size -= e ? 1 : 0, e;
- }
- var Dgt = Igt, Rgt = t$;
- function kgt(t) {
- return Rgt(this, t).get(t);
- }
- var Lgt = kgt, Ngt = t$;
- function Bgt(t) {
- return Ngt(this, t).has(t);
- }
- var zgt = Bgt, Vgt = t$;
- function Fgt(t, e) {
- var n = Vgt(this, t), r = n.size;
- return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
- }
- var Wgt = Fgt, Qgt = Tgt, Hgt = Dgt, Ggt = Lgt, jgt = zgt, Zgt = Wgt;
- function Bm(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- Bm.prototype.clear = Qgt;
- Bm.prototype.delete = Hgt;
- Bm.prototype.get = Ggt;
- Bm.prototype.has = jgt;
- Bm.prototype.set = Zgt;
- var Yhe = Bm, Ugt = JP, Xgt = V6, Ygt = Yhe, qgt = 200;
- function Kgt(t, e) {
- var n = this.__data__;
- if (n instanceof Ugt) {
- var r = n.__data__;
- if (!Xgt || r.length < qgt - 1)
- return r.push([t, e]), this.size = ++n.size, this;
- n = this.__data__ = new Ygt(r);
- }
- return n.set(t, e), this.size = n.size, this;
- }
- var Jgt = Kgt, emt = JP, tmt = svt, nmt = uvt, rmt = fvt, imt = hvt, amt = Jgt;
- function zm(t) {
- var e = this.__data__ = new emt(t);
- this.size = e.size;
- }
- zm.prototype.clear = tmt;
- zm.prototype.delete = nmt;
- zm.prototype.get = rmt;
- zm.prototype.has = imt;
- zm.prototype.set = amt;
- var qhe = zm;
- function omt(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
- ;
- return t;
- }
- var smt = omt, lmt = Op, umt = function() {
- try {
- var t = lmt(Object, "defineProperty");
- return t({}, "", {}), t;
- } catch {
- }
- }(), Khe = umt, Aq = Khe;
- function cmt(t, e, n) {
- e == "__proto__" && Aq ? Aq(t, e, {
- configurable: !0,
- enumerable: !0,
- value: n,
- writable: !0
- }) : t[e] = n;
- }
- var F6 = cmt, fmt = F6, dmt = qP, hmt = Object.prototype, pmt = hmt.hasOwnProperty;
- function vmt(t, e, n) {
- var r = t[e];
- (!(pmt.call(t, e) && dmt(r, n)) || n === void 0 && !(e in t)) && fmt(t, e, n);
- }
- var Jhe = vmt, gmt = Jhe, mmt = F6;
- function ymt(t, e, n, r) {
- var i = !n;
- n || (n = {});
- for (var a = -1, o = e.length; ++a < o; ) {
- var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
- l === void 0 && (l = t[s]), i ? mmt(n, s, l) : gmt(n, s, l);
- }
- return n;
- }
- var T1 = ymt;
- function bmt(t, e) {
- for (var n = -1, r = Array(t); ++n < t; )
- r[n] = e(n);
- return r;
- }
- var _mt = bmt, Omt = km, Smt = Vf, xmt = "[object Arguments]";
- function wmt(t) {
- return Smt(t) && Omt(t) == xmt;
- }
- var Cmt = wmt, Eq = Cmt, Tmt = Vf, epe = Object.prototype, Pmt = epe.hasOwnProperty, $mt = epe.propertyIsEnumerable, Amt = Eq(/* @__PURE__ */ function() {
- return arguments;
- }()) ? Eq : function(t) {
- return Tmt(t) && Pmt.call(t, "callee") && !$mt.call(t, "callee");
- }, tpe = Amt, Emt = Array.isArray, n$ = Emt, xT = { exports: {} };
- function Mmt() {
- return !1;
- }
- var Imt = Mmt;
- xT.exports;
- (function(t, e) {
- var n = tl, r = Imt, i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, o = a && a.exports === i, s = o ? n.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || r;
- t.exports = u;
- })(xT, xT.exports);
- var W6 = xT.exports, Dmt = 9007199254740991, Rmt = /^(?:0|[1-9]\d*)$/;
- function kmt(t, e) {
- var n = typeof t;
- return e = e ?? Dmt, !!e && (n == "number" || n != "symbol" && Rmt.test(t)) && t > -1 && t % 1 == 0 && t < e;
- }
- var npe = kmt, Lmt = 9007199254740991;
- function Nmt(t) {
- return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Lmt;
- }
- var rpe = Nmt, Bmt = km, zmt = rpe, Vmt = Vf, Fmt = "[object Arguments]", Wmt = "[object Array]", Qmt = "[object Boolean]", Hmt = "[object Date]", Gmt = "[object Error]", jmt = "[object Function]", Zmt = "[object Map]", Umt = "[object Number]", Xmt = "[object Object]", Ymt = "[object RegExp]", qmt = "[object Set]", Kmt = "[object String]", Jmt = "[object WeakMap]", e0t = "[object ArrayBuffer]", t0t = "[object DataView]", n0t = "[object Float32Array]", r0t = "[object Float64Array]", i0t = "[object Int8Array]", a0t = "[object Int16Array]", o0t = "[object Int32Array]", s0t = "[object Uint8Array]", l0t = "[object Uint8ClampedArray]", u0t = "[object Uint16Array]", c0t = "[object Uint32Array]", Jn = {};
- Jn[n0t] = Jn[r0t] = Jn[i0t] = Jn[a0t] = Jn[o0t] = Jn[s0t] = Jn[l0t] = Jn[u0t] = Jn[c0t] = !0;
- Jn[Fmt] = Jn[Wmt] = Jn[e0t] = Jn[Qmt] = Jn[t0t] = Jn[Hmt] = Jn[Gmt] = Jn[jmt] = Jn[Zmt] = Jn[Umt] = Jn[Xmt] = Jn[Ymt] = Jn[qmt] = Jn[Kmt] = Jn[Jmt] = !1;
- function f0t(t) {
- return Vmt(t) && zmt(t.length) && !!Jn[Bmt(t)];
- }
- var d0t = f0t;
- function h0t(t) {
- return function(e) {
- return t(e);
- };
- }
- var Q6 = h0t, wT = { exports: {} };
- wT.exports;
- (function(t, e) {
- var n = jhe, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
- try {
- var l = i && i.require && i.require("util").types;
- return l || o && o.binding && o.binding("util");
- } catch {
- }
- }();
- t.exports = s;
- })(wT, wT.exports);
- var H6 = wT.exports, p0t = d0t, v0t = Q6, Mq = H6, Iq = Mq && Mq.isTypedArray, g0t = Iq ? v0t(Iq) : p0t, ipe = g0t, m0t = _mt, y0t = tpe, b0t = n$, _0t = W6, O0t = npe, S0t = ipe, x0t = Object.prototype, w0t = x0t.hasOwnProperty;
- function C0t(t, e) {
- var n = b0t(t), r = !n && y0t(t), i = !n && !r && _0t(t), a = !n && !r && !i && S0t(t), o = n || r || i || a, s = o ? m0t(t.length, String) : [], l = s.length;
- for (var u in t)
- (e || w0t.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
- (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
- O0t(u, l))) && s.push(u);
- return s;
- }
- var ape = C0t, T0t = Object.prototype;
- function P0t(t) {
- var e = t && t.constructor, n = typeof e == "function" && e.prototype || T0t;
- return t === n;
- }
- var G6 = P0t;
- function $0t(t, e) {
- return function(n) {
- return t(e(n));
- };
- }
- var ope = $0t, A0t = ope, E0t = A0t(Object.keys, Object), M0t = E0t, I0t = G6, D0t = M0t, R0t = Object.prototype, k0t = R0t.hasOwnProperty;
- function L0t(t) {
- if (!I0t(t))
- return D0t(t);
- var e = [];
- for (var n in Object(t))
- k0t.call(t, n) && n != "constructor" && e.push(n);
- return e;
- }
- var N0t = L0t, B0t = z6, z0t = rpe;
- function V0t(t) {
- return t != null && z0t(t.length) && !B0t(t);
- }
- var r$ = V0t, F0t = ape, W0t = N0t, Q0t = r$;
- function H0t(t) {
- return Q0t(t) ? F0t(t) : W0t(t);
- }
- var j6 = H0t, G0t = T1, j0t = j6;
- function Z0t(t, e) {
- return t && G0t(e, j0t(e), t);
- }
- var U0t = Z0t;
- function X0t(t) {
- var e = [];
- if (t != null)
- for (var n in Object(t))
- e.push(n);
- return e;
- }
- var Y0t = X0t, q0t = el, K0t = G6, J0t = Y0t, eyt = Object.prototype, tyt = eyt.hasOwnProperty;
- function nyt(t) {
- if (!q0t(t))
- return J0t(t);
- var e = K0t(t), n = [];
- for (var r in t)
- r == "constructor" && (e || !tyt.call(t, r)) || n.push(r);
- return n;
- }
- var ryt = nyt, iyt = ape, ayt = ryt, oyt = r$;
- function syt(t) {
- return oyt(t) ? iyt(t, !0) : ayt(t);
- }
- var P1 = syt, lyt = T1, uyt = P1;
- function cyt(t, e) {
- return t && lyt(e, uyt(e), t);
- }
- var fyt = cyt, CT = { exports: {} };
- CT.exports;
- (function(t, e) {
- var n = tl, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a ? n.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
- function l(u, c) {
- if (c)
- return u.slice();
- var f = u.length, d = s ? s(f) : new u.constructor(f);
- return u.copy(d), d;
- }
- t.exports = l;
- })(CT, CT.exports);
- var spe = CT.exports;
- function dyt(t, e) {
- var n = -1, r = t.length;
- for (e || (e = Array(r)); ++n < r; )
- e[n] = t[n];
- return e;
- }
- var lpe = dyt;
- function hyt(t, e) {
- for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
- var o = t[n];
- e(o, n, t) && (a[i++] = o);
- }
- return a;
- }
- var pyt = hyt;
- function vyt() {
- return [];
- }
- var upe = vyt, gyt = pyt, myt = upe, yyt = Object.prototype, byt = yyt.propertyIsEnumerable, Dq = Object.getOwnPropertySymbols, _yt = Dq ? function(t) {
- return t == null ? [] : (t = Object(t), gyt(Dq(t), function(e) {
- return byt.call(t, e);
- }));
- } : myt, Z6 = _yt, Oyt = T1, Syt = Z6;
- function xyt(t, e) {
- return Oyt(t, Syt(t), e);
- }
- var wyt = xyt;
- function Cyt(t, e) {
- for (var n = -1, r = e.length, i = t.length; ++n < r; )
- t[i + n] = e[n];
- return t;
- }
- var cpe = Cyt, Tyt = ope, Pyt = Tyt(Object.getPrototypeOf, Object), U6 = Pyt, $yt = cpe, Ayt = U6, Eyt = Z6, Myt = upe, Iyt = Object.getOwnPropertySymbols, Dyt = Iyt ? function(t) {
- for (var e = []; t; )
- $yt(e, Eyt(t)), t = Ayt(t);
- return e;
- } : Myt, fpe = Dyt, Ryt = T1, kyt = fpe;
- function Lyt(t, e) {
- return Ryt(t, kyt(t), e);
- }
- var Nyt = Lyt, Byt = cpe, zyt = n$;
- function Vyt(t, e, n) {
- var r = e(t);
- return zyt(t) ? r : Byt(r, n(t));
- }
- var dpe = Vyt, Fyt = dpe, Wyt = Z6, Qyt = j6;
- function Hyt(t) {
- return Fyt(t, Qyt, Wyt);
- }
- var Gyt = Hyt, jyt = dpe, Zyt = fpe, Uyt = P1;
- function Xyt(t) {
- return jyt(t, Uyt, Zyt);
- }
- var Yyt = Xyt, qyt = Op, Kyt = tl, Jyt = qyt(Kyt, "DataView"), ebt = Jyt, tbt = Op, nbt = tl, rbt = tbt(nbt, "Promise"), ibt = rbt, abt = Op, obt = tl, sbt = abt(obt, "Set"), lbt = sbt, ubt = Op, cbt = tl, fbt = ubt(cbt, "WeakMap"), dbt = fbt, GL = ebt, jL = V6, ZL = ibt, UL = lbt, XL = dbt, hpe = km, Vm = Xhe, Rq = "[object Map]", hbt = "[object Object]", kq = "[object Promise]", Lq = "[object Set]", Nq = "[object WeakMap]", Bq = "[object DataView]", pbt = Vm(GL), vbt = Vm(jL), gbt = Vm(ZL), mbt = Vm(UL), ybt = Vm(XL), Fd = hpe;
- (GL && Fd(new GL(new ArrayBuffer(1))) != Bq || jL && Fd(new jL()) != Rq || ZL && Fd(ZL.resolve()) != kq || UL && Fd(new UL()) != Lq || XL && Fd(new XL()) != Nq) && (Fd = function(t) {
- var e = hpe(t), n = e == hbt ? t.constructor : void 0, r = n ? Vm(n) : "";
- if (r)
- switch (r) {
- case pbt:
- return Bq;
- case vbt:
- return Rq;
- case gbt:
- return kq;
- case mbt:
- return Lq;
- case ybt:
- return Nq;
- }
- return e;
- });
- var X6 = Fd, bbt = Object.prototype, _bt = bbt.hasOwnProperty;
- function Obt(t) {
- var e = t.length, n = new t.constructor(e);
- return e && typeof t[0] == "string" && _bt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
- }
- var Sbt = Obt, xbt = tl, wbt = xbt.Uint8Array, Cbt = wbt, zq = Cbt;
- function Tbt(t) {
- var e = new t.constructor(t.byteLength);
- return new zq(e).set(new zq(t)), e;
- }
- var Y6 = Tbt, Pbt = Y6;
- function $bt(t, e) {
- var n = e ? Pbt(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.byteLength);
- }
- var Abt = $bt, Ebt = /\w*$/;
- function Mbt(t) {
- var e = new t.constructor(t.source, Ebt.exec(t));
- return e.lastIndex = t.lastIndex, e;
- }
- var Ibt = Mbt, Vq = YP, Fq = Vq ? Vq.prototype : void 0, Wq = Fq ? Fq.valueOf : void 0;
- function Dbt(t) {
- return Wq ? Object(Wq.call(t)) : {};
- }
- var Rbt = Dbt, kbt = Y6;
- function Lbt(t, e) {
- var n = e ? kbt(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.length);
- }
- var ppe = Lbt, Nbt = Y6, Bbt = Abt, zbt = Ibt, Vbt = Rbt, Fbt = ppe, Wbt = "[object Boolean]", Qbt = "[object Date]", Hbt = "[object Map]", Gbt = "[object Number]", jbt = "[object RegExp]", Zbt = "[object Set]", Ubt = "[object String]", Xbt = "[object Symbol]", Ybt = "[object ArrayBuffer]", qbt = "[object DataView]", Kbt = "[object Float32Array]", Jbt = "[object Float64Array]", e_t = "[object Int8Array]", t_t = "[object Int16Array]", n_t = "[object Int32Array]", r_t = "[object Uint8Array]", i_t = "[object Uint8ClampedArray]", a_t = "[object Uint16Array]", o_t = "[object Uint32Array]";
- function s_t(t, e, n) {
- var r = t.constructor;
- switch (e) {
- case Ybt:
- return Nbt(t);
- case Wbt:
- case Qbt:
- return new r(+t);
- case qbt:
- return Bbt(t, n);
- case Kbt:
- case Jbt:
- case e_t:
- case t_t:
- case n_t:
- case r_t:
- case i_t:
- case a_t:
- case o_t:
- return Fbt(t, n);
- case Hbt:
- return new r();
- case Gbt:
- case Ubt:
- return new r(t);
- case jbt:
- return zbt(t);
- case Zbt:
- return new r();
- case Xbt:
- return Vbt(t);
- }
- }
- var l_t = s_t, u_t = el, Qq = Object.create, c_t = /* @__PURE__ */ function() {
- function t() {
- }
- return function(e) {
- if (!u_t(e))
- return {};
- if (Qq)
- return Qq(e);
- t.prototype = e;
- var n = new t();
- return t.prototype = void 0, n;
- };
- }(), f_t = c_t, d_t = f_t, h_t = U6, p_t = G6;
- function v_t(t) {
- return typeof t.constructor == "function" && !p_t(t) ? d_t(h_t(t)) : {};
- }
- var vpe = v_t, g_t = X6, m_t = Vf, y_t = "[object Map]";
- function b_t(t) {
- return m_t(t) && g_t(t) == y_t;
- }
- var __t = b_t, O_t = __t, S_t = Q6, Hq = H6, Gq = Hq && Hq.isMap, x_t = Gq ? S_t(Gq) : O_t, w_t = x_t, C_t = X6, T_t = Vf, P_t = "[object Set]";
- function $_t(t) {
- return T_t(t) && C_t(t) == P_t;
- }
- var A_t = $_t, E_t = A_t, M_t = Q6, jq = H6, Zq = jq && jq.isSet, I_t = Zq ? M_t(Zq) : E_t, D_t = I_t, R_t = qhe, k_t = smt, L_t = Jhe, N_t = U0t, B_t = fyt, z_t = spe, V_t = lpe, F_t = wyt, W_t = Nyt, Q_t = Gyt, H_t = Yyt, G_t = X6, j_t = Sbt, Z_t = l_t, U_t = vpe, X_t = n$, Y_t = W6, q_t = w_t, K_t = el, J_t = D_t, e1t = j6, t1t = P1, n1t = 1, r1t = 2, i1t = 4, gpe = "[object Arguments]", a1t = "[object Array]", o1t = "[object Boolean]", s1t = "[object Date]", l1t = "[object Error]", mpe = "[object Function]", u1t = "[object GeneratorFunction]", c1t = "[object Map]", f1t = "[object Number]", ype = "[object Object]", d1t = "[object RegExp]", h1t = "[object Set]", p1t = "[object String]", v1t = "[object Symbol]", g1t = "[object WeakMap]", m1t = "[object ArrayBuffer]", y1t = "[object DataView]", b1t = "[object Float32Array]", _1t = "[object Float64Array]", O1t = "[object Int8Array]", S1t = "[object Int16Array]", x1t = "[object Int32Array]", w1t = "[object Uint8Array]", C1t = "[object Uint8ClampedArray]", T1t = "[object Uint16Array]", P1t = "[object Uint32Array]", Un = {};
- Un[gpe] = Un[a1t] = Un[m1t] = Un[y1t] = Un[o1t] = Un[s1t] = Un[b1t] = Un[_1t] = Un[O1t] = Un[S1t] = Un[x1t] = Un[c1t] = Un[f1t] = Un[ype] = Un[d1t] = Un[h1t] = Un[p1t] = Un[v1t] = Un[w1t] = Un[C1t] = Un[T1t] = Un[P1t] = !0;
- Un[l1t] = Un[mpe] = Un[g1t] = !1;
- function Cw(t, e, n, r, i, a) {
- var o, s = e & n1t, l = e & r1t, u = e & i1t;
- if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
- return o;
- if (!K_t(t))
- return t;
- var c = X_t(t);
- if (c) {
- if (o = j_t(t), !s)
- return V_t(t, o);
- } else {
- var f = G_t(t), d = f == mpe || f == u1t;
- if (Y_t(t))
- return z_t(t, s);
- if (f == ype || f == gpe || d && !i) {
- if (o = l || d ? {} : U_t(t), !s)
- return l ? W_t(t, B_t(o, t)) : F_t(t, N_t(o, t));
- } else {
- if (!Un[f])
- return i ? t : {};
- o = Z_t(t, f, s);
- }
- }
- a || (a = new R_t());
- var h = a.get(t);
- if (h)
- return h;
- a.set(t, o), J_t(t) ? t.forEach(function(g) {
- o.add(Cw(g, e, n, g, t, a));
- }) : q_t(t) && t.forEach(function(g, m) {
- o.set(m, Cw(g, e, n, m, t, a));
- });
- var p = u ? l ? H_t : Q_t : l ? t1t : e1t, v = c ? void 0 : p(t);
- return k_t(v || t, function(g, m) {
- v && (m = g, g = t[m]), L_t(o, m, Cw(g, e, n, m, t, a));
- }), o;
- }
- var $1t = Cw, A1t = $1t, E1t = 1, M1t = 4;
- function I1t(t) {
- return A1t(t, E1t | M1t);
- }
- var D1t = I1t;
- const Uq = /* @__PURE__ */ g2(D1t);
- var R1t = Object.defineProperty, k1t = (t, e, n) => e in t ? R1t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Id = (t, e, n) => (k1t(t, typeof e != "symbol" ? e + "" : e, n), n);
- class L1t {
- constructor() {
- Id(this, "subscriptions", /* @__PURE__ */ new Map()), Id(this, "emitEffectCache", /* @__PURE__ */ new Map()), Id(this, "useSubscription", (e, n) => {
- const r = ee();
- Vt((i) => {
- var a, o;
- r.value = n;
- function s(u) {
- r.value && r.value(u);
- }
- const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
- l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
- this.subscriptions.delete(e);
- });
- });
- }), Id(this, "emit", (e, ...n) => {
- if (typeof e == "string" || typeof e == "number") {
- const r = this.subscriptions.get(e);
- r == null || r.forEach((i) => {
- i == null || i({
- params: Uq(n),
- event: e
- });
- }), this.emitEffectCache.set(e, {
- params: Uq(n),
- event: e
- });
- } else
- throw new TypeError("event must be string or number !");
- }), Id(this, "emitEffect", (e) => {
- const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
- n && (r == null || r.forEach((i) => {
- i == null || i({
- ...n
- });
- }));
- }), Id(this, "removeListener", (e) => {
- this.subscriptions.delete(e);
- }), Id(this, "clear", () => {
- this.subscriptions.clear();
- }), this.clear();
- }
- }
- new L1t();
- var N1t = { exports: {} };
- /*!
- * screenfull
- * v5.2.0 - 2021-11-03
- * (c) Sindre Sorhus; MIT License
- */
- (function(t) {
- (function() {
- var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
- for (var o, s = [
- [
- "requestFullscreen",
- "exitFullscreen",
- "fullscreenElement",
- "fullscreenEnabled",
- "fullscreenchange",
- "fullscreenerror"
- ],
- // New WebKit
- [
- "webkitRequestFullscreen",
- "webkitExitFullscreen",
- "webkitFullscreenElement",
- "webkitFullscreenEnabled",
- "webkitfullscreenchange",
- "webkitfullscreenerror"
- ],
- // Old WebKit
- [
- "webkitRequestFullScreen",
- "webkitCancelFullScreen",
- "webkitCurrentFullScreenElement",
- "webkitCancelFullScreen",
- "webkitfullscreenchange",
- "webkitfullscreenerror"
- ],
- [
- "mozRequestFullScreen",
- "mozCancelFullScreen",
- "mozFullScreenElement",
- "mozFullScreenEnabled",
- "mozfullscreenchange",
- "mozfullscreenerror"
- ],
- [
- "msRequestFullscreen",
- "msExitFullscreen",
- "msFullscreenElement",
- "msFullscreenEnabled",
- "MSFullscreenChange",
- "MSFullscreenError"
- ]
- ], l = 0, u = s.length, c = {}; l < u; l++)
- if (o = s[l], o && o[1] in e) {
- for (l = 0; l < o.length; l++)
- c[s[0][l]] = o[l];
- return c;
- }
- return !1;
- }(), i = {
- change: r.fullscreenchange,
- error: r.fullscreenerror
- }, a = {
- request: function(o, s) {
- return new Promise((function(l, u) {
- var c = (function() {
- this.off("change", c), l();
- }).bind(this);
- this.on("change", c), o = o || e.documentElement;
- var f = o[r.requestFullscreen](s);
- f instanceof Promise && f.then(c).catch(u);
- }).bind(this));
- },
- exit: function() {
- return new Promise((function(o, s) {
- if (!this.isFullscreen) {
- o();
- return;
- }
- var l = (function() {
- this.off("change", l), o();
- }).bind(this);
- this.on("change", l);
- var u = e[r.exitFullscreen]();
- u instanceof Promise && u.then(l).catch(s);
- }).bind(this));
- },
- toggle: function(o, s) {
- return this.isFullscreen ? this.exit() : this.request(o, s);
- },
- onchange: function(o) {
- this.on("change", o);
- },
- onerror: function(o) {
- this.on("error", o);
- },
- on: function(o, s) {
- var l = i[o];
- l && e.addEventListener(l, s, !1);
- },
- off: function(o, s) {
- var l = i[o];
- l && e.removeEventListener(l, s, !1);
- },
- raw: r
- };
- if (!r) {
- n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
- return;
- }
- Object.defineProperties(a, {
- isFullscreen: {
- get: function() {
- return !!e[r.fullscreenElement];
- }
- },
- element: {
- enumerable: !0,
- get: function() {
- return e[r.fullscreenElement];
- }
- },
- isEnabled: {
- enumerable: !0,
- get: function() {
- return !!e[r.fullscreenEnabled];
- }
- }
- }), n ? t.exports = a : window.screenfull = a;
- })();
- })(N1t);
- var B1t = "__lodash_hash_undefined__";
- function z1t(t) {
- return this.__data__.set(t, B1t), this;
- }
- var V1t = z1t;
- function F1t(t) {
- return this.__data__.has(t);
- }
- var W1t = F1t, Q1t = Yhe, H1t = V1t, G1t = W1t;
- function YL(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.__data__ = new Q1t(); ++e < n; )
- this.add(t[e]);
- }
- YL.prototype.add = YL.prototype.push = H1t;
- YL.prototype.has = G1t;
- var Xq = YP, Yq = Xq ? Xq.prototype : void 0;
- Yq && Yq.valueOf;
- var j1t = F6, Z1t = qP;
- function U1t(t, e, n) {
- (n !== void 0 && !Z1t(t[e], n) || n === void 0 && !(e in t)) && j1t(t, e, n);
- }
- var bpe = U1t;
- function X1t(t) {
- return function(e, n, r) {
- for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
- var l = o[t ? s : ++i];
- if (n(a[l], l, a) === !1)
- break;
- }
- return e;
- };
- }
- var Y1t = X1t, q1t = Y1t, K1t = q1t(), J1t = K1t, eOt = r$, tOt = Vf;
- function nOt(t) {
- return tOt(t) && eOt(t);
- }
- var rOt = nOt, iOt = km, aOt = U6, oOt = Vf, sOt = "[object Object]", lOt = Function.prototype, uOt = Object.prototype, _pe = lOt.toString, cOt = uOt.hasOwnProperty, fOt = _pe.call(Object);
- function dOt(t) {
- if (!oOt(t) || iOt(t) != sOt)
- return !1;
- var e = aOt(t);
- if (e === null)
- return !0;
- var n = cOt.call(e, "constructor") && e.constructor;
- return typeof n == "function" && n instanceof n && _pe.call(n) == fOt;
- }
- var hOt = dOt;
- function pOt(t, e) {
- if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
- return t[e];
- }
- var Ope = pOt, vOt = T1, gOt = P1;
- function mOt(t) {
- return vOt(t, gOt(t));
- }
- var yOt = mOt, qq = bpe, bOt = spe, _Ot = ppe, OOt = lpe, SOt = vpe, Kq = tpe, Jq = n$, xOt = rOt, wOt = W6, COt = z6, TOt = el, POt = hOt, $Ot = ipe, eK = Ope, AOt = yOt;
- function EOt(t, e, n, r, i, a, o) {
- var s = eK(t, n), l = eK(e, n), u = o.get(l);
- if (u) {
- qq(t, n, u);
- return;
- }
- var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
- if (f) {
- var d = Jq(l), h = !d && wOt(l), p = !d && !h && $Ot(l);
- c = l, d || h || p ? Jq(s) ? c = s : xOt(s) ? c = OOt(s) : h ? (f = !1, c = bOt(l, !0)) : p ? (f = !1, c = _Ot(l, !0)) : c = [] : POt(l) || Kq(l) ? (c = s, Kq(s) ? c = AOt(s) : (!TOt(s) || COt(s)) && (c = SOt(l))) : f = !1;
- }
- f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), qq(t, n, c);
- }
- var MOt = EOt, IOt = qhe, DOt = bpe, ROt = J1t, kOt = MOt, LOt = el, NOt = P1, BOt = Ope;
- function Spe(t, e, n, r, i) {
- t !== e && ROt(e, function(a, o) {
- if (i || (i = new IOt()), LOt(a))
- kOt(t, e, o, n, Spe, r, i);
- else {
- var s = r ? r(BOt(t, o), a, o + "", t, e, i) : void 0;
- s === void 0 && (s = a), DOt(t, o, s);
- }
- }, NOt);
- }
- var zOt = Spe;
- function VOt(t) {
- return t;
- }
- var xpe = VOt;
- function FOt(t, e, n) {
- switch (n.length) {
- case 0:
- return t.call(e);
- case 1:
- return t.call(e, n[0]);
- case 2:
- return t.call(e, n[0], n[1]);
- case 3:
- return t.call(e, n[0], n[1], n[2]);
- }
- return t.apply(e, n);
- }
- var WOt = FOt, QOt = WOt, tK = Math.max;
- function HOt(t, e, n) {
- return e = tK(e === void 0 ? t.length - 1 : e, 0), function() {
- for (var r = arguments, i = -1, a = tK(r.length - e, 0), o = Array(a); ++i < a; )
- o[i] = r[e + i];
- i = -1;
- for (var s = Array(e + 1); ++i < e; )
- s[i] = r[i];
- return s[e] = n(o), QOt(t, this, s);
- };
- }
- var GOt = HOt;
- function jOt(t) {
- return function() {
- return t;
- };
- }
- var ZOt = jOt, UOt = ZOt, nK = Khe, XOt = xpe, YOt = nK ? function(t, e) {
- return nK(t, "toString", {
- configurable: !0,
- enumerable: !1,
- value: UOt(e),
- writable: !0
- });
- } : XOt, qOt = YOt, KOt = 800, JOt = 16, eSt = Date.now;
- function tSt(t) {
- var e = 0, n = 0;
- return function() {
- var r = eSt(), i = JOt - (r - n);
- if (n = r, i > 0) {
- if (++e >= KOt)
- return arguments[0];
- } else
- e = 0;
- return t.apply(void 0, arguments);
- };
- }
- var nSt = tSt, rSt = qOt, iSt = nSt, aSt = iSt(rSt), oSt = aSt, sSt = xpe, lSt = GOt, uSt = oSt;
- function cSt(t, e) {
- return uSt(lSt(t, e, sSt), t + "");
- }
- var fSt = cSt, dSt = qP, hSt = r$, pSt = npe, vSt = el;
- function gSt(t, e, n) {
- if (!vSt(n))
- return !1;
- var r = typeof e;
- return (r == "number" ? hSt(n) && pSt(e, n.length) : r == "string" && e in n) ? dSt(n[e], t) : !1;
- }
- var mSt = gSt, ySt = fSt, bSt = mSt;
- function _St(t) {
- return ySt(function(e, n) {
- var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
- for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && bSt(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
- var s = n[r];
- s && t(e, s, r, a);
- }
- return e;
- });
- }
- var OSt = _St, SSt = zOt, xSt = OSt;
- xSt(function(t, e, n) {
- SSt(t, e, n);
- });
- const q6 = (t) => {
- var h, p, v;
- const e = t.dataSource || {}, n = ee(), r = ee(), i = ee((h = e == null ? void 0 : e.data) == null ? void 0 : h.series), a = V(() => async () => await fetch(t.dataSource.url, {
- method: t.dataSource.method
- }).then((g) => g.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = Dpt(a.value, {
- defaultParams: t.dataSource.params,
- manual: !0,
- cacheKey: t.dataSource.url,
- cacheTime: (((p = t.dataSource) == null ? void 0 : p.refreshTime) || 0) * 1e3,
- pollingInterval: (((v = t.dataSource) == null ? void 0 : v.refreshTime) || 0) * 1e3,
- // 刷新时间
- onError: (g) => {
- console.error(g), Wh.error(t.dataSource.url + "请求失败");
- }
- });
- t.dataSource.sourceType === kr.API && o(), me(
- () => u.value,
- async (g) => {
- if (g && t.dataSource.sourceType === kr.API) {
- let m = g;
- t.dataSource.dataProcess && (m = await jdt(t.dataSource.dataProcess, JSON.stringify(g))), n.value = m.xAxis || m.xData ? { data: m.xData } : n.value, r.value = m.yAxis || m.yData ? { data: m.yData } : r.value, i.value = m.series;
- }
- },
- {
- deep: !0
- }
- ), me(
- () => [
- t.dataSource.sourceType,
- t.dataSource.method,
- t.dataSource.data
- ],
- () => {
- if (t.dataSource.sourceType === kr.API && s(), t.dataSource.sourceType === kr.STATIC) {
- l();
- const g = t.dataSource || {}, { xData: m, yData: y, series: _ } = (g == null ? void 0 : g.data) || {};
- m && (n.value = { data: m }), y && (r.value = { data: y }), i.value = _;
- }
- if ([kr.BASIC_PATH, kr.VIEW_CODE].includes(t.dataSource.sourceType)) {
- const g = t.dataSource || {}, m = {
- viewCode: g.viewCode,
- basicPath: g.basicPath,
- items: "",
- filter: "",
- key: "",
- isOne: ""
- };
- window.mabp.$doLoadComponentData(m).then(function(y) {
- i.value = y.data;
- });
- }
- },
- {
- deep: !0
- }
- );
- const f = (g) => {
- var S, x, C, P;
- let m = 34, y = 20, _ = 30, O = 20;
- return !Array.isArray(g.title) && ((S = g.title) != null && S.show) && (O += 20), !Array.isArray(g.legend) && ((x = g.legend) != null && x.show) && (g.legend.left === "center" && g.legend.top !== "auto" && (O += 20), g.legend.left === "center" && g.legend.bottom !== "auto" && (m += 20), g.legend.top === "center" && g.legend.left !== "auto" && (_ += 70), g.legend.top === "center" && g.legend.right !== "auto" && (y += 50)), !Array.isArray(g.xAxis) && ((C = g.xAxis) != null && C.name) && (m += 20), !Array.isArray(g.yAxis) && ((P = g.yAxis) != null && P.name) && (_ += 20), {
- bottom: m,
- left: _,
- right: y,
- top: O
- };
- };
- return {
- options: V(() => {
- var _, O;
- const g = mte(t, [
- "width",
- "height",
- "dataSource"
- ]);
- !Array.isArray(g.title) && !((_ = g.title) != null && _.show) && !Array.isArray(g.legend) && g.legend && (g.legend.top = 12);
- const m = (g == null ? void 0 : g.label) || {}, y = pte(
- {
- xAxis: n.value,
- yAxis: r.value,
- series: (O = i.value) == null ? void 0 : O.map((S) => {
- const x = g.seriesExtend || {};
- return {
- ...m,
- ...S,
- ...x
- };
- }),
- grid: f(g)
- },
- g
- );
- return console.log("option result:", y), y;
- }),
- loading: c
- };
- }, wSt = ae({
- name: "DBasicLine",
- components: { Charts: D6 },
- props: L6,
- setup(t) {
- const { options: e, loading: n } = q6(t);
- return {
- options: e,
- loading: n
- };
- }
- });
- function CSt(t, e, n, r, i, a) {
- const o = br("Charts");
- return be(), Je(o, {
- width: t.width,
- height: t.height,
- "echarts-options": t.options,
- loading: t.loading
- }, null, 8, ["width", "height", "echarts-options", "loading"]);
- }
- const ng = /* @__PURE__ */ ui(wSt, [["render", CSt]]);
- class xn {
- /**
- Get the line description around the given position.
- */
- lineAt(e) {
- if (e < 0 || e > this.length)
- throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
- return this.lineInner(e, !1, 1, 0);
- }
- /**
- Get the description for the given (1-based) line number.
- */
- line(e) {
- if (e < 1 || e > this.lines)
- throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
- return this.lineInner(e, !0, 1, 0);
- }
- /**
- Replace a range of the text with the given content.
- */
- replace(e, n, r) {
- [e, n] = qg(this, e, n);
- let i = [];
- return this.decompose(
- 0,
- e,
- i,
- 2
- /* Open.To */
- ), r.length && r.decompose(
- 0,
- r.length,
- i,
- 3
- /* Open.To */
- ), this.decompose(
- n,
- this.length,
- i,
- 1
- /* Open.From */
- ), Cl.from(i, this.length - (n - e) + r.length);
- }
- /**
- Append another document to this one.
- */
- append(e) {
- return this.replace(this.length, this.length, e);
- }
- /**
- Retrieve the text between the given points.
- */
- slice(e, n = this.length) {
- [e, n] = qg(this, e, n);
- let r = [];
- return this.decompose(e, n, r, 0), Cl.from(r, n - e);
- }
- /**
- Test whether this text is equal to another instance.
- */
- eq(e) {
- if (e == this)
- return !0;
- if (e.length != this.length || e.lines != this.lines)
- return !1;
- let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new hb(this), a = new hb(e);
- for (let o = n, s = n; ; ) {
- if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
- return !1;
- if (s += i.value.length, i.done || s >= r)
- return !0;
- }
- }
- /**
- Iterate over the text. When `dir` is `-1`, iteration happens
- from end to start. This will return lines and the breaks between
- them as separate strings.
- */
- iter(e = 1) {
- return new hb(this, e);
- }
- /**
- Iterate over a range of the text. When `from` > `to`, the
- iterator will run in reverse.
- */
- iterRange(e, n = this.length) {
- return new wpe(this, e, n);
- }
- /**
- Return a cursor that iterates over the given range of lines,
- _without_ returning the line breaks between, and yielding empty
- strings for empty lines.
-
- When `from` and `to` are given, they should be 1-based line numbers.
- */
- iterLines(e, n) {
- let r;
- if (e == null)
- r = this.iter();
- else {
- n == null && (n = this.lines + 1);
- let i = this.line(e).from;
- r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
- }
- return new Cpe(r);
- }
- /**
- Return the document as a string, using newline characters to
- separate lines.
- */
- toString() {
- return this.sliceString(0);
- }
- /**
- Convert the document to an array of lines (which can be
- deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
- */
- toJSON() {
- let e = [];
- return this.flatten(e), e;
- }
- /**
- @internal
- */
- constructor() {
- }
- /**
- Create a `Text` instance for the given array of lines.
- */
- static of(e) {
- if (e.length == 0)
- throw new RangeError("A document must have at least one line");
- return e.length == 1 && !e[0] ? xn.empty : e.length <= 32 ? new $r(e) : Cl.from($r.split(e, []));
- }
- }
- class $r extends xn {
- constructor(e, n = TSt(e)) {
- super(), this.text = e, this.length = n;
- }
- get lines() {
- return this.text.length;
- }
- get children() {
- return null;
- }
- lineInner(e, n, r, i) {
- for (let a = 0; ; a++) {
- let o = this.text[a], s = i + o.length;
- if ((n ? r : s) >= e)
- return new PSt(i, s, r, o);
- i = s + 1, r++;
- }
- }
- decompose(e, n, r, i) {
- let a = e <= 0 && n >= this.length ? this : new $r(rK(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
- if (i & 1) {
- let o = r.pop(), s = Tw(a.text, o.text.slice(), 0, a.length);
- if (s.length <= 32)
- r.push(new $r(s, o.length + a.length));
- else {
- let l = s.length >> 1;
- r.push(new $r(s.slice(0, l)), new $r(s.slice(l)));
- }
- } else
- r.push(a);
- }
- replace(e, n, r) {
- if (!(r instanceof $r))
- return super.replace(e, n, r);
- [e, n] = qg(this, e, n);
- let i = Tw(this.text, Tw(r.text, rK(this.text, 0, e)), n), a = this.length + r.length - (n - e);
- return i.length <= 32 ? new $r(i, a) : Cl.from($r.split(i, []), a);
- }
- sliceString(e, n = this.length, r = `
- `) {
- [e, n] = qg(this, e, n);
- let i = "";
- for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
- let s = this.text[o], l = a + s.length;
- a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
- }
- return i;
- }
- flatten(e) {
- for (let n of this.text)
- e.push(n);
- }
- scanIdentical() {
- return 0;
- }
- static split(e, n) {
- let r = [], i = -1;
- for (let a of e)
- r.push(a), i += a.length + 1, r.length == 32 && (n.push(new $r(r, i)), r = [], i = -1);
- return i > -1 && n.push(new $r(r, i)), n;
- }
- }
- class Cl extends xn {
- constructor(e, n) {
- super(), this.children = e, this.length = n, this.lines = 0;
- for (let r of e)
- this.lines += r.lines;
- }
- lineInner(e, n, r, i) {
- for (let a = 0; ; a++) {
- let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
- if ((n ? l : s) >= e)
- return o.lineInner(e, n, r, i);
- i = s + 1, r = l + 1;
- }
- }
- decompose(e, n, r, i) {
- for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
- let s = this.children[a], l = o + s.length;
- if (e <= l && n >= o) {
- let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
- o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
- }
- o = l + 1;
- }
- }
- replace(e, n, r) {
- if ([e, n] = qg(this, e, n), r.lines < this.lines)
- for (let i = 0, a = 0; i < this.children.length; i++) {
- let o = this.children[i], s = a + o.length;
- if (e >= a && n <= s) {
- let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
- if (l.lines < u >> 4 && l.lines > u >> 6) {
- let c = this.children.slice();
- return c[i] = l, new Cl(c, this.length - (n - e) + r.length);
- }
- return super.replace(a, s, l);
- }
- a = s + 1;
- }
- return super.replace(e, n, r);
- }
- sliceString(e, n = this.length, r = `
- `) {
- [e, n] = qg(this, e, n);
- let i = "";
- for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
- let s = this.children[a], l = o + s.length;
- o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
- }
- return i;
- }
- flatten(e) {
- for (let n of this.children)
- n.flatten(e);
- }
- scanIdentical(e, n) {
- if (!(e instanceof Cl))
- return 0;
- let r = 0, [i, a, o, s] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
- for (; ; i += n, a += n) {
- if (i == o || a == s)
- return r;
- let l = this.children[i], u = e.children[a];
- if (l != u)
- return r + l.scanIdentical(u, n);
- r += l.length + 1;
- }
- }
- static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
- let r = 0;
- for (let h of e)
- r += h.lines;
- if (r < 32) {
- let h = [];
- for (let p of e)
- p.flatten(h);
- return new $r(h, n);
- }
- let i = Math.max(
- 32,
- r >> 5
- /* Tree.BranchShift */
- ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
- function f(h) {
- let p;
- if (h.lines > a && h instanceof Cl)
- for (let v of h.children)
- f(v);
- else h.lines > o && (l > o || !l) ? (d(), s.push(h)) : h instanceof $r && l && (p = c[c.length - 1]) instanceof $r && h.lines + p.lines <= 32 ? (l += h.lines, u += h.length + 1, c[c.length - 1] = new $r(p.text.concat(h.text), p.length + 1 + h.length)) : (l + h.lines > i && d(), l += h.lines, u += h.length + 1, c.push(h));
- }
- function d() {
- l != 0 && (s.push(c.length == 1 ? c[0] : Cl.from(c, u)), u = -1, l = c.length = 0);
- }
- for (let h of e)
- f(h);
- return d(), s.length == 1 ? s[0] : new Cl(s, n);
- }
- }
- xn.empty = /* @__PURE__ */ new $r([""], 0);
- function TSt(t) {
- let e = -1;
- for (let n of t)
- e += n.length + 1;
- return e;
- }
- function Tw(t, e, n = 0, r = 1e9) {
- for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
- let s = t[a], l = i + s.length;
- l >= n && (l > r && (s = s.slice(0, r - i)), i < n && (s = s.slice(n - i)), o ? (e[e.length - 1] += s, o = !1) : e.push(s)), i = l + 1;
- }
- return e;
- }
- function rK(t, e, n) {
- return Tw(t, [""], e, n);
- }
- class hb {
- constructor(e, n = 1) {
- this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof $r ? e.text.length : e.children.length) << 1];
- }
- nextInner(e, n) {
- for (this.done = this.lineBreak = !1; ; ) {
- let r = this.nodes.length - 1, i = this.nodes[r], a = this.offsets[r], o = a >> 1, s = i instanceof $r ? i.text.length : i.children.length;
- if (o == (n > 0 ? s : 0)) {
- if (r == 0)
- return this.done = !0, this.value = "", this;
- n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
- } else if ((a & 1) == (n > 0 ? 0 : 1)) {
- if (this.offsets[r] += n, e == 0)
- return this.lineBreak = !0, this.value = `
- `, this;
- e--;
- } else if (i instanceof $r) {
- let l = i.text[o + (n < 0 ? -1 : 0)];
- if (this.offsets[r] += n, l.length > Math.max(0, e))
- return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
- e -= l.length;
- } else {
- let l = i.children[o + (n < 0 ? -1 : 0)];
- e > l.length ? (e -= l.length, this.offsets[r] += n) : (n < 0 && this.offsets[r]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof $r ? l.text.length : l.children.length) << 1));
- }
- }
- }
- next(e = 0) {
- return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
- }
- }
- class wpe {
- constructor(e, n, r) {
- this.value = "", this.done = !1, this.cursor = new hb(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
- }
- nextInner(e, n) {
- if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
- return this.value = "", this.done = !0, this;
- e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
- let r = n < 0 ? this.pos - this.from : this.to - this.pos;
- e > r && (e = r), r -= e;
- let { value: i } = this.cursor.next(e);
- return this.pos += (i.length + e) * n, this.value = i.length <= r ? i : n < 0 ? i.slice(i.length - r) : i.slice(0, r), this.done = !this.value, this;
- }
- next(e = 0) {
- return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
- }
- get lineBreak() {
- return this.cursor.lineBreak && this.value != "";
- }
- }
- class Cpe {
- constructor(e) {
- this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
- }
- next(e = 0) {
- let { done: n, lineBreak: r, value: i } = this.inner.next(e);
- return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : r ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
- }
- get lineBreak() {
- return !1;
- }
- }
- typeof Symbol < "u" && (xn.prototype[Symbol.iterator] = function() {
- return this.iter();
- }, hb.prototype[Symbol.iterator] = wpe.prototype[Symbol.iterator] = Cpe.prototype[Symbol.iterator] = function() {
- return this;
- });
- class PSt {
- /**
- @internal
- */
- constructor(e, n, r, i) {
- this.from = e, this.to = n, this.number = r, this.text = i;
- }
- /**
- The length of the line (not including any line break after it).
- */
- get length() {
- return this.to - this.from;
- }
- }
- function qg(t, e, n) {
- return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
- }
- let rg = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1);
- for (let t = 1; t < rg.length; t++)
- rg[t] += rg[t - 1];
- function $St(t) {
- for (let e = 1; e < rg.length; e += 2)
- if (rg[e] > t)
- return rg[e - 1] <= t;
- return !1;
- }
- function iK(t) {
- return t >= 127462 && t <= 127487;
- }
- const aK = 8205;
- function wi(t, e, n = !0, r = !0) {
- return (n ? Tpe : ASt)(t, e, r);
- }
- function Tpe(t, e, n) {
- if (e == t.length)
- return e;
- e && Ppe(t.charCodeAt(e)) && $pe(t.charCodeAt(e - 1)) && e--;
- let r = bi(t, e);
- for (e += jo(r); e < t.length; ) {
- let i = bi(t, e);
- if (r == aK || i == aK || n && $St(i))
- e += jo(i), r = i;
- else if (iK(i)) {
- let a = 0, o = e - 2;
- for (; o >= 0 && iK(bi(t, o)); )
- a++, o -= 2;
- if (a % 2 == 0)
- break;
- e += 2;
- } else
- break;
- }
- return e;
- }
- function ASt(t, e, n) {
- for (; e > 0; ) {
- let r = Tpe(t, e - 2, n);
- if (r < e)
- return r;
- e--;
- }
- return 0;
- }
- function Ppe(t) {
- return t >= 56320 && t < 57344;
- }
- function $pe(t) {
- return t >= 55296 && t < 56320;
- }
- function bi(t, e) {
- let n = t.charCodeAt(e);
- if (!$pe(n) || e + 1 == t.length)
- return n;
- let r = t.charCodeAt(e + 1);
- return Ppe(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
- }
- function K6(t) {
- return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
- }
- function jo(t) {
- return t < 65536 ? 1 : 2;
- }
- const qL = /\r\n?|\n/;
- var Oi = /* @__PURE__ */ function(t) {
- return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
- }(Oi || (Oi = {}));
- class Bl {
- // Sections are encoded as pairs of integers. The first is the
- // length in the current document, and the second is -1 for
- // unaffected sections, and the length of the replacement content
- // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
- // 0), and a replacement two positive numbers.
- /**
- @internal
- */
- constructor(e) {
- this.sections = e;
- }
- /**
- The length of the document before the change.
- */
- get length() {
- let e = 0;
- for (let n = 0; n < this.sections.length; n += 2)
- e += this.sections[n];
- return e;
- }
- /**
- The length of the document after the change.
- */
- get newLength() {
- let e = 0;
- for (let n = 0; n < this.sections.length; n += 2) {
- let r = this.sections[n + 1];
- e += r < 0 ? this.sections[n] : r;
- }
- return e;
- }
- /**
- False when there are actual changes in this set.
- */
- get empty() {
- return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
- }
- /**
- Iterate over the unchanged parts left by these changes. `posA`
- provides the position of the range in the old document, `posB`
- the new position in the changed document.
- */
- iterGaps(e) {
- for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
- let a = this.sections[n++], o = this.sections[n++];
- o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
- }
- }
- /**
- Iterate over the ranges changed by these changes. (See
- [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
- variant that also provides you with the inserted text.)
- `fromA`/`toA` provides the extent of the change in the starting
- document, `fromB`/`toB` the extent of the replacement in the
- changed document.
-
- When `individual` is true, adjacent changes (which are kept
- separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
- reported separately.
- */
- iterChangedRanges(e, n = !1) {
- KL(this, e, n);
- }
- /**
- Get a description of the inverted form of these changes.
- */
- get invertedDesc() {
- let e = [];
- for (let n = 0; n < this.sections.length; ) {
- let r = this.sections[n++], i = this.sections[n++];
- i < 0 ? e.push(r, i) : e.push(i, r);
- }
- return new Bl(e);
- }
- /**
- Compute the combined effect of applying another set of changes
- after this one. The length of the document after this set should
- match the length before `other`.
- */
- composeDesc(e) {
- return this.empty ? e : e.empty ? this : Ape(this, e);
- }
- /**
- Map this description, which should start with the same document
- as `other`, over another set of changes, so that it can be
- applied after it. When `before` is true, map as if the changes
- in `other` happened before the ones in `this`.
- */
- mapDesc(e, n = !1) {
- return e.empty ? this : JL(this, e, n);
- }
- mapPos(e, n = -1, r = Oi.Simple) {
- let i = 0, a = 0;
- for (let o = 0; o < this.sections.length; ) {
- let s = this.sections[o++], l = this.sections[o++], u = i + s;
- if (l < 0) {
- if (u > e)
- return a + (e - i);
- a += s;
- } else {
- if (r != Oi.Simple && u >= e && (r == Oi.TrackDel && i < e && u > e || r == Oi.TrackBefore && i < e || r == Oi.TrackAfter && u > e))
- return null;
- if (u > e || u == e && n < 0 && !s)
- return e == i || n < 0 ? a : a + l;
- a += l;
- }
- i = u;
- }
- if (e > i)
- throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
- return a;
- }
- /**
- Check whether these changes touch a given range. When one of the
- changes entirely covers the range, the string `"cover"` is
- returned.
- */
- touchesRange(e, n = e) {
- for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
- let a = this.sections[r++], o = this.sections[r++], s = i + a;
- if (o >= 0 && i <= n && s >= e)
- return i < e && s > n ? "cover" : !0;
- i = s;
- }
- return !1;
- }
- /**
- @internal
- */
- toString() {
- let e = "";
- for (let n = 0; n < this.sections.length; ) {
- let r = this.sections[n++], i = this.sections[n++];
- e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
- }
- return e;
- }
- /**
- Serialize this change desc to a JSON-representable value.
- */
- toJSON() {
- return this.sections;
- }
- /**
- Create a change desc from its JSON representation (as produced
- by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
- */
- static fromJSON(e) {
- if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
- throw new RangeError("Invalid JSON representation of ChangeDesc");
- return new Bl(e);
- }
- /**
- @internal
- */
- static create(e) {
- return new Bl(e);
- }
- }
- class Zr extends Bl {
- constructor(e, n) {
- super(e), this.inserted = n;
- }
- /**
- Apply the changes to a document, returning the modified
- document.
- */
- apply(e) {
- if (this.length != e.length)
- throw new RangeError("Applying change set to a document with the wrong length");
- return KL(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
- }
- mapDesc(e, n = !1) {
- return JL(this, e, n, !0);
- }
- /**
- Given the document as it existed _before_ the changes, return a
- change set that represents the inverse of this set, which could
- be used to go from the document created by the changes back to
- the document as it existed before the changes.
- */
- invert(e) {
- let n = this.sections.slice(), r = [];
- for (let i = 0, a = 0; i < n.length; i += 2) {
- let o = n[i], s = n[i + 1];
- if (s >= 0) {
- n[i] = s, n[i + 1] = o;
- let l = i >> 1;
- for (; r.length < l; )
- r.push(xn.empty);
- r.push(o ? e.slice(a, a + o) : xn.empty);
- }
- a += o;
- }
- return new Zr(n, r);
- }
- /**
- Combine two subsequent change sets into a single set. `other`
- must start in the document produced by `this`. If `this` goes
- `docA` → `docB` and `other` represents `docB` → `docC`, the
- returned value will represent the change `docA` → `docC`.
- */
- compose(e) {
- return this.empty ? e : e.empty ? this : Ape(this, e, !0);
- }
- /**
- Given another change set starting in the same document, maps this
- change set over the other, producing a new change set that can be
- applied to the document produced by applying `other`. When
- `before` is `true`, order changes as if `this` comes before
- `other`, otherwise (the default) treat `other` as coming first.
-
- Given two changes `A` and `B`, `A.compose(B.map(A))` and
- `B.compose(A.map(B, true))` will produce the same document. This
- provides a basic form of [operational
- transformation](https://en.wikipedia.org/wiki/Operational_transformation),
- and can be used for collaborative editing.
- */
- map(e, n = !1) {
- return e.empty ? this : JL(this, e, n, !0);
- }
- /**
- Iterate over the changed ranges in the document, calling `f` for
- each, with the range in the original document (`fromA`-`toA`)
- and the range that replaces it in the new document
- (`fromB`-`toB`).
-
- When `individual` is true, adjacent changes are reported
- separately.
- */
- iterChanges(e, n = !1) {
- KL(this, e, n);
- }
- /**
- Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
- set.
- */
- get desc() {
- return Bl.create(this.sections);
- }
- /**
- @internal
- */
- filter(e) {
- let n = [], r = [], i = [], a = new v_(this);
- e: for (let o = 0, s = 0; ; ) {
- let l = o == e.length ? 1e9 : e[o++];
- for (; s < l || s == l && a.len == 0; ) {
- if (a.done)
- break e;
- let c = Math.min(a.len, l - s);
- Ni(i, c, -1);
- let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
- Ni(n, c, f), f > 0 && Xc(r, n, a.text), a.forward(c), s += c;
- }
- let u = e[o++];
- for (; s < u; ) {
- if (a.done)
- break e;
- let c = Math.min(a.len, u - s);
- Ni(n, c, -1), Ni(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
- }
- }
- return {
- changes: new Zr(n, r),
- filtered: Bl.create(i)
- };
- }
- /**
- Serialize this change set to a JSON-representable value.
- */
- toJSON() {
- let e = [];
- for (let n = 0; n < this.sections.length; n += 2) {
- let r = this.sections[n], i = this.sections[n + 1];
- i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
- }
- return e;
- }
- /**
- Create a change set for the given changes, for a document of the
- given length, using `lineSep` as line separator.
- */
- static of(e, n, r) {
- let i = [], a = [], o = 0, s = null;
- function l(c = !1) {
- if (!c && !i.length)
- return;
- o < n && Ni(i, n - o, -1);
- let f = new Zr(i, a);
- s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
- }
- function u(c) {
- if (Array.isArray(c))
- for (let f of c)
- u(f);
- else if (c instanceof Zr) {
- if (c.length != n)
- throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
- l(), s = s ? s.compose(c.map(s)) : c;
- } else {
- let { from: f, to: d = f, insert: h } = c;
- if (f > d || f < 0 || d > n)
- throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
- let p = h ? typeof h == "string" ? xn.of(h.split(r || qL)) : h : xn.empty, v = p.length;
- if (f == d && v == 0)
- return;
- f < o && l(), f > o && Ni(i, f - o, -1), Ni(i, d - f, v), Xc(a, i, p), o = d;
- }
- }
- return u(e), l(!s), s;
- }
- /**
- Create an empty changeset of the given length.
- */
- static empty(e) {
- return new Zr(e ? [e, -1] : [], []);
- }
- /**
- Create a changeset from its JSON representation (as produced by
- [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
- */
- static fromJSON(e) {
- if (!Array.isArray(e))
- throw new RangeError("Invalid JSON representation of ChangeSet");
- let n = [], r = [];
- for (let i = 0; i < e.length; i++) {
- let a = e[i];
- if (typeof a == "number")
- n.push(a, -1);
- else {
- if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
- throw new RangeError("Invalid JSON representation of ChangeSet");
- if (a.length == 1)
- n.push(a[0], 0);
- else {
- for (; r.length < i; )
- r.push(xn.empty);
- r[i] = xn.of(a.slice(1)), n.push(a[0], r[i].length);
- }
- }
- }
- return new Zr(n, r);
- }
- /**
- @internal
- */
- static createSet(e, n) {
- return new Zr(e, n);
- }
- }
- function Ni(t, e, n, r = !1) {
- if (e == 0 && n <= 0)
- return;
- let i = t.length - 2;
- i >= 0 && n <= 0 && n == t[i + 1] ? t[i] += e : e == 0 && t[i] == 0 ? t[i + 1] += n : r ? (t[i] += e, t[i + 1] += n) : t.push(e, n);
- }
- function Xc(t, e, n) {
- if (n.length == 0)
- return;
- let r = e.length - 2 >> 1;
- if (r < t.length)
- t[t.length - 1] = t[t.length - 1].append(n);
- else {
- for (; t.length < r; )
- t.push(xn.empty);
- t.push(n);
- }
- }
- function KL(t, e, n) {
- let r = t.inserted;
- for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
- let s = t.sections[o++], l = t.sections[o++];
- if (l < 0)
- i += s, a += s;
- else {
- let u = i, c = a, f = xn.empty;
- for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
- s = t.sections[o++], l = t.sections[o++];
- e(i, u, a, c, f), i = u, a = c;
- }
- }
- }
- function JL(t, e, n, r = !1) {
- let i = [], a = r ? [] : null, o = new v_(t), s = new v_(e);
- for (let l = -1; ; )
- if (o.ins == -1 && s.ins == -1) {
- let u = Math.min(o.len, s.len);
- Ni(i, u, -1), o.forward(u), s.forward(u);
- } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
- let u = s.len;
- for (Ni(i, s.ins, -1); u; ) {
- let c = Math.min(o.len, u);
- o.ins >= 0 && l < o.i && o.len <= c && (Ni(i, 0, o.ins), a && Xc(a, i, o.text), l = o.i), o.forward(c), u -= c;
- }
- s.next();
- } else if (o.ins >= 0) {
- let u = 0, c = o.len;
- for (; c; )
- if (s.ins == -1) {
- let f = Math.min(c, s.len);
- u += f, c -= f, s.forward(f);
- } else if (s.ins == 0 && s.len < c)
- c -= s.len, s.next();
- else
- break;
- Ni(i, u, l < o.i ? o.ins : 0), a && l < o.i && Xc(a, i, o.text), l = o.i, o.forward(o.len - c);
- } else {
- if (o.done && s.done)
- return a ? Zr.createSet(i, a) : Bl.create(i);
- throw new Error("Mismatched change set lengths");
- }
- }
- function Ape(t, e, n = !1) {
- let r = [], i = n ? [] : null, a = new v_(t), o = new v_(e);
- for (let s = !1; ; ) {
- if (a.done && o.done)
- return i ? Zr.createSet(r, i) : Bl.create(r);
- if (a.ins == 0)
- Ni(r, a.len, 0, s), a.next();
- else if (o.len == 0 && !o.done)
- Ni(r, 0, o.ins, s), i && Xc(i, r, o.text), o.next();
- else {
- if (a.done || o.done)
- throw new Error("Mismatched change set lengths");
- {
- let l = Math.min(a.len2, o.len), u = r.length;
- if (a.ins == -1) {
- let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
- Ni(r, l, c, s), i && c && Xc(i, r, o.text);
- } else o.ins == -1 ? (Ni(r, a.off ? 0 : a.len, l, s), i && Xc(i, r, a.textBit(l))) : (Ni(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Xc(i, r, o.text));
- s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
- }
- }
- }
- }
- class v_ {
- constructor(e) {
- this.set = e, this.i = 0, this.next();
- }
- next() {
- let { sections: e } = this.set;
- this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
- }
- get done() {
- return this.ins == -2;
- }
- get len2() {
- return this.ins < 0 ? this.len : this.ins;
- }
- get text() {
- let { inserted: e } = this.set, n = this.i - 2 >> 1;
- return n >= e.length ? xn.empty : e[n];
- }
- textBit(e) {
- let { inserted: n } = this.set, r = this.i - 2 >> 1;
- return r >= n.length && !e ? xn.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
- }
- forward(e) {
- e == this.len ? this.next() : (this.len -= e, this.off += e);
- }
- forward2(e) {
- this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
- }
- }
- class fh {
- constructor(e, n, r) {
- this.from = e, this.to = n, this.flags = r;
- }
- /**
- The anchor of the range—the side that doesn't move when you
- extend it.
- */
- get anchor() {
- return this.flags & 32 ? this.to : this.from;
- }
- /**
- The head of the range, which is moved when the range is
- [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
- */
- get head() {
- return this.flags & 32 ? this.from : this.to;
- }
- /**
- True when `anchor` and `head` are at the same position.
- */
- get empty() {
- return this.from == this.to;
- }
- /**
- If this is a cursor that is explicitly associated with the
- character on one of its sides, this returns the side. -1 means
- the character before its position, 1 the character after, and 0
- means no association.
- */
- get assoc() {
- return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
- }
- /**
- The bidirectional text level associated with this cursor, if
- any.
- */
- get bidiLevel() {
- let e = this.flags & 7;
- return e == 7 ? null : e;
- }
- /**
- The goal column (stored vertical offset) associated with a
- cursor. This is used to preserve the vertical position when
- [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
- lines of different length.
- */
- get goalColumn() {
- let e = this.flags >> 6;
- return e == 16777215 ? void 0 : e;
- }
- /**
- Map this range through a change, producing a valid range in the
- updated document.
- */
- map(e, n = -1) {
- let r, i;
- return this.empty ? r = i = e.mapPos(this.from, n) : (r = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), r == this.from && i == this.to ? this : new fh(r, i, this.flags);
- }
- /**
- Extend this range to cover at least `from` to `to`.
- */
- extend(e, n = e) {
- if (e <= this.anchor && n >= this.anchor)
- return De.range(e, n);
- let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
- return De.range(this.anchor, r);
- }
- /**
- Compare this range to another range.
- */
- eq(e, n = !1) {
- return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
- }
- /**
- Return a JSON-serializable object representing the range.
- */
- toJSON() {
- return { anchor: this.anchor, head: this.head };
- }
- /**
- Convert a JSON representation of a range to a `SelectionRange`
- instance.
- */
- static fromJSON(e) {
- if (!e || typeof e.anchor != "number" || typeof e.head != "number")
- throw new RangeError("Invalid JSON representation for SelectionRange");
- return De.range(e.anchor, e.head);
- }
- /**
- @internal
- */
- static create(e, n, r) {
- return new fh(e, n, r);
- }
- }
- class De {
- constructor(e, n) {
- this.ranges = e, this.mainIndex = n;
- }
- /**
- Map a selection through a change. Used to adjust the selection
- position for changes.
- */
- map(e, n = -1) {
- return e.empty ? this : De.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
- }
- /**
- Compare this selection to another selection. By default, ranges
- are compared only by position. When `includeAssoc` is true,
- cursor ranges must also have the same
- [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
- */
- eq(e, n = !1) {
- if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
- return !1;
- for (let r = 0; r < this.ranges.length; r++)
- if (!this.ranges[r].eq(e.ranges[r], n))
- return !1;
- return !0;
- }
- /**
- Get the primary selection range. Usually, you should make sure
- your code applies to _all_ ranges, by using methods like
- [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
- */
- get main() {
- return this.ranges[this.mainIndex];
- }
- /**
- Make sure the selection only has one range. Returns a selection
- holding only the main range from this selection.
- */
- asSingle() {
- return this.ranges.length == 1 ? this : new De([this.main], 0);
- }
- /**
- Extend this selection with an extra range.
- */
- addRange(e, n = !0) {
- return De.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
- }
- /**
- Replace a given range with another range, and then normalize the
- selection to merge and sort ranges if necessary.
- */
- replaceRange(e, n = this.mainIndex) {
- let r = this.ranges.slice();
- return r[n] = e, De.create(r, this.mainIndex);
- }
- /**
- Convert this selection to an object that can be serialized to
- JSON.
- */
- toJSON() {
- return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
- }
- /**
- Create a selection from a JSON representation.
- */
- static fromJSON(e) {
- if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
- throw new RangeError("Invalid JSON representation for EditorSelection");
- return new De(e.ranges.map((n) => fh.fromJSON(n)), e.main);
- }
- /**
- Create a selection holding a single range.
- */
- static single(e, n = e) {
- return new De([De.range(e, n)], 0);
- }
- /**
- Sort and merge the given set of ranges, creating a valid
- selection.
- */
- static create(e, n = 0) {
- if (e.length == 0)
- throw new RangeError("A selection needs at least one range");
- for (let r = 0, i = 0; i < e.length; i++) {
- let a = e[i];
- if (a.empty ? a.from <= r : a.from < r)
- return De.normalized(e.slice(), n);
- r = a.to;
- }
- return new De(e, n);
- }
- /**
- Create a cursor selection range at the given position. You can
- safely ignore the optional arguments in most situations.
- */
- static cursor(e, n = 0, r, i) {
- return fh.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
- }
- /**
- Create a selection range.
- */
- static range(e, n, r, i) {
- let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
- return n < e ? fh.create(n, e, 48 | a) : fh.create(e, n, (n > e ? 8 : 0) | a);
- }
- /**
- @internal
- */
- static normalized(e, n = 0) {
- let r = e[n];
- e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
- for (let i = 1; i < e.length; i++) {
- let a = e[i], o = e[i - 1];
- if (a.empty ? a.from <= o.to : a.from < o.to) {
- let s = o.from, l = Math.max(a.to, o.to);
- i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? De.range(l, s) : De.range(s, l));
- }
- }
- return new De(e, n);
- }
- }
- function Epe(t, e) {
- for (let n of t.ranges)
- if (n.to > e)
- throw new RangeError("Selection points outside of document");
- }
- let J6 = 0;
- class ut {
- constructor(e, n, r, i, a) {
- this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = J6++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
- }
- /**
- Returns a facet reader for this facet, which can be used to
- [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
- */
- get reader() {
- return this;
- }
- /**
- Define a new facet.
- */
- static define(e = {}) {
- return new ut(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : eB), !!e.static, e.enables);
- }
- /**
- Returns an extension that adds the given value to this facet.
- */
- of(e) {
- return new Pw([], this, 0, e);
- }
- /**
- Create an extension that computes a value for the facet from a
- state. You must take care to declare the parts of the state that
- this value depends on, since your function is only called again
- for a new state when one of those parts changed.
-
- In cases where your value depends only on a single field, you'll
- want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
- */
- compute(e, n) {
- if (this.isStatic)
- throw new Error("Can't compute a static facet");
- return new Pw(e, this, 1, n);
- }
- /**
- Create an extension that computes zero or more values for this
- facet from a state.
- */
- computeN(e, n) {
- if (this.isStatic)
- throw new Error("Can't compute a static facet");
- return new Pw(e, this, 2, n);
- }
- from(e, n) {
- return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
- }
- }
- function eB(t, e) {
- return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
- }
- class Pw {
- constructor(e, n, r, i) {
- this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = J6++;
- }
- dynamicSlot(e) {
- var n;
- let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
- for (let f of this.dependencies)
- f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
- return {
- create(f) {
- return f.values[o] = r(f), 1;
- },
- update(f, d) {
- if (l && d.docChanged || u && (d.docChanged || d.selection) || e4(f, c)) {
- let h = r(f);
- if (s ? !oK(h, f.values[o], i) : !i(h, f.values[o]))
- return f.values[o] = h, 1;
- }
- return 0;
- },
- reconfigure: (f, d) => {
- let h, p = d.config.address[a];
- if (p != null) {
- let v = PT(d, p);
- if (this.dependencies.every((g) => g instanceof ut ? d.facet(g) === f.facet(g) : g instanceof fi ? d.field(g, !1) == f.field(g, !1) : !0) || (s ? oK(h = r(f), v, i) : i(h = r(f), v)))
- return f.values[o] = v, 0;
- } else
- h = r(f);
- return f.values[o] = h, 1;
- }
- };
- }
- }
- function oK(t, e, n) {
- if (t.length != e.length)
- return !1;
- for (let r = 0; r < t.length; r++)
- if (!n(t[r], e[r]))
- return !1;
- return !0;
- }
- function e4(t, e) {
- let n = !1;
- for (let r of e)
- pb(t, r) & 1 && (n = !0);
- return n;
- }
- function ESt(t, e, n) {
- let r = n.map((l) => t[l.id]), i = n.map((l) => l.type), a = r.filter((l) => !(l & 1)), o = t[e.id] >> 1;
- function s(l) {
- let u = [];
- for (let c = 0; c < r.length; c++) {
- let f = PT(l, r[c]);
- if (i[c] == 2)
- for (let d of f)
- u.push(d);
- else
- u.push(f);
- }
- return e.combine(u);
- }
- return {
- create(l) {
- for (let u of r)
- pb(l, u);
- return l.values[o] = s(l), 1;
- },
- update(l, u) {
- if (!e4(l, a))
- return 0;
- let c = s(l);
- return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
- },
- reconfigure(l, u) {
- let c = e4(l, r), f = u.config.facets[e.id], d = u.facet(e);
- if (f && !c && eB(n, f))
- return l.values[o] = d, 0;
- let h = s(l);
- return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
- }
- };
- }
- const sK = /* @__PURE__ */ ut.define({ static: !0 });
- class fi {
- constructor(e, n, r, i, a) {
- this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
- }
- /**
- Define a state field.
- */
- static define(e) {
- let n = new fi(J6++, e.create, e.update, e.compare || ((r, i) => r === i), e);
- return e.provide && (n.provides = e.provide(n)), n;
- }
- create(e) {
- let n = e.facet(sK).find((r) => r.field == this);
- return ((n == null ? void 0 : n.create) || this.createF)(e);
- }
- /**
- @internal
- */
- slot(e) {
- let n = e[this.id] >> 1;
- return {
- create: (r) => (r.values[n] = this.create(r), 1),
- update: (r, i) => {
- let a = r.values[n], o = this.updateF(a, i);
- return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
- },
- reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
- };
- }
- /**
- Returns an extension that enables this field and overrides the
- way it is initialized. Can be useful when you need to provide a
- non-default starting value for the field.
- */
- init(e) {
- return [this, sK.of({ field: this, create: e })];
- }
- /**
- State field instances can be used as
- [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
- given state.
- */
- get extension() {
- return this;
- }
- }
- const Yd = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
- function ey(t) {
- return (e) => new Mpe(e, t);
- }
- const Ff = {
- /**
- The highest precedence level, for extensions that should end up
- near the start of the precedence ordering.
- */
- highest: /* @__PURE__ */ ey(Yd.highest),
- /**
- A higher-than-default precedence, for extensions that should
- come before those with default precedence.
- */
- high: /* @__PURE__ */ ey(Yd.high),
- /**
- The default precedence, which is also used for extensions
- without an explicit precedence.
- */
- default: /* @__PURE__ */ ey(Yd.default),
- /**
- A lower-than-default precedence.
- */
- low: /* @__PURE__ */ ey(Yd.low),
- /**
- The lowest precedence level. Meant for things that should end up
- near the end of the extension order.
- */
- lowest: /* @__PURE__ */ ey(Yd.lowest)
- };
- class Mpe {
- constructor(e, n) {
- this.inner = e, this.prec = n;
- }
- }
- class $1 {
- /**
- Create an instance of this compartment to add to your [state
- configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
- */
- of(e) {
- return new t4(this, e);
- }
- /**
- Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
- reconfigures this compartment.
- */
- reconfigure(e) {
- return $1.reconfigure.of({ compartment: this, extension: e });
- }
- /**
- Get the current content of the compartment in the state, or
- `undefined` if it isn't present.
- */
- get(e) {
- return e.config.compartments.get(this);
- }
- }
- class t4 {
- constructor(e, n) {
- this.compartment = e, this.inner = n;
- }
- }
- class TT {
- constructor(e, n, r, i, a, o) {
- for (this.base = e, this.compartments = n, this.dynamicSlots = r, this.address = i, this.staticValues = a, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < r.length; )
- this.statusTemplate.push(
- 0
- /* SlotStatus.Unresolved */
- );
- }
- staticFacet(e) {
- let n = this.address[e.id];
- return n == null ? e.default : this.staticValues[n >> 1];
- }
- static resolve(e, n, r) {
- let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
- for (let d of MSt(e, n, o))
- d instanceof fi ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
- let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
- for (let d of i)
- s[d.id] = u.length << 1, u.push((h) => d.slot(h));
- let c = r == null ? void 0 : r.config.facets;
- for (let d in a) {
- let h = a[d], p = h[0].facet, v = c && c[d] || [];
- if (h.every(
- (g) => g.type == 0
- /* Provider.Static */
- ))
- if (s[p.id] = l.length << 1 | 1, eB(v, h))
- l.push(r.facet(p));
- else {
- let g = p.combine(h.map((m) => m.value));
- l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
- }
- else {
- for (let g of h)
- g.type == 0 ? (s[g.id] = l.length << 1 | 1, l.push(g.value)) : (s[g.id] = u.length << 1, u.push((m) => g.dynamicSlot(m)));
- s[p.id] = u.length << 1, u.push((g) => ESt(g, p, h));
- }
- }
- let f = u.map((d) => d(s));
- return new TT(e, o, f, s, l, a);
- }
- }
- function MSt(t, e, n) {
- let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
- function a(o, s) {
- let l = i.get(o);
- if (l != null) {
- if (l <= s)
- return;
- let u = r[l].indexOf(o);
- u > -1 && r[l].splice(u, 1), o instanceof t4 && n.delete(o.compartment);
- }
- if (i.set(o, s), Array.isArray(o))
- for (let u of o)
- a(u, s);
- else if (o instanceof t4) {
- if (n.has(o.compartment))
- throw new RangeError("Duplicate use of compartment in extensions");
- let u = e.get(o.compartment) || o.inner;
- n.set(o.compartment, u), a(u, s);
- } else if (o instanceof Mpe)
- a(o.inner, o.prec);
- else if (o instanceof fi)
- r[s].push(o), o.provides && a(o.provides, s);
- else if (o instanceof Pw)
- r[s].push(o), o.facet.extensions && a(o.facet.extensions, Yd.default);
- else {
- let u = o.extension;
- if (!u)
- throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
- a(u, s);
- }
- }
- return a(t, Yd.default), r.reduce((o, s) => o.concat(s));
- }
- function pb(t, e) {
- if (e & 1)
- return 2;
- let n = e >> 1, r = t.status[n];
- if (r == 4)
- throw new Error("Cyclic dependency between fields and/or facets");
- if (r & 2)
- return r;
- t.status[n] = 4;
- let i = t.computeSlot(t, t.config.dynamicSlots[n]);
- return t.status[n] = 2 | i;
- }
- function PT(t, e) {
- return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
- }
- const Ipe = /* @__PURE__ */ ut.define(), n4 = /* @__PURE__ */ ut.define({
- combine: (t) => t.some((e) => e),
- static: !0
- }), Dpe = /* @__PURE__ */ ut.define({
- combine: (t) => t.length ? t[0] : void 0,
- static: !0
- }), Rpe = /* @__PURE__ */ ut.define(), kpe = /* @__PURE__ */ ut.define(), Lpe = /* @__PURE__ */ ut.define(), Npe = /* @__PURE__ */ ut.define({
- combine: (t) => t.length ? t[0] : !1
- });
- class ac {
- /**
- @internal
- */
- constructor(e, n) {
- this.type = e, this.value = n;
- }
- /**
- Define a new type of annotation.
- */
- static define() {
- return new ISt();
- }
- }
- class ISt {
- /**
- Create an instance of this annotation.
- */
- of(e) {
- return new ac(this, e);
- }
- }
- class DSt {
- /**
- @internal
- */
- constructor(e) {
- this.map = e;
- }
- /**
- Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
- type.
- */
- of(e) {
- return new zt(this, e);
- }
- }
- class zt {
- /**
- @internal
- */
- constructor(e, n) {
- this.type = e, this.value = n;
- }
- /**
- Map this effect through a position mapping. Will return
- `undefined` when that ends up deleting the effect.
- */
- map(e) {
- let n = this.type.map(this.value, e);
- return n === void 0 ? void 0 : n == this.value ? this : new zt(this.type, n);
- }
- /**
- Tells you whether this effect object is of a given
- [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
- */
- is(e) {
- return this.type == e;
- }
- /**
- Define a new effect type. The type parameter indicates the type
- of values that his effect holds. It should be a type that
- doesn't include `undefined`, since that is used in
- [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
- removed.
- */
- static define(e = {}) {
- return new DSt(e.map || ((n) => n));
- }
- /**
- Map an array of effects through a change set.
- */
- static mapEffects(e, n) {
- if (!e.length)
- return e;
- let r = [];
- for (let i of e) {
- let a = i.map(n);
- a && r.push(a);
- }
- return r;
- }
- }
- zt.reconfigure = /* @__PURE__ */ zt.define();
- zt.appendConfig = /* @__PURE__ */ zt.define();
- class zr {
- constructor(e, n, r, i, a, o) {
- this.startState = e, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r && Epe(r, n.newLength), a.some((s) => s.type == zr.time) || (this.annotations = a.concat(zr.time.of(Date.now())));
- }
- /**
- @internal
- */
- static create(e, n, r, i, a, o) {
- return new zr(e, n, r, i, a, o);
- }
- /**
- The new document produced by the transaction. Contrary to
- [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
- force the entire new state to be computed right away, so it is
- recommended that [transaction
- filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
- when they need to look at the new document.
- */
- get newDoc() {
- return this._doc || (this._doc = this.changes.apply(this.startState.doc));
- }
- /**
- The new selection produced by the transaction. If
- [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
- this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
- current selection through the changes made by the transaction.
- */
- get newSelection() {
- return this.selection || this.startState.selection.map(this.changes);
- }
- /**
- The new state created by the transaction. Computed on demand
- (but retained for subsequent access), so it is recommended not to
- access it in [transaction
- filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
- */
- get state() {
- return this._state || this.startState.applyTransaction(this), this._state;
- }
- /**
- Get the value of the given annotation type, if any.
- */
- annotation(e) {
- for (let n of this.annotations)
- if (n.type == e)
- return n.value;
- }
- /**
- Indicates whether the transaction changed the document.
- */
- get docChanged() {
- return !this.changes.empty;
- }
- /**
- Indicates whether this transaction reconfigures the state
- (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
- with a top-level configuration
- [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
- */
- get reconfigured() {
- return this.startState.config != this.state.config;
- }
- /**
- Returns true if the transaction has a [user
- event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
- or more specific than `event`. For example, if the transaction
- has `"select.pointer"` as user event, `"select"` and
- `"select.pointer"` will match it.
- */
- isUserEvent(e) {
- let n = this.annotation(zr.userEvent);
- return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
- }
- }
- zr.time = /* @__PURE__ */ ac.define();
- zr.userEvent = /* @__PURE__ */ ac.define();
- zr.addToHistory = /* @__PURE__ */ ac.define();
- zr.remote = /* @__PURE__ */ ac.define();
- function RSt(t, e) {
- let n = [];
- for (let r = 0, i = 0; ; ) {
- let a, o;
- if (r < t.length && (i == e.length || e[i] >= t[r]))
- a = t[r++], o = t[r++];
- else if (i < e.length)
- a = e[i++], o = e[i++];
- else
- return n;
- !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
- }
- }
- function Bpe(t, e, n) {
- var r;
- let i, a, o;
- return n ? (i = e.changes, a = Zr.empty(e.changes.length), o = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), a = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(i)), {
- changes: o,
- selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
- effects: zt.mapEffects(t.effects, i).concat(zt.mapEffects(e.effects, a)),
- annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
- scrollIntoView: t.scrollIntoView || e.scrollIntoView
- };
- }
- function r4(t, e, n) {
- let r = e.selection, i = ig(e.annotations);
- return e.userEvent && (i = i.concat(zr.userEvent.of(e.userEvent))), {
- changes: e.changes instanceof Zr ? e.changes : Zr.of(e.changes || [], n, t.facet(Dpe)),
- selection: r && (r instanceof De ? r : De.single(r.anchor, r.head)),
- effects: ig(e.effects),
- annotations: i,
- scrollIntoView: !!e.scrollIntoView
- };
- }
- function zpe(t, e, n) {
- let r = r4(t, e.length ? e[0] : {}, t.doc.length);
- e.length && e[0].filter === !1 && (n = !1);
- for (let a = 1; a < e.length; a++) {
- e[a].filter === !1 && (n = !1);
- let o = !!e[a].sequential;
- r = Bpe(r, r4(t, e[a], o ? r.changes.newLength : t.doc.length), o);
- }
- let i = zr.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
- return LSt(n ? kSt(i) : i);
- }
- function kSt(t) {
- let e = t.startState, n = !0;
- for (let i of e.facet(Rpe)) {
- let a = i(t);
- if (a === !1) {
- n = !1;
- break;
- }
- Array.isArray(a) && (n = n === !0 ? a : RSt(n, a));
- }
- if (n !== !0) {
- let i, a;
- if (n === !1)
- a = t.changes.invertedDesc, i = Zr.empty(e.doc.length);
- else {
- let o = t.changes.filter(n);
- i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
- }
- t = zr.create(e, i, t.selection && t.selection.map(a), zt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
- }
- let r = e.facet(kpe);
- for (let i = r.length - 1; i >= 0; i--) {
- let a = r[i](t);
- a instanceof zr ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof zr ? t = a[0] : t = zpe(e, ig(a), !1);
- }
- return t;
- }
- function LSt(t) {
- let e = t.startState, n = e.facet(Lpe), r = t;
- for (let i = n.length - 1; i >= 0; i--) {
- let a = n[i](t);
- a && Object.keys(a).length && (r = Bpe(r, r4(e, a, t.changes.newLength), !0));
- }
- return r == t ? t : zr.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
- }
- const NSt = [];
- function ig(t) {
- return t == null ? NSt : Array.isArray(t) ? t : [t];
- }
- var lr = /* @__PURE__ */ function(t) {
- return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
- }(lr || (lr = {}));
- const BSt = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
- let i4;
- try {
- i4 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
- } catch {
- }
- function zSt(t) {
- if (i4)
- return i4.test(t);
- for (let e = 0; e < t.length; e++) {
- let n = t[e];
- if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || BSt.test(n)))
- return !0;
- }
- return !1;
- }
- function VSt(t) {
- return (e) => {
- if (!/\S/.test(e))
- return lr.Space;
- if (zSt(e))
- return lr.Word;
- for (let n = 0; n < t.length; n++)
- if (e.indexOf(t[n]) > -1)
- return lr.Word;
- return lr.Other;
- };
- }
- class cn {
- constructor(e, n, r, i, a, o) {
- this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
- for (let s = 0; s < this.config.dynamicSlots.length; s++)
- pb(this, s << 1);
- this.computeSlot = null;
- }
- field(e, n = !0) {
- let r = this.config.address[e.id];
- if (r == null) {
- if (n)
- throw new RangeError("Field is not present in this state");
- return;
- }
- return pb(this, r), PT(this, r);
- }
- /**
- Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
- state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
- can be passed. Unless
- [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
- [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
- are assumed to start in the _current_ document (not the document
- produced by previous specs), and its
- [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
- [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
- to the document created by its _own_ changes. The resulting
- transaction contains the combined effect of all the different
- specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
- specs take precedence over earlier ones.
- */
- update(...e) {
- return zpe(this, e, !0);
- }
- /**
- @internal
- */
- applyTransaction(e) {
- let n = this.config, { base: r, compartments: i } = n;
- for (let s of e.effects)
- s.is($1.reconfigure) ? (n && (i = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => i.set(u, l)), n = null), i.set(s.value.compartment, s.value.extension)) : s.is(zt.reconfigure) ? (n = null, r = s.value) : s.is(zt.appendConfig) && (n = null, r = ig(r).concat(s.value));
- let a;
- n ? a = e.startState.values.slice() : (n = TT.resolve(r, i, this), a = new cn(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
- let o = e.startState.facet(n4) ? e.newSelection : e.newSelection.asSingle();
- new cn(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
- }
- /**
- Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
- replaces every selection range with the given content.
- */
- replaceSelection(e) {
- return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
- changes: { from: n.from, to: n.to, insert: e },
- range: De.cursor(n.from + e.length)
- }));
- }
- /**
- Create a set of changes and a new selection by running the given
- function for each range in the active selection. The function
- can return an optional set of changes (in the coordinate space
- of the start document), plus an updated range (in the coordinate
- space of the document produced by the call's own changes). This
- method will merge all the changes and ranges into a single
- changeset and selection, and return it as a [transaction
- spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
- [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
- */
- changeByRange(e) {
- let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = ig(r.effects);
- for (let s = 1; s < n.ranges.length; s++) {
- let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
- for (let d = 0; d < s; d++)
- a[d] = a[d].map(c);
- let f = i.mapDesc(u, !0);
- a.push(l.range.map(f)), i = i.compose(c), o = zt.mapEffects(o, c).concat(zt.mapEffects(ig(l.effects), f));
- }
- return {
- changes: i,
- selection: De.create(a, n.mainIndex),
- effects: o
- };
- }
- /**
- Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
- description, taking the state's document length and line
- separator into account.
- */
- changes(e = []) {
- return e instanceof Zr ? e : Zr.of(e, this.doc.length, this.facet(cn.lineSeparator));
- }
- /**
- Using the state's [line
- separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
- [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
- */
- toText(e) {
- return xn.of(e.split(this.facet(cn.lineSeparator) || qL));
- }
- /**
- Return the given range of the document as a string.
- */
- sliceDoc(e = 0, n = this.doc.length) {
- return this.doc.sliceString(e, n, this.lineBreak);
- }
- /**
- Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
- */
- facet(e) {
- let n = this.config.address[e.id];
- return n == null ? e.default : (pb(this, n), PT(this, n));
- }
- /**
- Convert this state to a JSON-serializable object. When custom
- fields should be serialized, you can pass them in as an object
- mapping property names (in the resulting object, which should
- not use `doc` or `selection`) to fields.
- */
- toJSON(e) {
- let n = {
- doc: this.sliceDoc(),
- selection: this.selection.toJSON()
- };
- if (e)
- for (let r in e) {
- let i = e[r];
- i instanceof fi && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
- }
- return n;
- }
- /**
- Deserialize a state from its JSON representation. When custom
- fields should be deserialized, pass the same object you passed
- to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
- third argument.
- */
- static fromJSON(e, n = {}, r) {
- if (!e || typeof e.doc != "string")
- throw new RangeError("Invalid JSON representation for EditorState");
- let i = [];
- if (r) {
- for (let a in r)
- if (Object.prototype.hasOwnProperty.call(e, a)) {
- let o = r[a], s = e[a];
- i.push(o.init((l) => o.spec.fromJSON(s, l)));
- }
- }
- return cn.create({
- doc: e.doc,
- selection: De.fromJSON(e.selection),
- extensions: n.extensions ? i.concat([n.extensions]) : i
- });
- }
- /**
- Create a new state. You'll usually only need this when
- initializing an editor—updated states are created by applying
- transactions.
- */
- static create(e = {}) {
- let n = TT.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof xn ? e.doc : xn.of((e.doc || "").split(n.staticFacet(cn.lineSeparator) || qL)), i = e.selection ? e.selection instanceof De ? e.selection : De.single(e.selection.anchor, e.selection.head) : De.single(0);
- return Epe(i, r.length), n.staticFacet(n4) || (i = i.asSingle()), new cn(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
- }
- /**
- The size (in columns) of a tab in the document, determined by
- the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
- */
- get tabSize() {
- return this.facet(cn.tabSize);
- }
- /**
- Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
- string for this state.
- */
- get lineBreak() {
- return this.facet(cn.lineSeparator) || `
- `;
- }
- /**
- Returns true when the editor is
- [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
- */
- get readOnly() {
- return this.facet(Npe);
- }
- /**
- Look up a translation for the given phrase (via the
- [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
- original string if no translation is found.
-
- If additional arguments are passed, they will be inserted in
- place of markers like `$1` (for the first value) and `$2`, etc.
- A single `$` is equivalent to `$1`, and `$$` will produce a
- literal dollar sign.
- */
- phrase(e, ...n) {
- for (let r of this.facet(cn.phrases))
- if (Object.prototype.hasOwnProperty.call(r, e)) {
- e = r[e];
- break;
- }
- return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
- if (i == "$")
- return "$";
- let a = +(i || 1);
- return !a || a > n.length ? r : n[a - 1];
- })), e;
- }
- /**
- Find the values for a given language data field, provided by the
- the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
-
- Examples of language data fields are...
-
- - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
- comment syntax.
- - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
- for providing language-specific completion sources.
- - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
- characters that should be considered part of words in this
- language.
- - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
- bracket closing behavior.
- */
- languageDataAt(e, n, r = -1) {
- let i = [];
- for (let a of this.facet(Ipe))
- for (let o of a(this, n, r))
- Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
- return i;
- }
- /**
- Return a function that can categorize strings (expected to
- represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
- into one of:
-
- - Word (contains an alphanumeric character or a character
- explicitly listed in the local language's `"wordChars"`
- language data, which should be a string)
- - Space (contains only whitespace)
- - Other (anything else)
- */
- charCategorizer(e) {
- return VSt(this.languageDataAt("wordChars", e).join(""));
- }
- /**
- Find the word at the given position, meaning the range
- containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
- around it. If no word characters are adjacent to the position,
- this returns null.
- */
- wordAt(e) {
- let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
- for (; o > 0; ) {
- let l = wi(n, o, !1);
- if (a(n.slice(l, o)) != lr.Word)
- break;
- o = l;
- }
- for (; s < i; ) {
- let l = wi(n, s);
- if (a(n.slice(s, l)) != lr.Word)
- break;
- s = l;
- }
- return o == s ? null : De.range(o + r, s + r);
- }
- }
- cn.allowMultipleSelections = n4;
- cn.tabSize = /* @__PURE__ */ ut.define({
- combine: (t) => t.length ? t[0] : 4
- });
- cn.lineSeparator = Dpe;
- cn.readOnly = Npe;
- cn.phrases = /* @__PURE__ */ ut.define({
- compare(t, e) {
- let n = Object.keys(t), r = Object.keys(e);
- return n.length == r.length && n.every((i) => t[i] == e[i]);
- }
- });
- cn.languageData = Ipe;
- cn.changeFilter = Rpe;
- cn.transactionFilter = kpe;
- cn.transactionExtender = Lpe;
- $1.reconfigure = /* @__PURE__ */ zt.define();
- function Kl(t, e, n = {}) {
- let r = {};
- for (let i of t)
- for (let a of Object.keys(i)) {
- let o = i[a], s = r[a];
- if (s === void 0)
- r[a] = o;
- else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
- r[a] = n[a](s, o);
- else
- throw new Error("Config merge conflict for field " + a);
- }
- for (let i in e)
- r[i] === void 0 && (r[i] = e[i]);
- return r;
- }
- class Kh {
- /**
- Compare this value with another value. Used when comparing
- rangesets. The default implementation compares by identity.
- Unless you are only creating a fixed number of unique instances
- of your value type, it is a good idea to implement this
- properly.
- */
- eq(e) {
- return this == e;
- }
- /**
- Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
- */
- range(e, n = e) {
- return a4.create(e, n, this);
- }
- }
- Kh.prototype.startSide = Kh.prototype.endSide = 0;
- Kh.prototype.point = !1;
- Kh.prototype.mapMode = Oi.TrackDel;
- let a4 = class Vpe {
- constructor(e, n, r) {
- this.from = e, this.to = n, this.value = r;
- }
- /**
- @internal
- */
- static create(e, n, r) {
- return new Vpe(e, n, r);
- }
- };
- function o4(t, e) {
- return t.from - e.from || t.value.startSide - e.value.startSide;
- }
- class tB {
- constructor(e, n, r, i) {
- this.from = e, this.to = n, this.value = r, this.maxPoint = i;
- }
- get length() {
- return this.to[this.to.length - 1];
- }
- // Find the index of the given position and side. Use the ranges'
- // `from` pos when `end == false`, `to` when `end == true`.
- findIndex(e, n, r, i = 0) {
- let a = r ? this.to : this.from;
- for (let o = i, s = a.length; ; ) {
- if (o == s)
- return o;
- let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
- if (l == o)
- return u >= 0 ? o : s;
- u >= 0 ? s = l : o = l + 1;
- }
- }
- between(e, n, r, i) {
- for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
- if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
- return !1;
- }
- map(e, n) {
- let r = [], i = [], a = [], o = -1, s = -1;
- for (let l = 0; l < this.value.length; l++) {
- let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
- if (c == f) {
- let p = n.mapPos(c, u.startSide, u.mapMode);
- if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
- continue;
- } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
- continue;
- (h - d || u.endSide - u.startSide) < 0 || (o < 0 && (o = d), u.point && (s = Math.max(s, h - d)), r.push(u), i.push(d - o), a.push(h - o));
- }
- return { mapped: r.length ? new tB(i, a, r, s) : null, pos: o };
- }
- }
- class Sn {
- constructor(e, n, r, i) {
- this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
- }
- /**
- @internal
- */
- static create(e, n, r, i) {
- return new Sn(e, n, r, i);
- }
- /**
- @internal
- */
- get length() {
- let e = this.chunk.length - 1;
- return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
- }
- /**
- The number of ranges in the set.
- */
- get size() {
- if (this.isEmpty)
- return 0;
- let e = this.nextLayer.size;
- for (let n of this.chunk)
- e += n.value.length;
- return e;
- }
- /**
- @internal
- */
- chunkEnd(e) {
- return this.chunkPos[e] + this.chunk[e].length;
- }
- /**
- Update the range set, optionally adding new ranges or filtering
- out existing ones.
-
- (Note: The type parameter is just there as a kludge to work
- around TypeScript variance issues that prevented `RangeSet<X>`
- from being a subtype of `RangeSet<Y>` when `X` is a subtype of
- `Y`.)
- */
- update(e) {
- let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
- if (n.length == 0 && !o)
- return this;
- if (r && (n = n.slice().sort(o4)), this.isEmpty)
- return n.length ? Sn.of(n) : this;
- let s = new Fpe(this, null, -1).goto(0), l = 0, u = [], c = new wf();
- for (; s.value || l < n.length; )
- if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
- let f = n[l++];
- c.addInner(f.from, f.to, f.value) || u.push(f);
- } else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(s.chunkIndex) < n[l].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && c.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (c.addInner(s.from, s.to, s.value) || u.push(a4.create(s.from, s.to, s.value))), s.next());
- return c.finishInner(this.nextLayer.isEmpty && !u.length ? Sn.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
- }
- /**
- Map this range set through a set of changes, return the new set.
- */
- map(e) {
- if (e.empty || this.isEmpty)
- return this;
- let n = [], r = [], i = -1;
- for (let o = 0; o < this.chunk.length; o++) {
- let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
- if (u === !1)
- i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
- else if (u === !0) {
- let { mapped: c, pos: f } = l.map(s, e);
- c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
- }
- }
- let a = this.nextLayer.map(e);
- return n.length == 0 ? a : new Sn(r, n, a || Sn.empty, i);
- }
- /**
- Iterate over the ranges that touch the region `from` to `to`,
- calling `f` for each. There is no guarantee that the ranges will
- be reported in any specific order. When the callback returns
- `false`, iteration stops.
- */
- between(e, n, r) {
- if (!this.isEmpty) {
- for (let i = 0; i < this.chunk.length; i++) {
- let a = this.chunkPos[i], o = this.chunk[i];
- if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
- return;
- }
- this.nextLayer.between(e, n, r);
- }
- }
- /**
- Iterate over the ranges in this set, in order, including all
- ranges that end at or after `from`.
- */
- iter(e = 0) {
- return g_.from([this]).goto(e);
- }
- /**
- @internal
- */
- get isEmpty() {
- return this.nextLayer == this;
- }
- /**
- Iterate over the ranges in a collection of sets, in order,
- starting from `from`.
- */
- static iter(e, n = 0) {
- return g_.from(e).goto(n);
- }
- /**
- Iterate over two groups of sets, calling methods on `comparator`
- to notify it of possible differences.
- */
- static compare(e, n, r, i, a = -1) {
- let o = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), s = n.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), l = lK(o, s, r), u = new ty(o, l, a), c = new ty(s, l, a);
- r.iterGaps((f, d, h) => uK(u, f, c, d, h, i)), r.empty && r.length == 0 && uK(u, 0, c, 0, 0, i);
- }
- /**
- Compare the contents of two groups of range sets, returning true
- if they are equivalent in the given range.
- */
- static eq(e, n, r = 0, i) {
- i == null && (i = 999999999);
- let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
- if (a.length != o.length)
- return !1;
- if (!a.length)
- return !0;
- let s = lK(a, o), l = new ty(a, s, 0).goto(r), u = new ty(o, s, 0).goto(r);
- for (; ; ) {
- if (l.to != u.to || !s4(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
- return !1;
- if (l.to > i)
- return !0;
- l.next(), u.next();
- }
- }
- /**
- Iterate over a group of range sets at the same time, notifying
- the iterator about the ranges covering every given piece of
- content. Returns the open count (see
- [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
- of the iteration.
- */
- static spans(e, n, r, i, a = -1) {
- let o = new ty(e, null, a).goto(n), s = n, l = o.openStart;
- for (; ; ) {
- let u = Math.min(o.to, r);
- if (o.point) {
- let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
- i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
- } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
- if (o.to > r)
- return l + (o.point && o.to > r ? 1 : 0);
- s = o.to, o.next();
- }
- }
- /**
- Create a range set for the given range or array of ranges. By
- default, this expects the ranges to be _sorted_ (by start
- position and, if two start at the same position,
- `value.startSide`). You can pass `true` as second argument to
- cause the method to sort them.
- */
- static of(e, n = !1) {
- let r = new wf();
- for (let i of e instanceof a4 ? [e] : n ? FSt(e) : e)
- r.add(i.from, i.to, i.value);
- return r.finish();
- }
- /**
- Join an array of range sets into a single set.
- */
- static join(e) {
- if (!e.length)
- return Sn.empty;
- let n = e[e.length - 1];
- for (let r = e.length - 2; r >= 0; r--)
- for (let i = e[r]; i != Sn.empty; i = i.nextLayer)
- n = new Sn(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
- return n;
- }
- }
- Sn.empty = /* @__PURE__ */ new Sn([], [], null, -1);
- function FSt(t) {
- if (t.length > 1)
- for (let e = t[0], n = 1; n < t.length; n++) {
- let r = t[n];
- if (o4(e, r) > 0)
- return t.slice().sort(o4);
- e = r;
- }
- return t;
- }
- Sn.empty.nextLayer = Sn.empty;
- class wf {
- finishChunk(e) {
- this.chunks.push(new tB(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
- }
- /**
- Create an empty builder.
- */
- constructor() {
- this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
- }
- /**
- Add a range. Ranges should be added in sorted (by `from` and
- `value.startSide`) order.
- */
- add(e, n, r) {
- this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new wf())).add(e, n, r);
- }
- /**
- @internal
- */
- addInner(e, n, r) {
- let i = e - this.lastTo || r.startSide - this.last.endSide;
- if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
- throw new Error("Ranges must be added sorted by `from` position and `startSide`");
- return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = r, this.lastFrom = e, this.lastTo = n, this.value.push(r), r.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0);
- }
- /**
- @internal
- */
- addChunk(e, n) {
- if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
- return !1;
- this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
- let r = n.value.length - 1;
- return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
- }
- /**
- Finish the range set. Returns the new set. The builder can't be
- used anymore after this has been called.
- */
- finish() {
- return this.finishInner(Sn.empty);
- }
- /**
- @internal
- */
- finishInner(e) {
- if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
- return e;
- let n = Sn.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
- return this.from = null, n;
- }
- }
- function lK(t, e, n) {
- let r = /* @__PURE__ */ new Map();
- for (let a of t)
- for (let o = 0; o < a.chunk.length; o++)
- a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
- let i = /* @__PURE__ */ new Set();
- for (let a of e)
- for (let o = 0; o < a.chunk.length; o++) {
- let s = r.get(a.chunk[o]);
- s != null && (n ? n.mapPos(s) : s) == a.chunkPos[o] && !(n != null && n.touchesRange(s, s + a.chunk[o].length)) && i.add(a.chunk[o]);
- }
- return i;
- }
- class Fpe {
- constructor(e, n, r, i = 0) {
- this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
- }
- get startSide() {
- return this.value ? this.value.startSide : 0;
- }
- get endSide() {
- return this.value ? this.value.endSide : 0;
- }
- goto(e, n = -1e9) {
- return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
- }
- gotoInner(e, n, r) {
- for (; this.chunkIndex < this.layer.chunk.length; ) {
- let i = this.layer.chunk[this.chunkIndex];
- if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
- break;
- this.chunkIndex++, r = !1;
- }
- if (this.chunkIndex < this.layer.chunk.length) {
- let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
- (!r || this.rangeIndex < i) && this.setRangeIndex(i);
- }
- this.next();
- }
- forward(e, n) {
- (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
- }
- next() {
- for (; ; )
- if (this.chunkIndex == this.layer.chunk.length) {
- this.from = this.to = 1e9, this.value = null;
- break;
- } else {
- let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
- if (this.from = r, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
- break;
- }
- }
- setRangeIndex(e) {
- if (e == this.layer.chunk[this.chunkIndex].value.length) {
- if (this.chunkIndex++, this.skip)
- for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
- this.chunkIndex++;
- this.rangeIndex = 0;
- } else
- this.rangeIndex = e;
- }
- nextChunk() {
- this.chunkIndex++, this.rangeIndex = 0, this.next();
- }
- compare(e) {
- return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
- }
- }
- class g_ {
- constructor(e) {
- this.heap = e;
- }
- static from(e, n = null, r = -1) {
- let i = [];
- for (let a = 0; a < e.length; a++)
- for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
- o.maxPoint >= r && i.push(new Fpe(o, n, r, a));
- return i.length == 1 ? i[0] : new g_(i);
- }
- get startSide() {
- return this.value ? this.value.startSide : 0;
- }
- goto(e, n = -1e9) {
- for (let r of this.heap)
- r.goto(e, n);
- for (let r = this.heap.length >> 1; r >= 0; r--)
- JI(this.heap, r);
- return this.next(), this;
- }
- forward(e, n) {
- for (let r of this.heap)
- r.forward(e, n);
- for (let r = this.heap.length >> 1; r >= 0; r--)
- JI(this.heap, r);
- (this.to - e || this.value.endSide - n) < 0 && this.next();
- }
- next() {
- if (this.heap.length == 0)
- this.from = this.to = 1e9, this.value = null, this.rank = -1;
- else {
- let e = this.heap[0];
- this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), JI(this.heap, 0);
- }
- }
- }
- function JI(t, e) {
- for (let n = t[e]; ; ) {
- let r = (e << 1) + 1;
- if (r >= t.length)
- break;
- let i = t[r];
- if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
- break;
- t[r] = n, t[e] = i, e = r;
- }
- }
- class ty {
- constructor(e, n, r) {
- this.minPoint = r, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = g_.from(e, n, r);
- }
- goto(e, n = -1e9) {
- return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
- }
- forward(e, n) {
- for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
- this.removeActive(this.minActive);
- this.cursor.forward(e, n);
- }
- removeActive(e) {
- ox(this.active, e), ox(this.activeTo, e), ox(this.activeRank, e), this.minActive = cK(this.active, this.activeTo);
- }
- addActive(e) {
- let n = 0, { value: r, to: i, rank: a } = this.cursor;
- for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
- n++;
- sx(this.active, n, r), sx(this.activeTo, n, i), sx(this.activeRank, n, a), e && sx(e, n, this.cursor.from), this.minActive = cK(this.active, this.activeTo);
- }
- // After calling this, if `this.point` != null, the next range is a
- // point. Otherwise, it's a regular range, covered by `this.active`.
- next() {
- let e = this.to, n = this.point;
- this.point = null;
- let r = this.openStart < 0 ? [] : null;
- for (; ; ) {
- let i = this.minActive;
- if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
- if (this.activeTo[i] > e) {
- this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
- break;
- }
- this.removeActive(i), r && ox(r, i);
- } else if (this.cursor.value)
- if (this.cursor.from > e) {
- this.to = this.cursor.from, this.endSide = this.cursor.startSide;
- break;
- } else {
- let a = this.cursor.value;
- if (!a.point)
- this.addActive(r), this.cursor.next();
- else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
- this.cursor.next();
- else {
- this.point = a, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = a.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
- break;
- }
- }
- else {
- this.to = this.endSide = 1e9;
- break;
- }
- }
- if (r) {
- this.openStart = 0;
- for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
- this.openStart++;
- }
- }
- activeForPoint(e) {
- if (!this.active.length)
- return this.active;
- let n = [];
- for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
- (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
- return n.reverse();
- }
- openEnd(e) {
- let n = 0;
- for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
- n++;
- return n;
- }
- }
- function uK(t, e, n, r, i, a) {
- t.goto(e), n.goto(r);
- let o = r + i, s = r, l = r - e;
- for (; ; ) {
- let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
- if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && s4(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !s4(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
- break;
- s = c, u <= 0 && t.next(), u >= 0 && n.next();
- }
- }
- function s4(t, e) {
- if (t.length != e.length)
- return !1;
- for (let n = 0; n < t.length; n++)
- if (t[n] != e[n] && !t[n].eq(e[n]))
- return !1;
- return !0;
- }
- function ox(t, e) {
- for (let n = e, r = t.length - 1; n < r; n++)
- t[n] = t[n + 1];
- t.pop();
- }
- function sx(t, e, n) {
- for (let r = t.length - 1; r >= e; r--)
- t[r + 1] = t[r];
- t[e] = n;
- }
- function cK(t, e) {
- let n = -1, r = 1e9;
- for (let i = 0; i < e.length; i++)
- (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
- return n;
- }
- function Fm(t, e, n = t.length) {
- let r = 0;
- for (let i = 0; i < n; )
- t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = wi(t, i));
- return r;
- }
- function l4(t, e, n, r) {
- for (let i = 0, a = 0; ; ) {
- if (a >= e)
- return i;
- if (i == t.length)
- break;
- a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = wi(t, i);
- }
- return r === !0 ? -1 : t.length;
- }
- const u4 = "ͼ", fK = typeof Symbol > "u" ? "__" + u4 : Symbol.for(u4), c4 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), dK = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
- class Cf {
- // :: (Object<Style>, ?{finish: ?(string) → string})
- // Create a style module from the given spec.
- //
- // When `finish` is given, it is called on regular (non-`@`)
- // selectors (after `&` expansion) to compute the final selector.
- constructor(e, n) {
- this.rules = [];
- let { finish: r } = n || {};
- function i(o) {
- return /^@/.test(o) ? [o] : o.split(/,\s*/);
- }
- function a(o, s, l, u) {
- let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
- if (f && s == null) return l.push(o[0] + ";");
- for (let h in s) {
- let p = s[h];
- if (/&/.test(h))
- a(
- h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
- p,
- l
- );
- else if (p && typeof p == "object") {
- if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
- a(i(h), p, c, d);
- } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
- }
- (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
- }
- for (let o in e) a(i(o), e[o], this.rules);
- }
- // :: () → string
- // Returns a string containing the module's CSS rules.
- getRules() {
- return this.rules.join(`
- `);
- }
- // :: () → string
- // Generate a new unique CSS class name.
- static newName() {
- let e = dK[fK] || 1;
- return dK[fK] = e + 1, u4 + e.toString(36);
- }
- // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
- //
- // Mount the given set of modules in the given DOM root, which ensures
- // that the CSS rules defined by the module are available in that
- // context.
- //
- // Rules are only added to the document once per root.
- //
- // Rule order will follow the order of the modules, so that rules from
- // modules later in the array take precedence of those from earlier
- // modules. If you call this function multiple times for the same root
- // in a way that changes the order of already mounted modules, the old
- // order will be changed.
- //
- // If a Content Security Policy nonce is provided, it is added to
- // the `<style>` tag generated by the library.
- static mount(e, n, r) {
- let i = e[c4], a = r && r.nonce;
- i ? a && i.setNonce(a) : i = new WSt(e, a), i.mount(Array.isArray(n) ? n : [n], e);
- }
- }
- let hK = /* @__PURE__ */ new Map();
- class WSt {
- constructor(e, n) {
- let r = e.ownerDocument || e, i = r.defaultView;
- if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
- let a = hK.get(r);
- if (a) return e[c4] = a;
- this.sheet = new i.CSSStyleSheet(), hK.set(r, this);
- } else
- this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
- this.modules = [], e[c4] = this;
- }
- mount(e, n) {
- let r = this.sheet, i = 0, a = 0;
- for (let o = 0; o < e.length; o++) {
- let s = e[o], l = this.modules.indexOf(s);
- if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
- if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
- r.insertRule(s.rules[u], i++);
- } else {
- for (; a < l; ) i += this.modules[a++].rules.length;
- i += s.rules.length, a++;
- }
- }
- if (r)
- n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
- else {
- let o = "";
- for (let l = 0; l < this.modules.length; l++)
- o += this.modules[l].getRules() + `
- `;
- this.styleTag.textContent = o;
- let s = n.head || n;
- this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
- }
- }
- setNonce(e) {
- this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
- }
- }
- var Tf = {
- 8: "Backspace",
- 9: "Tab",
- 10: "Enter",
- 12: "NumLock",
- 13: "Enter",
- 16: "Shift",
- 17: "Control",
- 18: "Alt",
- 20: "CapsLock",
- 27: "Escape",
- 32: " ",
- 33: "PageUp",
- 34: "PageDown",
- 35: "End",
- 36: "Home",
- 37: "ArrowLeft",
- 38: "ArrowUp",
- 39: "ArrowRight",
- 40: "ArrowDown",
- 44: "PrintScreen",
- 45: "Insert",
- 46: "Delete",
- 59: ";",
- 61: "=",
- 91: "Meta",
- 92: "Meta",
- 106: "*",
- 107: "+",
- 108: ",",
- 109: "-",
- 110: ".",
- 111: "/",
- 144: "NumLock",
- 145: "ScrollLock",
- 160: "Shift",
- 161: "Shift",
- 162: "Control",
- 163: "Control",
- 164: "Alt",
- 165: "Alt",
- 173: "-",
- 186: ";",
- 187: "=",
- 188: ",",
- 189: "-",
- 190: ".",
- 191: "/",
- 192: "`",
- 219: "[",
- 220: "\\",
- 221: "]",
- 222: "'"
- }, m_ = {
- 48: ")",
- 49: "!",
- 50: "@",
- 51: "#",
- 52: "$",
- 53: "%",
- 54: "^",
- 55: "&",
- 56: "*",
- 57: "(",
- 59: ":",
- 61: "+",
- 173: "_",
- 186: ":",
- 187: "+",
- 188: "<",
- 189: "_",
- 190: ">",
- 191: "?",
- 192: "~",
- 219: "{",
- 220: "|",
- 221: "}",
- 222: '"'
- }, QSt = typeof navigator < "u" && /Mac/.test(navigator.platform), HSt = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
- for (var _i = 0; _i < 10; _i++) Tf[48 + _i] = Tf[96 + _i] = String(_i);
- for (var _i = 1; _i <= 24; _i++) Tf[_i + 111] = "F" + _i;
- for (var _i = 65; _i <= 90; _i++)
- Tf[_i] = String.fromCharCode(_i + 32), m_[_i] = String.fromCharCode(_i);
- for (var eD in Tf) m_.hasOwnProperty(eD) || (m_[eD] = Tf[eD]);
- function GSt(t) {
- var e = QSt && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || HSt && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? m_ : Tf)[t.keyCode] || t.key || "Unidentified";
- return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
- }
- function y_(t) {
- let e;
- return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
- }
- function f4(t, e) {
- return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
- }
- function jSt(t) {
- let e = t.activeElement;
- for (; e && e.shadowRoot; )
- e = e.shadowRoot.activeElement;
- return e;
- }
- function $w(t, e) {
- if (!e.anchorNode)
- return !1;
- try {
- return f4(t, e.anchorNode);
- } catch {
- return !1;
- }
- }
- function Kg(t) {
- return t.nodeType == 3 ? ep(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
- }
- function vb(t, e, n, r) {
- return n ? pK(t, e, n, r, -1) || pK(t, e, n, r, 1) : !1;
- }
- function Jh(t) {
- for (var e = 0; ; e++)
- if (t = t.previousSibling, !t)
- return e;
- }
- function $T(t) {
- return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
- }
- function pK(t, e, n, r, i) {
- for (; ; ) {
- if (t == n && e == r)
- return !0;
- if (e == (i < 0 ? 0 : Uu(t))) {
- if (t.nodeName == "DIV")
- return !1;
- let a = t.parentNode;
- if (!a || a.nodeType != 1)
- return !1;
- e = Jh(t) + (i < 0 ? 0 : 1), t = a;
- } else if (t.nodeType == 1) {
- if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
- return !1;
- e = i < 0 ? Uu(t) : 0;
- } else
- return !1;
- }
- }
- function Uu(t) {
- return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
- }
- function i$(t, e) {
- let n = e ? t.left : t.right;
- return { left: n, right: n, top: t.top, bottom: t.bottom };
- }
- function ZSt(t) {
- let e = t.visualViewport;
- return e ? {
- left: 0,
- right: e.width,
- top: 0,
- bottom: e.height
- } : {
- left: 0,
- right: t.innerWidth,
- top: 0,
- bottom: t.innerHeight
- };
- }
- function Wpe(t, e) {
- let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
- return (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.width - t.offsetWidth) < 1) && (n = 1), (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.height - t.offsetHeight) < 1) && (r = 1), { scaleX: n, scaleY: r };
- }
- function USt(t, e, n, r, i, a, o, s) {
- let l = t.ownerDocument, u = l.defaultView || window;
- for (let c = t, f = !1; c && !f; )
- if (c.nodeType == 1) {
- let d, h = c == l.body, p = 1, v = 1;
- if (h)
- d = ZSt(u);
- else {
- if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
- c = c.assignedSlot || c.parentNode;
- continue;
- }
- let y = c.getBoundingClientRect();
- ({ scaleX: p, scaleY: v } = Wpe(c, y)), d = {
- left: y.left,
- right: y.left + c.clientWidth * p,
- top: y.top,
- bottom: y.top + c.clientHeight * v
- };
- }
- let g = 0, m = 0;
- if (i == "nearest")
- e.top < d.top ? (m = -(d.top - e.top + o), n > 0 && e.bottom > d.bottom + m && (m = e.bottom - d.bottom + m + o)) : e.bottom > d.bottom && (m = e.bottom - d.bottom + o, n < 0 && e.top - m < d.top && (m = -(d.top + m - e.top + o)));
- else {
- let y = e.bottom - e.top, _ = d.bottom - d.top;
- m = (i == "center" && y <= _ ? e.top + y / 2 - _ / 2 : i == "start" || i == "center" && n < 0 ? e.top - o : e.bottom - _ + o) - d.top;
- }
- if (r == "nearest" ? e.left < d.left ? (g = -(d.left - e.left + a), n > 0 && e.right > d.right + g && (g = e.right - d.right + g + a)) : e.right > d.right && (g = e.right - d.right + a, n < 0 && e.left < d.left + g && (g = -(d.left + g - e.left + a))) : g = (r == "center" ? e.left + (e.right - e.left) / 2 - (d.right - d.left) / 2 : r == "start" == s ? e.left - a : e.right - (d.right - d.left) + a) - d.left, g || m)
- if (h)
- u.scrollBy(g, m);
- else {
- let y = 0, _ = 0;
- if (m) {
- let O = c.scrollTop;
- c.scrollTop += m / v, _ = (c.scrollTop - O) * v;
- }
- if (g) {
- let O = c.scrollLeft;
- c.scrollLeft += g / p, y = (c.scrollLeft - O) * p;
- }
- e = {
- left: e.left - y,
- top: e.top - _,
- right: e.right - y,
- bottom: e.bottom - _
- }, y && Math.abs(y - g) < 1 && (r = "nearest"), _ && Math.abs(_ - m) < 1 && (i = "nearest");
- }
- if (h)
- break;
- c = c.assignedSlot || c.parentNode;
- } else if (c.nodeType == 11)
- c = c.host;
- else
- break;
- }
- function XSt(t) {
- let e = t.ownerDocument;
- for (let n = t.parentNode; n && n != e.body; )
- if (n.nodeType == 1) {
- if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
- return n;
- n = n.assignedSlot || n.parentNode;
- } else if (n.nodeType == 11)
- n = n.host;
- else
- break;
- return null;
- }
- class YSt {
- constructor() {
- this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
- }
- eq(e) {
- return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
- }
- setRange(e) {
- let { anchorNode: n, focusNode: r } = e;
- this.set(n, Math.min(e.anchorOffset, n ? Uu(n) : 0), r, Math.min(e.focusOffset, r ? Uu(r) : 0));
- }
- set(e, n, r, i) {
- this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
- }
- }
- let vv = null;
- function Qpe(t) {
- if (t.setActive)
- return t.setActive();
- if (vv)
- return t.focus(vv);
- let e = [];
- for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
- ;
- if (t.focus(vv == null ? {
- get preventScroll() {
- return vv = { preventScroll: !0 }, !0;
- }
- } : void 0), !vv) {
- vv = !1;
- for (let n = 0; n < e.length; ) {
- let r = e[n++], i = e[n++], a = e[n++];
- r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
- }
- }
- }
- let vK;
- function ep(t, e, n = e) {
- let r = vK || (vK = document.createRange());
- return r.setEnd(t, n), r.setStart(t, e), r;
- }
- function ag(t, e, n, r) {
- let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
- r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
- let a = new KeyboardEvent("keydown", i);
- a.synthetic = !0, t.dispatchEvent(a);
- let o = new KeyboardEvent("keyup", i);
- return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
- }
- function qSt(t) {
- for (; t; ) {
- if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
- return t;
- t = t.assignedSlot || t.parentNode;
- }
- return null;
- }
- function Hpe(t) {
- for (; t.attributes.length; )
- t.removeAttributeNode(t.attributes[0]);
- }
- function KSt(t, e) {
- let n = e.focusNode, r = e.focusOffset;
- if (!n || e.anchorNode != n || e.anchorOffset != r)
- return !1;
- for (r = Math.min(r, Uu(n)); ; )
- if (r) {
- if (n.nodeType != 1)
- return !1;
- let i = n.childNodes[r - 1];
- i.contentEditable == "false" ? r-- : (n = i, r = Uu(n));
- } else {
- if (n == t)
- return !0;
- r = Jh(n), n = n.parentNode;
- }
- }
- function Gpe(t) {
- return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
- }
- function jpe(t, e) {
- for (let n = t, r = e; ; ) {
- if (n.nodeType == 3 && r > 0)
- return { node: n, offset: r };
- if (n.nodeType == 1 && r > 0) {
- if (n.contentEditable == "false")
- return null;
- n = n.childNodes[r - 1], r = Uu(n);
- } else if (n.parentNode && !$T(n))
- r = Jh(n), n = n.parentNode;
- else
- return null;
- }
- }
- function Zpe(t, e) {
- for (let n = t, r = e; ; ) {
- if (n.nodeType == 3 && r < n.nodeValue.length)
- return { node: n, offset: r };
- if (n.nodeType == 1 && r < n.childNodes.length) {
- if (n.contentEditable == "false")
- return null;
- n = n.childNodes[r], r = 0;
- } else if (n.parentNode && !$T(n))
- r = Jh(n) + 1, n = n.parentNode;
- else
- return null;
- }
- }
- class zi {
- constructor(e, n, r = !0) {
- this.node = e, this.offset = n, this.precise = r;
- }
- static before(e, n) {
- return new zi(e.parentNode, Jh(e), n);
- }
- static after(e, n) {
- return new zi(e.parentNode, Jh(e) + 1, n);
- }
- }
- const nB = [];
- class Qn {
- constructor() {
- this.parent = null, this.dom = null, this.flags = 2;
- }
- get overrideDOMText() {
- return null;
- }
- get posAtStart() {
- return this.parent ? this.parent.posBefore(this) : 0;
- }
- get posAtEnd() {
- return this.posAtStart + this.length;
- }
- posBefore(e) {
- let n = this.posAtStart;
- for (let r of this.children) {
- if (r == e)
- return n;
- n += r.length + r.breakAfter;
- }
- throw new RangeError("Invalid child in posBefore");
- }
- posAfter(e) {
- return this.posBefore(e) + e.length;
- }
- sync(e, n) {
- if (this.flags & 2) {
- let r = this.dom, i = null, a;
- for (let o of this.children) {
- if (o.flags & 7) {
- if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
- let s = Qn.get(a);
- (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
- }
- o.sync(e, n), o.flags &= -8;
- }
- if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
- for (; a && a != o.dom; )
- a = gK(a);
- else
- r.insertBefore(o.dom, a);
- i = o.dom;
- }
- for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
- a = gK(a);
- } else if (this.flags & 1)
- for (let r of this.children)
- r.flags & 7 && (r.sync(e, n), r.flags &= -8);
- }
- reuseDOM(e) {
- }
- localPosFromDOM(e, n) {
- let r;
- if (e == this.dom)
- r = this.dom.childNodes[n];
- else {
- let i = Uu(e) == 0 ? 0 : n == 0 ? -1 : 1;
- for (; ; ) {
- let a = e.parentNode;
- if (a == this.dom)
- break;
- i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
- }
- i < 0 ? r = e : r = e.nextSibling;
- }
- if (r == this.dom.firstChild)
- return 0;
- for (; r && !Qn.get(r); )
- r = r.nextSibling;
- if (!r)
- return this.length;
- for (let i = 0, a = 0; ; i++) {
- let o = this.children[i];
- if (o.dom == r)
- return a;
- a += o.length + o.breakAfter;
- }
- }
- domBoundsAround(e, n, r = 0) {
- let i = -1, a = -1, o = -1, s = -1;
- for (let l = 0, u = r, c = r; l < this.children.length; l++) {
- let f = this.children[l], d = u + f.length;
- if (u < e && d > n)
- return f.domBoundsAround(e, n, u);
- if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
- o = l, s = c;
- break;
- }
- c = d, u = d + f.breakAfter;
- }
- return {
- from: a,
- to: s < 0 ? r + this.length : s,
- startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
- endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
- };
- }
- markDirty(e = !1) {
- this.flags |= 2, this.markParentsDirty(e);
- }
- markParentsDirty(e) {
- for (let n = this.parent; n; n = n.parent) {
- if (e && (n.flags |= 2), n.flags & 1)
- return;
- n.flags |= 1, e = !1;
- }
- }
- setParent(e) {
- this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
- }
- setDOM(e) {
- this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
- }
- get rootView() {
- for (let e = this; ; ) {
- let n = e.parent;
- if (!n)
- return e;
- e = n;
- }
- }
- replaceChildren(e, n, r = nB) {
- this.markDirty();
- for (let i = e; i < n; i++) {
- let a = this.children[i];
- a.parent == this && r.indexOf(a) < 0 && a.destroy();
- }
- this.children.splice(e, n - e, ...r);
- for (let i = 0; i < r.length; i++)
- r[i].setParent(this);
- }
- ignoreMutation(e) {
- return !1;
- }
- ignoreEvent(e) {
- return !1;
- }
- childCursor(e = this.length) {
- return new Upe(this.children, e, this.children.length);
- }
- childPos(e, n = 1) {
- return this.childCursor().findPos(e, n);
- }
- toString() {
- let e = this.constructor.name.replace("View", "");
- return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
- }
- static get(e) {
- return e.cmView;
- }
- get isEditable() {
- return !0;
- }
- get isWidget() {
- return !1;
- }
- get isHidden() {
- return !1;
- }
- merge(e, n, r, i, a, o) {
- return !1;
- }
- become(e) {
- return !1;
- }
- canReuseDOM(e) {
- return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
- }
- // When this is a zero-length view with a side, this should return a
- // number <= 0 to indicate it is before its position, or a
- // number > 0 when after its position.
- getSide() {
- return 0;
- }
- destroy() {
- for (let e of this.children)
- e.parent == this && e.destroy();
- this.parent = null;
- }
- }
- Qn.prototype.breakAfter = 0;
- function gK(t) {
- let e = t.nextSibling;
- return t.parentNode.removeChild(t), e;
- }
- class Upe {
- constructor(e, n, r) {
- this.children = e, this.pos = n, this.i = r, this.off = 0;
- }
- findPos(e, n = 1) {
- for (; ; ) {
- if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
- return this.off = e - this.pos, this;
- let r = this.children[--this.i];
- this.pos -= r.length + r.breakAfter;
- }
- }
- }
- function Xpe(t, e, n, r, i, a, o, s, l) {
- let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
- if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
- if (r < u.length) {
- let h = u[r];
- h && (i < h.length || h.breakAfter && (f != null && f.breakAfter)) ? (e == r && (h = h.split(i), i = 0), !d && f && h.merge(0, i, f, !0, 0, l) ? a[a.length - 1] = h : ((i || h.children.length && !h.children[0].length) && h.merge(0, i, null, !1, 0, l), a.push(h))) : h != null && h.breakAfter && (f ? f.breakAfter = 1 : o = 1), r++;
- }
- for (c && (c.breakAfter = o, n > 0 && (!o && a.length && c.merge(n, c.length, a[0], !1, s, 0) ? c.breakAfter = a.shift().breakAfter : (n < c.length || c.children.length && c.children[c.children.length - 1].length == 0) && c.merge(n, c.length, null, !1, s, 0), e++)); e < r && a.length; )
- if (u[r - 1].become(a[a.length - 1]))
- r--, a.pop(), l = a.length ? 0 : s;
- else if (u[e].become(a[0]))
- e++, a.shift(), s = a.length ? 0 : l;
- else
- break;
- !a.length && e && r < u.length && !u[e - 1].breakAfter && u[r].merge(0, 0, u[e - 1], !1, s, l) && e--, (e < r || a.length) && t.replaceChildren(e, r, a);
- }
- }
- function Ype(t, e, n, r, i, a) {
- let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
- for (let d of r)
- f += d.length;
- t.length += f, Xpe(t, u, c, s, l, r, 0, i, a);
- }
- let Aa = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, d4 = typeof document < "u" ? document : { documentElement: { style: {} } };
- const h4 = /* @__PURE__ */ /Edge\/(\d+)/.exec(Aa.userAgent), qpe = /* @__PURE__ */ /MSIE \d/.test(Aa.userAgent), p4 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Aa.userAgent), a$ = !!(qpe || p4 || h4), mK = !a$ && /* @__PURE__ */ /gecko\/(\d+)/i.test(Aa.userAgent), tD = !a$ && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Aa.userAgent), yK = "webkitFontSmoothing" in d4.documentElement.style, Kpe = !a$ && /* @__PURE__ */ /Apple Computer/.test(Aa.vendor), bK = Kpe && (/* @__PURE__ */ /Mobile\/\w+/.test(Aa.userAgent) || Aa.maxTouchPoints > 2);
- var lt = {
- mac: bK || /* @__PURE__ */ /Mac/.test(Aa.platform),
- windows: /* @__PURE__ */ /Win/.test(Aa.platform),
- linux: /* @__PURE__ */ /Linux|X11/.test(Aa.platform),
- ie: a$,
- ie_version: qpe ? d4.documentMode || 6 : p4 ? +p4[1] : h4 ? +h4[1] : 0,
- gecko: mK,
- gecko_version: mK ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Aa.userAgent) || [0, 0])[1] : 0,
- chrome: !!tD,
- chrome_version: tD ? +tD[1] : 0,
- ios: bK,
- android: /* @__PURE__ */ /Android\b/.test(Aa.userAgent),
- webkit: yK,
- safari: Kpe,
- webkit_version: yK ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(Aa.userAgent) || [0, 0])[1] : 0,
- tabSize: d4.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
- };
- const JSt = 256;
- class Us extends Qn {
- constructor(e) {
- super(), this.text = e;
- }
- get length() {
- return this.text.length;
- }
- createDOM(e) {
- this.setDOM(e || document.createTextNode(this.text));
- }
- sync(e, n) {
- this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
- }
- reuseDOM(e) {
- e.nodeType == 3 && this.createDOM(e);
- }
- merge(e, n, r) {
- return this.flags & 8 || r && (!(r instanceof Us) || this.length - (n - e) + r.length > JSt || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
- }
- split(e) {
- let n = new Us(this.text.slice(e));
- return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
- }
- localPosFromDOM(e, n) {
- return e == this.dom ? n : n ? this.text.length : 0;
- }
- domAtPos(e) {
- return new zi(this.dom, e);
- }
- domBoundsAround(e, n, r) {
- return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
- }
- coordsAt(e, n) {
- return ext(this.dom, e, n);
- }
- }
- class Xu extends Qn {
- constructor(e, n = [], r = 0) {
- super(), this.mark = e, this.children = n, this.length = r;
- for (let i of n)
- i.setParent(this);
- }
- setAttrs(e) {
- if (Hpe(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
- for (let n in this.mark.attrs)
- e.setAttribute(n, this.mark.attrs[n]);
- return e;
- }
- canReuseDOM(e) {
- return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
- }
- reuseDOM(e) {
- e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
- }
- sync(e, n) {
- this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
- }
- merge(e, n, r, i, a, o) {
- return r && (!(r instanceof Xu && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Ype(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
- }
- split(e) {
- let n = [], r = 0, i = -1, a = 0;
- for (let s of this.children) {
- let l = r + s.length;
- l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
- }
- let o = this.length - e;
- return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new Xu(this.mark, n, o);
- }
- domAtPos(e) {
- return Jpe(this, e);
- }
- coordsAt(e, n) {
- return tve(this, e, n);
- }
- }
- function ext(t, e, n) {
- let r = t.nodeValue.length;
- e > r && (e = r);
- let i = e, a = e, o = 0;
- e == 0 && n < 0 || e == r && n >= 0 ? lt.chrome || lt.gecko || (e ? (i--, o = 1) : a < r && (a++, o = -1)) : n < 0 ? i-- : a < r && a++;
- let s = ep(t, i, a).getClientRects();
- if (!s.length)
- return null;
- let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
- return lt.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? i$(l, o < 0) : l || null;
- }
- class Yc extends Qn {
- static create(e, n, r) {
- return new Yc(e, n, r);
- }
- constructor(e, n, r) {
- super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
- }
- split(e) {
- let n = Yc.create(this.widget, this.length - e, this.side);
- return this.length -= e, n;
- }
- sync(e) {
- (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
- }
- getSide() {
- return this.side;
- }
- merge(e, n, r, i, a, o) {
- return r && (!(r instanceof Yc) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
- }
- become(e) {
- return e instanceof Yc && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1;
- }
- ignoreMutation() {
- return !0;
- }
- ignoreEvent(e) {
- return this.widget.ignoreEvent(e);
- }
- get overrideDOMText() {
- if (this.length == 0)
- return xn.empty;
- let e = this;
- for (; e.parent; )
- e = e.parent;
- let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
- return r ? r.slice(i, i + this.length) : xn.empty;
- }
- domAtPos(e) {
- return (this.length ? e == 0 : this.side > 0) ? zi.before(this.dom) : zi.after(this.dom, e == this.length);
- }
- domBoundsAround() {
- return null;
- }
- coordsAt(e, n) {
- let r = this.widget.coordsAt(this.dom, e, n);
- if (r)
- return r;
- let i = this.dom.getClientRects(), a = null;
- if (!i.length)
- return null;
- let o = this.side ? this.side < 0 : e > 0;
- for (let s = o ? i.length - 1 : 0; a = i[s], !(e > 0 ? s == 0 : s == i.length - 1 || a.top < a.bottom); s += o ? -1 : 1)
- ;
- return i$(a, !o);
- }
- get isEditable() {
- return !1;
- }
- get isWidget() {
- return !0;
- }
- get isHidden() {
- return this.widget.isHidden;
- }
- destroy() {
- super.destroy(), this.dom && this.widget.destroy(this.dom);
- }
- }
- class Jg extends Qn {
- constructor(e) {
- super(), this.side = e;
- }
- get length() {
- return 0;
- }
- merge() {
- return !1;
- }
- become(e) {
- return e instanceof Jg && e.side == this.side;
- }
- split() {
- return new Jg(this.side);
- }
- sync() {
- if (!this.dom) {
- let e = document.createElement("img");
- e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
- }
- }
- getSide() {
- return this.side;
- }
- domAtPos(e) {
- return this.side > 0 ? zi.before(this.dom) : zi.after(this.dom);
- }
- localPosFromDOM() {
- return 0;
- }
- domBoundsAround() {
- return null;
- }
- coordsAt(e) {
- return this.dom.getBoundingClientRect();
- }
- get overrideDOMText() {
- return xn.empty;
- }
- get isHidden() {
- return !0;
- }
- }
- Us.prototype.children = Yc.prototype.children = Jg.prototype.children = nB;
- function Jpe(t, e) {
- let n = t.dom, { children: r } = t, i = 0;
- for (let a = 0; i < r.length; i++) {
- let o = r[i], s = a + o.length;
- if (!(s == a && o.getSide() <= 0)) {
- if (e > a && e < s && o.dom.parentNode == n)
- return o.domAtPos(e - a);
- if (e <= a)
- break;
- a = s;
- }
- }
- for (let a = i; a > 0; a--) {
- let o = r[a - 1];
- if (o.dom.parentNode == n)
- return o.domAtPos(o.length);
- }
- for (let a = i; a < r.length; a++) {
- let o = r[a];
- if (o.dom.parentNode == n)
- return o.domAtPos(0);
- }
- return new zi(n, 0);
- }
- function eve(t, e, n) {
- let r, { children: i } = t;
- n > 0 && e instanceof Xu && i.length && (r = i[i.length - 1]) instanceof Xu && r.mark.eq(e.mark) ? eve(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
- }
- function tve(t, e, n) {
- let r = null, i = -1, a = null, o = -1;
- function s(u, c) {
- for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
- let h = u.children[f], p = d + h.length;
- p >= c && (h.children.length ? s(h, c - d) : (!a || a.isHidden && n > 0) && (p > c || d == p && h.getSide() > 0) ? (a = h, o = c - d) : (d < c || d == p && h.getSide() < 0 && !h.isHidden) && (r = h, i = c - d)), d = p;
- }
- }
- s(t, e);
- let l = (n < 0 ? r : a) || r || a;
- return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : txt(t);
- }
- function txt(t) {
- let e = t.dom.lastChild;
- if (!e)
- return t.dom.getBoundingClientRect();
- let n = Kg(e);
- return n[n.length - 1] || null;
- }
- function v4(t, e) {
- for (let n in t)
- n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
- return e;
- }
- const _K = /* @__PURE__ */ Object.create(null);
- function AT(t, e, n) {
- if (t == e)
- return !0;
- t || (t = _K), e || (e = _K);
- let r = Object.keys(t), i = Object.keys(e);
- if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
- return !1;
- for (let a of r)
- if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
- return !1;
- return !0;
- }
- function g4(t, e, n) {
- let r = !1;
- if (e)
- for (let i in e)
- n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
- if (n)
- for (let i in n)
- e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
- return r;
- }
- function nxt(t) {
- let e = /* @__PURE__ */ Object.create(null);
- for (let n = 0; n < t.attributes.length; n++) {
- let r = t.attributes[n];
- e[r.name] = r.value;
- }
- return e;
- }
- class Rr extends Qn {
- constructor() {
- super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
- }
- // Consumes source
- merge(e, n, r, i, a, o) {
- if (r) {
- if (!(r instanceof Rr))
- return !1;
- this.dom || r.transferDOM(this);
- }
- return i && this.setDeco(r ? r.attrs : null), Ype(this, e, n, r ? r.children.slice() : [], a, o), !0;
- }
- split(e) {
- let n = new Rr();
- if (n.breakAfter = this.breakAfter, this.length == 0)
- return n;
- let { i: r, off: i } = this.childPos(e);
- i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
- for (let a = r; a < this.children.length; a++)
- n.append(this.children[a], 0);
- for (; r > 0 && this.children[r - 1].length == 0; )
- this.children[--r].destroy();
- return this.children.length = r, this.markDirty(), this.length = e, n;
- }
- transferDOM(e) {
- this.dom && (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null);
- }
- setDeco(e) {
- AT(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
- }
- append(e, n) {
- eve(this, e, n);
- }
- // Only called when building a line view in ContentBuilder
- addLineDeco(e) {
- let n = e.spec.attributes, r = e.spec.class;
- n && (this.attrs = v4(n, this.attrs || {})), r && (this.attrs = v4({ class: r }, this.attrs || {}));
- }
- domAtPos(e) {
- return Jpe(this, e);
- }
- reuseDOM(e) {
- e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
- }
- sync(e, n) {
- var r;
- this.dom ? this.flags & 4 && (Hpe(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (g4(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
- let i = this.dom.lastChild;
- for (; i && Qn.get(i) instanceof Xu; )
- i = i.lastChild;
- if (!i || !this.length || i.nodeName != "BR" && ((r = Qn.get(i)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!lt.ios || !this.children.some((a) => a instanceof Us))) {
- let a = document.createElement("BR");
- a.cmIgnore = !0, this.dom.appendChild(a);
- }
- }
- measureTextSize() {
- if (this.children.length == 0 || this.length > 20)
- return null;
- let e = 0, n;
- for (let r of this.children) {
- if (!(r instanceof Us) || /[^ -~]/.test(r.text))
- return null;
- let i = Kg(r.dom);
- if (i.length != 1)
- return null;
- e += i[0].width, n = i[0].height;
- }
- return e ? {
- lineHeight: this.dom.getBoundingClientRect().height,
- charWidth: e / this.length,
- textHeight: n
- } : null;
- }
- coordsAt(e, n) {
- let r = tve(this, e, n);
- if (!this.children.length && r && this.parent) {
- let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
- if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
- let o = (a - i.textHeight) / 2;
- return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
- }
- }
- return r;
- }
- become(e) {
- return e instanceof Rr && this.children.length == 0 && e.children.length == 0 && AT(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
- }
- covers() {
- return !0;
- }
- static find(e, n) {
- for (let r = 0, i = 0; r < e.children.length; r++) {
- let a = e.children[r], o = i + a.length;
- if (o >= n) {
- if (a instanceof Rr)
- return a;
- if (o > n)
- break;
- }
- i = o + a.breakAfter;
- }
- return null;
- }
- }
- class Ru extends Qn {
- constructor(e, n, r) {
- super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
- }
- merge(e, n, r, i, a, o) {
- return r && (!(r instanceof Ru) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
- }
- domAtPos(e) {
- return e == 0 ? zi.before(this.dom) : zi.after(this.dom, e == this.length);
- }
- split(e) {
- let n = this.length - e;
- this.length = e;
- let r = new Ru(this.widget, n, this.deco);
- return r.breakAfter = this.breakAfter, r;
- }
- get children() {
- return nB;
- }
- sync(e) {
- (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
- }
- get overrideDOMText() {
- return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : xn.empty;
- }
- domBoundsAround() {
- return null;
- }
- become(e) {
- return e instanceof Ru && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1;
- }
- ignoreMutation() {
- return !0;
- }
- ignoreEvent(e) {
- return this.widget.ignoreEvent(e);
- }
- get isEditable() {
- return !1;
- }
- get isWidget() {
- return !0;
- }
- coordsAt(e, n) {
- return this.widget.coordsAt(this.dom, e, n);
- }
- destroy() {
- super.destroy(), this.dom && this.widget.destroy(this.dom);
- }
- covers(e) {
- let { startSide: n, endSide: r } = this.deco;
- return n == r ? !1 : e < 0 ? n < 0 : r > 0;
- }
- }
- class Jl {
- /**
- Compare this instance to another instance of the same type.
- (TypeScript can't express this, but only instances of the same
- specific class will be passed to this method.) This is used to
- avoid redrawing widgets when they are replaced by a new
- decoration of the same type. The default implementation just
- returns `false`, which will cause new instances of the widget to
- always be redrawn.
- */
- eq(e) {
- return !1;
- }
- /**
- Update a DOM element created by a widget of the same type (but
- different, non-`eq` content) to reflect this widget. May return
- true to indicate that it could update, false to indicate it
- couldn't (in which case the widget will be redrawn). The default
- implementation just returns false.
- */
- updateDOM(e, n) {
- return !1;
- }
- /**
- @internal
- */
- compare(e) {
- return this == e || this.constructor == e.constructor && this.eq(e);
- }
- /**
- The estimated height this widget will have, to be used when
- estimating the height of content that hasn't been drawn. May
- return -1 to indicate you don't know. The default implementation
- returns -1.
- */
- get estimatedHeight() {
- return -1;
- }
- /**
- For inline widgets that are displayed inline (as opposed to
- `inline-block`) and introduce line breaks (through `<br>` tags
- or textual newlines), this must indicate the amount of line
- breaks they introduce. Defaults to 0.
- */
- get lineBreaks() {
- return 0;
- }
- /**
- Can be used to configure which kinds of events inside the widget
- should be ignored by the editor. The default is to ignore all
- events.
- */
- ignoreEvent(e) {
- return !0;
- }
- /**
- Override the way screen coordinates for positions at/in the
- widget are found. `pos` will be the offset into the widget, and
- `side` the side of the position that is being queried—less than
- zero for before, greater than zero for after, and zero for
- directly at that position.
- */
- coordsAt(e, n, r) {
- return null;
- }
- /**
- @internal
- */
- get isHidden() {
- return !1;
- }
- /**
- @internal
- */
- get editable() {
- return !1;
- }
- /**
- This is called when the an instance of the widget is removed
- from the editor view.
- */
- destroy(e) {
- }
- }
- var la = /* @__PURE__ */ function(t) {
- return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
- }(la || (la = {}));
- class pt extends Kh {
- constructor(e, n, r, i) {
- super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
- }
- /**
- @internal
- */
- get heightRelevant() {
- return !1;
- }
- /**
- Create a mark decoration, which influences the styling of the
- content in its range. Nested mark decorations will cause nested
- DOM elements to be created. Nesting order is determined by
- precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
- the higher-precedence decorations creating the inner DOM nodes.
- Such elements are split on line boundaries and on the boundaries
- of lower-precedence decorations.
- */
- static mark(e) {
- return new A1(e);
- }
- /**
- Create a widget decoration, which displays a DOM element at the
- given position.
- */
- static widget(e) {
- let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
- return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new Pf(e, n, n, r, e.widget || null, !1);
- }
- /**
- Create a replace decoration which replaces the given range with
- a widget, or simply hides it.
- */
- static replace(e) {
- let n = !!e.block, r, i;
- if (e.isBlockGap)
- r = -5e8, i = 4e8;
- else {
- let { start: a, end: o } = nve(e, n);
- r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
- }
- return new Pf(e, r, i, n, e.widget || null, !0);
- }
- /**
- Create a line decoration, which can add DOM attributes to the
- line starting at the given position.
- */
- static line(e) {
- return new E1(e);
- }
- /**
- Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
- decorated range or ranges. If the ranges aren't already sorted,
- pass `true` for `sort` to make the library sort them for you.
- */
- static set(e, n = !1) {
- return Sn.of(e, n);
- }
- /**
- @internal
- */
- hasHeight() {
- return this.widget ? this.widget.estimatedHeight > -1 : !1;
- }
- }
- pt.none = Sn.empty;
- class A1 extends pt {
- constructor(e) {
- let { start: n, end: r } = nve(e);
- super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
- }
- eq(e) {
- var n, r;
- return this == e || e instanceof A1 && this.tagName == e.tagName && (this.class || ((n = this.attrs) === null || n === void 0 ? void 0 : n.class)) == (e.class || ((r = e.attrs) === null || r === void 0 ? void 0 : r.class)) && AT(this.attrs, e.attrs, "class");
- }
- range(e, n = e) {
- if (e >= n)
- throw new RangeError("Mark decorations may not be empty");
- return super.range(e, n);
- }
- }
- A1.prototype.point = !1;
- class E1 extends pt {
- constructor(e) {
- super(-2e8, -2e8, null, e);
- }
- eq(e) {
- return e instanceof E1 && this.spec.class == e.spec.class && AT(this.spec.attributes, e.spec.attributes);
- }
- range(e, n = e) {
- if (n != e)
- throw new RangeError("Line decoration ranges must be zero-length");
- return super.range(e, n);
- }
- }
- E1.prototype.mapMode = Oi.TrackBefore;
- E1.prototype.point = !0;
- class Pf extends pt {
- constructor(e, n, r, i, a, o) {
- super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? Oi.TrackBefore : Oi.TrackAfter : Oi.TrackDel;
- }
- // Only relevant when this.block == true
- get type() {
- return this.startSide != this.endSide ? la.WidgetRange : this.startSide <= 0 ? la.WidgetBefore : la.WidgetAfter;
- }
- get heightRelevant() {
- return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
- }
- eq(e) {
- return e instanceof Pf && rxt(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
- }
- range(e, n = e) {
- if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
- throw new RangeError("Invalid range for replacement decoration");
- if (!this.isReplace && n != e)
- throw new RangeError("Widget decorations can only have zero-length ranges");
- return super.range(e, n);
- }
- }
- Pf.prototype.point = !0;
- function nve(t, e = !1) {
- let { inclusiveStart: n, inclusiveEnd: r } = t;
- return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
- }
- function rxt(t, e) {
- return t == e || !!(t && e && t.compare(e));
- }
- function m4(t, e, n, r = 0) {
- let i = n.length - 1;
- i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
- }
- class gb {
- constructor(e, n, r, i) {
- this.doc = e, this.pos = n, this.end = r, this.disallowBlockEffectsFor = i, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = n;
- }
- posCovered() {
- if (this.content.length == 0)
- return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
- let e = this.content[this.content.length - 1];
- return !(e.breakAfter || e instanceof Ru && e.deco.endSide < 0);
- }
- getLine() {
- return this.curLine || (this.content.push(this.curLine = new Rr()), this.atCursorPos = !0), this.curLine;
- }
- flushBuffer(e = this.bufferMarks) {
- this.pendingBuffer && (this.curLine.append(lx(new Jg(-1), e), e.length), this.pendingBuffer = 0);
- }
- addBlockWidget(e) {
- this.flushBuffer(), this.curLine = null, this.content.push(e);
- }
- finish(e) {
- this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ru) && this.getLine();
- }
- buildText(e, n, r) {
- for (; e > 0; ) {
- if (this.textOff == this.text.length) {
- let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
- if (this.skip = 0, s)
- throw new Error("Ran out of text content when drawing inline views");
- if (o) {
- this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer(), this.curLine = null, this.atCursorPos = !0, e--;
- continue;
- } else
- this.text = a, this.textOff = 0;
- }
- let i = Math.min(
- this.text.length - this.textOff,
- e,
- 512
- /* T.Chunk */
- );
- this.flushBuffer(n.slice(n.length - r)), this.getLine().append(lx(new Us(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
- }
- }
- span(e, n, r, i) {
- this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
- }
- point(e, n, r, i, a, o) {
- if (this.disallowBlockEffectsFor[o] && r instanceof Pf) {
- if (r.block)
- throw new RangeError("Block decorations may not be specified via plugins");
- if (n > this.doc.lineAt(this.pos).to)
- throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
- }
- let s = n - e;
- if (r instanceof Pf)
- if (r.block)
- r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ru(r.widget || em.block, s, r));
- else {
- let l = Yc.create(r.widget || em.inline, s, s ? 0 : r.startSide), u = this.atCursorPos && !l.isEditable && a <= i.length && (e < n || r.startSide > 0), c = !l.isEditable && (e < n || a > i.length || r.startSide <= 0), f = this.getLine();
- this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(lx(new Jg(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(lx(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
- }
- else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
- s && (this.textOff + s <= this.text.length ? this.textOff += s : (this.skip += s - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = n), this.openStart < 0 && (this.openStart = a);
- }
- static build(e, n, r, i, a) {
- let o = new gb(e, n, r, a);
- return o.openEnd = Sn.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
- }
- }
- function lx(t, e) {
- for (let n of e)
- t = new Xu(n, [t], t.length);
- return t;
- }
- class em extends Jl {
- constructor(e) {
- super(), this.tag = e;
- }
- eq(e) {
- return e.tag == this.tag;
- }
- toDOM() {
- return document.createElement(this.tag);
- }
- updateDOM(e) {
- return e.nodeName.toLowerCase() == this.tag;
- }
- get isHidden() {
- return !0;
- }
- }
- em.inline = /* @__PURE__ */ new em("span");
- em.block = /* @__PURE__ */ new em("div");
- var ir = /* @__PURE__ */ function(t) {
- return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
- }(ir || (ir = {}));
- const tp = ir.LTR, rB = ir.RTL;
- function rve(t) {
- let e = [];
- for (let n = 0; n < t.length; n++)
- e.push(1 << +t[n]);
- return e;
- }
- const ixt = /* @__PURE__ */ rve("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), axt = /* @__PURE__ */ rve("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), y4 = /* @__PURE__ */ Object.create(null), dl = [];
- for (let t of ["()", "[]", "{}"]) {
- let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
- y4[e] = n, y4[n] = -e;
- }
- function ive(t) {
- return t <= 247 ? ixt[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? axt[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
- }
- const oxt = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
- class qc {
- /**
- The direction of this span.
- */
- get dir() {
- return this.level % 2 ? rB : tp;
- }
- /**
- @internal
- */
- constructor(e, n, r) {
- this.from = e, this.to = n, this.level = r;
- }
- /**
- @internal
- */
- side(e, n) {
- return this.dir == n == e ? this.to : this.from;
- }
- /**
- @internal
- */
- forward(e, n) {
- return e == (this.dir == n);
- }
- /**
- @internal
- */
- static find(e, n, r, i) {
- let a = -1;
- for (let o = 0; o < e.length; o++) {
- let s = e[o];
- if (s.from <= n && s.to >= n) {
- if (s.level == r)
- return o;
- (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
- }
- }
- if (a < 0)
- throw new RangeError("Index out of range");
- return a;
- }
- }
- function ave(t, e) {
- if (t.length != e.length)
- return !1;
- for (let n = 0; n < t.length; n++) {
- let r = t[n], i = e[n];
- if (r.from != i.from || r.to != i.to || r.direction != i.direction || !ave(r.inner, i.inner))
- return !1;
- }
- return !0;
- }
- const Wn = [];
- function sxt(t, e, n, r, i) {
- for (let a = 0; a <= r.length; a++) {
- let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
- for (let u = o, c = l, f = l; u < s; u++) {
- let d = ive(t.charCodeAt(u));
- d == 512 ? d = c : d == 8 && f == 4 && (d = 16), Wn[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
- }
- for (let u = o, c = l, f = l; u < s; u++) {
- let d = Wn[u];
- if (d == 128)
- u < s - 1 && c == Wn[u + 1] && c & 24 ? d = Wn[u] = c : Wn[u] = 256;
- else if (d == 64) {
- let h = u + 1;
- for (; h < s && Wn[h] == 64; )
- h++;
- let p = u && c == 8 || h < n && Wn[h] == 8 ? f == 1 ? 1 : 8 : 256;
- for (let v = u; v < h; v++)
- Wn[v] = p;
- u = h - 1;
- } else d == 8 && f == 1 && (Wn[u] = 1);
- c = d, d & 7 && (f = d);
- }
- }
- }
- function lxt(t, e, n, r, i) {
- let a = i == 1 ? 2 : 1;
- for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
- let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
- for (let f = u, d, h, p; f < c; f++)
- if (h = y4[d = t.charCodeAt(f)])
- if (h < 0) {
- for (let v = s - 3; v >= 0; v -= 3)
- if (dl[v + 1] == -h) {
- let g = dl[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
- m && (Wn[f] = Wn[dl[v]] = m), s = v;
- break;
- }
- } else {
- if (dl.length == 189)
- break;
- dl[s++] = f, dl[s++] = d, dl[s++] = l;
- }
- else if ((p = Wn[f]) == 2 || p == 1) {
- let v = p == i;
- l = v ? 0 : 1;
- for (let g = s - 3; g >= 0; g -= 3) {
- let m = dl[g + 2];
- if (m & 2)
- break;
- if (v)
- dl[g + 2] |= 2;
- else {
- if (m & 4)
- break;
- dl[g + 2] |= 4;
- }
- }
- }
- }
- }
- function uxt(t, e, n, r) {
- for (let i = 0, a = r; i <= n.length; i++) {
- let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
- for (let l = o; l < s; ) {
- let u = Wn[l];
- if (u == 256) {
- let c = l + 1;
- for (; ; )
- if (c == s) {
- if (i == n.length)
- break;
- c = n[i++].to, s = i < n.length ? n[i].from : e;
- } else if (Wn[c] == 256)
- c++;
- else
- break;
- let f = a == 1, d = (c < e ? Wn[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
- for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
- p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), Wn[--p] = h;
- l = c;
- } else
- a = u, l++;
- }
- }
- }
- function b4(t, e, n, r, i, a, o) {
- let s = r % 2 ? 2 : 1;
- if (r % 2 == i % 2)
- for (let l = e, u = 0; l < n; ) {
- let c = !0, f = !1;
- if (u == a.length || l < a[u].from) {
- let v = Wn[l];
- v != s && (c = !1, f = v == 16);
- }
- let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
- e: for (; ; )
- if (u < a.length && p == a[u].from) {
- if (f)
- break e;
- let v = a[u];
- if (!c)
- for (let g = v.to, m = u + 1; ; ) {
- if (g == n)
- break e;
- if (m < a.length && a[m].from == g)
- g = a[m++].to;
- else {
- if (Wn[g] == s)
- break e;
- break;
- }
- }
- if (u++, d)
- d.push(v);
- else {
- v.from > l && o.push(new qc(l, v.from, h));
- let g = v.direction == tp != !(h % 2);
- _4(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
- }
- p = v.to;
- } else {
- if (p == n || (c ? Wn[p] != s : Wn[p] == s))
- break;
- p++;
- }
- d ? b4(t, l, p, r + 1, i, d, o) : l < p && o.push(new qc(l, p, h)), l = p;
- }
- else
- for (let l = n, u = a.length; l > e; ) {
- let c = !0, f = !1;
- if (!u || l > a[u - 1].to) {
- let v = Wn[l - 1];
- v != s && (c = !1, f = v == 16);
- }
- let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
- e: for (; ; )
- if (u && p == a[u - 1].to) {
- if (f)
- break e;
- let v = a[--u];
- if (!c)
- for (let g = v.from, m = u; ; ) {
- if (g == e)
- break e;
- if (m && a[m - 1].to == g)
- g = a[--m].from;
- else {
- if (Wn[g - 1] == s)
- break e;
- break;
- }
- }
- if (d)
- d.push(v);
- else {
- v.to < l && o.push(new qc(v.to, l, h));
- let g = v.direction == tp != !(h % 2);
- _4(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
- }
- p = v.from;
- } else {
- if (p == e || (c ? Wn[p - 1] != s : Wn[p - 1] == s))
- break;
- p--;
- }
- d ? b4(t, p, l, r + 1, i, d, o) : p < l && o.push(new qc(p, l, h)), l = p;
- }
- }
- function _4(t, e, n, r, i, a, o) {
- let s = e % 2 ? 2 : 1;
- sxt(t, i, a, r, s), lxt(t, i, a, r, s), uxt(i, a, r, s), b4(t, i, a, e, n, r, o);
- }
- function cxt(t, e, n) {
- if (!t)
- return [new qc(0, 0, e == rB ? 1 : 0)];
- if (e == tp && !n.length && !oxt.test(t))
- return ove(t.length);
- if (n.length)
- for (; t.length > Wn.length; )
- Wn[Wn.length] = 256;
- let r = [], i = e == tp ? 0 : 1;
- return _4(t, i, i, n, 0, t.length, r), r;
- }
- function ove(t) {
- return [new qc(0, t, 0)];
- }
- let sve = "";
- function fxt(t, e, n, r, i) {
- var a;
- let o = r.head - t.from, s = qc.find(e, o, (a = r.bidiLevel) !== null && a !== void 0 ? a : -1, r.assoc), l = e[s], u = l.side(i, n);
- if (o == u) {
- let d = s += i ? 1 : -1;
- if (d < 0 || d >= e.length)
- return null;
- l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
- }
- let c = wi(t.text, o, l.forward(i, n));
- (c < l.from || c > l.to) && (c = u), sve = t.text.slice(Math.min(o, c), Math.max(o, c));
- let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
- return f && c == u && f.level + (i ? 0 : 1) < l.level ? De.cursor(f.side(!i, n) + t.from, f.forward(i, n) ? 1 : -1, f.level) : De.cursor(c + t.from, l.forward(i, n) ? -1 : 1, l.level);
- }
- function dxt(t, e, n) {
- for (let r = e; r < n; r++) {
- let i = ive(t.charCodeAt(r));
- if (i == 1)
- return tp;
- if (i == 2 || i == 4)
- return rB;
- }
- return tp;
- }
- const lve = /* @__PURE__ */ ut.define(), uve = /* @__PURE__ */ ut.define(), cve = /* @__PURE__ */ ut.define(), fve = /* @__PURE__ */ ut.define(), O4 = /* @__PURE__ */ ut.define(), dve = /* @__PURE__ */ ut.define(), hve = /* @__PURE__ */ ut.define(), pve = /* @__PURE__ */ ut.define({
- combine: (t) => t.some((e) => e)
- }), vve = /* @__PURE__ */ ut.define({
- combine: (t) => t.some((e) => e)
- }), gve = /* @__PURE__ */ ut.define();
- class og {
- constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
- this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
- }
- map(e) {
- return e.empty ? this : new og(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
- }
- clip(e) {
- return this.range.to <= e.doc.length ? this : new og(De.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
- }
- }
- const ux = /* @__PURE__ */ zt.define({ map: (t, e) => t.map(e) }), mve = /* @__PURE__ */ zt.define();
- function Ia(t, e, n) {
- let r = t.facet(fve);
- r.length ? r[0](e) : window.onerror ? window.onerror(String(e), n, void 0, void 0, e) : n ? console.error(n + ":", e) : console.error(e);
- }
- const Nc = /* @__PURE__ */ ut.define({ combine: (t) => t.length ? t[0] : !0 });
- let hxt = 0;
- const Ty = /* @__PURE__ */ ut.define();
- class Ir {
- constructor(e, n, r, i, a) {
- this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
- }
- /**
- Define a plugin from a constructor function that creates the
- plugin's value, given an editor view.
- */
- static define(e, n) {
- const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
- return new Ir(hxt++, e, r, i, (s) => {
- let l = [Ty.of(s)];
- return o && l.push(b_.of((u) => {
- let c = u.plugin(s);
- return c ? o(c) : pt.none;
- })), a && l.push(a(s)), l;
- });
- }
- /**
- Create a plugin for a class whose constructor takes a single
- editor view as argument.
- */
- static fromClass(e, n) {
- return Ir.define((r) => new e(r), n);
- }
- }
- class nD {
- constructor(e) {
- this.spec = e, this.mustUpdate = null, this.value = null;
- }
- update(e) {
- if (this.value) {
- if (this.mustUpdate) {
- let n = this.mustUpdate;
- if (this.mustUpdate = null, this.value.update)
- try {
- this.value.update(n);
- } catch (r) {
- if (Ia(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
- try {
- this.value.destroy();
- } catch {
- }
- this.deactivate();
- }
- }
- } else if (this.spec)
- try {
- this.value = this.spec.create(e);
- } catch (n) {
- Ia(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
- }
- return this;
- }
- destroy(e) {
- var n;
- if (!((n = this.value) === null || n === void 0) && n.destroy)
- try {
- this.value.destroy();
- } catch (r) {
- Ia(e.state, r, "CodeMirror plugin crashed");
- }
- }
- deactivate() {
- this.spec = this.value = null;
- }
- }
- const yve = /* @__PURE__ */ ut.define(), iB = /* @__PURE__ */ ut.define(), b_ = /* @__PURE__ */ ut.define(), bve = /* @__PURE__ */ ut.define(), aB = /* @__PURE__ */ ut.define(), _ve = /* @__PURE__ */ ut.define();
- function OK(t, e) {
- let n = t.state.facet(_ve);
- if (!n.length)
- return n;
- let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
- return Sn.spans(r, e.from, e.to, {
- point() {
- },
- span(a, o, s, l) {
- let u = a - e.from, c = o - e.from, f = i;
- for (let d = s.length - 1; d >= 0; d--, l--) {
- let h = s[d].spec.bidiIsolate, p;
- if (h == null && (h = dxt(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
- p.to = c, f = p.inner;
- else {
- let v = { from: u, to: c, direction: h, inner: [] };
- f.push(v), f = v.inner;
- }
- }
- }
- }), i;
- }
- const Ove = /* @__PURE__ */ ut.define();
- function Sve(t) {
- let e = 0, n = 0, r = 0, i = 0;
- for (let a of t.state.facet(Ove)) {
- let o = a(t);
- o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (n = Math.max(n, o.right)), o.top != null && (r = Math.max(r, o.top)), o.bottom != null && (i = Math.max(i, o.bottom)));
- }
- return { left: e, right: n, top: r, bottom: i };
- }
- const Py = /* @__PURE__ */ ut.define();
- class Jo {
- constructor(e, n, r, i) {
- this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
- }
- join(e) {
- return new Jo(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
- }
- addToSet(e) {
- let n = e.length, r = this;
- for (; n > 0; n--) {
- let i = e[n - 1];
- if (!(i.fromA > r.toA)) {
- if (i.toA < r.fromA)
- break;
- r = r.join(i), e.splice(n - 1, 1);
- }
- }
- return e.splice(n, 0, r), e;
- }
- static extendWithRanges(e, n) {
- if (n.length == 0)
- return e;
- let r = [];
- for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
- let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
- for (; a < n.length && n[a] < c; ) {
- let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
- if (h <= p && new Jo(h + u, p + u, h, p).addToSet(r), d > c)
- break;
- a += 2;
- }
- if (!l)
- return r;
- new Jo(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
- }
- }
- }
- class ET {
- constructor(e, n, r) {
- this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = Zr.empty(this.startState.doc.length);
- for (let a of r)
- this.changes = this.changes.compose(a.changes);
- let i = [];
- this.changes.iterChangedRanges((a, o, s, l) => i.push(new Jo(a, o, s, l))), this.changedRanges = i;
- }
- /**
- @internal
- */
- static create(e, n, r) {
- return new ET(e, n, r);
- }
- /**
- Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
- [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
- update.
- */
- get viewportChanged() {
- return (this.flags & 4) > 0;
- }
- /**
- Indicates whether the height of a block element in the editor
- changed in this update.
- */
- get heightChanged() {
- return (this.flags & 2) > 0;
- }
- /**
- Returns true when the document was modified or the size of the
- editor, or elements within the editor, changed.
- */
- get geometryChanged() {
- return this.docChanged || (this.flags & 10) > 0;
- }
- /**
- True when this update indicates a focus change.
- */
- get focusChanged() {
- return (this.flags & 1) > 0;
- }
- /**
- Whether the document changed in this update.
- */
- get docChanged() {
- return !this.changes.empty;
- }
- /**
- Whether the selection was explicitly set in this update.
- */
- get selectionSet() {
- return this.transactions.some((e) => e.selection);
- }
- /**
- @internal
- */
- get empty() {
- return this.flags == 0 && this.transactions.length == 0;
- }
- }
- class SK extends Qn {
- get length() {
- return this.view.state.doc.length;
- }
- constructor(e) {
- super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = pt.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Rr()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new Jo(0, 0, 0, e.state.doc.length)], 0, null);
- }
- // Update the document view to a given state.
- update(e) {
- var n;
- let r = e.changedRanges;
- this.minWidth > 0 && r.length && (r.every(({ fromA: u, toA: c }) => c < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.updateEditContextFormatting(e);
- let i = -1;
- this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !_xt(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
- let a = i > -1 ? vxt(this.view, e.changes, i) : null;
- if (this.domChanged = null, this.hasComposition) {
- this.markedForComposition.clear();
- let { from: u, to: c } = this.hasComposition;
- r = new Jo(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
- }
- this.hasComposition = a ? { from: a.range.fromB, to: a.range.toB } : null, (lt.ie || lt.chrome) && !a && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
- let o = this.decorations, s = this.updateDeco(), l = yxt(o, s, e.changes);
- return r = Jo.extendWithRanges(r, l), !(this.flags & 7) && r.length == 0 ? !1 : (this.updateInner(r, e.startState.doc.length, a), e.transactions.length && (this.lastUpdate = Date.now()), !0);
- }
- // Used by update and the constructor do perform the actual DOM
- // update
- updateInner(e, n, r) {
- this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
- let { observer: i } = this.view;
- i.ignore(() => {
- this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
- let o = lt.chrome || lt.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
- this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
- }), this.markedForComposition.forEach(
- (o) => o.flags &= -9
- /* ViewFlag.Composition */
- );
- let a = [];
- if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
- for (let o of this.children)
- o instanceof Ru && o.widget instanceof xK && a.push(o.dom);
- i.updateGaps(a);
- }
- updateChildren(e, n, r) {
- let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
- for (let o = i.length - 1; ; o--) {
- let s = o >= 0 ? i[o] : null;
- if (!s)
- break;
- let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
- if (r && r.range.fromB < f && r.range.toB > c) {
- let O = gb.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), S = gb.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
- h = O.breakAtStart, p = O.openStart, v = S.openEnd;
- let x = this.compositionView(r);
- S.breakAtStart ? x.breakAfter = 1 : S.content.length && x.merge(x.length, x.length, S.content[0], !1, S.openStart, 0) && (x.breakAfter = S.content[0].breakAfter, S.content.shift()), O.content.length && x.merge(0, 0, O.content[O.content.length - 1], !0, 0, O.openEnd) && O.content.pop(), d = O.content.concat(x).concat(S.content);
- } else
- ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = gb.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
- let { i: g, off: m } = a.findPos(u, 1), { i: y, off: _ } = a.findPos(l, -1);
- Xpe(this, y, _, g, m, d, h, p, v);
- }
- r && this.fixCompositionDOM(r);
- }
- updateEditContextFormatting(e) {
- this.editContextFormatting = this.editContextFormatting.map(e.changes);
- for (let n of e.transactions)
- for (let r of n.effects)
- r.is(mve) && (this.editContextFormatting = r.value);
- }
- compositionView(e) {
- let n = new Us(e.text.nodeValue);
- n.flags |= 8;
- for (let { deco: i } of e.marks)
- n = new Xu(i, [n], n.length);
- let r = new Rr();
- return r.append(n, 0), r;
- }
- fixCompositionDOM(e) {
- let n = (a, o) => {
- o.flags |= 8 | (o.children.some(
- (l) => l.flags & 7
- /* ViewFlag.Dirty */
- ) ? 1 : 0), this.markedForComposition.add(o);
- let s = Qn.get(a);
- s && s != o && (s.dom = null), o.setDOM(a);
- }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
- n(e.line, i);
- for (let a = e.marks.length - 1; a >= -1; a--)
- r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
- }
- // Sync the DOM selection to this.state.selection
- updateSelection(e = !1, n = !1) {
- (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
- let r = this.view.root.activeElement, i = r == this.dom, a = !i && $w(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
- if (!(i || n || a))
- return;
- let o = this.forceSelection;
- this.forceSelection = !1;
- let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
- if (lt.gecko && s.empty && !this.hasComposition && pxt(l)) {
- let f = document.createTextNode("");
- this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new zi(f, 0), o = !0;
- }
- let c = this.view.observer.selectionRange;
- (o || !c.focusNode || (!vb(l.node, l.offset, c.anchorNode, c.anchorOffset) || !vb(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
- lt.android && lt.chrome && this.dom.contains(c.focusNode) && bxt(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
- let f = y_(this.view.root);
- if (f) if (s.empty) {
- if (lt.gecko) {
- let d = gxt(l.node, l.offset);
- if (d && d != 3) {
- let h = (d == 1 ? jpe : Zpe)(l.node, l.offset);
- h && (l = new zi(h.node, h.offset));
- }
- }
- f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
- } else if (f.extend) {
- f.collapse(l.node, l.offset);
- try {
- f.extend(u.node, u.offset);
- } catch {
- }
- } else {
- let d = document.createRange();
- s.anchor > s.head && ([l, u] = [u, l]), d.setEnd(u.node, u.offset), d.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d);
- }
- a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
- }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new zi(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new zi(c.focusNode, c.focusOffset);
- }
- // If a zero-length widget is inserted next to the cursor during
- // composition, avoid moving it across it and disrupting the
- // composition.
- suppressWidgetCursorChange(e, n) {
- return this.hasComposition && n.empty && vb(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
- }
- enforceCursorAssoc() {
- if (this.hasComposition)
- return;
- let { view: e } = this, n = e.state.selection.main, r = y_(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
- if (!r || !n.empty || !n.assoc || !r.modify)
- return;
- let o = Rr.find(this, n.head);
- if (!o)
- return;
- let s = o.posAtStart;
- if (n.head == s || n.head == s + o.length)
- return;
- let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
- if (!l || !u || l.bottom > u.top)
- return;
- let c = this.domAtPos(n.head + n.assoc);
- r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
- let f = e.observer.selectionRange;
- e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
- }
- // If a position is in/near a block widget, move it to a nearby text
- // line, since we don't want the cursor inside a block widget.
- moveToLine(e) {
- let n = this.dom, r;
- if (e.node != n)
- return e;
- for (let i = e.offset; !r && i < n.childNodes.length; i++) {
- let a = Qn.get(n.childNodes[i]);
- a instanceof Rr && (r = a.domAtPos(0));
- }
- for (let i = e.offset - 1; !r && i >= 0; i--) {
- let a = Qn.get(n.childNodes[i]);
- a instanceof Rr && (r = a.domAtPos(a.length));
- }
- return r ? new zi(r.node, r.offset, !0) : e;
- }
- nearest(e) {
- for (let n = e; n; ) {
- let r = Qn.get(n);
- if (r && r.rootView == this)
- return r;
- n = n.parentNode;
- }
- return null;
- }
- posFromDOM(e, n) {
- let r = this.nearest(e);
- if (!r)
- throw new RangeError("Trying to find position for a DOM position outside of the document");
- return r.localPosFromDOM(e, n) + r.posAtStart;
- }
- domAtPos(e) {
- let { i: n, off: r } = this.childCursor().findPos(e, -1);
- for (; n < this.children.length - 1; ) {
- let i = this.children[n];
- if (r < i.length || i instanceof Rr)
- break;
- n++, r = 0;
- }
- return this.children[n].domAtPos(r);
- }
- coordsAt(e, n) {
- let r = null, i = 0;
- for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
- let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
- if (l < e)
- break;
- if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Rr && !(r instanceof Rr && n >= 0)))
- r = s, i = u;
- else if (r && u == e && l == e && s instanceof Ru && Math.abs(n) < 2) {
- if (s.deco.startSide < 0)
- break;
- o && (r = null);
- }
- a = u;
- }
- return r ? r.coordsAt(e - i, n) : null;
- }
- coordsForChar(e) {
- let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
- if (!(i instanceof Rr))
- return null;
- for (; i.children.length; ) {
- let { i: s, off: l } = i.childPos(r, 1);
- for (; ; s++) {
- if (s == i.children.length)
- return null;
- if ((i = i.children[s]).length)
- break;
- }
- r = l;
- }
- if (!(i instanceof Us))
- return null;
- let a = wi(i.text, r);
- if (a == r)
- return null;
- let o = ep(i.dom, r, a).getClientRects();
- for (let s = 0; s < o.length; s++) {
- let l = o[s];
- if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
- return l;
- }
- return null;
- }
- measureVisibleLineHeights(e) {
- let n = [], { from: r, to: i } = e, a = this.view.contentDOM.clientWidth, o = a > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, s = -1, l = this.view.textDirection == ir.LTR;
- for (let u = 0, c = 0; c < this.children.length; c++) {
- let f = this.children[c], d = u + f.length;
- if (d > i)
- break;
- if (u >= r) {
- let h = f.dom.getBoundingClientRect();
- if (n.push(h.height), o) {
- let p = f.dom.lastChild, v = p ? Kg(p) : [];
- if (v.length) {
- let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
- m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
- }
- }
- }
- u = d + f.breakAfter;
- }
- return n;
- }
- textDirectionAt(e) {
- let { i: n } = this.childPos(e, 1);
- return getComputedStyle(this.children[n].dom).direction == "rtl" ? ir.RTL : ir.LTR;
- }
- measureTextSize() {
- for (let a of this.children)
- if (a instanceof Rr) {
- let o = a.measureTextSize();
- if (o)
- return o;
- }
- let e = document.createElement("div"), n, r, i;
- return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
- this.dom.appendChild(e);
- let a = Kg(e.firstChild)[0];
- n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
- }), { lineHeight: n, charWidth: r, textHeight: i };
- }
- childCursor(e = this.length) {
- let n = this.children.length;
- return n && (e -= this.children[--n].length), new Upe(this.children, e, n);
- }
- computeBlockGapDeco() {
- let e = [], n = this.view.viewState;
- for (let r = 0, i = 0; ; i++) {
- let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
- if (o > r) {
- let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
- e.push(pt.replace({
- widget: new xK(s),
- block: !0,
- inclusive: !0,
- isBlockGap: !0
- }).range(r, o));
- }
- if (!a)
- break;
- r = a.to + 1;
- }
- return pt.set(e);
- }
- updateDeco() {
- let e = 1, n = this.view.state.facet(b_).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(bve).map((a, o) => {
- let s = typeof a == "function";
- return s && (r = !0), s ? a(this.view) : a;
- });
- for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(Sn.join(i))), this.decorations = [
- this.editContextFormatting,
- ...n,
- this.computeBlockGapDeco(),
- this.view.viewState.lineGapDeco
- ]; e < this.decorations.length; )
- this.dynamicDecorationMap[e++] = !1;
- return this.decorations;
- }
- scrollIntoView(e) {
- if (e.isSnapshot) {
- let u = this.view.viewState.lineBlockAt(e.range.head);
- this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
- return;
- }
- for (let u of this.view.state.facet(gve))
- try {
- if (u(this.view, e.range, e))
- return !0;
- } catch (c) {
- Ia(this.view.state, c, "scroll handler");
- }
- let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
- if (!r)
- return;
- !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
- left: Math.min(r.left, i.left),
- top: Math.min(r.top, i.top),
- right: Math.max(r.right, i.right),
- bottom: Math.max(r.bottom, i.bottom)
- });
- let a = Sve(this.view), o = {
- left: r.left - a.left,
- top: r.top - a.top,
- right: r.right + a.right,
- bottom: r.bottom + a.bottom
- }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
- USt(this.view.scrollDOM, o, n.head < n.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, s), -s), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == ir.LTR);
- }
- }
- function pxt(t) {
- return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false");
- }
- class xK extends Jl {
- constructor(e) {
- super(), this.height = e;
- }
- toDOM() {
- let e = document.createElement("div");
- return e.className = "cm-gap", this.updateDOM(e), e;
- }
- eq(e) {
- return e.height == this.height;
- }
- updateDOM(e) {
- return e.style.height = this.height + "px", !0;
- }
- get editable() {
- return !0;
- }
- get estimatedHeight() {
- return this.height;
- }
- ignoreEvent() {
- return !1;
- }
- }
- function xve(t, e) {
- let n = t.observer.selectionRange;
- if (!n.focusNode)
- return null;
- let r = jpe(n.focusNode, n.focusOffset), i = Zpe(n.focusNode, n.focusOffset), a = r || i;
- if (i && r && i.node != r.node) {
- let s = Qn.get(i.node);
- if (!s || s instanceof Us && s.text != i.node.nodeValue)
- a = i;
- else if (t.docView.lastCompositionAfterCursor) {
- let l = Qn.get(r.node);
- !l || l instanceof Us && l.text != r.node.nodeValue || (a = i);
- }
- }
- if (t.docView.lastCompositionAfterCursor = a != r, !a)
- return null;
- let o = e - a.offset;
- return { from: o, to: o + a.node.nodeValue.length, node: a.node };
- }
- function vxt(t, e, n) {
- let r = xve(t, n);
- if (!r)
- return null;
- let { node: i, from: a, to: o } = r, s = i.nodeValue;
- if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
- return null;
- let l = e.invertedDesc, u = new Jo(l.mapPos(a), l.mapPos(o), a, o), c = [];
- for (let f = i.parentNode; ; f = f.parentNode) {
- let d = Qn.get(f);
- if (d instanceof Xu)
- c.push({ node: f, deco: d.mark });
- else {
- if (d instanceof Rr || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
- return { range: u, text: i, marks: c, line: f };
- if (f != t.contentDOM)
- c.push({ node: f, deco: new A1({
- inclusive: !0,
- attributes: nxt(f),
- tagName: f.tagName.toLowerCase()
- }) });
- else
- return null;
- }
- }
- }
- function gxt(t, e) {
- return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0);
- }
- let mxt = class {
- constructor() {
- this.changes = [];
- }
- compareRange(e, n) {
- m4(e, n, this.changes);
- }
- comparePoint(e, n) {
- m4(e, n, this.changes);
- }
- };
- function yxt(t, e, n) {
- let r = new mxt();
- return Sn.compare(t, e, n, r), r.changes;
- }
- function bxt(t, e) {
- for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
- if (n.nodeType == 1 && n.contentEditable == "false")
- return !0;
- return !1;
- }
- function _xt(t, e) {
- let n = !1;
- return e && t.iterChangedRanges((r, i) => {
- r < e.to && i > e.from && (n = !0);
- }), n;
- }
- function Oxt(t, e, n = 1) {
- let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
- if (i.length == 0)
- return De.cursor(e);
- a == 0 ? n = 1 : a == i.length && (n = -1);
- let o = a, s = a;
- n < 0 ? o = wi(i.text, a, !1) : s = wi(i.text, a);
- let l = r(i.text.slice(o, s));
- for (; o > 0; ) {
- let u = wi(i.text, o, !1);
- if (r(i.text.slice(u, o)) != l)
- break;
- o = u;
- }
- for (; s < i.length; ) {
- let u = wi(i.text, s);
- if (r(i.text.slice(s, u)) != l)
- break;
- s = u;
- }
- return De.range(o + i.from, s + i.from);
- }
- function Sxt(t, e) {
- return e.left > t ? e.left - t : Math.max(0, t - e.right);
- }
- function xxt(t, e) {
- return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
- }
- function rD(t, e) {
- return t.top < e.bottom - 1 && t.bottom > e.top + 1;
- }
- function wK(t, e) {
- return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
- }
- function CK(t, e) {
- return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
- }
- function S4(t, e, n) {
- let r, i, a, o, s = !1, l, u, c, f;
- for (let p = t.firstChild; p; p = p.nextSibling) {
- let v = Kg(p);
- for (let g = 0; g < v.length; g++) {
- let m = v[g];
- i && rD(i, m) && (m = wK(CK(m, i.bottom), i.top));
- let y = Sxt(e, m), _ = xxt(n, m);
- if (y == 0 && _ == 0)
- return p.nodeType == 3 ? TK(p, e, n) : S4(p, e, n);
- if (!r || o > _ || o == _ && a > y) {
- r = p, i = m, a = y, o = _;
- let O = _ ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
- s = !O || (O > 0 ? g < v.length - 1 : g > 0);
- }
- y == 0 ? n > m.bottom && (!c || c.bottom < m.bottom) ? (l = p, c = m) : n < m.top && (!f || f.top > m.top) && (u = p, f = m) : c && rD(c, m) ? c = CK(c, m.bottom) : f && rD(f, m) && (f = wK(f, m.top));
- }
- }
- if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
- return { node: t, offset: 0 };
- let d = Math.max(i.left, Math.min(i.right, e));
- if (r.nodeType == 3)
- return TK(r, d, n);
- if (s && r.contentEditable != "false")
- return S4(r, d, n);
- let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
- return { node: t, offset: h };
- }
- function TK(t, e, n) {
- let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
- for (let s = 0; s < r; s++) {
- let l = ep(t, s, s + 1).getClientRects();
- for (let u = 0; u < l.length; u++) {
- let c = l[u];
- if (c.top == c.bottom)
- continue;
- o || (o = e - c.left);
- let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
- if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
- let d = e >= (c.left + c.right) / 2, h = d;
- if ((lt.chrome || lt.gecko) && ep(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
- return { node: t, offset: s + (h ? 1 : 0) };
- i = s + (h ? 1 : 0), a = f;
- }
- }
- }
- return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
- }
- function wve(t, e, n, r = -1) {
- var i, a;
- let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
- if (d < 0)
- return 0;
- if (d > u)
- return t.state.doc.length;
- for (let O = t.viewState.heightOracle.textHeight / 2, S = !1; l = t.elementAtHeight(d), l.type != la.Text; )
- for (; d = r > 0 ? l.bottom + O : l.top - O, !(d >= 0 && d <= u); ) {
- if (S)
- return n ? null : 0;
- S = !0, r = -r;
- }
- f = s + d;
- let h = l.from;
- if (h < t.viewport.from)
- return t.viewport.from == 0 ? 0 : n ? null : PK(t, o, l, c, f);
- if (h > t.viewport.to)
- return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : PK(t, o, l, c, f);
- let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
- g && !t.contentDOM.contains(g) && (g = null), g || (c = Math.max(o.left + 1, Math.min(o.right - 1, c)), g = v.elementFromPoint(c, f), g && !t.contentDOM.contains(g) && (g = null));
- let m, y = -1;
- if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
- if (p.caretPositionFromPoint) {
- let O = p.caretPositionFromPoint(c, f);
- O && ({ offsetNode: m, offset: y } = O);
- } else if (p.caretRangeFromPoint) {
- let O = p.caretRangeFromPoint(c, f);
- O && ({ startContainer: m, startOffset: y } = O, (!t.contentDOM.contains(m) || lt.safari && wxt(m, y, c) || lt.chrome && Cxt(m, y, c)) && (m = void 0));
- }
- }
- if (!m || !t.docView.dom.contains(m)) {
- let O = Rr.find(t.docView, h);
- if (!O)
- return d > l.top + l.height / 2 ? l.to : l.from;
- ({ node: m, offset: y } = S4(O.dom, c, f));
- }
- let _ = t.docView.nearest(m);
- if (!_)
- return null;
- if (_.isWidget && ((a = _.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
- let O = _.dom.getBoundingClientRect();
- return e.y < O.top || e.y <= O.bottom && e.x <= (O.left + O.right) / 2 ? _.posAtStart : _.posAtEnd;
- } else
- return _.localPosFromDOM(m, y) + _.posAtStart;
- }
- function PK(t, e, n, r, i) {
- let a = Math.round((r - e.left) * t.defaultCharacterWidth);
- if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
- let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
- a += l * t.viewState.heightOracle.lineLength;
- }
- let o = t.state.sliceDoc(n.from, n.to);
- return n.from + l4(o, a, t.state.tabSize);
- }
- function wxt(t, e, n) {
- let r;
- if (t.nodeType != 3 || e != (r = t.nodeValue.length))
- return !1;
- for (let i = t.nextSibling; i; i = i.nextSibling)
- if (i.nodeType != 1 || i.nodeName != "BR")
- return !1;
- return ep(t, r - 1, r).getBoundingClientRect().left > n;
- }
- function Cxt(t, e, n) {
- if (e != 0)
- return !1;
- for (let i = t; ; ) {
- let a = i.parentNode;
- if (!a || a.nodeType != 1 || a.firstChild != i)
- return !1;
- if (a.classList.contains("cm-line"))
- break;
- i = a;
- }
- let r = t.nodeType == 1 ? t.getBoundingClientRect() : ep(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
- return n - r.left > 5;
- }
- function x4(t, e) {
- let n = t.lineBlockAt(e);
- if (Array.isArray(n.type)) {
- for (let r of n.type)
- if (r.to > e || r.to == e && (r.to == n.to || r.type == la.Text))
- return r;
- }
- return n;
- }
- function Txt(t, e, n, r) {
- let i = x4(t, e.head), a = !r || i.type != la.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
- if (a) {
- let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
- x: n == (s == ir.LTR) ? o.right - 1 : o.left + 1,
- y: (a.top + a.bottom) / 2
- });
- if (l != null)
- return De.cursor(l, n ? -1 : 1);
- }
- return De.cursor(n ? i.to : i.from, n ? -1 : 1);
- }
- function $K(t, e, n, r) {
- let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
- for (let s = e, l = null; ; ) {
- let u = fxt(i, a, o, s, n), c = sve;
- if (!u) {
- if (i.number == (n ? t.state.doc.lines : 1))
- return s;
- c = `
- `, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
- }
- if (l) {
- if (!l(c))
- return s;
- } else {
- if (!r)
- return u;
- l = r(c);
- }
- s = u;
- }
- }
- function Pxt(t, e, n) {
- let r = t.state.charCategorizer(e), i = r(n);
- return (a) => {
- let o = r(a);
- return i == lr.Space && (i = o), i == o;
- };
- }
- function $xt(t, e, n, r) {
- let i = e.head, a = n ? 1 : -1;
- if (i == (n ? t.state.doc.length : 0))
- return De.cursor(i, e.assoc);
- let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
- if (u)
- o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
- else {
- let h = t.viewState.lineBlockAt(i);
- o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
- }
- let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
- for (let h = 0; ; h += 10) {
- let p = s + (d + h) * a, v = wve(t, { x: f, y: p }, !1, a);
- if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
- let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
- return De.cursor(v, m, void 0, o);
- }
- }
- }
- function Aw(t, e, n) {
- for (; ; ) {
- let r = 0;
- for (let i of t)
- i.between(e - 1, e + 1, (a, o, s) => {
- if (e > a && e < o) {
- let l = r || n || (e - a < o - e ? -1 : 1);
- e = l < 0 ? a : o, r = l;
- }
- });
- if (!r)
- return e;
- }
- }
- function iD(t, e, n) {
- let r = Aw(t.state.facet(aB).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
- return r == n.from ? n : De.cursor(r, r < n.from ? 1 : -1);
- }
- class Axt {
- setSelectionOrigin(e) {
- this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
- }
- constructor(e) {
- this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, lt.safari && e.contentDOM.addEventListener("input", () => null), lt.gecko && Gxt(e.contentDOM.ownerDocument);
- }
- handleEvent(e) {
- !Nxt(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
- }
- runHandlers(e, n) {
- let r = this.handlers[e];
- if (r) {
- for (let i of r.observers)
- i(this.view, n);
- for (let i of r.handlers) {
- if (n.defaultPrevented)
- break;
- if (i(this.view, n)) {
- n.preventDefault();
- break;
- }
- }
- }
- }
- ensureHandlers(e) {
- let n = Ext(e), r = this.handlers, i = this.view.contentDOM;
- for (let a in n)
- if (a != "scroll") {
- let o = !n[a].handlers.length, s = r[a];
- s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
- }
- for (let a in r)
- a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
- this.handlers = n;
- }
- keydown(e) {
- if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
- return !0;
- if (this.tabFocusMode > 0 && e.keyCode != 27 && Tve.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), lt.android && lt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
- return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
- let n;
- return lt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = Cve.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || Mxt.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = n || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
- }
- flushIOSKey(e) {
- let n = this.pendingIOSKey;
- return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, ag(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
- }
- ignoreDuringComposition(e) {
- return /^key/.test(e.type) ? this.composing > 0 ? !0 : lt.safari && !lt.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
- }
- startMouseSelection(e) {
- this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
- }
- update(e) {
- this.view.observer.update(e), this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0);
- }
- destroy() {
- this.mouseSelection && this.mouseSelection.destroy();
- }
- }
- function AK(t, e) {
- return (n, r) => {
- try {
- return e.call(t, r, n);
- } catch (i) {
- Ia(n.state, i);
- }
- };
- }
- function Ext(t) {
- let e = /* @__PURE__ */ Object.create(null);
- function n(r) {
- return e[r] || (e[r] = { observers: [], handlers: [] });
- }
- for (let r of t) {
- let i = r.spec;
- if (i && i.domEventHandlers)
- for (let a in i.domEventHandlers) {
- let o = i.domEventHandlers[a];
- o && n(a).handlers.push(AK(r.value, o));
- }
- if (i && i.domEventObservers)
- for (let a in i.domEventObservers) {
- let o = i.domEventObservers[a];
- o && n(a).observers.push(AK(r.value, o));
- }
- }
- for (let r in Xs)
- n(r).handlers.push(Xs[r]);
- for (let r in us)
- n(r).observers.push(us[r]);
- return e;
- }
- const Cve = [
- { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
- { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
- { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
- { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
- ], Mxt = "dthko", Tve = [16, 17, 18, 20, 91, 92, 224, 225], cx = 6;
- function fx(t) {
- return Math.max(0, t) * 0.7 + 8;
- }
- function Ixt(t, e) {
- return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
- }
- class Dxt {
- constructor(e, n, r, i) {
- this.view = e, this.startEvent = n, this.style = r, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = n, this.scrollParent = XSt(e.contentDOM), this.atoms = e.state.facet(aB).map((o) => o(e));
- let a = e.contentDOM.ownerDocument;
- a.addEventListener("mousemove", this.move = this.move.bind(this)), a.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n.shiftKey, this.multiple = e.state.facet(cn.allowMultipleSelections) && Rxt(e, n), this.dragging = Lxt(e, n) && Eve(n) == 1 ? null : !1;
- }
- start(e) {
- this.dragging === !1 && this.select(e);
- }
- move(e) {
- var n;
- if (e.buttons == 0)
- return this.destroy();
- if (this.dragging || this.dragging == null && Ixt(this.startEvent, e) < 10)
- return;
- this.select(this.lastEvent = e);
- let r = 0, i = 0, a = ((n = this.scrollParent) === null || n === void 0 ? void 0 : n.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, o = Sve(this.view);
- e.clientX - o.left <= a.left + cx ? r = -fx(a.left - e.clientX) : e.clientX + o.right >= a.right - cx && (r = fx(e.clientX - a.right)), e.clientY - o.top <= a.top + cx ? i = -fx(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - cx && (i = fx(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
- }
- up(e) {
- this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
- }
- destroy() {
- this.setScrollSpeed(0, 0);
- let e = this.view.contentDOM.ownerDocument;
- e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
- }
- setScrollSpeed(e, n) {
- this.scrollSpeed = { x: e, y: n }, e || n ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), this.scrolling = -1);
- }
- scroll() {
- this.scrollParent ? (this.scrollParent.scrollLeft += this.scrollSpeed.x, this.scrollParent.scrollTop += this.scrollSpeed.y) : this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y), this.dragging === !1 && this.select(this.lastEvent);
- }
- skipAtoms(e) {
- let n = null;
- for (let r = 0; r < e.ranges.length; r++) {
- let i = e.ranges[r], a = null;
- if (i.empty) {
- let o = Aw(this.atoms, i.from, 0);
- o != i.from && (a = De.cursor(o, -1));
- } else {
- let o = Aw(this.atoms, i.from, -1), s = Aw(this.atoms, i.to, 1);
- (o != i.from || s != i.to) && (a = De.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
- }
- a && (n || (n = e.ranges.slice()), n[r] = a);
- }
- return n ? De.create(n, e.mainIndex) : e;
- }
- select(e) {
- let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
- (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
- selection: r,
- userEvent: "select.pointer"
- }), this.mustSelect = !1;
- }
- update(e) {
- e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
- }
- }
- function Rxt(t, e) {
- let n = t.state.facet(lve);
- return n.length ? n[0](e) : lt.mac ? e.metaKey : e.ctrlKey;
- }
- function kxt(t, e) {
- let n = t.state.facet(uve);
- return n.length ? n[0](e) : lt.mac ? !e.altKey : !e.ctrlKey;
- }
- function Lxt(t, e) {
- let { main: n } = t.state.selection;
- if (n.empty)
- return !1;
- let r = y_(t.root);
- if (!r || r.rangeCount == 0)
- return !0;
- let i = r.getRangeAt(0).getClientRects();
- for (let a = 0; a < i.length; a++) {
- let o = i[a];
- if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
- return !0;
- }
- return !1;
- }
- function Nxt(t, e) {
- if (!e.bubbles)
- return !0;
- if (e.defaultPrevented)
- return !1;
- for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
- if (!n || n.nodeType == 11 || (r = Qn.get(n)) && r.ignoreEvent(e))
- return !1;
- return !0;
- }
- const Xs = /* @__PURE__ */ Object.create(null), us = /* @__PURE__ */ Object.create(null), Pve = lt.ie && lt.ie_version < 15 || lt.ios && lt.webkit_version < 604;
- function Bxt(t) {
- let e = t.dom.parentNode;
- if (!e)
- return;
- let n = e.appendChild(document.createElement("textarea"));
- n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
- t.focus(), n.remove(), $ve(t, n.value);
- }, 50);
- }
- function $ve(t, e) {
- let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
- if (w4 != null && n.selection.ranges.every((l) => l.empty) && w4 == a.toString()) {
- let l = -1;
- r = n.changeByRange((u) => {
- let c = n.doc.lineAt(u.from);
- if (c.from == l)
- return { range: u };
- l = c.from;
- let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
- return {
- changes: { from: c.from, insert: f },
- range: De.cursor(u.from + f.length)
- };
- });
- } else o ? r = n.changeByRange((l) => {
- let u = a.line(i++);
- return {
- changes: { from: l.from, to: l.to, insert: u.text },
- range: De.cursor(l.from + u.length)
- };
- }) : r = n.replaceSelection(a);
- t.dispatch(r, {
- userEvent: "input.paste",
- scrollIntoView: !0
- });
- }
- us.scroll = (t) => {
- t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
- };
- Xs.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
- us.touchstart = (t, e) => {
- t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
- };
- us.touchmove = (t) => {
- t.inputState.setSelectionOrigin("select.pointer");
- };
- Xs.mousedown = (t, e) => {
- if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
- return !1;
- let n = null;
- for (let r of t.state.facet(cve))
- if (n = r(t, e), n)
- break;
- if (!n && e.button == 0 && (n = Fxt(t, e)), n) {
- let r = !t.hasFocus;
- t.inputState.startMouseSelection(new Dxt(t, e, n, r)), r && t.observer.ignore(() => {
- Qpe(t.contentDOM);
- let a = t.root.activeElement;
- a && !a.contains(t.contentDOM) && a.blur();
- });
- let i = t.inputState.mouseSelection;
- if (i)
- return i.start(e), i.dragging === !1;
- }
- return !1;
- };
- function EK(t, e, n, r) {
- if (r == 1)
- return De.cursor(e, n);
- if (r == 2)
- return Oxt(t.state, e, n);
- {
- let i = Rr.find(t.docView, e), a = t.state.doc.lineAt(i ? i.posAtEnd : e), o = i ? i.posAtStart : a.from, s = i ? i.posAtEnd : a.to;
- return s < t.state.doc.length && s == a.to && s++, De.range(o, s);
- }
- }
- let Ave = (t, e) => t >= e.top && t <= e.bottom, MK = (t, e, n) => Ave(e, n) && t >= n.left && t <= n.right;
- function zxt(t, e, n, r) {
- let i = Rr.find(t.docView, e);
- if (!i)
- return 1;
- let a = e - i.posAtStart;
- if (a == 0)
- return 1;
- if (a == i.length)
- return -1;
- let o = i.coordsAt(a, -1);
- if (o && MK(n, r, o))
- return -1;
- let s = i.coordsAt(a, 1);
- return s && MK(n, r, s) ? 1 : o && Ave(r, o) ? -1 : 1;
- }
- function IK(t, e) {
- let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
- return { pos: n, bias: zxt(t, n, e.clientX, e.clientY) };
- }
- const Vxt = lt.ie && lt.ie_version <= 11;
- let DK = null, RK = 0, kK = 0;
- function Eve(t) {
- if (!Vxt)
- return t.detail;
- let e = DK, n = kK;
- return DK = t, kK = Date.now(), RK = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (RK + 1) % 3 : 1;
- }
- function Fxt(t, e) {
- let n = IK(t, e), r = Eve(e), i = t.state.selection;
- return {
- update(a) {
- a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
- },
- get(a, o, s) {
- let l = IK(t, a), u, c = EK(t, l.pos, l.bias, r);
- if (n.pos != l.pos && !o) {
- let f = EK(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
- c = d < c.from ? De.range(d, h) : De.range(h, d);
- }
- return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Wxt(i, l.pos)) ? u : s ? i.addRange(c) : De.create([c]);
- }
- };
- }
- function Wxt(t, e) {
- for (let n = 0; n < t.ranges.length; n++) {
- let { from: r, to: i } = t.ranges[n];
- if (r <= e && i >= e)
- return De.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
- }
- return null;
- }
- Xs.dragstart = (t, e) => {
- let { selection: { main: n } } = t.state;
- if (e.target.draggable) {
- let i = t.docView.nearest(e.target);
- if (i && i.isWidget) {
- let a = i.posAtStart, o = a + i.length;
- (a >= n.to || o <= n.from) && (n = De.range(a, o));
- }
- }
- let { inputState: r } = t;
- return r.mouseSelection && (r.mouseSelection.dragging = !0), r.draggedContent = n, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(n.from, n.to)), e.dataTransfer.effectAllowed = "copyMove"), !1;
- };
- Xs.dragend = (t) => (t.inputState.draggedContent = null, !1);
- function LK(t, e, n, r) {
- if (!n)
- return;
- let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && kxt(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
- t.focus(), t.dispatch({
- changes: l,
- selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
- userEvent: o ? "move.drop" : "input.drop"
- }), t.inputState.draggedContent = null;
- }
- Xs.drop = (t, e) => {
- if (!e.dataTransfer)
- return !1;
- if (t.state.readOnly)
- return !0;
- let n = e.dataTransfer.files;
- if (n && n.length) {
- let r = Array(n.length), i = 0, a = () => {
- ++i == n.length && LK(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
- };
- for (let o = 0; o < n.length; o++) {
- let s = new FileReader();
- s.onerror = a, s.onload = () => {
- /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
- }, s.readAsText(n[o]);
- }
- return !0;
- } else {
- let r = e.dataTransfer.getData("Text");
- if (r)
- return LK(t, e, r, !0), !0;
- }
- return !1;
- };
- Xs.paste = (t, e) => {
- if (t.state.readOnly)
- return !0;
- t.observer.flush();
- let n = Pve ? null : e.clipboardData;
- return n ? ($ve(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (Bxt(t), !1);
- };
- function Qxt(t, e) {
- let n = t.dom.parentNode;
- if (!n)
- return;
- let r = n.appendChild(document.createElement("textarea"));
- r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
- r.remove(), t.focus();
- }, 50);
- }
- function Hxt(t) {
- let e = [], n = [], r = !1;
- for (let i of t.selection.ranges)
- i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
- if (!e.length) {
- let i = -1;
- for (let { from: a } of t.selection.ranges) {
- let o = t.doc.lineAt(a);
- o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
- }
- r = !0;
- }
- return { text: e.join(t.lineBreak), ranges: n, linewise: r };
- }
- let w4 = null;
- Xs.copy = Xs.cut = (t, e) => {
- let { text: n, ranges: r, linewise: i } = Hxt(t.state);
- if (!n && !i)
- return !1;
- w4 = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
- changes: r,
- scrollIntoView: !0,
- userEvent: "delete.cut"
- });
- let a = Pve ? null : e.clipboardData;
- return a ? (a.clearData(), a.setData("text/plain", n), !0) : (Qxt(t, n), !1);
- };
- const Mve = /* @__PURE__ */ ac.define();
- function Ive(t, e) {
- let n = [];
- for (let r of t.facet(hve)) {
- let i = r(t, e);
- i && n.push(i);
- }
- return n ? t.update({ effects: n, annotations: Mve.of(!0) }) : null;
- }
- function Dve(t) {
- setTimeout(() => {
- let e = t.hasFocus;
- if (e != t.inputState.notifiedFocused) {
- let n = Ive(t.state, e);
- n ? t.dispatch(n) : t.update([]);
- }
- }, 10);
- }
- us.focus = (t) => {
- t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), Dve(t);
- };
- us.blur = (t) => {
- t.observer.clearSelectionRange(), Dve(t);
- };
- us.compositionstart = us.compositionupdate = (t) => {
- t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
- };
- us.compositionend = (t) => {
- t.observer.editContext || (t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, lt.chrome && lt.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
- t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
- }, 50));
- };
- us.contextmenu = (t) => {
- t.inputState.lastContextMenu = Date.now();
- };
- Xs.beforeinput = (t, e) => {
- var n;
- let r;
- if (lt.chrome && lt.android && (r = Cve.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
- let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
- setTimeout(() => {
- var a;
- (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
- }, 100);
- }
- return lt.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), lt.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => us.compositionend(t, e), 20), !1;
- };
- const NK = /* @__PURE__ */ new Set();
- function Gxt(t) {
- NK.has(t) || (NK.add(t), t.addEventListener("copy", () => {
- }), t.addEventListener("cut", () => {
- }));
- }
- const BK = ["pre-wrap", "normal", "pre-line", "break-spaces"];
- class jxt {
- constructor(e) {
- this.lineWrapping = e, this.doc = xn.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
- }
- heightForGap(e, n) {
- let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
- return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
- }
- heightForLine(e) {
- return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
- }
- setDoc(e) {
- return this.doc = e, this;
- }
- mustRefreshForWrapping(e) {
- return BK.indexOf(e) > -1 != this.lineWrapping;
- }
- mustRefreshForHeights(e) {
- let n = !1;
- for (let r = 0; r < e.length; r++) {
- let i = e[r];
- i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
- }
- return n;
- }
- refresh(e, n, r, i, a, o) {
- let s = BK.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
- if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
- this.heightSamples = {};
- for (let u = 0; u < o.length; u++) {
- let c = o[u];
- c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
- }
- }
- return l;
- }
- }
- class Zxt {
- constructor(e, n) {
- this.from = e, this.heights = n, this.index = 0;
- }
- get more() {
- return this.index < this.heights.length;
- }
- }
- class Tl {
- /**
- @internal
- */
- constructor(e, n, r, i, a) {
- this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
- }
- /**
- The type of element this is. When querying lines, this may be
- an array of all the blocks that make up the line.
- */
- get type() {
- return typeof this._content == "number" ? la.Text : Array.isArray(this._content) ? this._content : this._content.type;
- }
- /**
- The end of the element as a document position.
- */
- get to() {
- return this.from + this.length;
- }
- /**
- The bottom position of the element.
- */
- get bottom() {
- return this.top + this.height;
- }
- /**
- If this is a widget block, this will return the widget
- associated with it.
- */
- get widget() {
- return this._content instanceof Pf ? this._content.widget : null;
- }
- /**
- If this is a textblock, this holds the number of line breaks
- that appear in widgets inside the block.
- */
- get widgetLineBreaks() {
- return typeof this._content == "number" ? this._content : 0;
- }
- /**
- @internal
- */
- join(e) {
- let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
- return new Tl(this.from, this.length + e.length, this.top, this.height + e.height, n);
- }
- }
- var er = /* @__PURE__ */ function(t) {
- return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
- }(er || (er = {}));
- const Ew = 1e-3;
- class ua {
- constructor(e, n, r = 2) {
- this.length = e, this.height = n, this.flags = r;
- }
- get outdated() {
- return (this.flags & 2) > 0;
- }
- set outdated(e) {
- this.flags = (e ? 2 : 0) | this.flags & -3;
- }
- setHeight(e, n) {
- this.height != n && (Math.abs(this.height - n) > Ew && (e.heightChanged = !0), this.height = n);
- }
- // Base case is to replace a leaf node, which simply builds a tree
- // from the new nodes and returns that (HeightMapBranch and
- // HeightMapGap override this to actually use from/to)
- replace(e, n, r) {
- return ua.of(r);
- }
- // Again, these are base cases, and are overridden for branch and gap nodes.
- decomposeLeft(e, n) {
- n.push(this);
- }
- decomposeRight(e, n) {
- n.push(this);
- }
- applyChanges(e, n, r, i) {
- let a = this, o = r.doc;
- for (let s = i.length - 1; s >= 0; s--) {
- let { fromA: l, toA: u, fromB: c, toB: f } = i[s], d = a.lineAt(l, er.ByPosNoHeight, r.setDoc(n), 0, 0), h = d.to >= u ? d : a.lineAt(u, er.ByPosNoHeight, r, 0, 0);
- for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
- l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, er.ByPosNoHeight, r, 0, 0));
- c += d.from - l, l = d.from;
- let p = oB.build(r.setDoc(o), e, c, f);
- a = a.replace(l, u, p);
- }
- return a.updateHeight(r, 0);
- }
- static empty() {
- return new eo(0, 0);
- }
- // nodes uses null values to indicate the position of line breaks.
- // There are never line breaks at the start or end of the array, or
- // two line breaks next to each other, and the array isn't allowed
- // to be empty (same restrictions as return value from the builder).
- static of(e) {
- if (e.length == 1)
- return e[0];
- let n = 0, r = e.length, i = 0, a = 0;
- for (; ; )
- if (n == r)
- if (i > a * 2) {
- let s = e[n - 1];
- s.break ? e.splice(--n, 1, s.left, null, s.right) : e.splice(--n, 1, s.left, s.right), r += 1 + s.break, i -= s.size;
- } else if (a > i * 2) {
- let s = e[r];
- s.break ? e.splice(r, 1, s.left, null, s.right) : e.splice(r, 1, s.left, s.right), r += 2 + s.break, a -= s.size;
- } else
- break;
- else if (i < a) {
- let s = e[n++];
- s && (i += s.size);
- } else {
- let s = e[--r];
- s && (a += s.size);
- }
- let o = 0;
- return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new Uxt(ua.of(e.slice(0, n)), o, ua.of(e.slice(r)));
- }
- }
- ua.prototype.size = 1;
- class Rve extends ua {
- constructor(e, n, r) {
- super(e, n), this.deco = r;
- }
- blockAt(e, n, r, i) {
- return new Tl(i, this.length, r, this.height, this.deco || 0);
- }
- lineAt(e, n, r, i, a) {
- return this.blockAt(0, r, i, a);
- }
- forEachLine(e, n, r, i, a, o) {
- e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
- }
- updateHeight(e, n = 0, r = !1, i) {
- return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
- }
- toString() {
- return `block(${this.length})`;
- }
- }
- class eo extends Rve {
- constructor(e, n) {
- super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
- }
- blockAt(e, n, r, i) {
- return new Tl(i, this.length, r, this.height, this.breaks);
- }
- replace(e, n, r) {
- let i = r[0];
- return r.length == 1 && (i instanceof eo || i instanceof vi && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof vi ? i = new eo(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ua.of(r);
- }
- updateHeight(e, n = 0, r = !1, i) {
- return i && i.from <= n && i.more ? this.setHeight(e, i.heights[i.index++]) : (r || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this;
- }
- toString() {
- return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
- }
- }
- class vi extends ua {
- constructor(e) {
- super(e, 0);
- }
- heightMetrics(e, n) {
- let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
- if (e.lineWrapping) {
- let l = Math.min(this.height, e.lineHeight * a);
- o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
- } else
- o = this.height / a;
- return { firstLine: r, lastLine: i, perLine: o, perChar: s };
- }
- blockAt(e, n, r, i) {
- let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
- if (n.lineWrapping) {
- let u = i + (e < n.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - r) / this.height)) * this.length)), c = n.doc.lineAt(u), f = s + c.length * l, d = Math.max(r, e - f / 2);
- return new Tl(c.from, c.length, d, f, 0);
- } else {
- let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
- return new Tl(c, f, r + s * u, s, 0);
- }
- }
- lineAt(e, n, r, i, a) {
- if (n == er.ByHeight)
- return this.blockAt(e, r, i, a);
- if (n == er.ByPosNoHeight) {
- let { from: h, to: p } = r.doc.lineAt(e);
- return new Tl(h, p - h, 0, 0, 0);
- }
- let { firstLine: o, perLine: s, perChar: l } = this.heightMetrics(r, a), u = r.doc.lineAt(e), c = s + u.length * l, f = u.number - o, d = i + s * f + l * (u.from - a - f);
- return new Tl(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
- }
- forEachLine(e, n, r, i, a, o) {
- e = Math.max(e, a), n = Math.min(n, a + this.length);
- let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
- for (let c = e, f = i; c <= n; ) {
- let d = r.doc.lineAt(c);
- if (c == e) {
- let p = d.number - s;
- f += l * p + u * (e - a - p);
- }
- let h = l + u * d.length;
- o(new Tl(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
- }
- }
- replace(e, n, r) {
- let i = this.length - n;
- if (i > 0) {
- let a = r[r.length - 1];
- a instanceof vi ? r[r.length - 1] = new vi(a.length + i) : r.push(null, new vi(i - 1));
- }
- if (e > 0) {
- let a = r[0];
- a instanceof vi ? r[0] = new vi(e + a.length) : r.unshift(new vi(e - 1), null);
- }
- return ua.of(r);
- }
- decomposeLeft(e, n) {
- n.push(new vi(e - 1), null);
- }
- decomposeRight(e, n) {
- n.push(null, new vi(this.length - e - 1));
- }
- updateHeight(e, n = 0, r = !1, i) {
- let a = n + this.length;
- if (i && i.from <= n + this.length && i.more) {
- let o = [], s = Math.max(n, i.from), l = -1;
- for (i.from > n && o.push(new vi(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
- let c = e.doc.lineAt(s).length;
- o.length && o.push(null);
- let f = i.heights[i.index++];
- l == -1 ? l = f : Math.abs(f - l) >= Ew && (l = -2);
- let d = new eo(c, f);
- d.outdated = !1, o.push(d), s += c + 1;
- }
- s <= a && o.push(null, new vi(a - s).updateHeight(e, s));
- let u = ua.of(o);
- return (l < 0 || Math.abs(u.height - this.height) >= Ew || Math.abs(l - this.heightMetrics(e, n).perLine) >= Ew) && (e.heightChanged = !0), u;
- } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
- return this;
- }
- toString() {
- return `gap(${this.length})`;
- }
- }
- class Uxt extends ua {
- constructor(e, n, r) {
- super(e.length + n + r.length, e.height + r.height, n | (e.outdated || r.outdated ? 2 : 0)), this.left = e, this.right = r, this.size = e.size + r.size;
- }
- get break() {
- return this.flags & 1;
- }
- blockAt(e, n, r, i) {
- let a = r + this.left.height;
- return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
- }
- lineAt(e, n, r, i, a) {
- let o = i + this.left.height, s = a + this.left.length + this.break, l = n == er.ByHeight ? e < o : e < s, u = l ? this.left.lineAt(e, n, r, i, a) : this.right.lineAt(e, n, r, o, s);
- if (this.break || (l ? u.to < s : u.from > s))
- return u;
- let c = n == er.ByPosNoHeight ? er.ByPosNoHeight : er.ByPos;
- return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
- }
- forEachLine(e, n, r, i, a, o) {
- let s = i + this.left.height, l = a + this.left.length + this.break;
- if (this.break)
- e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
- else {
- let u = this.lineAt(l, er.ByPos, r, i, a);
- e < u.from && this.left.forEachLine(e, u.from - 1, r, i, a, o), u.to >= e && u.from <= n && o(u), n > u.to && this.right.forEachLine(u.to + 1, n, r, s, l, o);
- }
- }
- replace(e, n, r) {
- let i = this.left.length + this.break;
- if (n < i)
- return this.balanced(this.left.replace(e, n, r), this.right);
- if (e > this.left.length)
- return this.balanced(this.left, this.right.replace(e - i, n - i, r));
- let a = [];
- e > 0 && this.decomposeLeft(e, a);
- let o = a.length;
- for (let s of r)
- a.push(s);
- if (e > 0 && zK(a, o - 1), n < this.length) {
- let s = a.length;
- this.decomposeRight(n, a), zK(a, s);
- }
- return ua.of(a);
- }
- decomposeLeft(e, n) {
- let r = this.left.length;
- if (e <= r)
- return this.left.decomposeLeft(e, n);
- n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
- }
- decomposeRight(e, n) {
- let r = this.left.length, i = r + this.break;
- if (e >= i)
- return this.right.decomposeRight(e - i, n);
- e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
- }
- balanced(e, n) {
- return e.size > 2 * n.size || n.size > 2 * e.size ? ua.of(this.break ? [e, null, n] : [e, n]) : (this.left = e, this.right = n, this.height = e.height + n.height, this.outdated = e.outdated || n.outdated, this.size = e.size + n.size, this.length = e.length + this.break + n.length, this);
- }
- updateHeight(e, n = 0, r = !1, i) {
- let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
- return i && i.from <= n + a.length && i.more ? l = a = a.updateHeight(e, n, r, i) : a.updateHeight(e, n, r), i && i.from <= s + o.length && i.more ? l = o = o.updateHeight(e, s, r, i) : o.updateHeight(e, s, r), l ? this.balanced(a, o) : (this.height = this.left.height + this.right.height, this.outdated = !1, this);
- }
- toString() {
- return this.left + (this.break ? " " : "-") + this.right;
- }
- }
- function zK(t, e) {
- let n, r;
- t[e] == null && (n = t[e - 1]) instanceof vi && (r = t[e + 1]) instanceof vi && t.splice(e - 1, 3, new vi(n.length + 1 + r.length));
- }
- const Xxt = 5;
- class oB {
- constructor(e, n) {
- this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
- }
- get isCovered() {
- return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
- }
- span(e, n) {
- if (this.lineStart > -1) {
- let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
- i instanceof eo ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new eo(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
- }
- this.pos = n;
- }
- point(e, n, r) {
- if (e < n || r.heightRelevant) {
- let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
- i < 0 && (i = this.oracle.lineHeight);
- let o = n - e;
- r.block ? this.addBlock(new Rve(o, i, r)) : (o || a || i >= Xxt) && this.addLineDeco(i, a, o);
- } else n > e && this.span(e, n);
- this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
- }
- enterLine() {
- if (this.lineStart > -1)
- return;
- let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
- this.lineStart = e, this.lineEnd = n, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new eo(this.pos - e, -1)), this.writtenTo = this.pos;
- }
- blankContent(e, n) {
- let r = new vi(n - e);
- return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
- }
- ensureLine() {
- this.enterLine();
- let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
- if (e instanceof eo)
- return e;
- let n = new eo(0, -1);
- return this.nodes.push(n), n;
- }
- addBlock(e) {
- this.enterLine();
- let n = e.deco;
- n && n.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), this.writtenTo = this.pos = this.pos + e.length, n && n.endSide > 0 && (this.covering = e);
- }
- addLineDeco(e, n, r) {
- let i = this.ensureLine();
- i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
- }
- finish(e) {
- let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
- this.lineStart > -1 && !(n instanceof eo) && !this.isCovered ? this.nodes.push(new eo(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
- let r = e;
- for (let i of this.nodes)
- i instanceof eo && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
- return this.nodes;
- }
- // Always called with a region that on both sides either stretches
- // to a line break or the end of the document.
- // The returned array uses null to indicate line breaks, but never
- // starts or ends in a line break, or has multiple line breaks next
- // to each other.
- static build(e, n, r, i) {
- let a = new oB(r, e);
- return Sn.spans(n, r, i, a, 0), a.finish(r);
- }
- }
- function Yxt(t, e, n) {
- let r = new qxt();
- return Sn.compare(t, e, n, r, 0), r.changes;
- }
- class qxt {
- constructor() {
- this.changes = [];
- }
- compareRange() {
- }
- comparePoint(e, n, r, i) {
- (e < n || r && r.heightRelevant || i && i.heightRelevant) && m4(e, n, this.changes, 5);
- }
- }
- function Kxt(t, e) {
- let n = t.getBoundingClientRect(), r = t.ownerDocument, i = r.defaultView || window, a = Math.max(0, n.left), o = Math.min(i.innerWidth, n.right), s = Math.max(0, n.top), l = Math.min(i.innerHeight, n.bottom);
- for (let u = t.parentNode; u && u != r.body; )
- if (u.nodeType == 1) {
- let c = u, f = window.getComputedStyle(c);
- if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
- let d = c.getBoundingClientRect();
- a = Math.max(a, d.left), o = Math.min(o, d.right), s = Math.max(s, d.top), l = u == t.parentNode ? d.bottom : Math.min(l, d.bottom);
- }
- u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
- } else if (u.nodeType == 11)
- u = u.host;
- else
- break;
- return {
- left: a - n.left,
- right: Math.max(a, o) - n.left,
- top: s - (n.top + e),
- bottom: Math.max(s, l) - (n.top + e)
- };
- }
- function Jxt(t, e) {
- let n = t.getBoundingClientRect();
- return {
- left: 0,
- right: n.right - n.left,
- top: e,
- bottom: n.bottom - (n.top + e)
- };
- }
- class aD {
- constructor(e, n, r) {
- this.from = e, this.to = n, this.size = r;
- }
- static same(e, n) {
- if (e.length != n.length)
- return !1;
- for (let r = 0; r < e.length; r++) {
- let i = e[r], a = n[r];
- if (i.from != a.from || i.to != a.to || i.size != a.size)
- return !1;
- }
- return !0;
- }
- draw(e, n) {
- return pt.replace({
- widget: new ewt(this.size * (n ? e.scaleY : e.scaleX), n)
- }).range(this.from, this.to);
- }
- }
- class ewt extends Jl {
- constructor(e, n) {
- super(), this.size = e, this.vertical = n;
- }
- eq(e) {
- return e.size == this.size && e.vertical == this.vertical;
- }
- toDOM() {
- let e = document.createElement("div");
- return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", e.style.height = "2px", e.style.display = "inline-block"), e;
- }
- get estimatedHeight() {
- return this.vertical ? this.size : -1;
- }
- }
- class VK {
- constructor(e) {
- this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = FK, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = ir.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
- let n = e.facet(iB).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
- this.heightOracle = new jxt(n), this.stateDeco = e.facet(b_).filter((r) => typeof r != "function"), this.heightMap = ua.empty().applyChanges(this.stateDeco, xn.empty, this.heightOracle.setDoc(e.doc), [new Jo(0, 0, 0, e.doc.length)]);
- for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
- ;
- this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = pt.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
- }
- updateForViewport() {
- let e = [this.viewport], { main: n } = this.state.selection;
- for (let r = 0; r <= 1; r++) {
- let i = r ? n.head : n.anchor;
- if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
- let { from: a, to: o } = this.lineBlockAt(i);
- e.push(new dx(a, o));
- }
- }
- return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
- }
- updateScaler() {
- let e = this.scaler;
- return this.scaler = this.heightMap.height <= 7e6 ? FK : new sB(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
- }
- updateViewportLines() {
- this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
- this.viewportLines.push($y(e, this.scaler));
- });
- }
- update(e, n = null) {
- this.state = e.state;
- let r = this.stateDeco;
- this.stateDeco = this.state.facet(b_).filter((c) => typeof c != "function");
- let i = e.changedRanges, a = Jo.extendWithRanges(i, Yxt(r, this.stateDeco, e ? e.changes : Zr.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
- this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), a), this.heightMap.height != o && (e.flags |= 2), s ? (this.scrollAnchorPos = e.changes.mapPos(s.from, -1), this.scrollAnchorHeight = s.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
- let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
- (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
- let u = l.from != this.viewport.from || l.to != this.viewport.to;
- this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), n && (this.scrollTarget = n), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(vve) && (this.mustEnforceCursorAssoc = !0);
- }
- measure(e) {
- let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
- this.defaultTextDirection = r.direction == "rtl" ? ir.RTL : ir.LTR;
- let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
- this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
- let u = 0, c = 0;
- if (s.width && s.height) {
- let { scaleX: O, scaleY: S } = Wpe(n, s);
- (O > 5e-3 && Math.abs(this.scaleX - O) > 5e-3 || S > 5e-3 && Math.abs(this.scaleY - S) > 5e-3) && (this.scaleX = O, this.scaleY = S, u |= 8, o = l = !0);
- }
- let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
- (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8);
- let h = e.scrollDOM.scrollTop * this.scaleY;
- this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Gpe(e.scrollDOM);
- let p = (this.printing ? Jxt : Kxt)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
- this.pixelViewport = p;
- let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
- if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
- return 0;
- let y = s.width;
- if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
- let O = e.docView.measureVisibleLineHeights(this.viewport);
- if (i.mustRefreshForHeights(O) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
- let { lineHeight: S, charWidth: x, textHeight: C } = e.docView.measureTextSize();
- o = S > 0 && i.refresh(a, S, x, C, y / x, O), o && (e.docView.minWidth = 0, u |= 8);
- }
- v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
- for (let S of this.viewports) {
- let x = S.from == this.viewport.from ? O : e.docView.measureVisibleLineHeights(S);
- this.heightMap = (o ? ua.empty().applyChanges(this.stateDeco, xn.empty, this.heightOracle, [new Jo(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Zxt(S.from, x));
- }
- i.heightChanged && (u |= 2);
- }
- let _ = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
- return _ && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || _) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u;
- }
- get visibleTop() {
- return this.scaler.fromDOM(this.pixelViewport.top);
- }
- get visibleBottom() {
- return this.scaler.fromDOM(this.pixelViewport.bottom);
- }
- getViewport(e, n) {
- let r = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, a = this.heightOracle, { visibleTop: o, visibleBottom: s } = this, l = new dx(i.lineAt(o - r * 1e3, er.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, er.ByHeight, a, 0, 0).to);
- if (n) {
- let { head: u } = n.range;
- if (u < l.from || u > l.to) {
- let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, er.ByPos, a, 0, 0), d;
- n.y == "center" ? d = (f.top + f.bottom) / 2 - c / 2 : n.y == "start" || n.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - c, l = new dx(i.lineAt(d - 1e3 / 2, er.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, er.ByHeight, a, 0, 0).to);
- }
- }
- return l;
- }
- mapViewport(e, n) {
- let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
- return new dx(this.heightMap.lineAt(r, er.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, er.ByPos, this.heightOracle, 0, 0).to);
- }
- // Checks if a given viewport covers the visible part of the
- // document and not too much beyond that.
- viewportIsAppropriate({ from: e, to: n }, r = 0) {
- if (!this.inView)
- return !0;
- let { top: i } = this.heightMap.lineAt(e, er.ByPos, this.heightOracle, 0, 0), { bottom: a } = this.heightMap.lineAt(n, er.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: s } = this;
- return (e == 0 || i <= o - Math.max(10, Math.min(
- -r,
- 250
- /* VP.MaxCoverMargin */
- ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
- r,
- 250
- /* VP.MaxCoverMargin */
- ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
- }
- mapLineGaps(e, n) {
- if (!e.length || n.empty)
- return e;
- let r = [];
- for (let i of e)
- n.touchesRange(i.from, i.to) || r.push(new aD(n.mapPos(i.from), n.mapPos(i.to), i.size));
- return r;
- }
- // Computes positions in the viewport where the start or end of a
- // line should be hidden, trying to reuse existing line gaps when
- // appropriate to avoid unneccesary redraws.
- // Uses crude character-counting for the positioning and sizing,
- // since actual DOM coordinates aren't always available and
- // predictable. Relies on generous margins (see LG.Margin) to hide
- // the artifacts this might produce from the user.
- ensureLineGaps(e, n) {
- let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
- if (this.defaultTextDirection != ir.LTR && !r)
- return [];
- let s = [], l = (c, f, d, h) => {
- if (f - c < a)
- return;
- let p = this.state.selection.main, v = [p.from];
- p.empty || v.push(p.to);
- for (let m of v)
- if (m > c && m < f) {
- l(c, m - 10, d, h), l(m + 10, f, d, h);
- return;
- }
- let g = nwt(e, (m) => m.from >= d.from && m.to <= d.to && Math.abs(m.from - c) < a && Math.abs(m.to - f) < a && !v.some((y) => m.from < y && m.to > y));
- if (!g) {
- if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
- let m = n.moveToLineBoundary(De.cursor(f), !1, !0).head;
- m > c && (f = m);
- }
- g = new aD(c, f, this.gapSize(d, c, f, h));
- }
- s.push(g);
- }, u = (c) => {
- if (c.length < o || c.type != la.Text)
- return;
- let f = twt(c.from, c.to, this.stateDeco);
- if (f.total < o)
- return;
- let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
- if (r) {
- let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
- if (d != null) {
- let y = px(f, d), _ = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
- g = y - _, m = y + _;
- } else
- g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
- h = hx(f, g), p = hx(f, m);
- } else {
- let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
- if (d != null) {
- let _ = px(f, d), O = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
- m = _ - O, y = _ + O;
- } else
- m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
- h = hx(f, m), p = hx(f, y);
- }
- h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
- };
- for (let c of this.viewportLines)
- Array.isArray(c.type) ? c.type.forEach(u) : u(c);
- return s;
- }
- gapSize(e, n, r, i) {
- let a = px(i, r) - px(i, n);
- return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
- }
- updateLineGaps(e) {
- aD.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = pt.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
- }
- computeVisibleRanges() {
- let e = this.stateDeco;
- this.lineGaps.length && (e = e.concat(this.lineGapDeco));
- let n = [];
- Sn.spans(e, this.viewport.from, this.viewport.to, {
- span(i, a) {
- n.push({ from: i, to: a });
- },
- point() {
- }
- }, 20);
- let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
- return this.visibleRanges = n, r ? 4 : 0;
- }
- lineBlockAt(e) {
- return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || $y(this.heightMap.lineAt(e, er.ByPos, this.heightOracle, 0, 0), this.scaler);
- }
- lineBlockAtHeight(e) {
- return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || $y(this.heightMap.lineAt(this.scaler.fromDOM(e), er.ByHeight, this.heightOracle, 0, 0), this.scaler);
- }
- scrollAnchorAt(e) {
- let n = this.lineBlockAtHeight(e + 8);
- return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
- }
- elementAtHeight(e) {
- return $y(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
- }
- get docHeight() {
- return this.scaler.toDOM(this.heightMap.height);
- }
- get contentHeight() {
- return this.docHeight + this.paddingTop + this.paddingBottom;
- }
- }
- class dx {
- constructor(e, n) {
- this.from = e, this.to = n;
- }
- }
- function twt(t, e, n) {
- let r = [], i = t, a = 0;
- return Sn.spans(n, t, e, {
- span() {
- },
- point(o, s) {
- o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
- }
- }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
- }
- function hx({ total: t, ranges: e }, n) {
- if (n <= 0)
- return e[0].from;
- if (n >= 1)
- return e[e.length - 1].to;
- let r = Math.floor(t * n);
- for (let i = 0; ; i++) {
- let { from: a, to: o } = e[i], s = o - a;
- if (r <= s)
- return a + r;
- r -= s;
- }
- }
- function px(t, e) {
- let n = 0;
- for (let { from: r, to: i } of t.ranges) {
- if (e <= i) {
- n += e - r;
- break;
- }
- n += i - r;
- }
- return n / t.total;
- }
- function nwt(t, e) {
- for (let n of t)
- if (e(n))
- return n;
- }
- const FK = {
- toDOM(t) {
- return t;
- },
- fromDOM(t) {
- return t;
- },
- scale: 1,
- eq(t) {
- return t == this;
- }
- };
- class sB {
- constructor(e, n, r) {
- let i = 0, a = 0, o = 0;
- this.viewports = r.map(({ from: s, to: l }) => {
- let u = n.lineAt(s, er.ByPos, e, 0, 0).top, c = n.lineAt(l, er.ByPos, e, 0, 0).bottom;
- return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
- }), this.scale = (7e6 - i) / (n.height - i);
- for (let s of this.viewports)
- s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
- }
- toDOM(e) {
- for (let n = 0, r = 0, i = 0; ; n++) {
- let a = n < this.viewports.length ? this.viewports[n] : null;
- if (!a || e < a.top)
- return i + (e - r) * this.scale;
- if (e <= a.bottom)
- return a.domTop + (e - a.top);
- r = a.bottom, i = a.domBottom;
- }
- }
- fromDOM(e) {
- for (let n = 0, r = 0, i = 0; ; n++) {
- let a = n < this.viewports.length ? this.viewports[n] : null;
- if (!a || e < a.domTop)
- return r + (e - i) / this.scale;
- if (e <= a.domBottom)
- return a.top + (e - a.domTop);
- r = a.bottom, i = a.domBottom;
- }
- }
- eq(e) {
- return e instanceof sB ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((n, r) => n.from == e.viewports[r].from && n.to == e.viewports[r].to) : !1;
- }
- }
- function $y(t, e) {
- if (e.scale == 1)
- return t;
- let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
- return new Tl(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => $y(i, e)) : t._content);
- }
- const vx = /* @__PURE__ */ ut.define({ combine: (t) => t.join(" ") }), C4 = /* @__PURE__ */ ut.define({ combine: (t) => t.indexOf(!0) > -1 }), T4 = /* @__PURE__ */ Cf.newName(), kve = /* @__PURE__ */ Cf.newName(), Lve = /* @__PURE__ */ Cf.newName(), Nve = { "&light": "." + kve, "&dark": "." + Lve };
- function P4(t, e, n) {
- return new Cf(e, {
- finish(r) {
- return /&/.test(r) ? r.replace(/&\w*/, (i) => {
- if (i == "&")
- return t;
- if (!n || !n[i])
- throw new RangeError(`Unsupported selector: ${i}`);
- return n[i];
- }) : t + " " + r;
- }
- });
- }
- const rwt = /* @__PURE__ */ P4("." + T4, {
- "&": {
- position: "relative !important",
- boxSizing: "border-box",
- "&.cm-focused": {
- // Provide a simple default outline to make sure a focused
- // editor is visually distinct. Can't leave the default behavior
- // because that will apply to the content element, which is
- // inside the scrollable container and doesn't include the
- // gutters. We also can't use an 'auto' outline, since those
- // are, for some reason, drawn behind the element content, which
- // will cause things like the active line background to cover
- // the outline (#297).
- outline: "1px dotted #212121"
- },
- display: "flex !important",
- flexDirection: "column"
- },
- ".cm-scroller": {
- display: "flex !important",
- alignItems: "flex-start !important",
- fontFamily: "monospace",
- lineHeight: 1.4,
- height: "100%",
- overflowX: "auto",
- position: "relative",
- zIndex: 0
- },
- ".cm-content": {
- margin: 0,
- flexGrow: 2,
- flexShrink: 0,
- display: "block",
- whiteSpace: "pre",
- wordWrap: "normal",
- // https://github.com/codemirror/dev/issues/456
- boxSizing: "border-box",
- minHeight: "100%",
- padding: "4px 0",
- outline: "none",
- "&[contenteditable=true]": {
- WebkitUserModify: "read-write-plaintext-only"
- }
- },
- ".cm-lineWrapping": {
- whiteSpace_fallback: "pre-wrap",
- // For IE
- whiteSpace: "break-spaces",
- wordBreak: "break-word",
- // For Safari, which doesn't support overflow-wrap: anywhere
- overflowWrap: "anywhere",
- flexShrink: 1
- },
- "&light .cm-content": { caretColor: "black" },
- "&dark .cm-content": { caretColor: "white" },
- ".cm-line": {
- display: "block",
- padding: "0 2px 0 6px"
- },
- ".cm-layer": {
- position: "absolute",
- left: 0,
- top: 0,
- contain: "size style",
- "& > *": {
- position: "absolute"
- }
- },
- "&light .cm-selectionBackground": {
- background: "#d9d9d9"
- },
- "&dark .cm-selectionBackground": {
- background: "#222"
- },
- "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
- background: "#d7d4f0"
- },
- "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
- background: "#233"
- },
- ".cm-cursorLayer": {
- pointerEvents: "none"
- },
- "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
- animation: "steps(1) cm-blink 1.2s infinite"
- },
- // Two animations defined so that we can switch between them to
- // restart the animation without forcing another style
- // recomputation.
- "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
- "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
- ".cm-cursor, .cm-dropCursor": {
- borderLeft: "1.2px solid black",
- marginLeft: "-0.6px",
- pointerEvents: "none"
- },
- ".cm-cursor": {
- display: "none"
- },
- "&dark .cm-cursor": {
- borderLeftColor: "#444"
- },
- ".cm-dropCursor": {
- position: "absolute"
- },
- "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
- display: "block"
- },
- ".cm-iso": {
- unicodeBidi: "isolate"
- },
- ".cm-announced": {
- position: "fixed",
- top: "-10000px"
- },
- "@media print": {
- ".cm-announced": { display: "none" }
- },
- "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
- "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
- "&light .cm-specialChar": { color: "red" },
- "&dark .cm-specialChar": { color: "#f78" },
- ".cm-gutters": {
- flexShrink: 0,
- display: "flex",
- height: "100%",
- boxSizing: "border-box",
- insetInlineStart: 0,
- zIndex: 200
- },
- "&light .cm-gutters": {
- backgroundColor: "#f5f5f5",
- color: "#6c6c6c",
- borderRight: "1px solid #ddd"
- },
- "&dark .cm-gutters": {
- backgroundColor: "#333338",
- color: "#ccc"
- },
- ".cm-gutter": {
- display: "flex !important",
- // Necessary -- prevents margin collapsing
- flexDirection: "column",
- flexShrink: 0,
- boxSizing: "border-box",
- minHeight: "100%",
- overflow: "hidden"
- },
- ".cm-gutterElement": {
- boxSizing: "border-box"
- },
- ".cm-lineNumbers .cm-gutterElement": {
- padding: "0 3px 0 5px",
- minWidth: "20px",
- textAlign: "right",
- whiteSpace: "nowrap"
- },
- "&light .cm-activeLineGutter": {
- backgroundColor: "#e2f2ff"
- },
- "&dark .cm-activeLineGutter": {
- backgroundColor: "#222227"
- },
- ".cm-panels": {
- boxSizing: "border-box",
- position: "sticky",
- left: 0,
- right: 0
- },
- "&light .cm-panels": {
- backgroundColor: "#f5f5f5",
- color: "black"
- },
- "&light .cm-panels-top": {
- borderBottom: "1px solid #ddd"
- },
- "&light .cm-panels-bottom": {
- borderTop: "1px solid #ddd"
- },
- "&dark .cm-panels": {
- backgroundColor: "#333338",
- color: "white"
- },
- ".cm-tab": {
- display: "inline-block",
- overflow: "hidden",
- verticalAlign: "bottom"
- },
- ".cm-widgetBuffer": {
- verticalAlign: "text-top",
- height: "1em",
- width: 0,
- display: "inline"
- },
- ".cm-placeholder": {
- color: "#888",
- display: "inline-block",
- verticalAlign: "top"
- },
- ".cm-highlightSpace:before": {
- content: "attr(data-display)",
- position: "absolute",
- pointerEvents: "none",
- color: "#888"
- },
- ".cm-highlightTab": {
- backgroundImage: `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,
- backgroundSize: "auto 100%",
- backgroundPosition: "right 90%",
- backgroundRepeat: "no-repeat"
- },
- ".cm-trailingSpace": {
- backgroundColor: "#ff332255"
- },
- ".cm-button": {
- verticalAlign: "middle",
- color: "inherit",
- fontSize: "70%",
- padding: ".2em 1em",
- borderRadius: "1px"
- },
- "&light .cm-button": {
- backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
- border: "1px solid #888",
- "&:active": {
- backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
- }
- },
- "&dark .cm-button": {
- backgroundImage: "linear-gradient(#393939, #111)",
- border: "1px solid #888",
- "&:active": {
- backgroundImage: "linear-gradient(#111, #333)"
- }
- },
- ".cm-textfield": {
- verticalAlign: "middle",
- color: "inherit",
- fontSize: "70%",
- border: "1px solid silver",
- padding: ".2em .5em"
- },
- "&light .cm-textfield": {
- backgroundColor: "white"
- },
- "&dark .cm-textfield": {
- border: "1px solid #555",
- backgroundColor: "inherit"
- }
- }, Nve), Ay = "";
- class iwt {
- constructor(e, n) {
- this.points = e, this.text = "", this.lineSeparator = n.facet(cn.lineSeparator);
- }
- append(e) {
- this.text += e;
- }
- lineBreak() {
- this.text += Ay;
- }
- readRange(e, n) {
- if (!e)
- return this;
- let r = e.parentNode;
- for (let i = e; ; ) {
- this.findPointBefore(r, i);
- let a = this.text.length;
- this.readNode(i);
- let o = i.nextSibling;
- if (o == n)
- break;
- let s = Qn.get(i), l = Qn.get(o);
- (s && l ? s.breakAfter : (s ? s.breakAfter : $T(i)) || $T(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
- }
- return this.findPointBefore(r, n), this;
- }
- readTextNode(e) {
- let n = e.nodeValue;
- for (let r of this.points)
- r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
- for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
- let a = -1, o = 1, s;
- if (this.lineSeparator ? (a = n.indexOf(this.lineSeparator, r), o = this.lineSeparator.length) : (s = i.exec(n)) && (a = s.index, o = s[0].length), this.append(n.slice(r, a < 0 ? n.length : a)), a < 0)
- break;
- if (this.lineBreak(), o > 1)
- for (let l of this.points)
- l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
- r = a + o;
- }
- }
- readNode(e) {
- if (e.cmIgnore)
- return;
- let n = Qn.get(e), r = n && n.overrideDOMText;
- if (r != null) {
- this.findPointInside(e, r.length);
- for (let i = r.iter(); !i.next().done; )
- i.lineBreak ? this.lineBreak() : this.append(i.value);
- } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
- }
- findPointBefore(e, n) {
- for (let r of this.points)
- r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
- }
- findPointInside(e, n) {
- for (let r of this.points)
- (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (awt(e, r.node, r.offset) ? n : 0));
- }
- }
- function awt(t, e, n) {
- for (; ; ) {
- if (!e || n < Uu(e))
- return !1;
- if (e == t)
- return !0;
- n = Jh(e) + 1, e = e.parentNode;
- }
- }
- class WK {
- constructor(e, n) {
- this.node = e, this.offset = n, this.pos = -1;
- }
- }
- class owt {
- constructor(e, n, r, i) {
- this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
- let { impreciseHead: a, impreciseAnchor: o } = e.docView;
- if (e.state.readOnly && n > -1)
- this.newSel = null;
- else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
- let s = a || o ? [] : uwt(e), l = new iwt(s, e.state);
- l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = cwt(s, this.bounds.from);
- } else {
- let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !f4(e.contentDOM, s.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(s.focusNode, s.focusOffset), u = o && o.node == s.anchorNode && o.offset == s.anchorOffset || !f4(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
- if ((lt.ios || lt.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
- let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
- (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
- }
- this.newSel = De.single(u, l);
- }
- }
- }
- function Bve(t, e) {
- let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
- if (e.bounds) {
- let { from: o, to: s } = e.bounds, l = i.from, u = null;
- (a === 8 || lt.android && e.text.length < s - o) && (l = i.to, u = "end");
- let c = lwt(t.state.doc.sliceString(o, s, Ay), e.text, l - o, u);
- c && (lt.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == Ay + Ay && c.toB--, n = {
- from: o + c.from,
- to: o + c.toA,
- insert: xn.of(e.text.slice(c.from, c.toB).split(Ay))
- });
- } else r && (!t.hasFocus && t.state.facet(Nc) || r.main.eq(i)) && (r = null);
- if (!n && !r)
- return !1;
- if (!n && e.typeOver && !i.empty && r && r.main.empty ? n = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : n && n.from >= i.from && n.to <= i.to && (n.from != i.from || n.to != i.to) && i.to - i.from - (n.to - n.from) <= 4 ? n = {
- from: i.from,
- to: i.to,
- insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
- } : (lt.mac || lt.android) && n && n.from == n.to && n.from == i.head - 1 && /^\. ?$/.test(n.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (r && n.insert.length == 2 && (r = De.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: xn.of([" "]) }) : lt.chrome && n && n.from == n.to && n.from == i.head && n.insert.toString() == `
- ` && t.lineWrapping && (r && (r = De.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: xn.of([" "]) }), n)
- return zve(t, n, r, a);
- if (r && !r.main.eq(i)) {
- let o = !1, s = "select";
- return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (o = !0), s = t.inputState.lastSelectionOrigin), t.dispatch({ selection: r, scrollIntoView: o, userEvent: s }), !0;
- } else
- return !1;
- }
- function zve(t, e, n, r = -1) {
- if (lt.ios && t.inputState.flushIOSKey(e))
- return !0;
- let i = t.state.selection.main;
- if (lt.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
- // after a completion when you press enter
- (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && ag(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || r == 8 && e.insert.length < e.to - e.from && e.to > i.head) && ag(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && ag(t.contentDOM, "Delete", 46)))
- return !0;
- let a = e.insert.toString();
- t.inputState.composing >= 0 && t.inputState.composing++;
- let o, s = () => o || (o = swt(t, e, n));
- return t.state.facet(dve).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
- }
- function swt(t, e, n) {
- let r, i = t.state, a = i.selection.main;
- if (e.from >= a.from && e.to <= a.to && e.to - e.from >= (a.to - a.from) / 3 && (!n || n.main.empty && n.main.from == e.from + e.insert.length) && t.inputState.composing < 0) {
- let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
- r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
- } else {
- let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
- if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
- let u = t.state.sliceDoc(e.from, e.to), c, f = n && xve(t, n.main.head);
- if (f) {
- let p = e.insert.length - (e.to - e.from);
- c = { from: f.from, to: f.to - p };
- } else
- c = t.state.doc.lineAt(a.head);
- let d = a.to - e.to, h = a.to - a.from;
- r = i.changeByRange((p) => {
- if (p.from == a.from && p.to == a.to)
- return { changes: s, range: l || p.map(s) };
- let v = p.to - d, g = v - u.length;
- if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
- // changes in the same node work without aborting
- // composition, so cursors in the composition range are
- // ignored.
- p.to >= c.from && p.from <= c.to)
- return { range: p };
- let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
- return {
- changes: m,
- range: l ? De.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
- };
- });
- } else
- r = {
- changes: s,
- selection: l && i.selection.replaceRange(l)
- };
- }
- let o = "input.type";
- return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, o += ".compose", t.inputState.compositionFirstChange && (o += ".start", t.inputState.compositionFirstChange = !1)), i.update(r, { userEvent: o, scrollIntoView: !0 });
- }
- function lwt(t, e, n, r) {
- let i = Math.min(t.length, e.length), a = 0;
- for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
- a++;
- if (a == i && t.length == e.length)
- return null;
- let o = t.length, s = e.length;
- for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
- o--, s--;
- if (r == "end") {
- let l = Math.max(0, a - Math.min(o, s));
- n -= o + l - a;
- }
- if (o < a && t.length < e.length) {
- let l = n <= a && n >= o ? a - n : 0;
- a -= l, s = a + (s - o), o = a;
- } else if (s < a) {
- let l = n <= a && n >= s ? a - n : 0;
- a -= l, o = a + (o - s), s = a;
- }
- return { from: a, toA: o, toB: s };
- }
- function uwt(t) {
- let e = [];
- if (t.root.activeElement != t.contentDOM)
- return e;
- let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
- return n && (e.push(new WK(n, r)), (i != n || a != r) && e.push(new WK(i, a))), e;
- }
- function cwt(t, e) {
- if (t.length == 0)
- return null;
- let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
- return n > -1 && r > -1 ? De.single(n + e, r + e) : null;
- }
- const fwt = {
- childList: !0,
- characterData: !0,
- subtree: !0,
- attributes: !0,
- characterDataOldValue: !0
- }, oD = lt.ie && lt.ie_version <= 11;
- class dwt {
- constructor(e) {
- this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new YSt(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((n) => {
- for (let r of n)
- this.queue.push(r);
- (lt.ie && lt.ie_version <= 11 || lt.ios && e.composing) && n.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : this.flush();
- }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
- !(lt.chrome && lt.chrome_version < 126) && (this.editContext = new pwt(e), e.state.facet(Nc) && (e.contentDOM.editContext = this.editContext.editContext)), oD && (this.onCharData = (n) => {
- this.queue.push({
- target: n.target,
- type: "characterData",
- oldValue: n.prevValue
- }), this.flushSoon();
- }), this.onSelectionChange = this.onSelectionChange.bind(this), this.onResize = this.onResize.bind(this), this.onPrint = this.onPrint.bind(this), this.onScroll = this.onScroll.bind(this), window.matchMedia && (this.printQuery = window.matchMedia("print")), typeof ResizeObserver == "function" && (this.resizeScroll = new ResizeObserver(() => {
- var n;
- ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
- }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
- this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), n.length > 0 && n[n.length - 1].intersectionRatio > 0 != this.intersecting && (this.intersecting = !this.intersecting, this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event")));
- }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
- n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
- }, {})), this.listenForScroll(), this.readSelectionRange();
- }
- onScrollChanged(e) {
- this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
- }
- onScroll(e) {
- this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
- }
- onResize() {
- this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
- this.resizeTimeout = -1, this.view.requestMeasure();
- }, 50));
- }
- onPrint(e) {
- e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
- this.view.viewState.printing = !1, this.view.requestMeasure();
- }, 500));
- }
- updateGaps(e) {
- if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
- this.gapIntersection.disconnect();
- for (let n of e)
- this.gapIntersection.observe(n);
- this.gaps = e;
- }
- }
- onSelectionChange(e) {
- let n = this.selectionChanged;
- if (!this.readSelectionRange() || this.delayedAndroidKey)
- return;
- let { view: r } = this, i = this.selectionRange;
- if (r.state.facet(Nc) ? r.root.activeElement != this.dom : !$w(r.dom, i))
- return;
- let a = i.anchorNode && r.docView.nearest(i.anchorNode);
- if (a && a.ignoreEvent(e)) {
- n || (this.selectionChanged = !1);
- return;
- }
- (lt.ie && lt.ie_version <= 11 || lt.android && lt.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
- i.focusNode && vb(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
- }
- readSelectionRange() {
- let { view: e } = this, n = y_(e.root);
- if (!n)
- return !1;
- let r = lt.safari && e.root.nodeType == 11 && jSt(this.dom.ownerDocument) == this.dom && hwt(this.view, n) || n;
- if (!r || this.selectionRange.eq(r))
- return !1;
- let i = $w(this.dom, r);
- return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && KSt(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
- }
- setSelectionRange(e, n) {
- this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
- }
- clearSelectionRange() {
- this.selectionRange.set(null, 0, null, 0);
- }
- listenForScroll() {
- this.parentCheck = -1;
- let e = 0, n = null;
- for (let r = this.dom; r; )
- if (r.nodeType == 1)
- !n && e < this.scrollTargets.length && this.scrollTargets[e] == r ? e++ : n || (n = this.scrollTargets.slice(0, e)), n && n.push(r), r = r.assignedSlot || r.parentNode;
- else if (r.nodeType == 11)
- r = r.host;
- else
- break;
- if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
- for (let r of this.scrollTargets)
- r.removeEventListener("scroll", this.onScroll);
- for (let r of this.scrollTargets = n)
- r.addEventListener("scroll", this.onScroll);
- }
- }
- ignore(e) {
- if (!this.active)
- return e();
- try {
- return this.stop(), e();
- } finally {
- this.start(), this.clear();
- }
- }
- start() {
- this.active || (this.observer.observe(this.dom, fwt), oD && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
- }
- stop() {
- this.active && (this.active = !1, this.observer.disconnect(), oD && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
- }
- // Throw away any pending changes
- clear() {
- this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
- }
- // Chrome Android, especially in combination with GBoard, not only
- // doesn't reliably fire regular key events, but also often
- // surrounds the effect of enter or backspace with a bunch of
- // composition events that, when interrupted, cause text duplication
- // or other kinds of corruption. This hack makes the editor back off
- // from handling DOM changes for a moment when such a key is
- // detected (via beforeinput or keydown), and then tries to flush
- // them or, if that has no effect, dispatches the given key.
- delayAndroidKey(e, n) {
- var r;
- if (!this.delayedAndroidKey) {
- let i = () => {
- let a = this.delayedAndroidKey;
- a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && ag(this.dom, a.key, a.keyCode));
- };
- this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
- }
- (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
- key: e,
- keyCode: n,
- // Only run the key handler when no changes are detected if
- // this isn't coming right after another change, in which case
- // it is probably part of a weird chain of updates, and should
- // be ignored if it returns the DOM to its previous state.
- force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
- });
- }
- clearDelayedAndroidKey() {
- this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
- }
- flushSoon() {
- this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
- this.delayedFlush = -1, this.flush();
- }));
- }
- forceFlush() {
- this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
- }
- pendingRecords() {
- for (let e of this.observer.takeRecords())
- this.queue.push(e);
- return this.queue;
- }
- processRecords() {
- let e = this.pendingRecords();
- e.length && (this.queue = []);
- let n = -1, r = -1, i = !1;
- for (let a of e) {
- let o = this.readMutation(a);
- o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
- }
- return { from: n, to: r, typeOver: i };
- }
- readChange() {
- let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && $w(this.dom, this.selectionRange);
- if (e < 0 && !i)
- return null;
- e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
- let a = new owt(this.view, e, n, r);
- return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
- }
- // Apply pending changes, if any
- flush(e = !0) {
- if (this.delayedFlush >= 0 || this.delayedAndroidKey)
- return !1;
- e && this.readSelectionRange();
- let n = this.readChange();
- if (!n)
- return this.view.requestMeasure(), !1;
- let r = this.view.state, i = Bve(this.view, n);
- return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
- }
- readMutation(e) {
- let n = this.view.docView.nearest(e.target);
- if (!n || n.ignoreMutation(e))
- return null;
- if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
- let r = QK(n, e.previousSibling || e.target.previousSibling, -1), i = QK(n, e.nextSibling || e.target.nextSibling, 1);
- return {
- from: r ? n.posAfter(r) : n.posAtStart,
- to: i ? n.posBefore(i) : n.posAtEnd,
- typeOver: !1
- };
- } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
- }
- setWindow(e) {
- e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
- }
- addWindowListeners(e) {
- e.addEventListener("resize", this.onResize), this.printQuery ? this.printQuery.addEventListener("change", this.onPrint) : e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange);
- }
- removeWindowListeners(e) {
- e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener("change", this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange);
- }
- update(e) {
- this.editContext && (this.editContext.update(e), e.startState.facet(Nc) != e.state.facet(Nc) && (e.view.contentDOM.editContext = e.state.facet(Nc) ? this.editContext.editContext : null));
- }
- destroy() {
- var e, n, r;
- this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (n = this.gapIntersection) === null || n === void 0 || n.disconnect(), (r = this.resizeScroll) === null || r === void 0 || r.disconnect();
- for (let i of this.scrollTargets)
- i.removeEventListener("scroll", this.onScroll);
- this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
- }
- }
- function QK(t, e, n) {
- for (; e; ) {
- let r = Qn.get(e);
- if (r && r.parent == t)
- return r;
- let i = e.parentNode;
- e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
- }
- return null;
- }
- function HK(t, e) {
- let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
- return vb(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
- }
- function hwt(t, e) {
- if (e.getComposedRanges) {
- let i = e.getComposedRanges(t.root)[0];
- if (i)
- return HK(t, i);
- }
- let n = null;
- function r(i) {
- i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
- }
- return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? HK(t, n) : null;
- }
- class pwt {
- constructor(e) {
- this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
- let n = this.editContext = new window.EditContext({
- text: e.state.doc.sliceString(this.from, this.to),
- selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
- selectionEnd: this.toContextPos(e.state.selection.main.head)
- });
- n.addEventListener("textupdate", (r) => {
- let { anchor: i } = e.state.selection.main, a = {
- from: this.toEditorPos(r.updateRangeStart),
- to: this.toEditorPos(r.updateRangeEnd),
- insert: xn.of(r.text.split(`
- `))
- };
- a.from == this.from && i < this.from ? a.from = i : a.to == this.to && i > this.to && (a.to = i), !(a.from == a.to && !a.insert.length) && (this.pendingContextChange = a, zve(e, a, De.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
- }), n.addEventListener("characterboundsupdate", (r) => {
- let i = [], a = null;
- for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
- let l = e.coordsForChar(o);
- a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
- }
- n.updateCharacterBounds(r.rangeStart, i);
- }), n.addEventListener("textformatupdate", (r) => {
- let i = [];
- for (let a of r.getTextFormats()) {
- let o = a.underlineStyle, s = a.underlineThickness;
- if (o != "None" && s != "None") {
- let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
- i.push(pt.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
- }
- }
- e.dispatch({ effects: mve.of(pt.set(i)) });
- }), n.addEventListener("compositionstart", () => {
- e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
- }), n.addEventListener("compositionend", () => {
- e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
- }), this.measureReq = { read: (r) => {
- this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
- let i = y_(r.root);
- i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
- } };
- }
- applyEdits(e) {
- let n = 0, r = !1, i = this.pendingContextChange;
- return e.changes.iterChanges((a, o, s, l, u) => {
- if (r)
- return;
- let c = u.length - (o - a);
- if (i && o >= i.to)
- if (i.from == a && i.to == o && i.insert.eq(u)) {
- i = this.pendingContextChange = null, n += c, this.to += c;
- return;
- } else
- i = null, this.revertPending(e.state);
- if (a += n, o += n, o <= this.from)
- this.from += c, this.to += c;
- else if (a < this.to) {
- if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
- r = !0;
- return;
- }
- this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
- }
- n += c;
- }), i && !r && this.revertPending(e.state), !r;
- }
- update(e) {
- !this.applyEdits(e) || !this.rangeIsValid(e.state) ? (this.pendingContextChange = null, this.resetRange(e.state), this.editContext.updateText(0, this.editContext.text.length, e.state.doc.sliceString(this.from, this.to)), this.setSelection(e.state)) : (e.docChanged || e.selectionSet) && this.setSelection(e.state), (e.geometryChanged || e.docChanged || e.selectionSet) && e.view.requestMeasure(this.measureReq);
- }
- resetRange(e) {
- let { head: n } = e.selection.main;
- this.from = Math.max(
- 0,
- n - 1e4
- /* CxVp.Margin */
- ), this.to = Math.min(
- e.doc.length,
- n + 1e4
- /* CxVp.Margin */
- );
- }
- revertPending(e) {
- let n = this.pendingContextChange;
- this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
- }
- setSelection(e) {
- let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
- (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
- }
- rangeIsValid(e) {
- let { head: n } = e.selection.main;
- return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
- }
- toEditorPos(e) {
- return e + this.from;
- }
- toContextPos(e) {
- return e - this.from;
- }
- }
- class rt {
- /**
- The current editor state.
- */
- get state() {
- return this.viewState.state;
- }
- /**
- To be able to display large documents without consuming too much
- memory or overloading the browser, CodeMirror only draws the
- code that is visible (plus a margin around it) to the DOM. This
- property tells you the extent of the current drawn viewport, in
- document positions.
- */
- get viewport() {
- return this.viewState.viewport;
- }
- /**
- When there are, for example, large collapsed ranges in the
- viewport, its size can be a lot bigger than the actual visible
- content. Thus, if you are doing something like styling the
- content in the viewport, it is preferable to only do so for
- these ranges, which are the subset of the viewport that is
- actually drawn.
- */
- get visibleRanges() {
- return this.viewState.visibleRanges;
- }
- /**
- Returns false when the editor is entirely scrolled out of view
- or otherwise hidden.
- */
- get inView() {
- return this.viewState.inView;
- }
- /**
- Indicates whether the user is currently composing text via
- [IME](https://en.wikipedia.org/wiki/Input_method), and at least
- one change has been made in the current composition.
- */
- get composing() {
- return this.inputState.composing > 0;
- }
- /**
- Indicates whether the user is currently in composing state. Note
- that on some platforms, like Android, this will be the case a
- lot, since just putting the cursor on a word starts a
- composition there.
- */
- get compositionStarted() {
- return this.inputState.composing >= 0;
- }
- /**
- The document or shadow root that the view lives in.
- */
- get root() {
- return this._root;
- }
- /**
- @internal
- */
- get win() {
- return this.dom.ownerDocument.defaultView || window;
- }
- /**
- Construct a new view. You'll want to either provide a `parent`
- option, or put `view.dom` into your document after creating a
- view, so that the user can see the editor.
- */
- constructor(e = {}) {
- this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
- let { dispatch: n } = e;
- this.dispatchTransactions = e.dispatchTransactions || n && ((r) => r.forEach((i) => n(i, this))) || ((r) => this.update(r)), this.dispatch = this.dispatch.bind(this), this._root = e.root || qSt(e.parent) || document, this.viewState = new VK(e.state || cn.create(e)), e.scrollTo && e.scrollTo.is(ux) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Ty).map((r) => new nD(r));
- for (let r of this.plugins)
- r.update(this);
- this.observer = new dwt(this), this.inputState = new Axt(this), this.inputState.ensureHandlers(this.plugins), this.docView = new SK(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
- }
- dispatch(...e) {
- let n = e.length == 1 && e[0] instanceof zr ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
- this.dispatchTransactions(n, this);
- }
- /**
- Update the view for the given array of transactions. This will
- update the visible document and selection to match the state
- produced by the transactions, and notify view plugins of the
- change. You should usually call
- [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
- as a primitive.
- */
- update(e) {
- if (this.updateState != 0)
- throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
- let n = !1, r = !1, i, a = this.state;
- for (let d of e) {
- if (d.startState != a)
- throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
- a = d.state;
- }
- if (this.destroyed) {
- this.viewState.state = a;
- return;
- }
- let o = this.hasFocus, s = 0, l = null;
- e.some((d) => d.annotation(Mve)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = Ive(a, o), l || (s = 1));
- let u = this.observer.delayedAndroidKey, c = null;
- if (u ? (this.observer.clearDelayedAndroidKey(), c = this.observer.readChange(), (c && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (c = null)) : this.observer.clear(), a.facet(cn.phrases) != this.state.facet(cn.phrases))
- return this.setState(a);
- i = ET.create(this, a, e), i.flags |= s;
- let f = this.viewState.scrollTarget;
- try {
- this.updateState = 2;
- for (let d of e) {
- if (f && (f = f.map(d.changes)), d.scrollIntoView) {
- let { main: h } = d.state.selection;
- f = new og(h.empty ? h : De.cursor(h.head, h.head > h.anchor ? -1 : 1));
- }
- for (let h of d.effects)
- h.is(ux) && (f = h.value.clip(this.state));
- }
- this.viewState.update(i, f), this.bidiCache = MT.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(Py) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
- } finally {
- this.updateState = 0;
- }
- if (i.startState.facet(vx) != i.state.facet(vx) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
- for (let d of this.state.facet(O4))
- try {
- d(i);
- } catch (h) {
- Ia(this.state, h, "update listener");
- }
- (l || c) && Promise.resolve().then(() => {
- l && this.state == l.startState && this.dispatch(l), c && !Bve(this, c) && u.force && ag(this.contentDOM, u.key, u.keyCode);
- });
- }
- /**
- Reset the view to the given state. (This will cause the entire
- document to be redrawn and all view plugins to be reinitialized,
- so you should probably only use it when the new state isn't
- derived from the old state. Otherwise, use
- [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
- */
- setState(e) {
- if (this.updateState != 0)
- throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
- if (this.destroyed) {
- this.viewState.state = e;
- return;
- }
- this.updateState = 2;
- let n = this.hasFocus;
- try {
- for (let r of this.plugins)
- r.destroy(this);
- this.viewState = new VK(e), this.plugins = e.facet(Ty).map((r) => new nD(r)), this.pluginMap.clear();
- for (let r of this.plugins)
- r.update(this);
- this.docView.destroy(), this.docView = new SK(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
- } finally {
- this.updateState = 0;
- }
- n && this.focus(), this.requestMeasure();
- }
- updatePlugins(e) {
- let n = e.startState.facet(Ty), r = e.state.facet(Ty);
- if (n != r) {
- let i = [];
- for (let a of r) {
- let o = n.indexOf(a);
- if (o < 0)
- i.push(new nD(a));
- else {
- let s = this.plugins[o];
- s.mustUpdate = e, i.push(s);
- }
- }
- for (let a of this.plugins)
- a.mustUpdate != e && a.destroy(this);
- this.plugins = i, this.pluginMap.clear();
- } else
- for (let i of this.plugins)
- i.mustUpdate = e;
- for (let i = 0; i < this.plugins.length; i++)
- this.plugins[i].update(this);
- n != r && this.inputState.ensureHandlers(this.plugins);
- }
- docViewUpdate() {
- for (let e of this.plugins) {
- let n = e.value;
- if (n && n.docViewUpdate)
- try {
- n.docViewUpdate(this);
- } catch (r) {
- Ia(this.state, r, "doc view update listener");
- }
- }
- }
- /**
- @internal
- */
- measure(e = !0) {
- if (this.destroyed)
- return;
- if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
- this.measureScheduled = -1, this.requestMeasure();
- return;
- }
- this.measureScheduled = 0, e && this.observer.forceFlush();
- let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
- Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
- try {
- for (let s = 0; ; s++) {
- if (o < 0)
- if (Gpe(r))
- a = -1, o = this.viewState.heightMap.height;
- else {
- let h = this.viewState.scrollAnchorAt(i);
- a = h.from, o = h.top;
- }
- this.updateState = 1;
- let l = this.viewState.measure(this);
- if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
- break;
- if (s > 5) {
- console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
- break;
- }
- let u = [];
- l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
- let c = u.map((h) => {
- try {
- return h.read(this);
- } catch (p) {
- return Ia(this.state, p), GK;
- }
- }), f = ET.create(this, this.state, []), d = !1;
- f.flags |= l, n ? n.flags |= l : n = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f), d && this.docViewUpdate());
- for (let h = 0; h < u.length; h++)
- if (c[h] != GK)
- try {
- let p = u[h];
- p.write && p.write(c[h], this);
- } catch (p) {
- Ia(this.state, p);
- }
- if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
- if (this.viewState.editorHeight)
- if (this.viewState.scrollTarget) {
- this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
- continue;
- } else {
- let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
- if (p > 1 || p < -1) {
- i = i + p, r.scrollTop = i / this.scaleY, o = -1;
- continue;
- }
- }
- break;
- }
- }
- } finally {
- this.updateState = 0, this.measureScheduled = -1;
- }
- if (n && !n.empty)
- for (let s of this.state.facet(O4))
- s(n);
- }
- /**
- Get the CSS classes for the currently active editor themes.
- */
- get themeClasses() {
- return T4 + " " + (this.state.facet(C4) ? Lve : kve) + " " + this.state.facet(vx);
- }
- updateAttrs() {
- let e = jK(this, yve, {
- class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
- }), n = {
- spellcheck: "false",
- autocorrect: "off",
- autocapitalize: "off",
- translate: "no",
- contenteditable: this.state.facet(Nc) ? "true" : "false",
- class: "cm-content",
- style: `${lt.tabSize}: ${this.state.tabSize}`,
- role: "textbox",
- "aria-multiline": "true"
- };
- this.state.readOnly && (n["aria-readonly"] = "true"), jK(this, iB, n);
- let r = this.observer.ignore(() => {
- let i = g4(this.contentDOM, this.contentAttrs, n), a = g4(this.dom, this.editorAttrs, e);
- return i || a;
- });
- return this.editorAttrs = e, this.contentAttrs = n, r;
- }
- showAnnouncements(e) {
- let n = !0;
- for (let r of e)
- for (let i of r.effects)
- if (i.is(rt.announce)) {
- n && (this.announceDOM.textContent = ""), n = !1;
- let a = this.announceDOM.appendChild(document.createElement("div"));
- a.textContent = i.value;
- }
- }
- mountStyles() {
- this.styleModules = this.state.facet(Py);
- let e = this.state.facet(rt.cspNonce);
- Cf.mount(this.root, this.styleModules.concat(rwt).reverse(), e ? { nonce: e } : void 0);
- }
- readMeasured() {
- if (this.updateState == 2)
- throw new Error("Reading the editor layout isn't allowed during an update");
- this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
- }
- /**
- Schedule a layout measurement, optionally providing callbacks to
- do custom DOM measuring followed by a DOM write phase. Using
- this is preferable reading DOM layout directly from, for
- example, an event handler, because it'll make sure measuring and
- drawing done by other components is synchronized, avoiding
- unnecessary DOM layout computations.
- */
- requestMeasure(e) {
- if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
- if (this.measureRequests.indexOf(e) > -1)
- return;
- if (e.key != null) {
- for (let n = 0; n < this.measureRequests.length; n++)
- if (this.measureRequests[n].key === e.key) {
- this.measureRequests[n] = e;
- return;
- }
- }
- this.measureRequests.push(e);
- }
- }
- /**
- Get the value of a specific plugin, if present. Note that
- plugins that crash can be dropped from a view, so even when you
- know you registered a given plugin, it is recommended to check
- the return value of this method.
- */
- plugin(e) {
- let n = this.pluginMap.get(e);
- return (n === void 0 || n && n.spec != e) && this.pluginMap.set(e, n = this.plugins.find((r) => r.spec == e) || null), n && n.update(this).value;
- }
- /**
- The top position of the document, in screen coordinates. This
- may be negative when the editor is scrolled down. Points
- directly to the top of the first line, not above the padding.
- */
- get documentTop() {
- return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
- }
- /**
- Reports the padding above and below the document.
- */
- get documentPadding() {
- return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
- }
- /**
- If the editor is transformed with CSS, this provides the scale
- along the X axis. Otherwise, it will just be 1. Note that
- transforms other than translation and scaling are not supported.
- */
- get scaleX() {
- return this.viewState.scaleX;
- }
- /**
- Provide the CSS transformed scale along the Y axis.
- */
- get scaleY() {
- return this.viewState.scaleY;
- }
- /**
- Find the text line or block widget at the given vertical
- position (which is interpreted as relative to the [top of the
- document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
- */
- elementAtHeight(e) {
- return this.readMeasured(), this.viewState.elementAtHeight(e);
- }
- /**
- Find the line block (see
- [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
- height, again interpreted relative to the [top of the
- document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
- */
- lineBlockAtHeight(e) {
- return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
- }
- /**
- Get the extent and vertical position of all [line
- blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
- are relative to the [top of the
- document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
- */
- get viewportLineBlocks() {
- return this.viewState.viewportLines;
- }
- /**
- Find the line block around the given document position. A line
- block is a range delimited on both sides by either a
- non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
- start/end of the document. It will usually just hold a line of
- text, but may be broken into multiple textblocks by block
- widgets.
- */
- lineBlockAt(e) {
- return this.viewState.lineBlockAt(e);
- }
- /**
- The editor's total content height.
- */
- get contentHeight() {
- return this.viewState.contentHeight;
- }
- /**
- Move a cursor position by [grapheme
- cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
- the motion is away from the line start, or towards it. In
- bidirectional text, the line is traversed in visual order, using
- the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
- When the start position was the last one on the line, the
- returned position will be across the line break. If there is no
- further line, the original position is returned.
-
- By default, this method moves over a single cluster. The
- optional `by` argument can be used to move across more. It will
- be called with the first cluster as argument, and should return
- a predicate that determines, for each subsequent cluster,
- whether it should also be moved over.
- */
- moveByChar(e, n, r) {
- return iD(this, e, $K(this, e, n, r));
- }
- /**
- Move a cursor position across the next group of either
- [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
- non-whitespace characters.
- */
- moveByGroup(e, n) {
- return iD(this, e, $K(this, e, n, (r) => Pxt(this, e.head, r)));
- }
- /**
- Get the cursor position visually at the start or end of a line.
- Note that this may differ from the _logical_ position at its
- start or end (which is simply at `line.from`/`line.to`) if text
- at the start or end goes against the line's base text direction.
- */
- visualLineSide(e, n) {
- let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
- return De.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
- }
- /**
- Move to the next line boundary in the given direction. If
- `includeWrap` is true, line wrapping is on, and there is a
- further wrap point on the current line, the wrap point will be
- returned. Otherwise this function will return the start or end
- of the line.
- */
- moveToLineBoundary(e, n, r = !0) {
- return Txt(this, e, n, r);
- }
- /**
- Move a cursor position vertically. When `distance` isn't given,
- it defaults to moving to the next line (including wrapped
- lines). Otherwise, `distance` should provide a positive distance
- in pixels.
-
- When `start` has a
- [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
- motion will use that as a target horizontal position. Otherwise,
- the cursor's own horizontal position is used. The returned
- cursor will have its goal column set to whichever column was
- used.
- */
- moveVertically(e, n, r) {
- return iD(this, e, $xt(this, e, n, r));
- }
- /**
- Find the DOM parent node and offset (child offset if `node` is
- an element, character offset when it is a text node) at the
- given document position.
-
- Note that for positions that aren't currently in
- `visibleRanges`, the resulting DOM position isn't necessarily
- meaningful (it may just point before or after a placeholder
- element).
- */
- domAtPos(e) {
- return this.docView.domAtPos(e);
- }
- /**
- Find the document position at the given DOM node. Can be useful
- for associating positions with DOM events. Will raise an error
- when `node` isn't part of the editor content.
- */
- posAtDOM(e, n = 0) {
- return this.docView.posFromDOM(e, n);
- }
- posAtCoords(e, n = !0) {
- return this.readMeasured(), wve(this, e, n);
- }
- /**
- Get the screen coordinates at the given document position.
- `side` determines whether the coordinates are based on the
- element before (-1) or after (1) the position (if no element is
- available on the given side, the method will transparently use
- another strategy to get reasonable coordinates).
- */
- coordsAtPos(e, n = 1) {
- this.readMeasured();
- let r = this.docView.coordsAt(e, n);
- if (!r || r.left == r.right)
- return r;
- let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[qc.find(a, e - i.from, -1, n)];
- return i$(r, o.dir == ir.LTR == n > 0);
- }
- /**
- Return the rectangle around a given character. If `pos` does not
- point in front of a character that is in the viewport and
- rendered (i.e. not replaced, not a line break), this will return
- null. For space characters that are a line wrap point, this will
- return the position before the line break.
- */
- coordsForChar(e) {
- return this.readMeasured(), this.docView.coordsForChar(e);
- }
- /**
- The default width of a character in the editor. May not
- accurately reflect the width of all characters (given variable
- width fonts or styling of invididual ranges).
- */
- get defaultCharacterWidth() {
- return this.viewState.heightOracle.charWidth;
- }
- /**
- The default height of a line in the editor. May not be accurate
- for all lines.
- */
- get defaultLineHeight() {
- return this.viewState.heightOracle.lineHeight;
- }
- /**
- The text direction
- ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
- CSS property) of the editor's content element.
- */
- get textDirection() {
- return this.viewState.defaultTextDirection;
- }
- /**
- Find the text direction of the block at the given position, as
- assigned by CSS. If
- [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
- isn't enabled, or the given position is outside of the viewport,
- this will always return the same as
- [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
- this may trigger a DOM layout.
- */
- textDirectionAt(e) {
- return !this.state.facet(pve) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
- }
- /**
- Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
- (as determined by the
- [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
- CSS property of its content element).
- */
- get lineWrapping() {
- return this.viewState.heightOracle.lineWrapping;
- }
- /**
- Returns the bidirectional text structure of the given line
- (which should be in the current document) as an array of span
- objects. The order of these spans matches the [text
- direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
- left-to-right, the leftmost spans come first, otherwise the
- rightmost spans come first.
- */
- bidiSpans(e) {
- if (e.length > vwt)
- return ove(e.length);
- let n = this.textDirectionAt(e.from), r;
- for (let a of this.bidiCache)
- if (a.from == e.from && a.dir == n && (a.fresh || ave(a.isolates, r = OK(this, e))))
- return a.order;
- r || (r = OK(this, e));
- let i = cxt(e.text, n, r);
- return this.bidiCache.push(new MT(e.from, e.to, n, r, !0, i)), i;
- }
- /**
- Check whether the editor has focus.
- */
- get hasFocus() {
- var e;
- return (this.dom.ownerDocument.hasFocus() || lt.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
- }
- /**
- Put focus on the editor.
- */
- focus() {
- this.observer.ignore(() => {
- Qpe(this.contentDOM), this.docView.updateSelection();
- });
- }
- /**
- Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
- necessary when moving the editor's existing DOM to a new window or shadow root.
- */
- setRoot(e) {
- this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
- }
- /**
- Clean up this editor view, removing its element from the
- document, unregistering event handlers, and notifying
- plugins. The view instance can no longer be used after
- calling this.
- */
- destroy() {
- this.root.activeElement == this.contentDOM && this.contentDOM.blur();
- for (let e of this.plugins)
- e.destroy(this);
- this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
- }
- /**
- Returns an effect that can be
- [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
- cause it to scroll the given position or range into view.
- */
- static scrollIntoView(e, n = {}) {
- return ux.of(new og(typeof e == "number" ? De.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
- }
- /**
- Return an effect that resets the editor to its current (at the
- time this method was called) scroll position. Note that this
- only affects the editor's own scrollable element, not parents.
- See also
- [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
-
- The effect should be used with a document identical to the one
- it was created for. Failing to do so is not an error, but may
- not scroll to the expected position. You can
- [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
- */
- scrollSnapshot() {
- let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
- return ux.of(new og(De.cursor(r.from), "start", "start", r.top - e, n, !0));
- }
- /**
- Enable or disable tab-focus mode, which disables key bindings
- for Tab and Shift-Tab, letting the browser's default
- focus-changing behavior go through instead. This is useful to
- prevent trapping keyboard users in your editor.
-
- Without argument, this toggles the mode. With a boolean, it
- enables (true) or disables it (false). Given a number, it
- temporarily enables the mode until that number of milliseconds
- have passed or another non-Tab key is pressed.
- */
- setTabFocusMode(e) {
- e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e);
- }
- /**
- Returns an extension that can be used to add DOM event handlers.
- The value should be an object mapping event names to handler
- functions. For any given event, such functions are ordered by
- extension precedence, and the first handler to return true will
- be assumed to have handled that event, and no other handlers or
- built-in behavior will be activated for it. These are registered
- on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
- for `scroll` handlers, which will be called any time the
- editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
- its parent nodes is scrolled.
- */
- static domEventHandlers(e) {
- return Ir.define(() => ({}), { eventHandlers: e });
- }
- /**
- Create an extension that registers DOM event observers. Contrary
- to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
- observers can't be prevented from running by a higher-precedence
- handler returning true. They also don't prevent other handlers
- and observers from running when they return true, and should not
- call `preventDefault`.
- */
- static domEventObservers(e) {
- return Ir.define(() => ({}), { eventObservers: e });
- }
- /**
- Create a theme extension. The first argument can be a
- [`style-mod`](https://github.com/marijnh/style-mod#documentation)
- style spec providing the styles for the theme. These will be
- prefixed with a generated class for the style.
-
- Because the selectors will be prefixed with a scope class, rule
- that directly match the editor's [wrapper
- element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
- added—need to be explicitly differentiated by adding an `&` to
- the selector for that element—for example
- `&.cm-focused`.
-
- When `dark` is set to true, the theme will be marked as dark,
- which will cause the `&dark` rules from [base
- themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
- `&light` when a light theme is active).
- */
- static theme(e, n) {
- let r = Cf.newName(), i = [vx.of(r), Py.of(P4(`.${r}`, e))];
- return n && n.dark && i.push(C4.of(!0)), i;
- }
- /**
- Create an extension that adds styles to the base theme. Like
- with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
- place of the editor wrapper element when directly targeting
- that. You can also use `&dark` or `&light` instead to only
- target editors with a dark or light theme.
- */
- static baseTheme(e) {
- return Ff.lowest(Py.of(P4("." + T4, e, Nve)));
- }
- /**
- Retrieve an editor view instance from the view's DOM
- representation.
- */
- static findFromDOM(e) {
- var n;
- let r = e.querySelector(".cm-content"), i = r && Qn.get(r) || Qn.get(e);
- return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
- }
- }
- rt.styleModule = Py;
- rt.inputHandler = dve;
- rt.scrollHandler = gve;
- rt.focusChangeEffect = hve;
- rt.perLineTextDirection = pve;
- rt.exceptionSink = fve;
- rt.updateListener = O4;
- rt.editable = Nc;
- rt.mouseSelectionStyle = cve;
- rt.dragMovesSelection = uve;
- rt.clickAddsSelectionRange = lve;
- rt.decorations = b_;
- rt.outerDecorations = bve;
- rt.atomicRanges = aB;
- rt.bidiIsolatedRanges = _ve;
- rt.scrollMargins = Ove;
- rt.darkTheme = C4;
- rt.cspNonce = /* @__PURE__ */ ut.define({ combine: (t) => t.length ? t[0] : "" });
- rt.contentAttributes = iB;
- rt.editorAttributes = yve;
- rt.lineWrapping = /* @__PURE__ */ rt.contentAttributes.of({ class: "cm-lineWrapping" });
- rt.announce = /* @__PURE__ */ zt.define();
- const vwt = 4096, GK = {};
- class MT {
- constructor(e, n, r, i, a, o) {
- this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
- }
- static update(e, n) {
- if (n.empty && !e.some((a) => a.fresh))
- return e;
- let r = [], i = e.length ? e[e.length - 1].dir : ir.LTR;
- for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
- let o = e[a];
- o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new MT(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
- }
- return r;
- }
- }
- function jK(t, e, n) {
- for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
- let a = r[i], o = typeof a == "function" ? a(t) : a;
- o && v4(o, n);
- }
- return n;
- }
- const gwt = lt.mac ? "mac" : lt.windows ? "win" : lt.linux ? "linux" : "key";
- function mwt(t, e) {
- const n = t.split(/-(?!$)/);
- let r = n[n.length - 1];
- r == "Space" && (r = " ");
- let i, a, o, s;
- for (let l = 0; l < n.length - 1; ++l) {
- const u = n[l];
- if (/^(cmd|meta|m)$/i.test(u))
- s = !0;
- else if (/^a(lt)?$/i.test(u))
- i = !0;
- else if (/^(c|ctrl|control)$/i.test(u))
- a = !0;
- else if (/^s(hift)?$/i.test(u))
- o = !0;
- else if (/^mod$/i.test(u))
- e == "mac" ? s = !0 : a = !0;
- else
- throw new Error("Unrecognized modifier name: " + u);
- }
- return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
- }
- function gx(t, e, n) {
- return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
- }
- const ywt = /* @__PURE__ */ Ff.default(/* @__PURE__ */ rt.domEventHandlers({
- keydown(t, e) {
- return Fve(Vve(e.state), t, e, "editor");
- }
- })), M1 = /* @__PURE__ */ ut.define({ enables: ywt }), ZK = /* @__PURE__ */ new WeakMap();
- function Vve(t) {
- let e = t.facet(M1), n = ZK.get(e);
- return n || ZK.set(e, n = Owt(e.reduce((r, i) => r.concat(i), []))), n;
- }
- function bwt(t, e, n) {
- return Fve(Vve(t.state), e, t, n);
- }
- let Bc = null;
- const _wt = 4e3;
- function Owt(t, e = gwt) {
- let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
- let l = r[o];
- if (l == null)
- r[o] = s;
- else if (l != s)
- throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
- }, a = (o, s, l, u, c) => {
- var f, d;
- let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => mwt(m, e));
- for (let m = 1; m < p.length; m++) {
- let y = p.slice(0, m).join(" ");
- i(y, !0), h[y] || (h[y] = {
- preventDefault: !0,
- stopPropagation: !1,
- run: [(_) => {
- let O = Bc = { view: _, prefix: y, scope: o };
- return setTimeout(() => {
- Bc == O && (Bc = null);
- }, _wt), !0;
- }]
- });
- }
- let v = p.join(" ");
- i(v, !1);
- let g = h[v] || (h[v] = {
- preventDefault: !1,
- stopPropagation: !1,
- run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
- });
- l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
- };
- for (let o of t) {
- let s = o.scope ? o.scope.split(" ") : ["editor"];
- if (o.any)
- for (let u of s) {
- let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
- c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
- let { any: f } = o;
- for (let d in c)
- c[d].run.push((h) => f(h, $4));
- }
- let l = o[e] || o.key;
- if (l)
- for (let u of s)
- a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
- }
- return n;
- }
- let $4 = null;
- function Fve(t, e, n, r) {
- $4 = e;
- let i = GSt(e), a = bi(i, 0), o = jo(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
- Bc && Bc.view == n && Bc.scope == r && (s = Bc.prefix + " ", Tve.indexOf(e.keyCode) < 0 && (u = !0, Bc = null));
- let f = /* @__PURE__ */ new Set(), d = (g) => {
- if (g) {
- for (let m of g.run)
- if (!f.has(m) && (f.add(m), m(n)))
- return g.stopPropagation && (c = !0), !0;
- g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
- }
- return !1;
- }, h = t[r], p, v;
- return h && (d(h[s + gx(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
- !(lt.windows && e.ctrlKey && e.altKey) && (p = Tf[e.keyCode]) && p != i ? (d(h[s + gx(p, e, !0)]) || e.shiftKey && (v = m_[e.keyCode]) != i && v != p && d(h[s + gx(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + gx(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), $4 = null, l;
- }
- class I1 {
- /**
- Create a marker with the given class and dimensions. If `width`
- is null, the DOM element will get no width style.
- */
- constructor(e, n, r, i, a) {
- this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
- }
- draw() {
- let e = document.createElement("div");
- return e.className = this.className, this.adjust(e), e;
- }
- update(e, n) {
- return n.className != this.className ? !1 : (this.adjust(e), !0);
- }
- adjust(e) {
- e.style.left = this.left + "px", e.style.top = this.top + "px", this.width != null && (e.style.width = this.width + "px"), e.style.height = this.height + "px";
- }
- eq(e) {
- return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
- }
- /**
- Create a set of rectangles for the given selection range,
- assigning them theclass`className`. Will create a single
- rectangle for empty ranges, and a set of selection-style
- rectangles covering the range's content (in a bidi-aware
- way) for non-empty ones.
- */
- static forRange(e, n, r) {
- if (r.empty) {
- let i = e.coordsAtPos(r.head, r.assoc || 1);
- if (!i)
- return [];
- let a = Wve(e);
- return [new I1(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
- } else
- return Swt(e, n, r);
- }
- }
- function Wve(t) {
- let e = t.scrollDOM.getBoundingClientRect();
- return { left: (t.textDirection == ir.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
- }
- function UK(t, e, n, r) {
- let i = t.coordsAtPos(e, n * 2);
- if (!i)
- return r;
- let a = t.dom.getBoundingClientRect(), o = (i.top + i.bottom) / 2, s = t.posAtCoords({ x: a.left + 1, y: o }), l = t.posAtCoords({ x: a.right - 1, y: o });
- return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
- }
- function Swt(t, e, n) {
- if (n.to <= t.viewport.from || n.from >= t.viewport.to)
- return [];
- let r = Math.max(n.from, t.viewport.from), i = Math.min(n.to, t.viewport.to), a = t.textDirection == ir.LTR, o = t.contentDOM, s = o.getBoundingClientRect(), l = Wve(t), u = o.querySelector(".cm-line"), c = u && window.getComputedStyle(u), f = s.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), d = s.right - (c ? parseInt(c.paddingRight) : 0), h = x4(t, r), p = x4(t, i), v = h.type == la.Text ? h : null, g = p.type == la.Text ? p : null;
- if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = UK(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = UK(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
- return y(_(n.from, n.to, v));
- {
- let S = v ? _(n.from, null, v) : O(h, !1), x = g ? _(null, n.to, g) : O(p, !0), C = [];
- return (v || h).to < (g || p).from - (v && g ? 1 : 0) || h.widgetLineBreaks > 1 && S.bottom + t.defaultLineHeight / 2 < x.top ? C.push(m(f, S.bottom, d, x.top)) : S.bottom < x.top && t.elementAtHeight((S.bottom + x.top) / 2).type == la.Text && (S.bottom = x.top = (S.bottom + x.top) / 2), y(S).concat(C).concat(y(x));
- }
- function m(S, x, C, P) {
- return new I1(
- e,
- S - l.left,
- x - l.top - 0.01,
- C - S,
- P - x + 0.01
- /* C.Epsilon */
- );
- }
- function y({ top: S, bottom: x, horizontal: C }) {
- let P = [];
- for (let $ = 0; $ < C.length; $ += 2)
- P.push(m(C[$], S, C[$ + 1], x));
- return P;
- }
- function _(S, x, C) {
- let P = 1e9, $ = -1e9, T = [];
- function E(N, I, B, Q, W) {
- let H = t.coordsAtPos(N, N == C.to ? -2 : 2), U = t.coordsAtPos(B, B == C.from ? 2 : -2);
- !H || !U || (P = Math.min(H.top, U.top, P), $ = Math.max(H.bottom, U.bottom, $), W == ir.LTR ? T.push(a && I ? f : H.left, a && Q ? d : U.right) : T.push(!a && Q ? f : U.left, !a && I ? d : H.right));
- }
- let M = S ?? C.from, R = x ?? C.to;
- for (let N of t.visibleRanges)
- if (N.to > M && N.from < R)
- for (let I = Math.max(N.from, M), B = Math.min(N.to, R); ; ) {
- let Q = t.state.doc.lineAt(I);
- for (let W of t.bidiSpans(Q)) {
- let H = W.from + Q.from, U = W.to + Q.from;
- if (H >= B)
- break;
- U > I && E(Math.max(H, I), S == null && H <= M, Math.min(U, B), x == null && U >= R, W.dir);
- }
- if (I = Q.to + 1, I >= B)
- break;
- }
- return T.length == 0 && E(M, S == null, R, x == null, t.textDirection), { top: P, bottom: $, horizontal: T };
- }
- function O(S, x) {
- let C = s.top + (x ? S.top : S.bottom);
- return { top: C, bottom: C, horizontal: [] };
- }
- }
- function xwt(t, e) {
- return t.constructor == e.constructor && t.eq(e);
- }
- class wwt {
- constructor(e, n) {
- this.view = e, this.layer = n, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), n.above && this.dom.classList.add("cm-layer-above"), n.class && this.dom.classList.add(n.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), n.mount && n.mount(this.dom, e);
- }
- update(e) {
- e.startState.facet(Mw) != e.state.facet(Mw) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
- }
- docViewUpdate(e) {
- this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
- }
- setOrder(e) {
- let n = 0, r = e.facet(Mw);
- for (; n < r.length && r[n] != this.layer; )
- n++;
- this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
- }
- measure() {
- return this.layer.markers(this.view);
- }
- scale() {
- let { scaleX: e, scaleY: n } = this.view;
- (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
- }
- draw(e) {
- if (e.length != this.drawn.length || e.some((n, r) => !xwt(n, this.drawn[r]))) {
- let n = this.dom.firstChild, r = 0;
- for (let i of e)
- i.update && n && i.constructor && this.drawn[r].constructor && i.update(n, this.drawn[r]) ? (n = n.nextSibling, r++) : this.dom.insertBefore(i.draw(), n);
- for (; n; ) {
- let i = n.nextSibling;
- n.remove(), n = i;
- }
- this.drawn = e;
- }
- }
- destroy() {
- this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
- }
- }
- const Mw = /* @__PURE__ */ ut.define();
- function Qve(t) {
- return [
- Ir.define((e) => new wwt(e, t)),
- Mw.of(t)
- ];
- }
- const Hve = !lt.ios, __ = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, {
- cursorBlinkRate: 1200,
- drawRangeCursor: !0
- }, {
- cursorBlinkRate: (e, n) => Math.min(e, n),
- drawRangeCursor: (e, n) => e || n
- });
- }
- });
- function Cwt(t = {}) {
- return [
- __.of(t),
- Twt,
- Pwt,
- $wt,
- vve.of(!0)
- ];
- }
- function Gve(t) {
- return t.startState.facet(__) != t.state.facet(__);
- }
- const Twt = /* @__PURE__ */ Qve({
- above: !0,
- markers(t) {
- let { state: e } = t, n = e.facet(__), r = [];
- for (let i of e.selection.ranges) {
- let a = i == e.selection.main;
- if (i.empty ? !a || Hve : n.drawRangeCursor) {
- let o = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", s = i.empty ? i : De.cursor(i.head, i.head > i.anchor ? -1 : 1);
- for (let l of I1.forRange(t, o, s))
- r.push(l);
- }
- }
- return r;
- },
- update(t, e) {
- t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
- let n = Gve(t);
- return n && XK(t.state, e), t.docChanged || t.selectionSet || n;
- },
- mount(t, e) {
- XK(e.state, t);
- },
- class: "cm-cursorLayer"
- });
- function XK(t, e) {
- e.style.animationDuration = t.facet(__).cursorBlinkRate + "ms";
- }
- const Pwt = /* @__PURE__ */ Qve({
- above: !1,
- markers(t) {
- return t.state.selection.ranges.map((e) => e.empty ? [] : I1.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
- },
- update(t, e) {
- return t.docChanged || t.selectionSet || t.viewportChanged || Gve(t);
- },
- class: "cm-selectionLayer"
- }), A4 = {
- ".cm-line": {
- "& ::selection, &::selection": { backgroundColor: "transparent !important" }
- },
- ".cm-content": {
- "& :focus": {
- caretColor: "initial !important",
- "&::selection, & ::selection": {
- backgroundColor: "Highlight !important"
- }
- }
- }
- };
- Hve && (A4[".cm-line"].caretColor = A4[".cm-content"].caretColor = "transparent !important");
- const $wt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ rt.theme(A4)), jve = /* @__PURE__ */ zt.define({
- map(t, e) {
- return t == null ? null : e.mapPos(t);
- }
- }), Ey = /* @__PURE__ */ fi.define({
- create() {
- return null;
- },
- update(t, e) {
- return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(jve) ? r.value : n, t);
- }
- }), Awt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
- }
- update(t) {
- var e;
- let n = t.state.field(Ey);
- n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(Ey) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
- }
- readPos() {
- let { view: t } = this, e = t.state.field(Ey), n = e != null && t.coordsAtPos(e);
- if (!n)
- return null;
- let r = t.scrollDOM.getBoundingClientRect();
- return {
- left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
- top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
- height: n.bottom - n.top
- };
- }
- drawCursor(t) {
- if (this.cursor) {
- let { scaleX: e, scaleY: n } = this.view;
- t ? (this.cursor.style.left = t.left / e + "px", this.cursor.style.top = t.top / n + "px", this.cursor.style.height = t.height / n + "px") : this.cursor.style.left = "-100000px";
- }
- }
- destroy() {
- this.cursor && this.cursor.remove();
- }
- setDropPos(t) {
- this.view.state.field(Ey) != t && this.view.dispatch({ effects: jve.of(t) });
- }
- }, {
- eventObservers: {
- dragover(t) {
- this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
- },
- dragleave(t) {
- (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
- },
- dragend() {
- this.setDropPos(null);
- },
- drop() {
- this.setDropPos(null);
- }
- }
- });
- function Ewt() {
- return [Ey, Awt];
- }
- function YK(t, e, n, r, i) {
- e.lastIndex = 0;
- for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
- if (!a.lineBreak)
- for (; s = e.exec(a.value); )
- i(o + s.index, s);
- }
- function Mwt(t, e) {
- let n = t.visibleRanges;
- if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
- return n;
- let r = [];
- for (let { from: i, to: a } of n)
- i = Math.max(t.state.doc.lineAt(i).from, i - e), a = Math.min(t.state.doc.lineAt(a).to, a + e), r.length && r[r.length - 1].to >= i ? r[r.length - 1].to = a : r.push({ from: i, to: a });
- return r;
- }
- class Iwt {
- /**
- Create a decorator.
- */
- constructor(e) {
- const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
- if (!n.global)
- throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
- if (this.regexp = n, i)
- this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
- else if (typeof r == "function")
- this.addMatch = (s, l, u, c) => {
- let f = r(s, l, u);
- f && c(u, u + s[0].length, f);
- };
- else if (r)
- this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
- else
- throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
- this.boundary = a, this.maxLength = o;
- }
- /**
- Compute the full set of decorations for matches in the given
- view's viewport. You'll want to call this when initializing your
- plugin.
- */
- createDeco(e) {
- let n = new wf(), r = n.add.bind(n);
- for (let { from: i, to: a } of Mwt(e, this.maxLength))
- YK(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
- return n.finish();
- }
- /**
- Update a set of decorations for a view update. `deco` _must_ be
- the set of decorations produced by _this_ `MatchDecorator` for
- the view state before the update.
- */
- updateDeco(e, n) {
- let r = 1e9, i = -1;
- return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
- l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
- }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
- }
- updateRange(e, n, r, i) {
- for (let a of e.visibleRanges) {
- let o = Math.max(a.from, r), s = Math.min(a.to, i);
- if (s > o) {
- let l = e.state.doc.lineAt(o), u = l.to < s ? e.state.doc.lineAt(s) : l, c = Math.max(a.from, l.from), f = Math.min(a.to, u.to);
- if (this.boundary) {
- for (; o > l.from; o--)
- if (this.boundary.test(l.text[o - 1 - l.from])) {
- c = o;
- break;
- }
- for (; s < u.to; s++)
- if (this.boundary.test(u.text[s - u.from])) {
- f = s;
- break;
- }
- }
- let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
- if (l == u)
- for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
- this.addMatch(h, e, h.index + l.from, p);
- else
- YK(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
- n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
- }
- }
- return n;
- }
- }
- const E4 = /x/.unicode != null ? "gu" : "g", Dwt = /* @__PURE__ */ new RegExp(`[\0-\b
- --\u2028\u2029\uFEFF-]`, E4), Rwt = {
- 0: "null",
- 7: "bell",
- 8: "backspace",
- 10: "newline",
- 11: "vertical tab",
- 13: "carriage return",
- 27: "escape",
- 8203: "zero width space",
- 8204: "zero width non-joiner",
- 8205: "zero width joiner",
- 8206: "left-to-right mark",
- 8207: "right-to-left mark",
- 8232: "line separator",
- 8237: "left-to-right override",
- 8238: "right-to-left override",
- 8294: "left-to-right isolate",
- 8295: "right-to-left isolate",
- 8297: "pop directional isolate",
- 8233: "paragraph separator",
- 65279: "zero width no-break space",
- 65532: "object replacement"
- };
- let sD = null;
- function kwt() {
- var t;
- if (sD == null && typeof document < "u" && document.body) {
- let e = document.body.style;
- sD = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
- }
- return sD || !1;
- }
- const Iw = /* @__PURE__ */ ut.define({
- combine(t) {
- let e = Kl(t, {
- render: null,
- specialChars: Dwt,
- addSpecialChars: null
- });
- return (e.replaceTabs = !kwt()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, E4)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, E4)), e;
- }
- });
- function Lwt(t = {}) {
- return [Iw.of(t), Nwt()];
- }
- let qK = null;
- function Nwt() {
- return qK || (qK = Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.decorations = pt.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(Iw)), this.decorations = this.decorator.createDeco(t);
- }
- makeDecorator(t) {
- return new Iwt({
- regexp: t.specialChars,
- decoration: (e, n, r) => {
- let { doc: i } = n.state, a = bi(e[0], 0);
- if (a == 9) {
- let o = i.lineAt(r), s = n.state.tabSize, l = Fm(o.text, s, r - o.from);
- return pt.replace({
- widget: new Fwt((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
- });
- }
- return this.decorationCache[a] || (this.decorationCache[a] = pt.replace({ widget: new Vwt(t, a) }));
- },
- boundary: t.replaceTabs ? void 0 : /[^]/
- });
- }
- update(t) {
- let e = t.state.facet(Iw);
- t.startState.facet(Iw) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
- }
- }, {
- decorations: (t) => t.decorations
- }));
- }
- const Bwt = "•";
- function zwt(t) {
- return t >= 32 ? Bwt : t == 10 ? "" : String.fromCharCode(9216 + t);
- }
- class Vwt extends Jl {
- constructor(e, n) {
- super(), this.options = e, this.code = n;
- }
- eq(e) {
- return e.code == this.code;
- }
- toDOM(e) {
- let n = zwt(this.code), r = e.state.phrase("Control character") + " " + (Rwt[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
- if (i)
- return i;
- let a = document.createElement("span");
- return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
- }
- ignoreEvent() {
- return !1;
- }
- }
- class Fwt extends Jl {
- constructor(e) {
- super(), this.width = e;
- }
- eq(e) {
- return e.width == this.width;
- }
- toDOM() {
- let e = document.createElement("span");
- return e.textContent = " ", e.className = "cm-tab", e.style.width = this.width + "px", e;
- }
- ignoreEvent() {
- return !1;
- }
- }
- function Wwt() {
- return Hwt;
- }
- const Qwt = /* @__PURE__ */ pt.line({ class: "cm-activeLine" }), Hwt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.decorations = this.getDeco(t);
- }
- update(t) {
- (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
- }
- getDeco(t) {
- let e = -1, n = [];
- for (let r of t.state.selection.ranges) {
- let i = t.lineBlockAt(r.head);
- i.from > e && (n.push(Qwt.range(i.from)), e = i.from);
- }
- return pt.set(n);
- }
- }, {
- decorations: (t) => t.decorations
- });
- class Gwt extends Jl {
- constructor(e) {
- super(), this.content = e;
- }
- toDOM() {
- let e = document.createElement("span");
- return e.className = "cm-placeholder", e.style.pointerEvents = "none", e.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : this.content), typeof this.content == "string" ? e.setAttribute("aria-label", "placeholder " + this.content) : e.setAttribute("aria-hidden", "true"), e;
- }
- coordsAt(e) {
- let n = e.firstChild ? Kg(e.firstChild) : [];
- if (!n.length)
- return null;
- let r = window.getComputedStyle(e.parentNode), i = i$(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
- return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
- }
- ignoreEvent() {
- return !1;
- }
- }
- function jwt(t) {
- return Ir.fromClass(class {
- constructor(e) {
- this.view = e, this.placeholder = t ? pt.set([pt.widget({ widget: new Gwt(t), side: 1 }).range(0)]) : pt.none;
- }
- get decorations() {
- return this.view.state.doc.length ? pt.none : this.placeholder;
- }
- }, { decorations: (e) => e.decorations });
- }
- const M4 = 2e3;
- function Zwt(t, e, n) {
- let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
- if (e.off > M4 || n.off > M4 || e.col < 0 || n.col < 0) {
- let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
- for (let l = r; l <= i; l++) {
- let u = t.doc.line(l);
- u.length <= s && a.push(De.range(u.from + o, u.to + s));
- }
- } else {
- let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
- for (let l = r; l <= i; l++) {
- let u = t.doc.line(l), c = l4(u.text, o, t.tabSize, !0);
- if (c < 0)
- a.push(De.cursor(u.to));
- else {
- let f = l4(u.text, s, t.tabSize);
- a.push(De.range(u.from + c, u.from + f));
- }
- }
- }
- return a;
- }
- function Uwt(t, e) {
- let n = t.coordsAtPos(t.viewport.from);
- return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
- }
- function KK(t, e) {
- let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > M4 ? -1 : i == r.length ? Uwt(t, e.clientX) : Fm(r.text, t.state.tabSize, n - r.from);
- return { line: r.number, col: a, off: i };
- }
- function Xwt(t, e) {
- let n = KK(t, e), r = t.state.selection;
- return n ? {
- update(i) {
- if (i.docChanged) {
- let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
- n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
- }
- },
- get(i, a, o) {
- let s = KK(t, i);
- if (!s)
- return r;
- let l = Zwt(t.state, n, s);
- return l.length ? o ? De.create(l.concat(r.ranges)) : De.create(l) : r;
- }
- } : null;
- }
- function Ywt(t) {
- let e = (n) => n.altKey && n.button == 0;
- return rt.mouseSelectionStyle.of((n, r) => e(r) ? Xwt(n, r) : null);
- }
- const qwt = {
- Alt: [18, (t) => !!t.altKey],
- Control: [17, (t) => !!t.ctrlKey],
- Shift: [16, (t) => !!t.shiftKey],
- Meta: [91, (t) => !!t.metaKey]
- }, Kwt = { style: "cursor: crosshair" };
- function Jwt(t = {}) {
- let [e, n] = qwt[t.key || "Alt"], r = Ir.fromClass(class {
- constructor(i) {
- this.view = i, this.isDown = !1;
- }
- set(i) {
- this.isDown != i && (this.isDown = i, this.view.update([]));
- }
- }, {
- eventObservers: {
- keydown(i) {
- this.set(i.keyCode == e || n(i));
- },
- keyup(i) {
- (i.keyCode == e || !n(i)) && this.set(!1);
- },
- mousemove(i) {
- this.set(n(i));
- }
- }
- });
- return [
- r,
- rt.contentAttributes.of((i) => {
- var a;
- return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? Kwt : null;
- })
- ];
- }
- const ny = "-10000px";
- class Zve {
- constructor(e, n, r, i) {
- this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
- let a = null;
- this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
- }
- update(e, n) {
- var r;
- let i = e.state.facet(this.facet), a = i.filter((l) => l);
- if (i === this.input) {
- for (let l of this.tooltipViews)
- l.update && l.update(e);
- return !1;
- }
- let o = [], s = n ? [] : null;
- for (let l = 0; l < a.length; l++) {
- let u = a[l], c = -1;
- if (u) {
- for (let f = 0; f < this.tooltips.length; f++) {
- let d = this.tooltips[f];
- d && d.create == u.create && (c = f);
- }
- if (c < 0)
- o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
- else {
- let f = o[l] = this.tooltipViews[c];
- s && (s[l] = n[c]), f.update && f.update(e);
- }
- }
- }
- for (let l of this.tooltipViews)
- o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
- return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
- }
- }
- function eCt(t) {
- let { win: e } = t;
- return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
- }
- const lD = /* @__PURE__ */ ut.define({
- combine: (t) => {
- var e, n, r;
- return {
- position: lt.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
- parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
- tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || eCt
- };
- }
- }), JK = /* @__PURE__ */ new WeakMap(), lB = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
- let e = t.state.facet(lD);
- this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new Zve(t, uB, (n, r) => this.createTooltip(n, r), (n) => {
- this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
- }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
- Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
- }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
- }
- createContainer() {
- this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom;
- }
- observeIntersection() {
- if (this.intersectionObserver) {
- this.intersectionObserver.disconnect();
- for (let t of this.manager.tooltipViews)
- this.intersectionObserver.observe(t.dom);
- }
- }
- measureSoon() {
- this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
- this.measureTimeout = -1, this.maybeMeasure();
- }, 50));
- }
- update(t) {
- t.transactions.length && (this.lastTransaction = Date.now());
- let e = this.manager.update(t, this.above);
- e && this.observeIntersection();
- let n = e || t.geometryChanged, r = t.state.facet(lD);
- if (r.position != this.position && !this.madeAbsolute) {
- this.position = r.position;
- for (let i of this.manager.tooltipViews)
- i.dom.style.position = this.position;
- n = !0;
- }
- if (r.parent != this.parent) {
- this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
- for (let i of this.manager.tooltipViews)
- this.container.appendChild(i.dom);
- n = !0;
- } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
- n && this.maybeMeasure();
- }
- createTooltip(t, e) {
- let n = t.create(this.view), r = e ? e.dom : null;
- if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
- let i = document.createElement("div");
- i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
- }
- return n.dom.style.position = this.position, n.dom.style.top = ny, n.dom.style.left = "0px", this.container.insertBefore(n.dom, r), n.mount && n.mount(this.view), this.resizeObserver && this.resizeObserver.observe(n.dom), n;
- }
- destroy() {
- var t, e, n;
- this.view.win.removeEventListener("resize", this.measureSoon);
- for (let r of this.manager.tooltipViews)
- r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
- this.parent && this.container.remove(), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), (n = this.intersectionObserver) === null || n === void 0 || n.disconnect(), clearTimeout(this.measureTimeout);
- }
- readMeasure() {
- let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
- if (this.position == "fixed" && this.manager.tooltipViews.length) {
- let { dom: i } = this.manager.tooltipViews[0];
- if (lt.gecko)
- r = i.offsetParent != this.container.ownerDocument.body;
- else if (i.style.top == ny && i.style.left == "0px") {
- let a = i.getBoundingClientRect();
- r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
- }
- }
- if (r || this.position == "absolute")
- if (this.parent) {
- let i = this.parent.getBoundingClientRect();
- i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
- } else
- ({ scaleX: e, scaleY: n } = this.view.viewState);
- return {
- editor: t,
- parent: this.parent ? this.container.getBoundingClientRect() : t,
- pos: this.manager.tooltips.map((i, a) => {
- let o = this.manager.tooltipViews[a];
- return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
- }),
- size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
- space: this.view.state.facet(lD).tooltipSpace(this.view),
- scaleX: e,
- scaleY: n,
- makeAbsolute: r
- };
- }
- writeMeasure(t) {
- var e;
- if (t.makeAbsolute) {
- this.madeAbsolute = !0, this.position = "absolute";
- for (let s of this.manager.tooltipViews)
- s.dom.style.position = "absolute";
- }
- let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
- for (let s = 0; s < this.manager.tooltips.length; s++) {
- let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
- if (!f || f.bottom <= Math.max(n.top, r.top) || f.top >= Math.min(n.bottom, r.bottom) || f.right < Math.max(n.left, r.left) - 0.1 || f.left > Math.min(n.right, r.right) + 0.1) {
- c.style.top = ny;
- continue;
- }
- let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = JK.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || nCt, y = this.view.textDirection == ir.LTR, _ = d.width > r.right - r.left ? y ? r.left : r.right - d.width : y ? Math.min(f.left - (h ? 14 : 0) + m.x, r.right - v) : Math.max(r.left, f.left - v + (h ? 14 : 0) - m.x), O = this.above[s];
- !l.strictSide && (O ? f.top - (d.bottom - d.top) - m.y < r.top : f.bottom + (d.bottom - d.top) + m.y > r.bottom) && O == r.bottom - f.bottom > f.top - r.top && (O = this.above[s] = !O);
- let S = (O ? f.top - r.top : r.bottom - f.bottom) - p;
- if (S < g && u.resize !== !1) {
- if (S < this.view.defaultLineHeight) {
- c.style.top = ny;
- continue;
- }
- JK.set(u, g), c.style.height = (g = S) / a + "px";
- } else c.style.height && (c.style.height = "");
- let x = O ? f.top - g - p - m.y : f.bottom + p + m.y, C = _ + v;
- if (u.overlap !== !0)
- for (let P of o)
- P.left < C && P.right > _ && P.top < x + g && P.bottom > x && (x = O ? P.top - g - 2 - p : P.bottom + p + 2);
- if (this.position == "absolute" ? (c.style.top = (x - t.parent.top) / a + "px", c.style.left = (_ - t.parent.left) / i + "px") : (c.style.top = x / a + "px", c.style.left = _ / i + "px"), h) {
- let P = f.left + (y ? m.x : -m.x) - (_ + 14 - 7);
- h.style.left = P / i + "px";
- }
- u.overlap !== !0 && o.push({ left: _, top: x, right: C, bottom: x + g }), c.classList.toggle("cm-tooltip-above", O), c.classList.toggle("cm-tooltip-below", !O), u.positioned && u.positioned(t.space);
- }
- }
- maybeMeasure() {
- if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView)))
- for (let t of this.manager.tooltipViews)
- t.dom.style.top = ny;
- }
- }, {
- eventObservers: {
- scroll() {
- this.maybeMeasure();
- }
- }
- }), tCt = /* @__PURE__ */ rt.baseTheme({
- ".cm-tooltip": {
- zIndex: 100,
- boxSizing: "border-box"
- },
- "&light .cm-tooltip": {
- border: "1px solid #bbb",
- backgroundColor: "#f5f5f5"
- },
- "&light .cm-tooltip-section:not(:first-child)": {
- borderTop: "1px solid #bbb"
- },
- "&dark .cm-tooltip": {
- backgroundColor: "#333338",
- color: "white"
- },
- ".cm-tooltip-arrow": {
- height: "7px",
- width: `${7 * 2}px`,
- position: "absolute",
- zIndex: -1,
- overflow: "hidden",
- "&:before, &:after": {
- content: "''",
- position: "absolute",
- width: 0,
- height: 0,
- borderLeft: "7px solid transparent",
- borderRight: "7px solid transparent"
- },
- ".cm-tooltip-above &": {
- bottom: "-7px",
- "&:before": {
- borderTop: "7px solid #bbb"
- },
- "&:after": {
- borderTop: "7px solid #f5f5f5",
- bottom: "1px"
- }
- },
- ".cm-tooltip-below &": {
- top: "-7px",
- "&:before": {
- borderBottom: "7px solid #bbb"
- },
- "&:after": {
- borderBottom: "7px solid #f5f5f5",
- top: "1px"
- }
- }
- },
- "&dark .cm-tooltip .cm-tooltip-arrow": {
- "&:before": {
- borderTopColor: "#333338",
- borderBottomColor: "#333338"
- },
- "&:after": {
- borderTopColor: "transparent",
- borderBottomColor: "transparent"
- }
- }
- }), nCt = { x: 0, y: 0 }, uB = /* @__PURE__ */ ut.define({
- enables: [lB, tCt]
- }), IT = /* @__PURE__ */ ut.define({
- combine: (t) => t.reduce((e, n) => e.concat(n), [])
- });
- class o$ {
- // Needs to be static so that host tooltip instances always match
- static create(e) {
- return new o$(e);
- }
- constructor(e) {
- this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new Zve(e, IT, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
- }
- createHostedView(e, n) {
- let r = e.create(this.view);
- return r.dom.classList.add("cm-tooltip-section"), this.dom.insertBefore(r.dom, n ? n.dom.nextSibling : this.dom.firstChild), this.mounted && r.mount && r.mount(this.view), r;
- }
- mount(e) {
- for (let n of this.manager.tooltipViews)
- n.mount && n.mount(e);
- this.mounted = !0;
- }
- positioned(e) {
- for (let n of this.manager.tooltipViews)
- n.positioned && n.positioned(e);
- }
- update(e) {
- this.manager.update(e);
- }
- destroy() {
- var e;
- for (let n of this.manager.tooltipViews)
- (e = n.destroy) === null || e === void 0 || e.call(n);
- }
- passProp(e) {
- let n;
- for (let r of this.manager.tooltipViews) {
- let i = r[e];
- if (i !== void 0) {
- if (n === void 0)
- n = i;
- else if (n !== i)
- return;
- }
- }
- return n;
- }
- get offset() {
- return this.passProp("offset");
- }
- get getCoords() {
- return this.passProp("getCoords");
- }
- get overlap() {
- return this.passProp("overlap");
- }
- get resize() {
- return this.passProp("resize");
- }
- }
- const rCt = /* @__PURE__ */ uB.compute([IT], (t) => {
- let e = t.facet(IT);
- return e.length === 0 ? null : {
- pos: Math.min(...e.map((n) => n.pos)),
- end: Math.max(...e.map((n) => {
- var r;
- return (r = n.end) !== null && r !== void 0 ? r : n.pos;
- })),
- create: o$.create,
- above: e[0].above,
- arrow: e.some((n) => n.arrow)
- };
- });
- class iCt {
- constructor(e, n, r, i, a) {
- this.view = e, this.source = n, this.field = r, this.setHover = i, this.hoverTime = a, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this));
- }
- update() {
- this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
- }
- get active() {
- return this.view.state.field(this.field);
- }
- checkHover() {
- if (this.hoverTimeout = -1, this.active.length)
- return;
- let e = Date.now() - this.lastMove.time;
- e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
- }
- startHover() {
- clearTimeout(this.restartTimeout);
- let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
- if (!r)
- return;
- let i, a = 1;
- if (r instanceof Yc)
- i = r.posAtStart;
- else {
- if (i = e.posAtCoords(n), i == null)
- return;
- let s = e.coordsAtPos(i);
- if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
- return;
- let l = e.bidiSpans(e.state.doc.lineAt(i)).find((c) => c.from <= i && c.to >= i), u = l && l.dir == ir.RTL ? -1 : 1;
- a = n.x < s.left ? -u : u;
- }
- let o = this.source(e, i, a);
- if (o != null && o.then) {
- let s = this.pending = { pos: i };
- o.then((l) => {
- this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
- }, (l) => Ia(e.state, l, "hover tooltip"));
- } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
- }
- get tooltip() {
- let e = this.view.plugin(lB), n = e ? e.manager.tooltips.findIndex((r) => r.create == o$.create) : -1;
- return n > -1 ? e.manager.tooltipViews[n] : null;
- }
- mousemove(e) {
- var n, r;
- this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
- let { active: i, tooltip: a } = this;
- if (i.length && a && !aCt(a.dom, e) || this.pending) {
- let { pos: o } = i[0] || this.pending, s = (r = (n = i[0]) === null || n === void 0 ? void 0 : n.end) !== null && r !== void 0 ? r : o;
- (o == s ? this.view.posAtCoords(this.lastMove) != o : !oCt(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
- }
- }
- mouseleave(e) {
- clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
- let { active: n } = this;
- if (n.length) {
- let { tooltip: r } = this;
- r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
- }
- }
- watchTooltipLeave(e) {
- let n = (r) => {
- e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
- };
- e.addEventListener("mouseleave", n);
- }
- destroy() {
- clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
- }
- }
- const mx = 4;
- function aCt(t, e) {
- let n = t.getBoundingClientRect();
- return e.clientX >= n.left - mx && e.clientX <= n.right + mx && e.clientY >= n.top - mx && e.clientY <= n.bottom + mx;
- }
- function oCt(t, e, n, r, i, a) {
- let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
- if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
- return !1;
- let l = t.posAtCoords({ x: r, y: i }, !1);
- return l >= e && l <= n;
- }
- function sCt(t, e = {}) {
- let n = zt.define(), r = fi.define({
- create() {
- return [];
- },
- update(i, a) {
- if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
- let o = [];
- for (let s of i) {
- let l = a.changes.mapPos(s.pos, -1, Oi.TrackDel);
- if (l != null) {
- let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
- u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
- }
- }
- i = o;
- }
- for (let o of a.effects)
- o.is(n) && (i = o.value), o.is(lCt) && (i = []);
- return i;
- },
- provide: (i) => IT.from(i)
- });
- return [
- r,
- Ir.define((i) => new iCt(
- i,
- t,
- r,
- n,
- e.hoverTime || 300
- /* Hover.Time */
- )),
- rCt
- ];
- }
- function Uve(t, e) {
- let n = t.plugin(lB);
- if (!n)
- return null;
- let r = n.manager.tooltips.indexOf(e);
- return r < 0 ? null : n.manager.tooltipViews[r];
- }
- const lCt = /* @__PURE__ */ zt.define(), eJ = /* @__PURE__ */ ut.define({
- combine(t) {
- let e, n;
- for (let r of t)
- e = e || r.topContainer, n = n || r.bottomContainer;
- return { topContainer: e, bottomContainer: n };
- }
- });
- function O_(t, e) {
- let n = t.plugin(Xve), r = n ? n.specs.indexOf(e) : -1;
- return r > -1 ? n.panels[r] : null;
- }
- const Xve = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.input = t.state.facet(S_), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
- let e = t.state.facet(eJ);
- this.top = new yx(t, !0, e.topContainer), this.bottom = new yx(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
- for (let n of this.panels)
- n.dom.classList.add("cm-panel"), n.mount && n.mount();
- }
- update(t) {
- let e = t.state.facet(eJ);
- this.top.container != e.topContainer && (this.top.sync([]), this.top = new yx(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new yx(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
- let n = t.state.facet(S_);
- if (n != this.input) {
- let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
- for (let l of r) {
- let u = this.specs.indexOf(l), c;
- u < 0 ? (c = l(t.view), s.push(c)) : (c = this.panels[u], c.update && c.update(t)), i.push(c), (c.top ? a : o).push(c);
- }
- this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
- for (let l of s)
- l.dom.classList.add("cm-panel"), l.mount && l.mount();
- } else
- for (let r of this.panels)
- r.update && r.update(t);
- }
- destroy() {
- this.top.sync([]), this.bottom.sync([]);
- }
- }, {
- provide: (t) => rt.scrollMargins.of((e) => {
- let n = e.plugin(t);
- return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
- })
- });
- class yx {
- constructor(e, n, r) {
- this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
- }
- sync(e) {
- for (let n of this.panels)
- n.destroy && e.indexOf(n) < 0 && n.destroy();
- this.panels = e, this.syncDOM();
- }
- syncDOM() {
- if (this.panels.length == 0) {
- this.dom && (this.dom.remove(), this.dom = void 0);
- return;
- }
- if (!this.dom) {
- this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0";
- let n = this.container || this.view.dom;
- n.insertBefore(this.dom, this.top ? n.firstChild : null);
- }
- let e = this.dom.firstChild;
- for (let n of this.panels)
- if (n.dom.parentNode == this.dom) {
- for (; e != n.dom; )
- e = tJ(e);
- e = e.nextSibling;
- } else
- this.dom.insertBefore(n.dom, e);
- for (; e; )
- e = tJ(e);
- }
- scrollMargin() {
- return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top);
- }
- syncClasses() {
- if (!(!this.container || this.classes == this.view.themeClasses)) {
- for (let e of this.classes.split(" "))
- e && this.container.classList.remove(e);
- for (let e of (this.classes = this.view.themeClasses).split(" "))
- e && this.container.classList.add(e);
- }
- }
- }
- function tJ(t) {
- let e = t.nextSibling;
- return t.remove(), e;
- }
- const S_ = /* @__PURE__ */ ut.define({
- enables: Xve
- });
- class Yu extends Kh {
- /**
- @internal
- */
- compare(e) {
- return this == e || this.constructor == e.constructor && this.eq(e);
- }
- /**
- Compare this marker to another marker of the same type.
- */
- eq(e) {
- return !1;
- }
- /**
- Called if the marker has a `toDOM` method and its representation
- was removed from a gutter.
- */
- destroy(e) {
- }
- }
- Yu.prototype.elementClass = "";
- Yu.prototype.toDOM = void 0;
- Yu.prototype.mapMode = Oi.TrackBefore;
- Yu.prototype.startSide = Yu.prototype.endSide = -1;
- Yu.prototype.point = !0;
- const Dw = /* @__PURE__ */ ut.define(), uCt = {
- class: "",
- renderEmptyElements: !1,
- elementStyle: "",
- markers: () => Sn.empty,
- lineMarker: () => null,
- widgetMarker: () => null,
- lineMarkerChange: null,
- initialSpacer: null,
- updateSpacer: null,
- domEventHandlers: {}
- }, mb = /* @__PURE__ */ ut.define();
- function cCt(t) {
- return [Yve(), mb.of(Object.assign(Object.assign({}, uCt), t))];
- }
- const nJ = /* @__PURE__ */ ut.define({
- combine: (t) => t.some((e) => e)
- });
- function Yve(t) {
- return [
- fCt
- ];
- }
- const fCt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(mb).map((e) => new iJ(t, e));
- for (let e of this.gutters)
- this.dom.appendChild(e.dom);
- this.fixed = !t.state.facet(nJ), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
- }
- update(t) {
- if (this.updateGutters(t)) {
- let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
- this.syncGutters(r < (n.to - n.from) * 0.8);
- }
- t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(nJ) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
- }
- syncGutters(t) {
- let e = this.dom.nextSibling;
- t && this.dom.remove();
- let n = Sn.iter(this.view.state.facet(Dw), this.view.viewport.from), r = [], i = this.gutters.map((a) => new dCt(a, this.view.viewport, -this.view.documentPadding.top));
- for (let a of this.view.viewportLineBlocks)
- if (r.length && (r = []), Array.isArray(a.type)) {
- let o = !0;
- for (let s of a.type)
- if (s.type == la.Text && o) {
- I4(n, r, s.from);
- for (let l of i)
- l.line(this.view, s, r);
- o = !1;
- } else if (s.widget)
- for (let l of i)
- l.widget(this.view, s);
- } else if (a.type == la.Text) {
- I4(n, r, a.from);
- for (let o of i)
- o.line(this.view, a, r);
- } else if (a.widget)
- for (let o of i)
- o.widget(this.view, a);
- for (let a of i)
- a.finish();
- t && this.view.scrollDOM.insertBefore(this.dom, e);
- }
- updateGutters(t) {
- let e = t.startState.facet(mb), n = t.state.facet(mb), r = t.docChanged || t.heightChanged || t.viewportChanged || !Sn.eq(t.startState.facet(Dw), t.state.facet(Dw), t.view.viewport.from, t.view.viewport.to);
- if (e == n)
- for (let i of this.gutters)
- i.update(t) && (r = !0);
- else {
- r = !0;
- let i = [];
- for (let a of n) {
- let o = e.indexOf(a);
- o < 0 ? i.push(new iJ(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
- }
- for (let a of this.gutters)
- a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
- for (let a of i)
- this.dom.appendChild(a.dom);
- this.gutters = i;
- }
- return r;
- }
- destroy() {
- for (let t of this.gutters)
- t.destroy();
- this.dom.remove();
- }
- }, {
- provide: (t) => rt.scrollMargins.of((e) => {
- let n = e.plugin(t);
- return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == ir.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
- })
- });
- function rJ(t) {
- return Array.isArray(t) ? t : [t];
- }
- function I4(t, e, n) {
- for (; t.value && t.from <= n; )
- t.from == n && e.push(t.value), t.next();
- }
- class dCt {
- constructor(e, n, r) {
- this.gutter = e, this.height = r, this.i = 0, this.cursor = Sn.iter(e.markers, n.from);
- }
- addElement(e, n, r) {
- let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
- if (this.i == i.elements.length) {
- let s = new qve(e, o, a, r);
- i.elements.push(s), i.dom.appendChild(s.dom);
- } else
- i.elements[this.i].update(e, o, a, r);
- this.height = n.bottom, this.i++;
- }
- line(e, n, r) {
- let i = [];
- I4(this.cursor, i, n.from), r.length && (i = i.concat(r));
- let a = this.gutter.config.lineMarker(e, n, i);
- a && i.unshift(a);
- let o = this.gutter;
- i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
- }
- widget(e, n) {
- let r = this.gutter.config.widgetMarker(e, n.widget, n);
- r && this.addElement(e, n, [r]);
- }
- finish() {
- let e = this.gutter;
- for (; e.elements.length > this.i; ) {
- let n = e.elements.pop();
- e.dom.removeChild(n.dom), n.destroy();
- }
- }
- }
- class iJ {
- constructor(e, n) {
- this.view = e, this.config = n, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
- for (let r in n.domEventHandlers)
- this.dom.addEventListener(r, (i) => {
- let a = i.target, o;
- if (a != this.dom && this.dom.contains(a)) {
- for (; a.parentNode != this.dom; )
- a = a.parentNode;
- let l = a.getBoundingClientRect();
- o = (l.top + l.bottom) / 2;
- } else
- o = i.clientY;
- let s = e.lineBlockAtHeight(o - e.documentTop);
- n.domEventHandlers[r](e, s, i) && i.preventDefault();
- });
- this.markers = rJ(n.markers(e)), n.initialSpacer && (this.spacer = new qve(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
- }
- update(e) {
- let n = this.markers;
- if (this.markers = rJ(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
- let i = this.config.updateSpacer(this.spacer.markers[0], e);
- i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
- }
- let r = e.view.viewport;
- return !Sn.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
- }
- destroy() {
- for (let e of this.elements)
- e.destroy();
- }
- }
- class qve {
- constructor(e, n, r, i) {
- this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
- }
- update(e, n, r, i) {
- this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), hCt(this.markers, i) || this.setMarkers(e, i);
- }
- setMarkers(e, n) {
- let r = "cm-gutterElement", i = this.dom.firstChild;
- for (let a = 0, o = 0; ; ) {
- let s = o, l = a < n.length ? n[a++] : null, u = !1;
- if (l) {
- let c = l.elementClass;
- c && (r += " " + c);
- for (let f = o; f < this.markers.length; f++)
- if (this.markers[f].compare(l)) {
- s = f, u = !0;
- break;
- }
- } else
- s = this.markers.length;
- for (; o < s; ) {
- let c = this.markers[o++];
- if (c.toDOM) {
- c.destroy(i);
- let f = i.nextSibling;
- i.remove(), i = f;
- }
- }
- if (!l)
- break;
- l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
- }
- this.dom.className = r, this.markers = n;
- }
- destroy() {
- this.setMarkers(null, []);
- }
- }
- function hCt(t, e) {
- if (t.length != e.length)
- return !1;
- for (let n = 0; n < t.length; n++)
- if (!t[n].compare(e[n]))
- return !1;
- return !0;
- }
- const pCt = /* @__PURE__ */ ut.define(), Lv = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, { formatNumber: String, domEventHandlers: {} }, {
- domEventHandlers(e, n) {
- let r = Object.assign({}, e);
- for (let i in n) {
- let a = r[i], o = n[i];
- r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
- }
- return r;
- }
- });
- }
- });
- class uD extends Yu {
- constructor(e) {
- super(), this.number = e;
- }
- eq(e) {
- return this.number == e.number;
- }
- toDOM() {
- return document.createTextNode(this.number);
- }
- }
- function cD(t, e) {
- return t.state.facet(Lv).formatNumber(e, t.state);
- }
- const vCt = /* @__PURE__ */ mb.compute([Lv], (t) => ({
- class: "cm-lineNumbers",
- renderEmptyElements: !1,
- markers(e) {
- return e.state.facet(pCt);
- },
- lineMarker(e, n, r) {
- return r.some((i) => i.toDOM) ? null : new uD(cD(e, e.state.doc.lineAt(n.from).number));
- },
- widgetMarker: () => null,
- lineMarkerChange: (e) => e.startState.facet(Lv) != e.state.facet(Lv),
- initialSpacer(e) {
- return new uD(cD(e, aJ(e.state.doc.lines)));
- },
- updateSpacer(e, n) {
- let r = cD(n.view, aJ(n.view.state.doc.lines));
- return r == e.number ? e : new uD(r);
- },
- domEventHandlers: t.facet(Lv).domEventHandlers
- }));
- function gCt(t = {}) {
- return [
- Lv.of(t),
- Yve(),
- vCt
- ];
- }
- function aJ(t) {
- let e = 9;
- for (; e < t; )
- e = e * 10 + 9;
- return e;
- }
- const mCt = /* @__PURE__ */ new class extends Yu {
- constructor() {
- super(...arguments), this.elementClass = "cm-activeLineGutter";
- }
- }(), yCt = /* @__PURE__ */ Dw.compute(["selection"], (t) => {
- let e = [], n = -1;
- for (let r of t.selection.ranges) {
- let i = t.doc.lineAt(r.head).from;
- i > n && (n = i, e.push(mCt.range(i)));
- }
- return Sn.of(e);
- });
- function bCt() {
- return yCt;
- }
- const Kve = 1024;
- let _Ct = 0;
- class fD {
- constructor(e, n) {
- this.from = e, this.to = n;
- }
- }
- class rn {
- /**
- Create a new node prop type.
- */
- constructor(e = {}) {
- this.id = _Ct++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
- throw new Error("This node type doesn't define a deserialize function");
- });
- }
- /**
- This is meant to be used with
- [`NodeSet.extend`](#common.NodeSet.extend) or
- [`LRParser.configure`](#lr.ParserConfig.props) to compute
- prop values for each node type in the set. Takes a [match
- object](#common.NodeType^match) or function that returns undefined
- if the node type doesn't get this prop, and the prop's value if
- it does.
- */
- add(e) {
- if (this.perNode)
- throw new RangeError("Can't add per-node props to node types");
- return typeof e != "function" && (e = Va.match(e)), (n) => {
- let r = e(n);
- return r === void 0 ? null : [this, r];
- };
- }
- }
- rn.closedBy = new rn({ deserialize: (t) => t.split(" ") });
- rn.openedBy = new rn({ deserialize: (t) => t.split(" ") });
- rn.group = new rn({ deserialize: (t) => t.split(" ") });
- rn.isolate = new rn({ deserialize: (t) => {
- if (t && t != "rtl" && t != "ltr" && t != "auto")
- throw new RangeError("Invalid value for isolate: " + t);
- return t || "auto";
- } });
- rn.contextHash = new rn({ perNode: !0 });
- rn.lookAhead = new rn({ perNode: !0 });
- rn.mounted = new rn({ perNode: !0 });
- class DT {
- constructor(e, n, r) {
- this.tree = e, this.overlay = n, this.parser = r;
- }
- /**
- @internal
- */
- static get(e) {
- return e && e.props && e.props[rn.mounted.id];
- }
- }
- const OCt = /* @__PURE__ */ Object.create(null);
- class Va {
- /**
- @internal
- */
- constructor(e, n, r, i = 0) {
- this.name = e, this.props = n, this.id = r, this.flags = i;
- }
- /**
- Define a node type.
- */
- static define(e) {
- let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : OCt, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Va(e.name || "", n, e.id, r);
- if (e.props) {
- for (let a of e.props)
- if (Array.isArray(a) || (a = a(i)), a) {
- if (a[0].perNode)
- throw new RangeError("Can't store a per-node prop on a node type");
- n[a[0].id] = a[1];
- }
- }
- return i;
- }
- /**
- Retrieves a node prop for this type. Will return `undefined` if
- the prop isn't present on this node.
- */
- prop(e) {
- return this.props[e.id];
- }
- /**
- True when this is the top node of a grammar.
- */
- get isTop() {
- return (this.flags & 1) > 0;
- }
- /**
- True when this node is produced by a skip rule.
- */
- get isSkipped() {
- return (this.flags & 2) > 0;
- }
- /**
- Indicates whether this is an error node.
- */
- get isError() {
- return (this.flags & 4) > 0;
- }
- /**
- When true, this node type doesn't correspond to a user-declared
- named node, for example because it is used to cache repetition.
- */
- get isAnonymous() {
- return (this.flags & 8) > 0;
- }
- /**
- Returns true when this node's name or one of its
- [groups](#common.NodeProp^group) matches the given string.
- */
- is(e) {
- if (typeof e == "string") {
- if (this.name == e)
- return !0;
- let n = this.prop(rn.group);
- return n ? n.indexOf(e) > -1 : !1;
- }
- return this.id == e;
- }
- /**
- Create a function from node types to arbitrary values by
- specifying an object whose property names are node or
- [group](#common.NodeProp^group) names. Often useful with
- [`NodeProp.add`](#common.NodeProp.add). You can put multiple
- names, separated by spaces, in a single property name to map
- multiple node names to a single value.
- */
- static match(e) {
- let n = /* @__PURE__ */ Object.create(null);
- for (let r in e)
- for (let i of r.split(" "))
- n[i] = e[r];
- return (r) => {
- for (let i = r.prop(rn.group), a = -1; a < (i ? i.length : 0); a++) {
- let o = n[a < 0 ? r.name : i[a]];
- if (o)
- return o;
- }
- };
- }
- }
- Va.none = new Va(
- "",
- /* @__PURE__ */ Object.create(null),
- 0,
- 8
- /* NodeFlag.Anonymous */
- );
- class cB {
- /**
- Create a set with the given types. The `id` property of each
- type should correspond to its position within the array.
- */
- constructor(e) {
- this.types = e;
- for (let n = 0; n < e.length; n++)
- if (e[n].id != n)
- throw new RangeError("Node type ids should correspond to array positions when creating a node set");
- }
- /**
- Create a copy of this set with some node properties added. The
- arguments to this method can be created with
- [`NodeProp.add`](#common.NodeProp.add).
- */
- extend(...e) {
- let n = [];
- for (let r of this.types) {
- let i = null;
- for (let a of e) {
- let o = a(r);
- o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
- }
- n.push(i ? new Va(r.name, i, r.id, r.flags) : r);
- }
- return new cB(n);
- }
- }
- const bx = /* @__PURE__ */ new WeakMap(), oJ = /* @__PURE__ */ new WeakMap();
- var Ur;
- (function(t) {
- t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
- })(Ur || (Ur = {}));
- class Vr {
- /**
- Construct a new tree. See also [`Tree.build`](#common.Tree^build).
- */
- constructor(e, n, r, i, a) {
- if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
- this.props = /* @__PURE__ */ Object.create(null);
- for (let [o, s] of a)
- this.props[typeof o == "number" ? o : o.id] = s;
- }
- }
- /**
- @internal
- */
- toString() {
- let e = DT.get(this);
- if (e && !e.overlay)
- return e.tree.toString();
- let n = "";
- for (let r of this.children) {
- let i = r.toString();
- i && (n && (n += ","), n += i);
- }
- return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
- }
- /**
- Get a [tree cursor](#common.TreeCursor) positioned at the top of
- the tree. Mode can be used to [control](#common.IterMode) which
- nodes the cursor visits.
- */
- cursor(e = 0) {
- return new R4(this.topNode, e);
- }
- /**
- Get a [tree cursor](#common.TreeCursor) pointing into this tree
- at the given position and side (see
- [`moveTo`](#common.TreeCursor.moveTo).
- */
- cursorAt(e, n = 0, r = 0) {
- let i = bx.get(this) || this.topNode, a = new R4(i);
- return a.moveTo(e, n), bx.set(this, a._tree), a;
- }
- /**
- Get a [syntax node](#common.SyntaxNode) object for the top of the
- tree.
- */
- get topNode() {
- return new Ba(this, 0, 0, null);
- }
- /**
- Get the [syntax node](#common.SyntaxNode) at the given position.
- If `side` is -1, this will move into nodes that end at the
- position. If 1, it'll move into nodes that start at the
- position. With 0, it'll only enter nodes that cover the position
- from both sides.
-
- Note that this will not enter
- [overlays](#common.MountedTree.overlay), and you often want
- [`resolveInner`](#common.Tree.resolveInner) instead.
- */
- resolve(e, n = 0) {
- let r = x_(bx.get(this) || this.topNode, e, n, !1);
- return bx.set(this, r), r;
- }
- /**
- Like [`resolve`](#common.Tree.resolve), but will enter
- [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
- pointing into the innermost overlaid tree at the given position
- (with parent links going through all parent structure, including
- the host trees).
- */
- resolveInner(e, n = 0) {
- let r = x_(oJ.get(this) || this.topNode, e, n, !0);
- return oJ.set(this, r), r;
- }
- /**
- In some situations, it can be useful to iterate through all
- nodes around a position, including those in overlays that don't
- directly cover the position. This method gives you an iterator
- that will produce all nodes, from small to big, around the given
- position.
- */
- resolveStack(e, n = 0) {
- return wCt(this, e, n);
- }
- /**
- Iterate over the tree and its children, calling `enter` for any
- node that touches the `from`/`to` region (if given) before
- running over such a node's children, and `leave` (if given) when
- leaving the node. When `enter` returns `false`, that node will
- not have its children iterated over (or `leave` called).
- */
- iterate(e) {
- let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Ur.IncludeAnonymous) > 0;
- for (let l = this.cursor(o | Ur.IncludeAnonymous); ; ) {
- let u = !1;
- if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
- if (l.firstChild())
- continue;
- u = !0;
- }
- for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
- if (!l.parent())
- return;
- u = !0;
- }
- }
- }
- /**
- Get the value of the given [node prop](#common.NodeProp) for this
- node. Works with both per-node and per-type props.
- */
- prop(e) {
- return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
- }
- /**
- Returns the node's [per-node props](#common.NodeProp.perNode) in a
- format that can be passed to the [`Tree`](#common.Tree)
- constructor.
- */
- get propValues() {
- let e = [];
- if (this.props)
- for (let n in this.props)
- e.push([+n, this.props[n]]);
- return e;
- }
- /**
- Balance the direct children of this tree, producing a copy of
- which may have children grouped into subtrees with type
- [`NodeType.none`](#common.NodeType^none).
- */
- balance(e = {}) {
- return this.children.length <= 8 ? this : hB(Va.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, r, i) => new Vr(this.type, n, r, i, this.propValues), e.makeTree || ((n, r, i) => new Vr(Va.none, n, r, i)));
- }
- /**
- Build a tree from a postfix-ordered buffer of node information,
- or a cursor over such a buffer.
- */
- static build(e) {
- return CCt(e);
- }
- }
- Vr.empty = new Vr(Va.none, [], [], 0);
- class fB {
- constructor(e, n) {
- this.buffer = e, this.index = n;
- }
- get id() {
- return this.buffer[this.index - 4];
- }
- get start() {
- return this.buffer[this.index - 3];
- }
- get end() {
- return this.buffer[this.index - 2];
- }
- get size() {
- return this.buffer[this.index - 1];
- }
- get pos() {
- return this.index;
- }
- next() {
- this.index -= 4;
- }
- fork() {
- return new fB(this.buffer, this.index);
- }
- }
- class $f {
- /**
- Create a tree buffer.
- */
- constructor(e, n, r) {
- this.buffer = e, this.length = n, this.set = r;
- }
- /**
- @internal
- */
- get type() {
- return Va.none;
- }
- /**
- @internal
- */
- toString() {
- let e = [];
- for (let n = 0; n < this.buffer.length; )
- e.push(this.childString(n)), n = this.buffer[n + 3];
- return e.join(",");
- }
- /**
- @internal
- */
- childString(e) {
- let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
- if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
- return a;
- let o = [];
- for (; e < r; )
- o.push(this.childString(e)), e = this.buffer[e + 3];
- return a + "(" + o.join(",") + ")";
- }
- /**
- @internal
- */
- findChild(e, n, r, i, a) {
- let { buffer: o } = this, s = -1;
- for (let l = e; l != n && !(Jve(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
- ;
- return s;
- }
- /**
- @internal
- */
- slice(e, n, r) {
- let i = this.buffer, a = new Uint16Array(n - e), o = 0;
- for (let s = e, l = 0; s < n; ) {
- a[l++] = i[s++], a[l++] = i[s++] - r;
- let u = a[l++] = i[s++] - r;
- a[l++] = i[s++] - e, o = Math.max(o, u);
- }
- return new $f(a, o, this.set);
- }
- }
- function Jve(t, e, n, r) {
- switch (t) {
- case -2:
- return n < e;
- case -1:
- return r >= e && n < e;
- case 0:
- return n < e && r > e;
- case 1:
- return n <= e && r > e;
- case 2:
- return r > e;
- case 4:
- return !0;
- }
- }
- function x_(t, e, n, r) {
- for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
- let o = !r && t instanceof Ba && t.index < 0 ? null : t.parent;
- if (!o)
- return t;
- t = o;
- }
- let a = r ? 0 : Ur.IgnoreOverlays;
- if (r)
- for (let o = t, s = o.parent; s; o = s, s = o.parent)
- o instanceof Ba && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
- for (; ; ) {
- let o = t.enter(e, n, a);
- if (!o)
- return t;
- t = o;
- }
- }
- class ege {
- cursor(e = 0) {
- return new R4(this, e);
- }
- getChild(e, n = null, r = null) {
- let i = sJ(this, e, n, r);
- return i.length ? i[0] : null;
- }
- getChildren(e, n = null, r = null) {
- return sJ(this, e, n, r);
- }
- resolve(e, n = 0) {
- return x_(this, e, n, !1);
- }
- resolveInner(e, n = 0) {
- return x_(this, e, n, !0);
- }
- matchContext(e) {
- return D4(this, e);
- }
- enterUnfinishedNodesBefore(e) {
- let n = this.childBefore(e), r = this;
- for (; n; ) {
- let i = n.lastChild;
- if (!i || i.to != n.to)
- break;
- i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
- }
- return r;
- }
- get node() {
- return this;
- }
- get next() {
- return this.parent;
- }
- }
- class Ba extends ege {
- constructor(e, n, r, i) {
- super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
- }
- get type() {
- return this._tree.type;
- }
- get name() {
- return this._tree.type.name;
- }
- get to() {
- return this.from + this._tree.length;
- }
- nextChild(e, n, r, i, a = 0) {
- for (let o = this; ; ) {
- for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
- let c = s[e], f = l[e] + o.from;
- if (Jve(i, r, f, f + c.length)) {
- if (c instanceof $f) {
- if (a & Ur.ExcludeBuffers)
- continue;
- let d = c.findChild(0, c.buffer.length, n, r - f, i);
- if (d > -1)
- return new Ml(new SCt(o, c, e, f), null, d);
- } else if (a & Ur.IncludeAnonymous || !c.type.isAnonymous || dB(c)) {
- let d;
- if (!(a & Ur.IgnoreMounts) && (d = DT.get(c)) && !d.overlay)
- return new Ba(d.tree, f, e, o);
- let h = new Ba(c, f, e, o);
- return a & Ur.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
- }
- }
- }
- if (a & Ur.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
- return null;
- }
- }
- get firstChild() {
- return this.nextChild(
- 0,
- 1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- get lastChild() {
- return this.nextChild(
- this._tree.children.length - 1,
- -1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- childAfter(e) {
- return this.nextChild(
- 0,
- 1,
- e,
- 2
- /* Side.After */
- );
- }
- childBefore(e) {
- return this.nextChild(
- this._tree.children.length - 1,
- -1,
- e,
- -2
- /* Side.Before */
- );
- }
- enter(e, n, r = 0) {
- let i;
- if (!(r & Ur.IgnoreOverlays) && (i = DT.get(this._tree)) && i.overlay) {
- let a = e - this.from;
- for (let { from: o, to: s } of i.overlay)
- if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
- return new Ba(i.tree, i.overlay[0].from + this.from, -1, this);
- }
- return this.nextChild(0, 1, e, n, r);
- }
- nextSignificantParent() {
- let e = this;
- for (; e.type.isAnonymous && e._parent; )
- e = e._parent;
- return e;
- }
- get parent() {
- return this._parent ? this._parent.nextSignificantParent() : null;
- }
- get nextSibling() {
- return this._parent && this.index >= 0 ? this._parent.nextChild(
- this.index + 1,
- 1,
- 0,
- 4
- /* Side.DontCare */
- ) : null;
- }
- get prevSibling() {
- return this._parent && this.index >= 0 ? this._parent.nextChild(
- this.index - 1,
- -1,
- 0,
- 4
- /* Side.DontCare */
- ) : null;
- }
- get tree() {
- return this._tree;
- }
- toTree() {
- return this._tree;
- }
- /**
- @internal
- */
- toString() {
- return this._tree.toString();
- }
- }
- function sJ(t, e, n, r) {
- let i = t.cursor(), a = [];
- if (!i.firstChild())
- return a;
- if (n != null) {
- for (let o = !1; !o; )
- if (o = i.type.is(n), !i.nextSibling())
- return a;
- }
- for (; ; ) {
- if (r != null && i.type.is(r))
- return a;
- if (i.type.is(e) && a.push(i.node), !i.nextSibling())
- return r == null ? a : [];
- }
- }
- function D4(t, e, n = e.length - 1) {
- for (let r = t.parent; n >= 0; r = r.parent) {
- if (!r)
- return !1;
- if (!r.type.isAnonymous) {
- if (e[n] && e[n] != r.name)
- return !1;
- n--;
- }
- }
- return !0;
- }
- class SCt {
- constructor(e, n, r, i) {
- this.parent = e, this.buffer = n, this.index = r, this.start = i;
- }
- }
- class Ml extends ege {
- get name() {
- return this.type.name;
- }
- get from() {
- return this.context.start + this.context.buffer.buffer[this.index + 1];
- }
- get to() {
- return this.context.start + this.context.buffer.buffer[this.index + 2];
- }
- constructor(e, n, r) {
- super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
- }
- child(e, n, r) {
- let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
- return a < 0 ? null : new Ml(this.context, this, a);
- }
- get firstChild() {
- return this.child(
- 1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- get lastChild() {
- return this.child(
- -1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- childAfter(e) {
- return this.child(
- 1,
- e,
- 2
- /* Side.After */
- );
- }
- childBefore(e) {
- return this.child(
- -1,
- e,
- -2
- /* Side.Before */
- );
- }
- enter(e, n, r = 0) {
- if (r & Ur.ExcludeBuffers)
- return null;
- let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], n > 0 ? 1 : -1, e - this.context.start, n);
- return a < 0 ? null : new Ml(this.context, this, a);
- }
- get parent() {
- return this._parent || this.context.parent.nextSignificantParent();
- }
- externalSibling(e) {
- return this._parent ? null : this.context.parent.nextChild(
- this.context.index + e,
- e,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- get nextSibling() {
- let { buffer: e } = this.context, n = e.buffer[this.index + 3];
- return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Ml(this.context, this._parent, n) : this.externalSibling(1);
- }
- get prevSibling() {
- let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
- return this.index == n ? this.externalSibling(-1) : new Ml(this.context, this._parent, e.findChild(
- n,
- this.index,
- -1,
- 0,
- 4
- /* Side.DontCare */
- ));
- }
- get tree() {
- return null;
- }
- toTree() {
- let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
- if (a > i) {
- let o = r.buffer[this.index + 1];
- e.push(r.slice(i, a, o)), n.push(0);
- }
- return new Vr(this.type, e, n, this.to - this.from);
- }
- /**
- @internal
- */
- toString() {
- return this.context.buffer.childString(this.index);
- }
- }
- function tge(t) {
- if (!t.length)
- return null;
- let e = 0, n = t[0];
- for (let a = 1; a < t.length; a++) {
- let o = t[a];
- (o.from > n.from || o.to < n.to) && (n = o, e = a);
- }
- let r = n instanceof Ba && n.index < 0 ? null : n.parent, i = t.slice();
- return r ? i[e] = r : i.splice(e, 1), new xCt(i, n);
- }
- class xCt {
- constructor(e, n) {
- this.heads = e, this.node = n;
- }
- get next() {
- return tge(this.heads);
- }
- }
- function wCt(t, e, n) {
- let r = t.resolveInner(e, n), i = null;
- for (let a = r instanceof Ba ? r : r.context.parent; a; a = a.parent)
- if (a.index < 0) {
- let o = a.parent;
- (i || (i = [r])).push(o.resolve(e, n)), a = o;
- } else {
- let o = DT.get(a.tree);
- if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
- let s = new Ba(o.tree, o.overlay[0].from + a.from, -1, a);
- (i || (i = [r])).push(x_(s, e, n, !1));
- }
- }
- return i ? tge(i) : r;
- }
- class R4 {
- /**
- Shorthand for `.type.name`.
- */
- get name() {
- return this.type.name;
- }
- /**
- @internal
- */
- constructor(e, n = 0) {
- if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Ba)
- this.yieldNode(e);
- else {
- this._tree = e.context.parent, this.buffer = e.context;
- for (let r = e._parent; r; r = r._parent)
- this.stack.unshift(r.index);
- this.bufferNode = e, this.yieldBuf(e.index);
- }
- }
- yieldNode(e) {
- return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
- }
- yieldBuf(e, n) {
- this.index = e;
- let { start: r, buffer: i } = this.buffer;
- return this.type = n || i.set.types[i.buffer[e]], this.from = r + i.buffer[e + 1], this.to = r + i.buffer[e + 2], !0;
- }
- /**
- @internal
- */
- yield(e) {
- return e ? e instanceof Ba ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
- }
- /**
- @internal
- */
- toString() {
- return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
- }
- /**
- @internal
- */
- enterChild(e, n, r) {
- if (!this.buffer)
- return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
- let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
- return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
- }
- /**
- Move the cursor to this node's first child. When this returns
- false, the node has no child, and the cursor has not been moved.
- */
- firstChild() {
- return this.enterChild(
- 1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- /**
- Move the cursor to this node's last child.
- */
- lastChild() {
- return this.enterChild(
- -1,
- 0,
- 4
- /* Side.DontCare */
- );
- }
- /**
- Move the cursor to the first child that ends after `pos`.
- */
- childAfter(e) {
- return this.enterChild(
- 1,
- e,
- 2
- /* Side.After */
- );
- }
- /**
- Move to the last child that starts before `pos`.
- */
- childBefore(e) {
- return this.enterChild(
- -1,
- e,
- -2
- /* Side.Before */
- );
- }
- /**
- Move the cursor to the child around `pos`. If side is -1 the
- child may end at that position, when 1 it may start there. This
- will also enter [overlaid](#common.MountedTree.overlay)
- [mounted](#common.NodeProp^mounted) trees unless `overlays` is
- set to false.
- */
- enter(e, n, r = this.mode) {
- return this.buffer ? r & Ur.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
- }
- /**
- Move to the node's parent node, if this isn't the top node.
- */
- parent() {
- if (!this.buffer)
- return this.yieldNode(this.mode & Ur.IncludeAnonymous ? this._tree._parent : this._tree.parent);
- if (this.stack.length)
- return this.yieldBuf(this.stack.pop());
- let e = this.mode & Ur.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
- return this.buffer = null, this.yieldNode(e);
- }
- /**
- @internal
- */
- sibling(e) {
- if (!this.buffer)
- return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
- let { buffer: n } = this.buffer, r = this.stack.length - 1;
- if (e < 0) {
- let i = r < 0 ? 0 : this.stack[r] + 4;
- if (this.index != i)
- return this.yieldBuf(n.findChild(
- i,
- this.index,
- -1,
- 0,
- 4
- /* Side.DontCare */
- ));
- } else {
- let i = n.buffer[this.index + 3];
- if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
- return this.yieldBuf(i);
- }
- return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
- }
- /**
- Move to this node's next sibling, if any.
- */
- nextSibling() {
- return this.sibling(1);
- }
- /**
- Move to this node's previous sibling, if any.
- */
- prevSibling() {
- return this.sibling(-1);
- }
- atLastNode(e) {
- let n, r, { buffer: i } = this;
- if (i) {
- if (e > 0) {
- if (this.index < i.buffer.buffer.length)
- return !1;
- } else
- for (let a = 0; a < this.index; a++)
- if (i.buffer.buffer[a + 3] < this.index)
- return !1;
- ({ index: n, parent: r } = i);
- } else
- ({ index: n, _parent: r } = this._tree);
- for (; r; { index: n, _parent: r } = r)
- if (n > -1)
- for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
- let s = r._tree.children[a];
- if (this.mode & Ur.IncludeAnonymous || s instanceof $f || !s.type.isAnonymous || dB(s))
- return !1;
- }
- return !0;
- }
- move(e, n) {
- if (n && this.enterChild(
- e,
- 0,
- 4
- /* Side.DontCare */
- ))
- return !0;
- for (; ; ) {
- if (this.sibling(e))
- return !0;
- if (this.atLastNode(e) || !this.parent())
- return !1;
- }
- }
- /**
- Move to the next node in a
- [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
- traversal, going from a node to its first child or, if the
- current node is empty or `enter` is false, its next sibling or
- the next sibling of the first parent node that has one.
- */
- next(e = !0) {
- return this.move(1, e);
- }
- /**
- Move to the next node in a last-to-first pre-order traveral. A
- node is followed by its last child or, if it has none, its
- previous sibling or the previous sibling of the first parent
- node that has one.
- */
- prev(e = !0) {
- return this.move(-1, e);
- }
- /**
- Move the cursor to the innermost node that covers `pos`. If
- `side` is -1, it will enter nodes that end at `pos`. If it is 1,
- it will enter nodes that start at `pos`.
- */
- moveTo(e, n = 0) {
- for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
- ;
- for (; this.enterChild(1, e, n); )
- ;
- return this;
- }
- /**
- Get a [syntax node](#common.SyntaxNode) at the cursor's current
- position.
- */
- get node() {
- if (!this.buffer)
- return this._tree;
- let e = this.bufferNode, n = null, r = 0;
- if (e && e.context == this.buffer)
- e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
- for (let o = e; o; o = o._parent)
- if (o.index == i) {
- if (i == this.index)
- return o;
- n = o, r = a + 1;
- break e;
- }
- i = this.stack[--a];
- }
- for (let i = r; i < this.stack.length; i++)
- n = new Ml(this.buffer, n, this.stack[i]);
- return this.bufferNode = new Ml(this.buffer, n, this.index);
- }
- /**
- Get the [tree](#common.Tree) that represents the current node, if
- any. Will return null when the node is in a [tree
- buffer](#common.TreeBuffer).
- */
- get tree() {
- return this.buffer ? null : this._tree._tree;
- }
- /**
- Iterate over the current node and all its descendants, calling
- `enter` when entering a node and `leave`, if given, when leaving
- one. When `enter` returns `false`, any children of that node are
- skipped, and `leave` isn't called for it.
- */
- iterate(e, n) {
- for (let r = 0; ; ) {
- let i = !1;
- if (this.type.isAnonymous || e(this) !== !1) {
- if (this.firstChild()) {
- r++;
- continue;
- }
- this.type.isAnonymous || (i = !0);
- }
- for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
- if (!r)
- return;
- this.parent(), r--, i = !0;
- }
- }
- }
- /**
- Test whether the current node matches a given context—a sequence
- of direct parent node names. Empty strings in the context array
- are treated as wildcards.
- */
- matchContext(e) {
- if (!this.buffer)
- return D4(this.node, e);
- let { buffer: n } = this.buffer, { types: r } = n.set;
- for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
- if (a < 0)
- return D4(this.node, e, i);
- let o = r[n.buffer[this.stack[a]]];
- if (!o.isAnonymous) {
- if (e[i] && e[i] != o.name)
- return !1;
- i--;
- }
- }
- return !0;
- }
- }
- function dB(t) {
- return t.children.some((e) => e instanceof $f || !e.type.isAnonymous || dB(e));
- }
- function CCt(t) {
- var e;
- let { buffer: n, nodeSet: r, maxBufferLength: i = Kve, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new fB(n, n.length) : n, l = r.types, u = 0, c = 0;
- function f(S, x, C, P, $, T) {
- let { id: E, start: M, end: R, size: N } = s, I = c;
- for (; N < 0; )
- if (s.next(), N == -1) {
- let U = a[E];
- C.push(U), P.push(M - S);
- return;
- } else if (N == -3) {
- u = E;
- return;
- } else if (N == -4) {
- c = E;
- return;
- } else
- throw new RangeError(`Unrecognized record size: ${N}`);
- let B = l[E], Q, W, H = M - S;
- if (R - M <= i && (W = g(s.pos - x, $))) {
- let U = new Uint16Array(W.size - W.skip), j = s.pos - W.size, Y = U.length;
- for (; s.pos > j; )
- Y = m(W.start, U, Y);
- Q = new $f(U, R - W.start, r), H = W.start - S;
- } else {
- let U = s.pos - N;
- s.next();
- let j = [], Y = [], ne = E >= o ? E : -1, fe = 0, ue = R;
- for (; s.pos > U; )
- ne >= 0 && s.id == ne && s.size >= 0 ? (s.end <= ue - i && (p(j, Y, M, fe, s.end, ue, ne, I), fe = j.length, ue = s.end), s.next()) : T > 2500 ? d(M, U, j, Y) : f(M, U, j, Y, ne, T + 1);
- if (ne >= 0 && fe > 0 && fe < j.length && p(j, Y, M, fe, M, ue, ne, I), j.reverse(), Y.reverse(), ne > -1 && fe > 0) {
- let ye = h(B);
- Q = hB(B, j, Y, 0, j.length, 0, R - M, ye, ye);
- } else
- Q = v(B, j, Y, R - M, I - R);
- }
- C.push(Q), P.push(H);
- }
- function d(S, x, C, P) {
- let $ = [], T = 0, E = -1;
- for (; s.pos > x; ) {
- let { id: M, start: R, end: N, size: I } = s;
- if (I > 4)
- s.next();
- else {
- if (E > -1 && R < E)
- break;
- E < 0 && (E = N - i), $.push(M, R, N), T++, s.next();
- }
- }
- if (T) {
- let M = new Uint16Array(T * 4), R = $[$.length - 2];
- for (let N = $.length - 3, I = 0; N >= 0; N -= 3)
- M[I++] = $[N], M[I++] = $[N + 1] - R, M[I++] = $[N + 2] - R, M[I++] = I;
- C.push(new $f(M, $[2] - R, r)), P.push(R - S);
- }
- }
- function h(S) {
- return (x, C, P) => {
- let $ = 0, T = x.length - 1, E, M;
- if (T >= 0 && (E = x[T]) instanceof Vr) {
- if (!T && E.type == S && E.length == P)
- return E;
- (M = E.prop(rn.lookAhead)) && ($ = C[T] + E.length + M);
- }
- return v(S, x, C, P, $);
- };
- }
- function p(S, x, C, P, $, T, E, M) {
- let R = [], N = [];
- for (; S.length > P; )
- R.push(S.pop()), N.push(x.pop() + C - $);
- S.push(v(r.types[E], R, N, T - $, M - T)), x.push($ - C);
- }
- function v(S, x, C, P, $ = 0, T) {
- if (u) {
- let E = [rn.contextHash, u];
- T = T ? [E].concat(T) : [E];
- }
- if ($ > 25) {
- let E = [rn.lookAhead, $];
- T = T ? [E].concat(T) : [E];
- }
- return new Vr(S, x, C, P, T);
- }
- function g(S, x) {
- let C = s.fork(), P = 0, $ = 0, T = 0, E = C.end - i, M = { size: 0, start: 0, skip: 0 };
- e: for (let R = C.pos - S; C.pos > R; ) {
- let N = C.size;
- if (C.id == x && N >= 0) {
- M.size = P, M.start = $, M.skip = T, T += 4, P += 4, C.next();
- continue;
- }
- let I = C.pos - N;
- if (N < 0 || I < R || C.start < E)
- break;
- let B = C.id >= o ? 4 : 0, Q = C.start;
- for (C.next(); C.pos > I; ) {
- if (C.size < 0)
- if (C.size == -3)
- B += 4;
- else
- break e;
- else C.id >= o && (B += 4);
- C.next();
- }
- $ = Q, P += N, T += B;
- }
- return (x < 0 || P == S) && (M.size = P, M.start = $, M.skip = T), M.size > 4 ? M : void 0;
- }
- function m(S, x, C) {
- let { id: P, start: $, end: T, size: E } = s;
- if (s.next(), E >= 0 && P < o) {
- let M = C;
- if (E > 4) {
- let R = s.pos - (E - 4);
- for (; s.pos > R; )
- C = m(S, x, C);
- }
- x[--C] = M, x[--C] = T - S, x[--C] = $ - S, x[--C] = P;
- } else E == -3 ? u = P : E == -4 && (c = P);
- return C;
- }
- let y = [], _ = [];
- for (; s.pos > 0; )
- f(t.start || 0, t.bufferStart || 0, y, _, -1, 0);
- let O = (e = t.length) !== null && e !== void 0 ? e : y.length ? _[0] + y[0].length : 0;
- return new Vr(l[t.topID], y.reverse(), _.reverse(), O);
- }
- const lJ = /* @__PURE__ */ new WeakMap();
- function Rw(t, e) {
- if (!t.isAnonymous || e instanceof $f || e.type != t)
- return 1;
- let n = lJ.get(e);
- if (n == null) {
- n = 1;
- for (let r of e.children) {
- if (r.type != t || !(r instanceof Vr)) {
- n = 1;
- break;
- }
- n += Rw(t, r);
- }
- lJ.set(e, n);
- }
- return n;
- }
- function hB(t, e, n, r, i, a, o, s, l) {
- let u = 0;
- for (let p = r; p < i; p++)
- u += Rw(t, e[p]);
- let c = Math.ceil(
- u * 1.5 / 8
- /* Balance.BranchFactor */
- ), f = [], d = [];
- function h(p, v, g, m, y) {
- for (let _ = g; _ < m; ) {
- let O = _, S = v[_], x = Rw(t, p[_]);
- for (_++; _ < m; _++) {
- let C = Rw(t, p[_]);
- if (x + C >= c)
- break;
- x += C;
- }
- if (_ == O + 1) {
- if (x > c) {
- let C = p[O];
- h(C.children, C.positions, 0, C.children.length, v[O] + y);
- continue;
- }
- f.push(p[O]);
- } else {
- let C = v[_ - 1] + p[_ - 1].length - S;
- f.push(hB(t, p, v, O, _, S, C, null, l));
- }
- d.push(S + y - a);
- }
- }
- return h(e, n, r, i, 0), (s || l)(f, d, o);
- }
- class TCt {
- constructor() {
- this.map = /* @__PURE__ */ new WeakMap();
- }
- setBuffer(e, n, r) {
- let i = this.map.get(e);
- i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
- }
- getBuffer(e, n) {
- let r = this.map.get(e);
- return r && r.get(n);
- }
- /**
- Set the value for this syntax node.
- */
- set(e, n) {
- e instanceof Ml ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof Ba && this.map.set(e.tree, n);
- }
- /**
- Retrieve value for this syntax node, if it exists in the map.
- */
- get(e) {
- return e instanceof Ml ? this.getBuffer(e.context.buffer, e.index) : e instanceof Ba ? this.map.get(e.tree) : void 0;
- }
- /**
- Set the value for the node that a cursor currently points to.
- */
- cursorSet(e, n) {
- e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
- }
- /**
- Retrieve the value for the node that a cursor currently points
- to.
- */
- cursorGet(e) {
- return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
- }
- }
- class Eh {
- /**
- Construct a tree fragment. You'll usually want to use
- [`addTree`](#common.TreeFragment^addTree) and
- [`applyChanges`](#common.TreeFragment^applyChanges) instead of
- calling this directly.
- */
- constructor(e, n, r, i, a = !1, o = !1) {
- this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
- }
- /**
- Whether the start of the fragment represents the start of a
- parse, or the end of a change. (In the second case, it may not
- be safe to reuse some nodes at the start, depending on the
- parsing algorithm.)
- */
- get openStart() {
- return (this.open & 1) > 0;
- }
- /**
- Whether the end of the fragment represents the end of a
- full-document parse, or the start of a change.
- */
- get openEnd() {
- return (this.open & 2) > 0;
- }
- /**
- Create a set of fragments from a freshly parsed tree, or update
- an existing set of fragments by replacing the ones that overlap
- with a tree with content from the new tree. When `partial` is
- true, the parse is treated as incomplete, and the resulting
- fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
- true.
- */
- static addTree(e, n = [], r = !1) {
- let i = [new Eh(0, e.length, e, 0, !1, r)];
- for (let a of n)
- a.to > e.length && i.push(a);
- return i;
- }
- /**
- Apply a set of edits to an array of fragments, removing or
- splitting fragments as necessary to remove edited ranges, and
- adjusting offsets for fragments that moved.
- */
- static applyChanges(e, n, r = 128) {
- if (!n.length)
- return e;
- let i = [], a = 1, o = e.length ? e[0] : null;
- for (let s = 0, l = 0, u = 0; ; s++) {
- let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
- if (f - l >= r)
- for (; o && o.from < f; ) {
- let d = o;
- if (l >= d.from || f <= d.to || u) {
- let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
- d = h >= p ? null : new Eh(h, p, d.tree, d.offset + u, s > 0, !!c);
- }
- if (d && i.push(d), o.to > f)
- break;
- o = a < e.length ? e[a++] : null;
- }
- if (!c)
- break;
- l = c.toA, u = c.toA - c.toB;
- }
- return i;
- }
- }
- class nge {
- /**
- Start a parse, returning a [partial parse](#common.PartialParse)
- object. [`fragments`](#common.TreeFragment) can be passed in to
- make the parse incremental.
-
- By default, the entire input is parsed. You can pass `ranges`,
- which should be a sorted array of non-empty, non-overlapping
- ranges, to parse only those ranges. The tree returned in that
- case will start at `ranges[0].from`.
- */
- startParse(e, n, r) {
- return typeof e == "string" && (e = new PCt(e)), r = r ? r.length ? r.map((i) => new fD(i.from, i.to)) : [new fD(0, 0)] : [new fD(0, e.length)], this.createParse(e, n || [], r);
- }
- /**
- Run a full parse, returning the resulting tree.
- */
- parse(e, n, r) {
- let i = this.startParse(e, n, r);
- for (; ; ) {
- let a = i.advance();
- if (a)
- return a;
- }
- }
- }
- class PCt {
- constructor(e) {
- this.string = e;
- }
- get length() {
- return this.string.length;
- }
- chunk(e) {
- return this.string.slice(e);
- }
- get lineChunks() {
- return !1;
- }
- read(e, n) {
- return this.string.slice(e, n);
- }
- }
- new rn({ perNode: !0 });
- let $Ct = 0;
- class Sl {
- /**
- @internal
- */
- constructor(e, n, r) {
- this.set = e, this.base = n, this.modified = r, this.id = $Ct++;
- }
- /**
- Define a new tag. If `parent` is given, the tag is treated as a
- sub-tag of that parent, and
- [highlighters](#highlight.tagHighlighter) that don't mention
- this tag will try to fall back to the parent tag (or grandparent
- tag, etc).
- */
- static define(e) {
- if (e != null && e.base)
- throw new Error("Can not derive from a modified tag");
- let n = new Sl([], null, []);
- if (n.set.push(n), e)
- for (let r of e.set)
- n.set.push(r);
- return n;
- }
- /**
- Define a tag _modifier_, which is a function that, given a tag,
- will return a tag that is a subtag of the original. Applying the
- same modifier to a twice tag will return the same value (`m1(t1)
- == m1(t1)`) and applying multiple modifiers will, regardless or
- order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
-
- When multiple modifiers are applied to a given base tag, each
- smaller set of modifiers is registered as a parent, so that for
- example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
- `m1(m3(t1)`, and so on.
- */
- static defineModifier() {
- let e = new RT();
- return (n) => n.modified.indexOf(e) > -1 ? n : RT.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
- }
- }
- let ACt = 0;
- class RT {
- constructor() {
- this.instances = [], this.id = ACt++;
- }
- static get(e, n) {
- if (!n.length)
- return e;
- let r = n[0].instances.find((s) => s.base == e && ECt(n, s.modified));
- if (r)
- return r;
- let i = [], a = new Sl(i, e, n);
- for (let s of n)
- s.instances.push(a);
- let o = MCt(n);
- for (let s of e.set)
- if (!s.modified.length)
- for (let l of o)
- i.push(RT.get(s, l));
- return a;
- }
- }
- function ECt(t, e) {
- return t.length == e.length && t.every((n, r) => n == e[r]);
- }
- function MCt(t) {
- let e = [[]];
- for (let n = 0; n < t.length; n++)
- for (let r = 0, i = e.length; r < i; r++)
- e.push(e[r].concat(t[n]));
- return e.sort((n, r) => r.length - n.length);
- }
- function pB(t) {
- let e = /* @__PURE__ */ Object.create(null);
- for (let n in t) {
- let r = t[n];
- Array.isArray(r) || (r = [r]);
- for (let i of n.split(" "))
- if (i) {
- let a = [], o = 2, s = i;
- for (let f = 0; ; ) {
- if (s == "..." && f > 0 && f + 3 == i.length) {
- o = 1;
- break;
- }
- let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
- if (!d)
- throw new RangeError("Invalid path: " + i);
- if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
- break;
- let h = i[f++];
- if (f == i.length && h == "!") {
- o = 0;
- break;
- }
- if (h != "/")
- throw new RangeError("Invalid path: " + i);
- s = i.slice(f);
- }
- let l = a.length - 1, u = a[l];
- if (!u)
- throw new RangeError("Invalid path: " + i);
- let c = new kT(r, o, l > 0 ? a.slice(0, l) : null);
- e[u] = c.sort(e[u]);
- }
- }
- return rge.add(e);
- }
- const rge = new rn();
- class kT {
- constructor(e, n, r, i) {
- this.tags = e, this.mode = n, this.context = r, this.next = i;
- }
- get opaque() {
- return this.mode == 0;
- }
- get inherit() {
- return this.mode == 1;
- }
- sort(e) {
- return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
- }
- get depth() {
- return this.context ? this.context.length : 0;
- }
- }
- kT.empty = new kT([], 2, null);
- function ige(t, e) {
- let n = /* @__PURE__ */ Object.create(null);
- for (let a of t)
- if (!Array.isArray(a.tag))
- n[a.tag.id] = a.class;
- else
- for (let o of a.tag)
- n[o.id] = a.class;
- let { scope: r, all: i = null } = e || {};
- return {
- style: (a) => {
- let o = i;
- for (let s of a)
- for (let l of s.set) {
- let u = n[l.id];
- if (u) {
- o = o ? o + " " + u : u;
- break;
- }
- }
- return o;
- },
- scope: r
- };
- }
- function ICt(t, e) {
- let n = null;
- for (let r of t) {
- let i = r.style(e);
- i && (n = n ? n + " " + i : i);
- }
- return n;
- }
- function DCt(t, e, n, r = 0, i = t.length) {
- let a = new RCt(r, Array.isArray(e) ? e : [e], n);
- a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
- }
- class RCt {
- constructor(e, n, r) {
- this.at = e, this.highlighters = n, this.span = r, this.class = "";
- }
- startSpan(e, n) {
- n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
- }
- flush(e) {
- e > this.at && this.class && this.span(this.at, e, this.class);
- }
- highlightRange(e, n, r, i, a) {
- let { type: o, from: s, to: l } = e;
- if (s >= r || l <= n)
- return;
- o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
- let u = i, c = kCt(e) || kT.empty, f = ICt(a, c.tags);
- if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
- return;
- let d = e.tree && e.tree.prop(rn.mounted);
- if (d && d.overlay) {
- let h = e.node.enter(d.overlay[0].from + s, 1), p = this.highlighters.filter((g) => !g.scope || g.scope(d.tree.type)), v = e.firstChild();
- for (let g = 0, m = s; ; g++) {
- let y = g < d.overlay.length ? d.overlay[g] : null, _ = y ? y.from + s : l, O = Math.max(n, m), S = Math.min(r, _);
- if (O < S && v)
- for (; e.from < S && (this.highlightRange(e, O, S, i, a), this.startSpan(Math.min(S, e.to), u), !(e.to >= _ || !e.nextSibling())); )
- ;
- if (!y || _ > r)
- break;
- m = y.to + s, m > n && (this.highlightRange(h.cursor(), Math.max(n, y.from + s), Math.min(r, m), "", p), this.startSpan(Math.min(r, m), u));
- }
- v && e.parent();
- } else if (e.firstChild()) {
- d && (i = "");
- do
- if (!(e.to <= n)) {
- if (e.from >= r)
- break;
- this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
- }
- while (e.nextSibling());
- e.parent();
- }
- }
- }
- function kCt(t) {
- let e = t.type.prop(rge);
- for (; e && e.context && !t.matchContext(e.context); )
- e = e.next;
- return e || null;
- }
- const Xe = Sl.define, _x = Xe(), Dc = Xe(), uJ = Xe(Dc), cJ = Xe(Dc), Rc = Xe(), Ox = Xe(Rc), dD = Xe(Rc), yl = Xe(), Dd = Xe(yl), hl = Xe(), pl = Xe(), k4 = Xe(), ry = Xe(k4), Sx = Xe(), ce = {
- /**
- A comment.
- */
- comment: _x,
- /**
- A line [comment](#highlight.tags.comment).
- */
- lineComment: Xe(_x),
- /**
- A block [comment](#highlight.tags.comment).
- */
- blockComment: Xe(_x),
- /**
- A documentation [comment](#highlight.tags.comment).
- */
- docComment: Xe(_x),
- /**
- Any kind of identifier.
- */
- name: Dc,
- /**
- The [name](#highlight.tags.name) of a variable.
- */
- variableName: Xe(Dc),
- /**
- A type [name](#highlight.tags.name).
- */
- typeName: uJ,
- /**
- A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
- */
- tagName: Xe(uJ),
- /**
- A property or field [name](#highlight.tags.name).
- */
- propertyName: cJ,
- /**
- An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
- */
- attributeName: Xe(cJ),
- /**
- The [name](#highlight.tags.name) of a class.
- */
- className: Xe(Dc),
- /**
- A label [name](#highlight.tags.name).
- */
- labelName: Xe(Dc),
- /**
- A namespace [name](#highlight.tags.name).
- */
- namespace: Xe(Dc),
- /**
- The [name](#highlight.tags.name) of a macro.
- */
- macroName: Xe(Dc),
- /**
- A literal value.
- */
- literal: Rc,
- /**
- A string [literal](#highlight.tags.literal).
- */
- string: Ox,
- /**
- A documentation [string](#highlight.tags.string).
- */
- docString: Xe(Ox),
- /**
- A character literal (subtag of [string](#highlight.tags.string)).
- */
- character: Xe(Ox),
- /**
- An attribute value (subtag of [string](#highlight.tags.string)).
- */
- attributeValue: Xe(Ox),
- /**
- A number [literal](#highlight.tags.literal).
- */
- number: dD,
- /**
- An integer [number](#highlight.tags.number) literal.
- */
- integer: Xe(dD),
- /**
- A floating-point [number](#highlight.tags.number) literal.
- */
- float: Xe(dD),
- /**
- A boolean [literal](#highlight.tags.literal).
- */
- bool: Xe(Rc),
- /**
- Regular expression [literal](#highlight.tags.literal).
- */
- regexp: Xe(Rc),
- /**
- An escape [literal](#highlight.tags.literal), for example a
- backslash escape in a string.
- */
- escape: Xe(Rc),
- /**
- A color [literal](#highlight.tags.literal).
- */
- color: Xe(Rc),
- /**
- A URL [literal](#highlight.tags.literal).
- */
- url: Xe(Rc),
- /**
- A language keyword.
- */
- keyword: hl,
- /**
- The [keyword](#highlight.tags.keyword) for the self or this
- object.
- */
- self: Xe(hl),
- /**
- The [keyword](#highlight.tags.keyword) for null.
- */
- null: Xe(hl),
- /**
- A [keyword](#highlight.tags.keyword) denoting some atomic value.
- */
- atom: Xe(hl),
- /**
- A [keyword](#highlight.tags.keyword) that represents a unit.
- */
- unit: Xe(hl),
- /**
- A modifier [keyword](#highlight.tags.keyword).
- */
- modifier: Xe(hl),
- /**
- A [keyword](#highlight.tags.keyword) that acts as an operator.
- */
- operatorKeyword: Xe(hl),
- /**
- A control-flow related [keyword](#highlight.tags.keyword).
- */
- controlKeyword: Xe(hl),
- /**
- A [keyword](#highlight.tags.keyword) that defines something.
- */
- definitionKeyword: Xe(hl),
- /**
- A [keyword](#highlight.tags.keyword) related to defining or
- interfacing with modules.
- */
- moduleKeyword: Xe(hl),
- /**
- An operator.
- */
- operator: pl,
- /**
- An [operator](#highlight.tags.operator) that dereferences something.
- */
- derefOperator: Xe(pl),
- /**
- Arithmetic-related [operator](#highlight.tags.operator).
- */
- arithmeticOperator: Xe(pl),
- /**
- Logical [operator](#highlight.tags.operator).
- */
- logicOperator: Xe(pl),
- /**
- Bit [operator](#highlight.tags.operator).
- */
- bitwiseOperator: Xe(pl),
- /**
- Comparison [operator](#highlight.tags.operator).
- */
- compareOperator: Xe(pl),
- /**
- [Operator](#highlight.tags.operator) that updates its operand.
- */
- updateOperator: Xe(pl),
- /**
- [Operator](#highlight.tags.operator) that defines something.
- */
- definitionOperator: Xe(pl),
- /**
- Type-related [operator](#highlight.tags.operator).
- */
- typeOperator: Xe(pl),
- /**
- Control-flow [operator](#highlight.tags.operator).
- */
- controlOperator: Xe(pl),
- /**
- Program or markup punctuation.
- */
- punctuation: k4,
- /**
- [Punctuation](#highlight.tags.punctuation) that separates
- things.
- */
- separator: Xe(k4),
- /**
- Bracket-style [punctuation](#highlight.tags.punctuation).
- */
- bracket: ry,
- /**
- Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
- tokens).
- */
- angleBracket: Xe(ry),
- /**
- Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
- tokens).
- */
- squareBracket: Xe(ry),
- /**
- Parentheses (usually `(` and `)` tokens). Subtag of
- [bracket](#highlight.tags.bracket).
- */
- paren: Xe(ry),
- /**
- Braces (usually `{` and `}` tokens). Subtag of
- [bracket](#highlight.tags.bracket).
- */
- brace: Xe(ry),
- /**
- Content, for example plain text in XML or markup documents.
- */
- content: yl,
- /**
- [Content](#highlight.tags.content) that represents a heading.
- */
- heading: Dd,
- /**
- A level 1 [heading](#highlight.tags.heading).
- */
- heading1: Xe(Dd),
- /**
- A level 2 [heading](#highlight.tags.heading).
- */
- heading2: Xe(Dd),
- /**
- A level 3 [heading](#highlight.tags.heading).
- */
- heading3: Xe(Dd),
- /**
- A level 4 [heading](#highlight.tags.heading).
- */
- heading4: Xe(Dd),
- /**
- A level 5 [heading](#highlight.tags.heading).
- */
- heading5: Xe(Dd),
- /**
- A level 6 [heading](#highlight.tags.heading).
- */
- heading6: Xe(Dd),
- /**
- A prose separator (such as a horizontal rule).
- */
- contentSeparator: Xe(yl),
- /**
- [Content](#highlight.tags.content) that represents a list.
- */
- list: Xe(yl),
- /**
- [Content](#highlight.tags.content) that represents a quote.
- */
- quote: Xe(yl),
- /**
- [Content](#highlight.tags.content) that is emphasized.
- */
- emphasis: Xe(yl),
- /**
- [Content](#highlight.tags.content) that is styled strong.
- */
- strong: Xe(yl),
- /**
- [Content](#highlight.tags.content) that is part of a link.
- */
- link: Xe(yl),
- /**
- [Content](#highlight.tags.content) that is styled as code or
- monospace.
- */
- monospace: Xe(yl),
- /**
- [Content](#highlight.tags.content) that has a strike-through
- style.
- */
- strikethrough: Xe(yl),
- /**
- Inserted text in a change-tracking format.
- */
- inserted: Xe(),
- /**
- Deleted text.
- */
- deleted: Xe(),
- /**
- Changed text.
- */
- changed: Xe(),
- /**
- An invalid or unsyntactic element.
- */
- invalid: Xe(),
- /**
- Metadata or meta-instruction.
- */
- meta: Sx,
- /**
- [Metadata](#highlight.tags.meta) that applies to the entire
- document.
- */
- documentMeta: Xe(Sx),
- /**
- [Metadata](#highlight.tags.meta) that annotates or adds
- attributes to a given syntactic element.
- */
- annotation: Xe(Sx),
- /**
- Processing instruction or preprocessor directive. Subtag of
- [meta](#highlight.tags.meta).
- */
- processingInstruction: Xe(Sx),
- /**
- [Modifier](#highlight.Tag^defineModifier) that indicates that a
- given element is being defined. Expected to be used with the
- various [name](#highlight.tags.name) tags.
- */
- definition: Sl.defineModifier(),
- /**
- [Modifier](#highlight.Tag^defineModifier) that indicates that
- something is constant. Mostly expected to be used with
- [variable names](#highlight.tags.variableName).
- */
- constant: Sl.defineModifier(),
- /**
- [Modifier](#highlight.Tag^defineModifier) used to indicate that
- a [variable](#highlight.tags.variableName) or [property
- name](#highlight.tags.propertyName) is being called or defined
- as a function.
- */
- function: Sl.defineModifier(),
- /**
- [Modifier](#highlight.Tag^defineModifier) that can be applied to
- [names](#highlight.tags.name) to indicate that they belong to
- the language's standard environment.
- */
- standard: Sl.defineModifier(),
- /**
- [Modifier](#highlight.Tag^defineModifier) that indicates a given
- [names](#highlight.tags.name) is local to some scope.
- */
- local: Sl.defineModifier(),
- /**
- A generic variant [modifier](#highlight.Tag^defineModifier) that
- can be used to tag language-specific alternative variants of
- some common tag. It is recommended for themes to define special
- forms of at least the [string](#highlight.tags.string) and
- [variable name](#highlight.tags.variableName) tags, since those
- come up a lot.
- */
- special: Sl.defineModifier()
- };
- ige([
- { tag: ce.link, class: "tok-link" },
- { tag: ce.heading, class: "tok-heading" },
- { tag: ce.emphasis, class: "tok-emphasis" },
- { tag: ce.strong, class: "tok-strong" },
- { tag: ce.keyword, class: "tok-keyword" },
- { tag: ce.atom, class: "tok-atom" },
- { tag: ce.bool, class: "tok-bool" },
- { tag: ce.url, class: "tok-url" },
- { tag: ce.labelName, class: "tok-labelName" },
- { tag: ce.inserted, class: "tok-inserted" },
- { tag: ce.deleted, class: "tok-deleted" },
- { tag: ce.literal, class: "tok-literal" },
- { tag: ce.string, class: "tok-string" },
- { tag: ce.number, class: "tok-number" },
- { tag: [ce.regexp, ce.escape, ce.special(ce.string)], class: "tok-string2" },
- { tag: ce.variableName, class: "tok-variableName" },
- { tag: ce.local(ce.variableName), class: "tok-variableName tok-local" },
- { tag: ce.definition(ce.variableName), class: "tok-variableName tok-definition" },
- { tag: ce.special(ce.variableName), class: "tok-variableName2" },
- { tag: ce.definition(ce.propertyName), class: "tok-propertyName tok-definition" },
- { tag: ce.typeName, class: "tok-typeName" },
- { tag: ce.namespace, class: "tok-namespace" },
- { tag: ce.className, class: "tok-className" },
- { tag: ce.macroName, class: "tok-macroName" },
- { tag: ce.propertyName, class: "tok-propertyName" },
- { tag: ce.operator, class: "tok-operator" },
- { tag: ce.comment, class: "tok-comment" },
- { tag: ce.meta, class: "tok-meta" },
- { tag: ce.invalid, class: "tok-invalid" },
- { tag: ce.punctuation, class: "tok-punctuation" }
- ]);
- var hD;
- const Nv = /* @__PURE__ */ new rn();
- function age(t) {
- return ut.define({
- combine: t ? (e) => e.concat(t) : void 0
- });
- }
- const vB = /* @__PURE__ */ new rn();
- class Ds {
- /**
- Construct a language object. If you need to invoke this
- directly, first define a data facet with
- [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
- configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
- to the language's outer syntax node.
- */
- constructor(e, n, r = [], i = "") {
- this.data = e, this.name = i, cn.prototype.hasOwnProperty("tree") || Object.defineProperty(cn.prototype, "tree", { get() {
- return ni(this);
- } }), this.parser = n, this.extension = [
- Af.of(this),
- cn.languageData.of((a, o, s) => {
- let l = fJ(a, o, s), u = l.type.prop(Nv);
- if (!u)
- return [];
- let c = a.facet(u), f = l.type.prop(vB);
- if (f) {
- let d = l.resolve(o - l.from, s);
- for (let h of f)
- if (h.test(d, a)) {
- let p = a.facet(h.facet);
- return h.type == "replace" ? p : p.concat(c);
- }
- }
- return c;
- })
- ].concat(r);
- }
- /**
- Query whether this language is active at the given position.
- */
- isActiveAt(e, n, r = -1) {
- return fJ(e, n, r).type.prop(Nv) == this.data;
- }
- /**
- Find the document regions that were parsed using this language.
- The returned regions will _include_ any nested languages rooted
- in this language, when those exist.
- */
- findRegions(e) {
- let n = e.facet(Af);
- if ((n == null ? void 0 : n.data) == this.data)
- return [{ from: 0, to: e.doc.length }];
- if (!n || !n.allowsNesting)
- return [];
- let r = [], i = (a, o) => {
- if (a.prop(Nv) == this.data) {
- r.push({ from: o, to: o + a.length });
- return;
- }
- let s = a.prop(rn.mounted);
- if (s) {
- if (s.tree.prop(Nv) == this.data) {
- if (s.overlay)
- for (let l of s.overlay)
- r.push({ from: l.from + o, to: l.to + o });
- else
- r.push({ from: o, to: o + a.length });
- return;
- } else if (s.overlay) {
- let l = r.length;
- if (i(s.tree, s.overlay[0].from + o), r.length > l)
- return;
- }
- }
- for (let l = 0; l < a.children.length; l++) {
- let u = a.children[l];
- u instanceof Vr && i(u, a.positions[l] + o);
- }
- };
- return i(ni(e), 0), r;
- }
- /**
- Indicates whether this language allows nested languages. The
- default implementation returns true.
- */
- get allowsNesting() {
- return !0;
- }
- }
- Ds.setState = /* @__PURE__ */ zt.define();
- function fJ(t, e, n) {
- let r = t.facet(Af), i = ni(t).topNode;
- if (!r || r.allowsNesting)
- for (let a = i; a; a = a.enter(e, n, Ur.ExcludeBuffers))
- a.type.isTop && (i = a);
- return i;
- }
- class w_ extends Ds {
- constructor(e, n, r) {
- super(e, n, [], r), this.parser = n;
- }
- /**
- Define a language from a parser.
- */
- static define(e) {
- let n = age(e.languageData);
- return new w_(n, e.parser.configure({
- props: [Nv.add((r) => r.isTop ? n : void 0)]
- }), e.name);
- }
- /**
- Create a new instance of this language with a reconfigured
- version of its parser and optionally a new name.
- */
- configure(e, n) {
- return new w_(this.data, this.parser.configure(e), n || this.name);
- }
- get allowsNesting() {
- return this.parser.hasWrappers();
- }
- }
- function ni(t) {
- let e = t.field(Ds.state, !1);
- return e ? e.tree : Vr.empty;
- }
- class LCt {
- /**
- Create an input object for the given document.
- */
- constructor(e) {
- this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
- }
- get length() {
- return this.doc.length;
- }
- syncTo(e) {
- return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
- }
- chunk(e) {
- return this.syncTo(e), this.string;
- }
- get lineChunks() {
- return !0;
- }
- read(e, n) {
- let r = this.cursorPos - this.string.length;
- return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
- }
- }
- let iy = null;
- class LT {
- constructor(e, n, r = [], i, a, o, s, l) {
- this.parser = e, this.state = n, this.fragments = r, this.tree = i, this.treeLen = a, this.viewport = o, this.skipped = s, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
- }
- /**
- @internal
- */
- static create(e, n, r) {
- return new LT(e, n, [], Vr.empty, 0, r, [], null);
- }
- startParse() {
- return this.parser.startParse(new LCt(this.state.doc), this.fragments);
- }
- /**
- @internal
- */
- work(e, n) {
- return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Vr.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
- var r;
- if (typeof e == "number") {
- let i = Date.now() + e;
- e = () => Date.now() > i;
- }
- for (this.parse || (this.parse = this.startParse()), n != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > n) && n < this.state.doc.length && this.parse.stopAt(n); ; ) {
- let i = this.parse.advance();
- if (i)
- if (this.fragments = this.withoutTempSkipped(Eh.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (r = this.parse.stoppedAt) !== null && r !== void 0 ? r : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (n ?? this.state.doc.length))
- this.parse = this.startParse();
- else
- return !0;
- if (e())
- return !1;
- }
- });
- }
- /**
- @internal
- */
- takeTree() {
- let e, n;
- this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
- for (; !(n = this.parse.advance()); )
- ;
- }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(Eh.addTree(this.tree, this.fragments, !0)), this.parse = null);
- }
- withContext(e) {
- let n = iy;
- iy = this;
- try {
- return e();
- } finally {
- iy = n;
- }
- }
- withoutTempSkipped(e) {
- for (let n; n = this.tempSkipped.pop(); )
- e = dJ(e, n.from, n.to);
- return e;
- }
- /**
- @internal
- */
- changes(e, n) {
- let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
- if (this.takeTree(), !e.empty) {
- let l = [];
- if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = Eh.applyChanges(r, l), i = Vr.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
- s = [];
- for (let u of this.skipped) {
- let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
- c < f && s.push({ from: c, to: f });
- }
- }
- }
- return new LT(this.parser, n, r, i, a, o, s, this.scheduleOn);
- }
- /**
- @internal
- */
- updateViewport(e) {
- if (this.viewport.from == e.from && this.viewport.to == e.to)
- return !1;
- this.viewport = e;
- let n = this.skipped.length;
- for (let r = 0; r < this.skipped.length; r++) {
- let { from: i, to: a } = this.skipped[r];
- i < e.to && a > e.from && (this.fragments = dJ(this.fragments, i, a), this.skipped.splice(r--, 1));
- }
- return this.skipped.length >= n ? !1 : (this.reset(), !0);
- }
- /**
- @internal
- */
- reset() {
- this.parse && (this.takeTree(), this.parse = null);
- }
- /**
- Notify the parse scheduler that the given region was skipped
- because it wasn't in view, and the parse should be restarted
- when it comes into view.
- */
- skipUntilInView(e, n) {
- this.skipped.push({ from: e, to: n });
- }
- /**
- Returns a parser intended to be used as placeholder when
- asynchronously loading a nested parser. It'll skip its input and
- mark it as not-really-parsed, so that the next update will parse
- it again.
-
- When `until` is given, a reparse will be scheduled when that
- promise resolves.
- */
- static getSkippingParser(e) {
- return new class extends nge {
- createParse(n, r, i) {
- let a = i[0].from, o = i[i.length - 1].to;
- return {
- parsedPos: a,
- advance() {
- let l = iy;
- if (l) {
- for (let u of i)
- l.tempSkipped.push(u);
- e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
- }
- return this.parsedPos = o, new Vr(Va.none, [], [], o - a);
- },
- stoppedAt: null,
- stopAt() {
- }
- };
- }
- }();
- }
- /**
- @internal
- */
- isDone(e) {
- e = Math.min(e, this.state.doc.length);
- let n = this.fragments;
- return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
- }
- /**
- Get the context for the current parse, or `null` if no editor
- parse is in progress.
- */
- static get() {
- return iy;
- }
- }
- function dJ(t, e, n) {
- return Eh.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
- }
- class tm {
- constructor(e) {
- this.context = e, this.tree = e.tree;
- }
- apply(e) {
- if (!e.docChanged && this.tree == this.context.tree)
- return this;
- let n = this.context.changes(e.changes, e.state), r = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), n.viewport.to);
- return n.work(20, r) || n.takeTree(), new tm(n);
- }
- static init(e) {
- let n = Math.min(3e3, e.doc.length), r = LT.create(e.facet(Af).parser, e, { from: 0, to: n });
- return r.work(20, n) || r.takeTree(), new tm(r);
- }
- }
- Ds.state = /* @__PURE__ */ fi.define({
- create: tm.init,
- update(t, e) {
- for (let n of e.effects)
- if (n.is(Ds.setState))
- return n.value;
- return e.startState.facet(Af) != e.state.facet(Af) ? tm.init(e.state) : t.apply(e);
- }
- });
- let oge = (t) => {
- let e = setTimeout(
- () => t(),
- 500
- /* Work.MaxPause */
- );
- return () => clearTimeout(e);
- };
- typeof requestIdleCallback < "u" && (oge = (t) => {
- let e = -1, n = setTimeout(
- () => {
- e = requestIdleCallback(t, {
- timeout: 400
- /* Work.MinPause */
- });
- },
- 100
- /* Work.MinPause */
- );
- return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
- });
- const pD = typeof navigator < "u" && (!((hD = navigator.scheduling) === null || hD === void 0) && hD.isInputPending) ? () => navigator.scheduling.isInputPending() : null, NCt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(e) {
- this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
- }
- update(e) {
- let n = this.view.state.field(Ds.state).context;
- (n.updateViewport(e.view.viewport) || this.view.viewport.to > n.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(n);
- }
- scheduleWork() {
- if (this.working)
- return;
- let { state: e } = this.view, n = e.field(Ds.state);
- (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = oge(this.work));
- }
- work(e) {
- this.working = null;
- let n = Date.now();
- if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
- return;
- let { state: r, viewport: { to: i } } = this.view, a = r.field(Ds.state);
- if (a.tree == a.context.tree && a.context.isDone(
- i + 1e5
- /* Work.MaxParseAhead */
- ))
- return;
- let o = Date.now() + Math.min(this.chunkBudget, 100, e && !pD ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => pD && pD() || Date.now() > o, i + (s ? 0 : 1e5));
- this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ds.setState.of(new tm(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
- }
- checkAsyncSchedule(e) {
- e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => Ia(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
- }
- destroy() {
- this.working && this.working();
- }
- isWorking() {
- return !!(this.working || this.workScheduled > 0);
- }
- }, {
- eventHandlers: { focus() {
- this.scheduleWork();
- } }
- }), Af = /* @__PURE__ */ ut.define({
- combine(t) {
- return t.length ? t[0] : null;
- },
- enables: (t) => [
- Ds.state,
- NCt,
- rt.contentAttributes.compute([t], (e) => {
- let n = e.facet(t);
- return n && n.name ? { "data-language": n.name } : {};
- })
- ]
- });
- class sge {
- /**
- Create a language support object.
- */
- constructor(e, n = []) {
- this.language = e, this.support = n, this.extension = [e, n];
- }
- }
- const BCt = /* @__PURE__ */ ut.define(), D1 = /* @__PURE__ */ ut.define({
- combine: (t) => {
- if (!t.length)
- return " ";
- let e = t[0];
- if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
- throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
- return e;
- }
- });
- function NT(t) {
- let e = t.facet(D1);
- return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
- }
- function C_(t, e) {
- let n = "", r = t.tabSize, i = t.facet(D1)[0];
- if (i == " ") {
- for (; e >= r; )
- n += " ", e -= r;
- i = " ";
- }
- for (let a = 0; a < e; a++)
- n += i;
- return n;
- }
- function gB(t, e) {
- t instanceof cn && (t = new s$(t));
- for (let r of t.state.facet(BCt)) {
- let i = r(t, e);
- if (i !== void 0)
- return i;
- }
- let n = ni(t.state);
- return n.length >= e ? zCt(t, n, e) : null;
- }
- class s$ {
- /**
- Create an indent context.
- */
- constructor(e, n = {}) {
- this.state = e, this.options = n, this.unit = NT(e);
- }
- /**
- Get a description of the line at the given position, taking
- [simulated line
- breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
- into account. If there is such a break at `pos`, the `bias`
- argument determines whether the part of the line line before or
- after the break is used.
- */
- lineAt(e, n = 1) {
- let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
- return i != null && i >= r.from && i <= r.to ? a && i == e ? { text: "", from: e } : (n < 0 ? i < e : i <= e) ? { text: r.text.slice(i - r.from), from: i } : { text: r.text.slice(0, i - r.from), from: r.from } : r;
- }
- /**
- Get the text directly after `pos`, either the entire line
- or the next 100 characters, whichever is shorter.
- */
- textAfterPos(e, n = 1) {
- if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
- return "";
- let { text: r, from: i } = this.lineAt(e, n);
- return r.slice(e - i, Math.min(r.length, e + 100 - i));
- }
- /**
- Find the column for the given position.
- */
- column(e, n = 1) {
- let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
- return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
- }
- /**
- Find the column position (taking tabs into account) of the given
- position in the given string.
- */
- countColumn(e, n = e.length) {
- return Fm(e, this.state.tabSize, n);
- }
- /**
- Find the indentation column of the line at the given point.
- */
- lineIndent(e, n = 1) {
- let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
- if (a) {
- let o = a(i);
- if (o > -1)
- return o;
- }
- return this.countColumn(r, r.search(/\S|$/));
- }
- /**
- Returns the [simulated line
- break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
- for this context, if any.
- */
- get simulatedBreak() {
- return this.options.simulateBreak || null;
- }
- }
- const mB = /* @__PURE__ */ new rn();
- function zCt(t, e, n) {
- let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
- if (i != r.node) {
- let a = [];
- for (let o = i; o != r.node; o = o.parent)
- a.push(o);
- for (let o = a.length - 1; o >= 0; o--)
- r = { node: a[o], next: r };
- }
- return lge(r, t, n);
- }
- function lge(t, e, n) {
- for (let r = t; r; r = r.next) {
- let i = FCt(r.node);
- if (i)
- return i(yB.create(e, n, r));
- }
- return 0;
- }
- function VCt(t) {
- return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
- }
- function FCt(t) {
- let e = t.type.prop(mB);
- if (e)
- return e;
- let n = t.firstChild, r;
- if (n && (r = n.type.prop(rn.closedBy))) {
- let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
- return (o) => uge(o, !0, 1, void 0, a && !VCt(o) ? i.from : void 0);
- }
- return t.parent == null ? WCt : null;
- }
- function WCt() {
- return 0;
- }
- class yB extends s$ {
- constructor(e, n, r) {
- super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
- }
- /**
- The syntax tree node to which the indentation strategy
- applies.
- */
- get node() {
- return this.context.node;
- }
- /**
- @internal
- */
- static create(e, n, r) {
- return new yB(e, n, r);
- }
- /**
- Get the text directly after `this.pos`, either the entire line
- or the next 100 characters, whichever is shorter.
- */
- get textAfter() {
- return this.textAfterPos(this.pos);
- }
- /**
- Get the indentation at the reference line for `this.node`, which
- is the line on which it starts, unless there is a node that is
- _not_ a parent of this node covering the start of that line. If
- so, the line at the start of that node is tried, again skipping
- on if it is covered by another such node.
- */
- get baseIndent() {
- return this.baseIndentFor(this.node);
- }
- /**
- Get the indentation for the reference line of the given node
- (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
- */
- baseIndentFor(e) {
- let n = this.state.doc.lineAt(e.from);
- for (; ; ) {
- let r = e.resolve(n.from);
- for (; r.parent && r.parent.from == r.from; )
- r = r.parent;
- if (QCt(r, e))
- break;
- n = this.state.doc.lineAt(r.from);
- }
- return this.lineIndent(n.from);
- }
- /**
- Continue looking for indentations in the node's parent nodes,
- and return the result of that.
- */
- continue() {
- return lge(this.context.next, this.base, this.pos);
- }
- }
- function QCt(t, e) {
- for (let n = e; n; n = n.parent)
- if (t == n)
- return !0;
- return !1;
- }
- function HCt(t) {
- let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
- if (!n)
- return null;
- let i = t.options.simulateBreak, a = t.state.doc.lineAt(n.from), o = i == null || i <= a.from ? a.to : Math.min(a.to, i);
- for (let s = n.to; ; ) {
- let l = e.childAfter(s);
- if (!l || l == r)
- return null;
- if (!l.type.isSkipped)
- return l.from < o ? n : null;
- s = l.to;
- }
- }
- function GCt({ closing: t, align: e = !0, units: n = 1 }) {
- return (r) => uge(r, e, n, t);
- }
- function uge(t, e, n, r, i) {
- let a = t.textAfter, o = a.match(/^\s*/)[0].length, s = r && a.slice(o, o + r.length) == r || i == t.pos + o, l = e ? HCt(t) : null;
- return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
- }
- const jCt = (t) => t.baseIndent;
- function yb({ except: t, units: e = 1 } = {}) {
- return (n) => {
- let r = t && t.test(n.textAfter);
- return n.baseIndent + (r ? 0 : e * n.unit);
- };
- }
- const ZCt = 200;
- function UCt() {
- return cn.transactionFilter.of((t) => {
- if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
- return t;
- let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
- if (!e.length)
- return t;
- let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
- if (r > i.from + ZCt)
- return t;
- let a = n.sliceString(i.from, r);
- if (!e.some((u) => u.test(a)))
- return t;
- let { state: o } = t, s = -1, l = [];
- for (let { head: u } of o.selection.ranges) {
- let c = o.doc.lineAt(u);
- if (c.from == s)
- continue;
- s = c.from;
- let f = gB(o, c.from);
- if (f == null)
- continue;
- let d = /^\s*/.exec(c.text)[0], h = C_(o, f);
- d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
- }
- return l.length ? [t, { changes: l, sequential: !0 }] : t;
- });
- }
- const XCt = /* @__PURE__ */ ut.define(), bB = /* @__PURE__ */ new rn();
- function cge(t) {
- let e = t.firstChild, n = t.lastChild;
- return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
- }
- function YCt(t, e, n) {
- let r = ni(t);
- if (r.length < n)
- return null;
- let i = r.resolveStack(n, 1), a = null;
- for (let o = i; o; o = o.next) {
- let s = o.node;
- if (s.to <= n || s.from > n)
- continue;
- if (a && s.from < e)
- break;
- let l = s.type.prop(bB);
- if (l && (s.to < r.length - 50 || r.length == t.doc.length || !qCt(s))) {
- let u = l(s, t);
- u && u.from <= n && u.from >= e && u.to > n && (a = u);
- }
- }
- return a;
- }
- function qCt(t) {
- let e = t.lastChild;
- return e && e.to == t.to && e.type.isError;
- }
- function BT(t, e, n) {
- for (let r of t.facet(XCt)) {
- let i = r(t, e, n);
- if (i)
- return i;
- }
- return YCt(t, e, n);
- }
- function fge(t, e) {
- let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
- return n >= r ? void 0 : { from: n, to: r };
- }
- const l$ = /* @__PURE__ */ zt.define({ map: fge }), R1 = /* @__PURE__ */ zt.define({ map: fge });
- function dge(t) {
- let e = [];
- for (let { head: n } of t.state.selection.ranges)
- e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
- return e;
- }
- const np = /* @__PURE__ */ fi.define({
- create() {
- return pt.none;
- },
- update(t, e) {
- t = t.map(e.changes);
- for (let n of e.effects)
- if (n.is(l$) && !KCt(t, n.value.from, n.value.to)) {
- let { preparePlaceholder: r } = e.state.facet(vge), i = r ? pt.replace({ widget: new aTt(r(e.state, n.value)) }) : hJ;
- t = t.update({ add: [i.range(n.value.from, n.value.to)] });
- } else n.is(R1) && (t = t.update({
- filter: (r, i) => n.value.from != r || n.value.to != i,
- filterFrom: n.value.from,
- filterTo: n.value.to
- }));
- if (e.selection) {
- let n = !1, { head: r } = e.selection.main;
- t.between(r, r, (i, a) => {
- i < r && a > r && (n = !0);
- }), n && (t = t.update({
- filterFrom: r,
- filterTo: r,
- filter: (i, a) => a <= r || i >= r
- }));
- }
- return t;
- },
- provide: (t) => rt.decorations.from(t),
- toJSON(t, e) {
- let n = [];
- return t.between(0, e.doc.length, (r, i) => {
- n.push(r, i);
- }), n;
- },
- fromJSON(t) {
- if (!Array.isArray(t) || t.length % 2)
- throw new RangeError("Invalid JSON for fold state");
- let e = [];
- for (let n = 0; n < t.length; ) {
- let r = t[n++], i = t[n++];
- if (typeof r != "number" || typeof i != "number")
- throw new RangeError("Invalid JSON for fold state");
- e.push(hJ.range(r, i));
- }
- return pt.set(e, !0);
- }
- });
- function zT(t, e, n) {
- var r;
- let i = null;
- return (r = t.field(np, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
- (!i || i.from > a) && (i = { from: a, to: o });
- }), i;
- }
- function KCt(t, e, n) {
- let r = !1;
- return t.between(e, e, (i, a) => {
- i == e && a == n && (r = !0);
- }), r;
- }
- function hge(t, e) {
- return t.field(np, !1) ? e : e.concat(zt.appendConfig.of(gge()));
- }
- const JCt = (t) => {
- for (let e of dge(t)) {
- let n = BT(t.state, e.from, e.to);
- if (n)
- return t.dispatch({ effects: hge(t.state, [l$.of(n), pge(t, n)]) }), !0;
- }
- return !1;
- }, eTt = (t) => {
- if (!t.state.field(np, !1))
- return !1;
- let e = [];
- for (let n of dge(t)) {
- let r = zT(t.state, n.from, n.to);
- r && e.push(R1.of(r), pge(t, r, !1));
- }
- return e.length && t.dispatch({ effects: e }), e.length > 0;
- };
- function pge(t, e, n = !0) {
- let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
- return rt.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
- }
- const tTt = (t) => {
- let { state: e } = t, n = [];
- for (let r = 0; r < e.doc.length; ) {
- let i = t.lineBlockAt(r), a = BT(e, i.from, i.to);
- a && n.push(l$.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
- }
- return n.length && t.dispatch({ effects: hge(t.state, n) }), !!n.length;
- }, nTt = (t) => {
- let e = t.state.field(np, !1);
- if (!e || !e.size)
- return !1;
- let n = [];
- return e.between(0, t.state.doc.length, (r, i) => {
- n.push(R1.of({ from: r, to: i }));
- }), t.dispatch({ effects: n }), !0;
- }, rTt = [
- { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: JCt },
- { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: eTt },
- { key: "Ctrl-Alt-[", run: tTt },
- { key: "Ctrl-Alt-]", run: nTt }
- ], iTt = {
- placeholderDOM: null,
- preparePlaceholder: null,
- placeholderText: "…"
- }, vge = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, iTt);
- }
- });
- function gge(t) {
- return [np, lTt];
- }
- function mge(t, e) {
- let { state: n } = t, r = n.facet(vge), i = (o) => {
- let s = t.lineBlockAt(t.posAtDOM(o.target)), l = zT(t.state, s.from, s.to);
- l && t.dispatch({ effects: R1.of(l) }), o.preventDefault();
- };
- if (r.placeholderDOM)
- return r.placeholderDOM(t, i, e);
- let a = document.createElement("span");
- return a.textContent = r.placeholderText, a.setAttribute("aria-label", n.phrase("folded code")), a.title = n.phrase("unfold"), a.className = "cm-foldPlaceholder", a.onclick = i, a;
- }
- const hJ = /* @__PURE__ */ pt.replace({ widget: /* @__PURE__ */ new class extends Jl {
- toDOM(t) {
- return mge(t, null);
- }
- }() });
- class aTt extends Jl {
- constructor(e) {
- super(), this.value = e;
- }
- eq(e) {
- return this.value == e.value;
- }
- toDOM(e) {
- return mge(e, this.value);
- }
- }
- const oTt = {
- openText: "⌄",
- closedText: "›",
- markerDOM: null,
- domEventHandlers: {},
- foldingChanged: () => !1
- };
- class vD extends Yu {
- constructor(e, n) {
- super(), this.config = e, this.open = n;
- }
- eq(e) {
- return this.config == e.config && this.open == e.open;
- }
- toDOM(e) {
- if (this.config.markerDOM)
- return this.config.markerDOM(this.open);
- let n = document.createElement("span");
- return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
- }
- }
- function sTt(t = {}) {
- let e = Object.assign(Object.assign({}, oTt), t), n = new vD(e, !0), r = new vD(e, !1), i = Ir.fromClass(class {
- constructor(o) {
- this.from = o.viewport.from, this.markers = this.buildMarkers(o);
- }
- update(o) {
- (o.docChanged || o.viewportChanged || o.startState.facet(Af) != o.state.facet(Af) || o.startState.field(np, !1) != o.state.field(np, !1) || ni(o.startState) != ni(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
- }
- buildMarkers(o) {
- let s = new wf();
- for (let l of o.viewportLineBlocks) {
- let u = zT(o.state, l.from, l.to) ? r : BT(o.state, l.from, l.to) ? n : null;
- u && s.add(l.from, l.from, u);
- }
- return s.finish();
- }
- }), { domEventHandlers: a } = e;
- return [
- i,
- cCt({
- class: "cm-foldGutter",
- markers(o) {
- var s;
- return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || Sn.empty;
- },
- initialSpacer() {
- return new vD(e, !1);
- },
- domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
- if (a.click && a.click(o, s, l))
- return !0;
- let u = zT(o.state, s.from, s.to);
- if (u)
- return o.dispatch({ effects: R1.of(u) }), !0;
- let c = BT(o.state, s.from, s.to);
- return c ? (o.dispatch({ effects: l$.of(c) }), !0) : !1;
- } })
- }),
- gge()
- ];
- }
- const lTt = /* @__PURE__ */ rt.baseTheme({
- ".cm-foldPlaceholder": {
- backgroundColor: "#eee",
- border: "1px solid #ddd",
- color: "#888",
- borderRadius: ".2em",
- margin: "0 1px",
- padding: "0 1px",
- cursor: "pointer"
- },
- ".cm-foldGutter span": {
- padding: "0 1px",
- cursor: "pointer"
- }
- });
- class k1 {
- constructor(e, n) {
- this.specs = e;
- let r;
- function i(s) {
- let l = Cf.newName();
- return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
- }
- const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
- this.scope = o instanceof Ds ? (s) => s.prop(Nv) == o.data : o ? (s) => s == o : void 0, this.style = ige(e.map((s) => ({
- tag: s.tag,
- class: s.class || i(Object.assign({}, s, { tag: null }))
- })), {
- all: a
- }).style, this.module = r ? new Cf(r) : null, this.themeType = n.themeType;
- }
- /**
- Create a highlighter style that associates the given styles to
- the given tags. The specs must be objects that hold a style tag
- or array of tags in their `tag` property, and either a single
- `class` property providing a static CSS class (for highlighter
- that rely on external styling), or a
- [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
- set of CSS properties (which define the styling for those tags).
-
- The CSS rules created for a highlighter will be emitted in the
- order of the spec's properties. That means that for elements that
- have multiple tags associated with them, styles defined further
- down in the list will have a higher CSS precedence than styles
- defined earlier.
- */
- static define(e, n) {
- return new k1(e, n || {});
- }
- }
- const L4 = /* @__PURE__ */ ut.define(), yge = /* @__PURE__ */ ut.define({
- combine(t) {
- return t.length ? [t[0]] : null;
- }
- });
- function gD(t) {
- let e = t.facet(L4);
- return e.length ? e : t.facet(yge);
- }
- function bge(t, e) {
- let n = [cTt], r;
- return t instanceof k1 && (t.module && n.push(rt.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(yge.of(t)) : r ? n.push(L4.computeN([rt.darkTheme], (i) => i.facet(rt.darkTheme) == (r == "dark") ? [t] : [])) : n.push(L4.of(t)), n;
- }
- class uTt {
- constructor(e) {
- this.markCache = /* @__PURE__ */ Object.create(null), this.tree = ni(e.state), this.decorations = this.buildDeco(e, gD(e.state)), this.decoratedTo = e.viewport.to;
- }
- update(e) {
- let n = ni(e.state), r = gD(e.state), i = r != gD(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
- n.length < a.to && !i && n.type == this.tree.type && o >= a.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = o) : (n != this.tree || e.viewportChanged || i) && (this.tree = n, this.decorations = this.buildDeco(e.view, r), this.decoratedTo = a.to);
- }
- buildDeco(e, n) {
- if (!n || !this.tree.length)
- return pt.none;
- let r = new wf();
- for (let { from: i, to: a } of e.visibleRanges)
- DCt(this.tree, n, (o, s, l) => {
- r.add(o, s, this.markCache[l] || (this.markCache[l] = pt.mark({ class: l })));
- }, i, a);
- return r.finish();
- }
- }
- const cTt = /* @__PURE__ */ Ff.high(/* @__PURE__ */ Ir.fromClass(uTt, {
- decorations: (t) => t.decorations
- })), fTt = /* @__PURE__ */ k1.define([
- {
- tag: ce.meta,
- color: "#404740"
- },
- {
- tag: ce.link,
- textDecoration: "underline"
- },
- {
- tag: ce.heading,
- textDecoration: "underline",
- fontWeight: "bold"
- },
- {
- tag: ce.emphasis,
- fontStyle: "italic"
- },
- {
- tag: ce.strong,
- fontWeight: "bold"
- },
- {
- tag: ce.strikethrough,
- textDecoration: "line-through"
- },
- {
- tag: ce.keyword,
- color: "#708"
- },
- {
- tag: [ce.atom, ce.bool, ce.url, ce.contentSeparator, ce.labelName],
- color: "#219"
- },
- {
- tag: [ce.literal, ce.inserted],
- color: "#164"
- },
- {
- tag: [ce.string, ce.deleted],
- color: "#a11"
- },
- {
- tag: [ce.regexp, ce.escape, /* @__PURE__ */ ce.special(ce.string)],
- color: "#e40"
- },
- {
- tag: /* @__PURE__ */ ce.definition(ce.variableName),
- color: "#00f"
- },
- {
- tag: /* @__PURE__ */ ce.local(ce.variableName),
- color: "#30a"
- },
- {
- tag: [ce.typeName, ce.namespace],
- color: "#085"
- },
- {
- tag: ce.className,
- color: "#167"
- },
- {
- tag: [/* @__PURE__ */ ce.special(ce.variableName), ce.macroName],
- color: "#256"
- },
- {
- tag: /* @__PURE__ */ ce.definition(ce.propertyName),
- color: "#00c"
- },
- {
- tag: ce.comment,
- color: "#940"
- },
- {
- tag: ce.invalid,
- color: "#f00"
- }
- ]), dTt = /* @__PURE__ */ rt.baseTheme({
- "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
- "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
- }), _ge = 1e4, Oge = "()[]{}", Sge = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, {
- afterCursor: !0,
- brackets: Oge,
- maxScanDistance: _ge,
- renderMatch: vTt
- });
- }
- }), hTt = /* @__PURE__ */ pt.mark({ class: "cm-matchingBracket" }), pTt = /* @__PURE__ */ pt.mark({ class: "cm-nonmatchingBracket" });
- function vTt(t) {
- let e = [], n = t.matched ? hTt : pTt;
- return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
- }
- const gTt = /* @__PURE__ */ fi.define({
- create() {
- return pt.none;
- },
- update(t, e) {
- if (!e.docChanged && !e.selection)
- return t;
- let n = [], r = e.state.facet(Sge);
- for (let i of e.state.selection.ranges) {
- if (!i.empty)
- continue;
- let a = Il(e.state, i.head, -1, r) || i.head > 0 && Il(e.state, i.head - 1, 1, r) || r.afterCursor && (Il(e.state, i.head, 1, r) || i.head < e.state.doc.length && Il(e.state, i.head + 1, -1, r));
- a && (n = n.concat(r.renderMatch(a, e.state)));
- }
- return pt.set(n, !0);
- },
- provide: (t) => rt.decorations.from(t)
- }), mTt = [
- gTt,
- dTt
- ];
- function yTt(t = {}) {
- return [Sge.of(t), mTt];
- }
- const bTt = /* @__PURE__ */ new rn();
- function N4(t, e, n) {
- let r = t.prop(e < 0 ? rn.openedBy : rn.closedBy);
- if (r)
- return r;
- if (t.name.length == 1) {
- let i = n.indexOf(t.name);
- if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
- return [n[i + e]];
- }
- return null;
- }
- function B4(t) {
- let e = t.type.prop(bTt);
- return e ? e(t.node) : t;
- }
- function Il(t, e, n, r = {}) {
- let i = r.maxScanDistance || _ge, a = r.brackets || Oge, o = ni(t), s = o.resolveInner(e, n);
- for (let l = s; l; l = l.parent) {
- let u = N4(l.type, n, a);
- if (u && l.from < l.to) {
- let c = B4(l);
- if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
- return _Tt(t, e, n, l, c, u, a);
- }
- }
- return OTt(t, e, n, o, s.type, i, a);
- }
- function _Tt(t, e, n, r, i, a, o) {
- let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
- if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
- do
- if (n < 0 ? c.to <= r.from : c.from >= r.to) {
- if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
- let f = B4(c);
- return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
- } else if (N4(c.type, n, o))
- u++;
- else if (N4(c.type, -n, o)) {
- if (u == 0) {
- let f = B4(c);
- return {
- start: l,
- end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
- matched: !1
- };
- }
- u--;
- }
- }
- while (n < 0 ? c.prevSibling() : c.nextSibling());
- return { start: l, matched: !1 };
- }
- function OTt(t, e, n, r, i, a, o) {
- let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
- if (l < 0 || l % 2 == 0 != n > 0)
- return null;
- let u = { from: n < 0 ? e - 1 : e, to: n > 0 ? e + 1 : e }, c = t.doc.iterRange(e, n > 0 ? t.doc.length : 0), f = 0;
- for (let d = 0; !c.next().done && d <= a; ) {
- let h = c.value;
- n < 0 && (d += h.length);
- let p = e + d * n;
- for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
- let m = o.indexOf(h[v]);
- if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
- if (m % 2 == 0 == n > 0)
- f++;
- else {
- if (f == 1)
- return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
- f--;
- }
- }
- n > 0 && (d += h.length);
- }
- return c.done ? { start: u, matched: !1 } : null;
- }
- const STt = /* @__PURE__ */ Object.create(null), pJ = [Va.none], vJ = [], gJ = /* @__PURE__ */ Object.create(null), xTt = /* @__PURE__ */ Object.create(null);
- for (let [t, e] of [
- ["variable", "variableName"],
- ["variable-2", "variableName.special"],
- ["string-2", "string.special"],
- ["def", "variableName.definition"],
- ["tag", "tagName"],
- ["attribute", "attributeName"],
- ["type", "typeName"],
- ["builtin", "variableName.standard"],
- ["qualifier", "modifier"],
- ["error", "invalid"],
- ["header", "heading"],
- ["property", "propertyName"]
- ])
- xTt[t] = /* @__PURE__ */ wTt(STt, e);
- function mD(t, e) {
- vJ.indexOf(t) > -1 || (vJ.push(t), console.warn(e));
- }
- function wTt(t, e) {
- let n = [];
- for (let s of e.split(" ")) {
- let l = [];
- for (let u of s.split(".")) {
- let c = t[u] || ce[u];
- c ? typeof c == "function" ? l.length ? l = l.map(c) : mD(u, `Modifier ${u} used at start of tag`) : l.length ? mD(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : mD(u, `Unknown highlighting tag ${u}`);
- }
- for (let u of l)
- n.push(u);
- }
- if (!n.length)
- return 0;
- let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = gJ[i];
- if (a)
- return a.id;
- let o = gJ[i] = Va.define({
- id: pJ.length,
- name: r,
- props: [pB({ [r]: n })]
- });
- return pJ.push(o), o.id;
- }
- ir.RTL, ir.LTR;
- const CTt = (t) => {
- let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = OB(t.state, n.from);
- return r.line ? TTt(t) : r.block ? $Tt(t) : !1;
- };
- function _B(t, e) {
- return ({ state: n, dispatch: r }) => {
- if (n.readOnly)
- return !1;
- let i = t(e, n);
- return i ? (r(n.update(i)), !0) : !1;
- };
- }
- const TTt = /* @__PURE__ */ _B(
- MTt,
- 0
- /* CommentOption.Toggle */
- ), PTt = /* @__PURE__ */ _B(
- xge,
- 0
- /* CommentOption.Toggle */
- ), $Tt = /* @__PURE__ */ _B(
- (t, e) => xge(t, e, ETt(e)),
- 0
- /* CommentOption.Toggle */
- );
- function OB(t, e) {
- let n = t.languageDataAt("commentTokens", e);
- return n.length ? n[0] : {};
- }
- const ay = 50;
- function ATt(t, { open: e, close: n }, r, i) {
- let a = t.sliceDoc(r - ay, r), o = t.sliceDoc(i, i + ay), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
- if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
- return {
- open: { pos: r - s, margin: s && 1 },
- close: { pos: i + l, margin: l && 1 }
- };
- let c, f;
- i - r <= 2 * ay ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + ay), f = t.sliceDoc(i - ay, i));
- let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
- return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
- open: {
- pos: r + d + e.length,
- margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
- },
- close: {
- pos: i - h - n.length,
- margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
- }
- } : null;
- }
- function ETt(t) {
- let e = [];
- for (let n of t.selection.ranges) {
- let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
- a >= 0 && e[a].to > r.from ? e[a].to = i.to : e.push({ from: r.from + /^\s*/.exec(r.text)[0].length, to: i.to });
- }
- return e;
- }
- function xge(t, e, n = e.selection.ranges) {
- let r = n.map((a) => OB(e, a.from).block);
- if (!r.every((a) => a))
- return null;
- let i = n.map((a, o) => ATt(e, r[o], a.from, a.to));
- if (t != 2 && !i.every((a) => a))
- return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
- if (t != 1 && i.some((a) => a)) {
- let a = [];
- for (let o = 0, s; o < i.length; o++)
- if (s = i[o]) {
- let l = r[o], { open: u, close: c } = s;
- a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
- }
- return { changes: a };
- }
- return null;
- }
- function MTt(t, e, n = e.selection.ranges) {
- let r = [], i = -1;
- for (let { from: a, to: o } of n) {
- let s = r.length, l = 1e9, u = OB(e, a).line;
- if (u) {
- for (let c = a; c <= o; ) {
- let f = e.doc.lineAt(c);
- if (f.from > i && (a == o || o > f.from)) {
- i = f.from;
- let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
- d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
- }
- c = f.to + 1;
- }
- if (l < 1e9)
- for (let c = s; c < r.length; c++)
- r[c].indent < r[c].line.text.length && (r[c].indent = l);
- r.length == s + 1 && (r[s].single = !0);
- }
- }
- if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
- let a = [];
- for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
- (f || !c) && a.push({ from: s.from + u, insert: l + " " });
- let o = e.changes(a);
- return { changes: o, selection: e.selection.map(o, 1) };
- } else if (t != 1 && r.some((a) => a.comment >= 0)) {
- let a = [];
- for (let { line: o, comment: s, token: l } of r)
- if (s >= 0) {
- let u = o.from + s, c = u + l.length;
- o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
- }
- return { changes: a };
- }
- return null;
- }
- const z4 = /* @__PURE__ */ ac.define(), ITt = /* @__PURE__ */ ac.define(), DTt = /* @__PURE__ */ ut.define(), wge = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, {
- minDepth: 100,
- newGroupDelay: 500,
- joinToEvent: (e, n) => n
- }, {
- minDepth: Math.max,
- newGroupDelay: Math.min,
- joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
- });
- }
- }), Cge = /* @__PURE__ */ fi.define({
- create() {
- return Dl.empty;
- },
- update(t, e) {
- let n = e.state.facet(wge), r = e.annotation(z4);
- if (r) {
- let l = Da.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
- return l ? c = VT(c, c.length, n.minDepth, l) : c = $ge(c, e.startState.selection), new Dl(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
- }
- let i = e.annotation(ITt);
- if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(zr.addToHistory) === !1)
- return e.changes.empty ? t : t.addMapping(e.changes.desc);
- let a = Da.fromTransaction(e), o = e.annotation(zr.time), s = e.annotation(zr.userEvent);
- return a ? t = t.addChanges(a, o, s, n, e) : e.selection && (t = t.addSelection(e.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (t = t.isolate()), t;
- },
- toJSON(t) {
- return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
- },
- fromJSON(t) {
- return new Dl(t.done.map(Da.fromJSON), t.undone.map(Da.fromJSON));
- }
- });
- function RTt(t = {}) {
- return [
- Cge,
- wge.of(t),
- rt.domEventHandlers({
- beforeinput(e, n) {
- let r = e.inputType == "historyUndo" ? Tge : e.inputType == "historyRedo" ? V4 : null;
- return r ? (e.preventDefault(), r(n)) : !1;
- }
- })
- ];
- }
- function u$(t, e) {
- return function({ state: n, dispatch: r }) {
- if (!e && n.readOnly)
- return !1;
- let i = n.field(Cge, !1);
- if (!i)
- return !1;
- let a = i.pop(t, n, e);
- return a ? (r(a), !0) : !1;
- };
- }
- const Tge = /* @__PURE__ */ u$(0, !1), V4 = /* @__PURE__ */ u$(1, !1), kTt = /* @__PURE__ */ u$(0, !0), LTt = /* @__PURE__ */ u$(1, !0);
- class Da {
- constructor(e, n, r, i, a) {
- this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
- }
- setSelAfter(e) {
- return new Da(this.changes, this.effects, this.mapped, this.startSelection, e);
- }
- toJSON() {
- var e, n, r;
- return {
- changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
- mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
- startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
- selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
- };
- }
- static fromJSON(e) {
- return new Da(e.changes && Zr.fromJSON(e.changes), [], e.mapped && Bl.fromJSON(e.mapped), e.startSelection && De.fromJSON(e.startSelection), e.selectionsAfter.map(De.fromJSON));
- }
- // This does not check `addToHistory` and such, it assumes the
- // transaction needs to be converted to an item. Returns null when
- // there are no changes or effects in the transaction.
- static fromTransaction(e, n) {
- let r = Uo;
- for (let i of e.startState.facet(DTt)) {
- let a = i(e);
- a.length && (r = r.concat(a));
- }
- return !r.length && e.changes.empty ? null : new Da(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, Uo);
- }
- static selection(e) {
- return new Da(void 0, Uo, void 0, void 0, e);
- }
- }
- function VT(t, e, n, r) {
- let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
- return a.push(r), a;
- }
- function NTt(t, e) {
- let n = [], r = !1;
- return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
- for (let l = 0; l < n.length; ) {
- let u = n[l++], c = n[l++];
- s >= u && o <= c && (r = !0);
- }
- }), r;
- }
- function BTt(t, e) {
- return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
- }
- function Pge(t, e) {
- return t.length ? e.length ? t.concat(e) : t : e;
- }
- const Uo = [], zTt = 200;
- function $ge(t, e) {
- if (t.length) {
- let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - zTt));
- return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), VT(t, t.length - 1, 1e9, n.setSelAfter(r)));
- } else
- return [Da.selection([e])];
- }
- function VTt(t) {
- let e = t[t.length - 1], n = t.slice();
- return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
- }
- function yD(t, e) {
- if (!t.length)
- return t;
- let n = t.length, r = Uo;
- for (; n; ) {
- let i = FTt(t[n - 1], e, r);
- if (i.changes && !i.changes.empty || i.effects.length) {
- let a = t.slice(0, n);
- return a[n - 1] = i, a;
- } else
- e = i.mapped, n--, r = i.selectionsAfter;
- }
- return r.length ? [Da.selection(r)] : Uo;
- }
- function FTt(t, e, n) {
- let r = Pge(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : Uo, n);
- if (!t.changes)
- return Da.selection(r);
- let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
- return new Da(i, zt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
- }
- const WTt = /^(input\.type|delete)($|\.)/;
- class Dl {
- constructor(e, n, r = 0, i = void 0) {
- this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
- }
- isolate() {
- return this.prevTime ? new Dl(this.done, this.undone) : this;
- }
- addChanges(e, n, r, i, a) {
- let o = this.done, s = o[o.length - 1];
- return s && s.changes && !s.changes.empty && e.changes && (!r || WTt.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, NTt(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
- r == "input.type.compose") ? o = VT(o, o.length - 1, i.minDepth, new Da(e.changes.compose(s.changes), Pge(e.effects, s.effects), s.mapped, s.startSelection, Uo)) : o = VT(o, o.length, i.minDepth, e), new Dl(o, Uo, n, r);
- }
- addSelection(e, n, r, i) {
- let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Uo;
- return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && BTt(a[a.length - 1], e) ? this : new Dl($ge(this.done, e), this.undone, n, r);
- }
- addMapping(e) {
- return new Dl(yD(this.done, e), yD(this.undone, e), this.prevTime, this.prevUserEvent);
- }
- pop(e, n, r) {
- let i = e == 0 ? this.done : this.undone;
- if (i.length == 0)
- return null;
- let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
- if (r && a.selectionsAfter.length)
- return n.update({
- selection: a.selectionsAfter[a.selectionsAfter.length - 1],
- annotations: z4.of({ side: e, rest: VTt(i), selection: o }),
- userEvent: e == 0 ? "select.undo" : "select.redo",
- scrollIntoView: !0
- });
- if (a.changes) {
- let s = i.length == 1 ? Uo : i.slice(0, i.length - 1);
- return a.mapped && (s = yD(s, a.mapped)), n.update({
- changes: a.changes,
- selection: a.startSelection,
- effects: a.effects,
- annotations: z4.of({ side: e, rest: s, selection: o }),
- filter: !1,
- userEvent: e == 0 ? "undo" : "redo",
- scrollIntoView: !0
- });
- } else
- return null;
- }
- }
- Dl.empty = /* @__PURE__ */ new Dl(Uo, Uo);
- const QTt = [
- { key: "Mod-z", run: Tge, preventDefault: !0 },
- { key: "Mod-y", mac: "Mod-Shift-z", run: V4, preventDefault: !0 },
- { linux: "Ctrl-Shift-z", run: V4, preventDefault: !0 },
- { key: "Mod-u", run: kTt, preventDefault: !0 },
- { key: "Alt-u", mac: "Mod-Shift-u", run: LTt, preventDefault: !0 }
- ];
- function Wm(t, e) {
- return De.create(t.ranges.map(e), t.mainIndex);
- }
- function eu(t, e) {
- return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
- }
- function nl({ state: t, dispatch: e }, n) {
- let r = Wm(t.selection, n);
- return r.eq(t.selection, !0) ? !1 : (e(eu(t, r)), !0);
- }
- function c$(t, e) {
- return De.cursor(e ? t.to : t.from);
- }
- function Age(t, e) {
- return nl(t, (n) => n.empty ? t.moveByChar(n, e) : c$(n, e));
- }
- function Gi(t) {
- return t.textDirectionAt(t.state.selection.main.head) == ir.LTR;
- }
- const Ege = (t) => Age(t, !Gi(t)), Mge = (t) => Age(t, Gi(t));
- function Ige(t, e) {
- return nl(t, (n) => n.empty ? t.moveByGroup(n, e) : c$(n, e));
- }
- const HTt = (t) => Ige(t, !Gi(t)), GTt = (t) => Ige(t, Gi(t));
- function jTt(t, e, n) {
- if (e.type.prop(n))
- return !0;
- let r = e.to - e.from;
- return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
- }
- function f$(t, e, n) {
- let r = ni(t).resolveInner(e.head), i = n ? rn.closedBy : rn.openedBy;
- for (let l = e.head; ; ) {
- let u = n ? r.childAfter(l) : r.childBefore(l);
- if (!u)
- break;
- jTt(t, u, i) ? r = u : l = n ? u.to : u.from;
- }
- let a = r.type.prop(i), o, s;
- return a && (o = n ? Il(t, r.from, 1) : Il(t, r.to, -1)) && o.matched ? s = n ? o.end.to : o.end.from : s = n ? r.to : r.from, De.cursor(s, n ? -1 : 1);
- }
- const ZTt = (t) => nl(t, (e) => f$(t.state, e, !Gi(t))), UTt = (t) => nl(t, (e) => f$(t.state, e, Gi(t)));
- function Dge(t, e) {
- return nl(t, (n) => {
- if (!n.empty)
- return c$(n, e);
- let r = t.moveVertically(n, e);
- return r.head != n.head ? r : t.moveToLineBoundary(n, e);
- });
- }
- const Rge = (t) => Dge(t, !1), kge = (t) => Dge(t, !0);
- function Lge(t) {
- let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
- if (e) {
- for (let a of t.state.facet(rt.scrollMargins)) {
- let o = a(t);
- o != null && o.top && (n = Math.max(o == null ? void 0 : o.top, n)), o != null && o.bottom && (r = Math.max(o == null ? void 0 : o.bottom, r));
- }
- i = t.scrollDOM.clientHeight - n - r;
- } else
- i = (t.dom.ownerDocument.defaultView || window).innerHeight;
- return {
- marginTop: n,
- marginBottom: r,
- selfScroll: e,
- height: Math.max(t.defaultLineHeight, i - 5)
- };
- }
- function Nge(t, e) {
- let n = Lge(t), { state: r } = t, i = Wm(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : c$(o, e));
- if (i.eq(r.selection))
- return !1;
- let a;
- if (n.selfScroll) {
- let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
- o && o.top > l && o.bottom < u && (a = rt.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
- }
- return t.dispatch(eu(r, i), { effects: a }), !0;
- }
- const mJ = (t) => Nge(t, !1), F4 = (t) => Nge(t, !0);
- function Wf(t, e, n) {
- let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
- if (i.head == e.head && i.head != (n ? r.to : r.from) && (i = t.moveToLineBoundary(e, n, !1)), !n && i.head == r.from && r.length) {
- let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
- a && e.head != r.from + a && (i = De.cursor(r.from + a));
- }
- return i;
- }
- const XTt = (t) => nl(t, (e) => Wf(t, e, !0)), YTt = (t) => nl(t, (e) => Wf(t, e, !1)), qTt = (t) => nl(t, (e) => Wf(t, e, !Gi(t))), KTt = (t) => nl(t, (e) => Wf(t, e, Gi(t))), JTt = (t) => nl(t, (e) => De.cursor(t.lineBlockAt(e.head).from, 1)), e2t = (t) => nl(t, (e) => De.cursor(t.lineBlockAt(e.head).to, -1));
- function t2t(t, e, n) {
- let r = !1, i = Wm(t.selection, (a) => {
- let o = Il(t, a.head, -1) || Il(t, a.head, 1) || a.head > 0 && Il(t, a.head - 1, 1) || a.head < t.doc.length && Il(t, a.head + 1, -1);
- if (!o || !o.end)
- return a;
- r = !0;
- let s = o.start.from == a.head ? o.end.to : o.end.from;
- return De.cursor(s);
- });
- return r ? (e(eu(t, i)), !0) : !1;
- }
- const n2t = ({ state: t, dispatch: e }) => t2t(t, e);
- function gs(t, e) {
- let n = Wm(t.state.selection, (r) => {
- let i = e(r);
- return De.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
- });
- return n.eq(t.state.selection) ? !1 : (t.dispatch(eu(t.state, n)), !0);
- }
- function Bge(t, e) {
- return gs(t, (n) => t.moveByChar(n, e));
- }
- const zge = (t) => Bge(t, !Gi(t)), Vge = (t) => Bge(t, Gi(t));
- function Fge(t, e) {
- return gs(t, (n) => t.moveByGroup(n, e));
- }
- const r2t = (t) => Fge(t, !Gi(t)), i2t = (t) => Fge(t, Gi(t)), a2t = (t) => gs(t, (e) => f$(t.state, e, !Gi(t))), o2t = (t) => gs(t, (e) => f$(t.state, e, Gi(t)));
- function Wge(t, e) {
- return gs(t, (n) => t.moveVertically(n, e));
- }
- const Qge = (t) => Wge(t, !1), Hge = (t) => Wge(t, !0);
- function Gge(t, e) {
- return gs(t, (n) => t.moveVertically(n, e, Lge(t).height));
- }
- const yJ = (t) => Gge(t, !1), bJ = (t) => Gge(t, !0), s2t = (t) => gs(t, (e) => Wf(t, e, !0)), l2t = (t) => gs(t, (e) => Wf(t, e, !1)), u2t = (t) => gs(t, (e) => Wf(t, e, !Gi(t))), c2t = (t) => gs(t, (e) => Wf(t, e, Gi(t))), f2t = (t) => gs(t, (e) => De.cursor(t.lineBlockAt(e.head).from)), d2t = (t) => gs(t, (e) => De.cursor(t.lineBlockAt(e.head).to)), _J = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: 0 })), !0), OJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.doc.length })), !0), SJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.selection.main.anchor, head: 0 })), !0), xJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), h2t = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), p2t = ({ state: t, dispatch: e }) => {
- let n = d$(t).map(({ from: r, to: i }) => De.range(r, Math.min(i + 1, t.doc.length)));
- return e(t.update({ selection: De.create(n), userEvent: "select" })), !0;
- }, v2t = ({ state: t, dispatch: e }) => {
- let n = Wm(t.selection, (r) => {
- var i;
- let a = ni(t).resolveStack(r.from, 1);
- for (let o = a; o; o = o.next) {
- let { node: s } = o;
- if ((s.from < r.from && s.to >= r.to || s.to > r.to && s.from <= r.from) && (!((i = s.parent) === null || i === void 0) && i.parent))
- return De.range(s.to, s.from);
- }
- return r;
- });
- return e(eu(t, n)), !0;
- }, g2t = ({ state: t, dispatch: e }) => {
- let n = t.selection, r = null;
- return n.ranges.length > 1 ? r = De.create([n.main]) : n.main.empty || (r = De.create([De.cursor(n.main.head)])), r ? (e(eu(t, r)), !0) : !1;
- };
- function L1(t, e) {
- if (t.state.readOnly)
- return !1;
- let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
- let { from: o, to: s } = a;
- if (o == s) {
- let l = e(a);
- l < o ? (n = "delete.backward", l = xx(t, l, !1)) : l > o && (n = "delete.forward", l = xx(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
- } else
- o = xx(t, o, !1), s = xx(t, s, !0);
- return o == s ? { range: a } : { changes: { from: o, to: s }, range: De.cursor(o, o < a.head ? -1 : 1) };
- });
- return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
- scrollIntoView: !0,
- userEvent: n,
- effects: n == "delete.selection" ? rt.announce.of(r.phrase("Selection deleted")) : void 0
- })), !0);
- }
- function xx(t, e, n) {
- if (t instanceof rt)
- for (let r of t.state.facet(rt.atomicRanges).map((i) => i(t)))
- r.between(e, e, (i, a) => {
- i < e && a > e && (e = n ? a : i);
- });
- return e;
- }
- const jge = (t, e, n) => L1(t, (r) => {
- let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
- if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
- if (s[s.length - 1] == " ")
- return i - 1;
- let u = Fm(s, a.tabSize), c = u % NT(a) || NT(a);
- for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
- i--;
- l = i;
- } else
- l = wi(o.text, i - o.from, e, e) + o.from, l == i && o.number != (e ? a.doc.lines : 1) ? l += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(o.text.slice(l - o.from, i - o.from)) && (l = wi(o.text, l - o.from, !1, !1) + o.from);
- return l;
- }), W4 = (t) => jge(t, !1, !0), Zge = (t) => jge(t, !0, !1), Uge = (t, e) => L1(t, (n) => {
- let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
- for (let s = null; ; ) {
- if (r == (e ? a.to : a.from)) {
- r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
- break;
- }
- let l = wi(a.text, r - a.from, e) + a.from, u = a.text.slice(Math.min(r, l) - a.from, Math.max(r, l) - a.from), c = o(u);
- if (s != null && c != s)
- break;
- (u != " " || r != n.head) && (s = c), r = l;
- }
- return r;
- }), Xge = (t) => Uge(t, !1), m2t = (t) => Uge(t, !0), y2t = (t) => L1(t, (e) => {
- let n = t.lineBlockAt(e.head).to;
- return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
- }), b2t = (t) => L1(t, (e) => {
- let n = t.moveToLineBoundary(e, !1).head;
- return e.head > n ? n : Math.max(0, e.head - 1);
- }), _2t = (t) => L1(t, (e) => {
- let n = t.moveToLineBoundary(e, !0).head;
- return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
- }), O2t = ({ state: t, dispatch: e }) => {
- if (t.readOnly)
- return !1;
- let n = t.changeByRange((r) => ({
- changes: { from: r.from, to: r.to, insert: xn.of(["", ""]) },
- range: De.cursor(r.from)
- }));
- return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
- }, S2t = ({ state: t, dispatch: e }) => {
- if (t.readOnly)
- return !1;
- let n = t.changeByRange((r) => {
- if (!r.empty || r.from == 0 || r.from == t.doc.length)
- return { range: r };
- let i = r.from, a = t.doc.lineAt(i), o = i == a.from ? i - 1 : wi(a.text, i - a.from, !1) + a.from, s = i == a.to ? i + 1 : wi(a.text, i - a.from, !0) + a.from;
- return {
- changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
- range: De.cursor(s)
- };
- });
- return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
- };
- function d$(t) {
- let e = [], n = -1;
- for (let r of t.selection.ranges) {
- let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
- if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
- let o = e[e.length - 1];
- o.to = a.to, o.ranges.push(r);
- } else
- e.push({ from: i.from, to: a.to, ranges: [r] });
- n = a.number + 1;
- }
- return e;
- }
- function Yge(t, e, n) {
- if (t.readOnly)
- return !1;
- let r = [], i = [];
- for (let a of d$(t)) {
- if (n ? a.to == t.doc.length : a.from == 0)
- continue;
- let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
- if (n) {
- r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
- for (let l of a.ranges)
- i.push(De.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
- } else {
- r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
- for (let l of a.ranges)
- i.push(De.range(l.anchor - s, l.head - s));
- }
- }
- return r.length ? (e(t.update({
- changes: r,
- scrollIntoView: !0,
- selection: De.create(i, t.selection.mainIndex),
- userEvent: "move.line"
- })), !0) : !1;
- }
- const x2t = ({ state: t, dispatch: e }) => Yge(t, e, !1), w2t = ({ state: t, dispatch: e }) => Yge(t, e, !0);
- function qge(t, e, n) {
- if (t.readOnly)
- return !1;
- let r = [];
- for (let i of d$(t))
- n ? r.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : r.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) });
- return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
- }
- const C2t = ({ state: t, dispatch: e }) => qge(t, e, !1), T2t = ({ state: t, dispatch: e }) => qge(t, e, !0), P2t = (t) => {
- if (t.state.readOnly)
- return !1;
- let { state: e } = t, n = e.changes(d$(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = Wm(e.selection, (i) => {
- let a;
- if (t.lineWrapping) {
- let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
- s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
- }
- return t.moveVertically(i, !0, a);
- }).map(n);
- return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
- };
- function $2t(t, e) {
- if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
- return { from: e, to: e };
- let n = ni(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
- return r && i && r.to <= e && i.from >= e && (a = r.type.prop(rn.closedBy)) && a.indexOf(i.name) > -1 && t.doc.lineAt(r.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(r.to, i.from)) ? { from: r.to, to: i.from } : null;
- }
- const A2t = /* @__PURE__ */ Kge(!1), E2t = /* @__PURE__ */ Kge(!0);
- function Kge(t) {
- return ({ state: e, dispatch: n }) => {
- if (e.readOnly)
- return !1;
- let r = e.changeByRange((i) => {
- let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && $2t(e, a);
- t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
- let u = new s$(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = gB(u, a);
- for (c == null && (c = Fm(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
- o++;
- l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
- let f = ["", C_(e, c)];
- return l && f.push(C_(e, u.lineIndent(s.from, -1))), {
- changes: { from: a, to: o, insert: xn.of(f) },
- range: De.cursor(a + 1 + f[1].length)
- };
- });
- return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
- };
- }
- function SB(t, e) {
- let n = -1;
- return t.changeByRange((r) => {
- let i = [];
- for (let o = r.from; o <= r.to; ) {
- let s = t.doc.lineAt(o);
- s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
- }
- let a = t.changes(i);
- return {
- changes: i,
- range: De.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
- };
- });
- }
- const M2t = ({ state: t, dispatch: e }) => {
- if (t.readOnly)
- return !1;
- let n = /* @__PURE__ */ Object.create(null), r = new s$(t, { overrideIndentation: (a) => {
- let o = n[a];
- return o ?? -1;
- } }), i = SB(t, (a, o, s) => {
- let l = gB(r, a.from);
- if (l == null)
- return;
- /\S/.test(a.text) || (l = 0);
- let u = /^\s*/.exec(a.text)[0], c = C_(t, l);
- (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
- });
- return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
- }, Jge = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(SB(t, (n, r) => {
- r.push({ from: n.from, insert: t.facet(D1) });
- }), { userEvent: "input.indent" })), !0), eme = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(SB(t, (n, r) => {
- let i = /^\s*/.exec(n.text)[0];
- if (!i)
- return;
- let a = Fm(i, t.tabSize), o = 0, s = C_(t, Math.max(0, a - NT(t)));
- for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
- o++;
- r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
- }), { userEvent: "delete.dedent" })), !0), I2t = (t) => (t.setTabFocusMode(), !0), D2t = [
- { key: "Ctrl-b", run: Ege, shift: zge, preventDefault: !0 },
- { key: "Ctrl-f", run: Mge, shift: Vge },
- { key: "Ctrl-p", run: Rge, shift: Qge },
- { key: "Ctrl-n", run: kge, shift: Hge },
- { key: "Ctrl-a", run: JTt, shift: f2t },
- { key: "Ctrl-e", run: e2t, shift: d2t },
- { key: "Ctrl-d", run: Zge },
- { key: "Ctrl-h", run: W4 },
- { key: "Ctrl-k", run: y2t },
- { key: "Ctrl-Alt-h", run: Xge },
- { key: "Ctrl-o", run: O2t },
- { key: "Ctrl-t", run: S2t },
- { key: "Ctrl-v", run: F4 }
- ], R2t = /* @__PURE__ */ [
- { key: "ArrowLeft", run: Ege, shift: zge, preventDefault: !0 },
- { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: HTt, shift: r2t, preventDefault: !0 },
- { mac: "Cmd-ArrowLeft", run: qTt, shift: u2t, preventDefault: !0 },
- { key: "ArrowRight", run: Mge, shift: Vge, preventDefault: !0 },
- { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: GTt, shift: i2t, preventDefault: !0 },
- { mac: "Cmd-ArrowRight", run: KTt, shift: c2t, preventDefault: !0 },
- { key: "ArrowUp", run: Rge, shift: Qge, preventDefault: !0 },
- { mac: "Cmd-ArrowUp", run: _J, shift: SJ },
- { mac: "Ctrl-ArrowUp", run: mJ, shift: yJ },
- { key: "ArrowDown", run: kge, shift: Hge, preventDefault: !0 },
- { mac: "Cmd-ArrowDown", run: OJ, shift: xJ },
- { mac: "Ctrl-ArrowDown", run: F4, shift: bJ },
- { key: "PageUp", run: mJ, shift: yJ },
- { key: "PageDown", run: F4, shift: bJ },
- { key: "Home", run: YTt, shift: l2t, preventDefault: !0 },
- { key: "Mod-Home", run: _J, shift: SJ },
- { key: "End", run: XTt, shift: s2t, preventDefault: !0 },
- { key: "Mod-End", run: OJ, shift: xJ },
- { key: "Enter", run: A2t },
- { key: "Mod-a", run: h2t },
- { key: "Backspace", run: W4, shift: W4 },
- { key: "Delete", run: Zge },
- { key: "Mod-Backspace", mac: "Alt-Backspace", run: Xge },
- { key: "Mod-Delete", mac: "Alt-Delete", run: m2t },
- { mac: "Mod-Backspace", run: b2t },
- { mac: "Mod-Delete", run: _2t }
- ].concat(/* @__PURE__ */ D2t.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), k2t = /* @__PURE__ */ [
- { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: ZTt, shift: a2t },
- { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: UTt, shift: o2t },
- { key: "Alt-ArrowUp", run: x2t },
- { key: "Shift-Alt-ArrowUp", run: C2t },
- { key: "Alt-ArrowDown", run: w2t },
- { key: "Shift-Alt-ArrowDown", run: T2t },
- { key: "Escape", run: g2t },
- { key: "Mod-Enter", run: E2t },
- { key: "Alt-l", mac: "Ctrl-l", run: p2t },
- { key: "Mod-i", run: v2t, preventDefault: !0 },
- { key: "Mod-[", run: eme },
- { key: "Mod-]", run: Jge },
- { key: "Mod-Alt-\\", run: M2t },
- { key: "Shift-Mod-k", run: P2t },
- { key: "Shift-Mod-\\", run: n2t },
- { key: "Mod-/", run: CTt },
- { key: "Alt-A", run: PTt },
- { key: "Ctrl-m", mac: "Shift-Alt-m", run: I2t }
- ].concat(R2t), L2t = { key: "Tab", run: Jge, shift: eme };
- function Yn() {
- var t = arguments[0];
- typeof t == "string" && (t = document.createElement(t));
- var e = 1, n = arguments[1];
- if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
- for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
- var i = n[r];
- typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
- }
- e++;
- }
- for (; e < arguments.length; e++) tme(t, arguments[e]);
- return t;
- }
- function tme(t, e) {
- if (typeof e == "string")
- t.appendChild(document.createTextNode(e));
- else if (e != null) if (e.nodeType != null)
- t.appendChild(e);
- else if (Array.isArray(e))
- for (var n = 0; n < e.length; n++) tme(t, e[n]);
- else
- throw new RangeError("Unsupported child node: " + e);
- }
- const wJ = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
- class nm {
- /**
- Create a text cursor. The query is the search string, `from` to
- `to` provides the region to search.
-
- When `normalize` is given, it will be called, on both the query
- string and the content it is matched against, before comparing.
- You can, for example, create a case-insensitive search by
- passing `s => s.toLowerCase()`.
-
- Text is always normalized with
- [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
- (when supported).
- */
- constructor(e, n, r = 0, i = e.length, a, o) {
- this.test = o, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(r, i), this.bufferStart = r, this.normalize = a ? (s) => a(wJ(s)) : wJ, this.query = this.normalize(n);
- }
- peek() {
- if (this.bufferPos == this.buffer.length) {
- if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
- return -1;
- this.bufferPos = 0, this.buffer = this.iter.value;
- }
- return bi(this.buffer, this.bufferPos);
- }
- /**
- Look for the next match. Updates the iterator's
- [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
- [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
- at least once before using the cursor.
- */
- next() {
- for (; this.matches.length; )
- this.matches.pop();
- return this.nextOverlapping();
- }
- /**
- The `next` method will ignore matches that partially overlap a
- previous match. This method behaves like `next`, but includes
- such matches.
- */
- nextOverlapping() {
- for (; ; ) {
- let e = this.peek();
- if (e < 0)
- return this.done = !0, this;
- let n = K6(e), r = this.bufferStart + this.bufferPos;
- this.bufferPos += jo(e);
- let i = this.normalize(n);
- for (let a = 0, o = r; ; a++) {
- let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
- if (a == i.length - 1) {
- if (l)
- return this.value = l, this;
- break;
- }
- o == r && a < n.length && n.charCodeAt(a) == s && o++;
- }
- }
- }
- match(e, n, r) {
- let i = null;
- for (let a = 0; a < this.matches.length; a += 2) {
- let o = this.matches[a], s = !1;
- this.query.charCodeAt(o) == e && (o == this.query.length - 1 ? i = { from: this.matches[a + 1], to: r } : (this.matches[a]++, s = !0)), s || (this.matches.splice(a, 2), a -= 2);
- }
- return this.query.charCodeAt(0) == e && (this.query.length == 1 ? i = { from: n, to: r } : this.matches.push(1, n)), i && this.test && !this.test(i.from, i.to, this.buffer, this.bufferStart) && (i = null), i;
- }
- }
- typeof Symbol < "u" && (nm.prototype[Symbol.iterator] = function() {
- return this;
- });
- const nme = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, xB = "gm" + (/x/.unicode == null ? "" : "u");
- class rme {
- /**
- Create a cursor that will search the given range in the given
- document. `query` should be the raw pattern (as you'd pass it to
- `new RegExp`).
- */
- constructor(e, n, r, i = 0, a = e.length) {
- if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = nme, /\\[sWDnr]|\n|\r|\[\^/.test(n))
- return new ime(e, n, r, i, a);
- this.re = new RegExp(n, xB + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
- let o = e.lineAt(i);
- this.curLineStart = o.from, this.matchPos = FT(e, i), this.getLine(this.curLineStart);
- }
- getLine(e) {
- this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
- }
- nextLine() {
- this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
- }
- /**
- Move to the next match, if there is one.
- */
- next() {
- for (let e = this.matchPos - this.curLineStart; ; ) {
- this.re.lastIndex = e;
- let n = this.matchPos <= this.to && this.re.exec(this.curLine);
- if (n) {
- let r = this.curLineStart + n.index, i = r + n[0].length;
- if (this.matchPos = FT(this.text, i + (r == i ? 1 : 0)), r == this.curLineStart + this.curLine.length && this.nextLine(), (r < i || r > this.value.to) && (!this.test || this.test(r, i, n)))
- return this.value = { from: r, to: i, match: n }, this;
- e = this.matchPos - this.curLineStart;
- } else if (this.curLineStart + this.curLine.length < this.to)
- this.nextLine(), e = 0;
- else
- return this.done = !0, this;
- }
- }
- }
- const bD = /* @__PURE__ */ new WeakMap();
- class sg {
- constructor(e, n) {
- this.from = e, this.text = n;
- }
- get to() {
- return this.from + this.text.length;
- }
- static get(e, n, r) {
- let i = bD.get(e);
- if (!i || i.from >= r || i.to <= n) {
- let s = new sg(n, e.sliceString(n, r));
- return bD.set(e, s), s;
- }
- if (i.from == n && i.to == r)
- return i;
- let { text: a, from: o } = i;
- return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), bD.set(e, new sg(o, a)), new sg(n, a.slice(n - o, r - o));
- }
- }
- class ime {
- constructor(e, n, r, i, a) {
- this.text = e, this.to = a, this.done = !1, this.value = nme, this.matchPos = FT(e, i), this.re = new RegExp(n, xB + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = sg.get(e, i, this.chunkEnd(
- i + 5e3
- /* Chunk.Base */
- ));
- }
- chunkEnd(e) {
- return e >= this.to ? this.to : this.text.lineAt(e).to;
- }
- next() {
- for (; ; ) {
- let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
- if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
- let r = this.flat.from + n.index, i = r + n[0].length;
- if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
- return this.value = { from: r, to: i, match: n }, this.matchPos = FT(this.text, i + (r == i ? 1 : 0)), this;
- }
- if (this.flat.to == this.to)
- return this.done = !0, this;
- this.flat = sg.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
- }
- }
- }
- typeof Symbol < "u" && (rme.prototype[Symbol.iterator] = ime.prototype[Symbol.iterator] = function() {
- return this;
- });
- function N2t(t) {
- try {
- return new RegExp(t, xB), !0;
- } catch {
- return !1;
- }
- }
- function FT(t, e) {
- if (e >= t.length)
- return e;
- let n = t.lineAt(e), r;
- for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
- e++;
- return e;
- }
- function Q4(t) {
- let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = Yn("input", { class: "cm-textfield", name: "line", value: e }), r = Yn("form", {
- class: "cm-gotoLine",
- onkeydown: (a) => {
- a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: WT.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
- },
- onsubmit: (a) => {
- a.preventDefault(), i();
- }
- }, Yn("label", t.state.phrase("Go to line"), ": ", n), " ", Yn("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
- function i() {
- let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
- if (!a)
- return;
- let { state: o } = t, s = o.doc.lineAt(o.selection.main.head), [, l, u, c, f] = a, d = c ? +c.slice(1) : 0, h = u ? +u : s.number;
- if (u && f) {
- let g = h / 100;
- l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
- } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
- let p = o.doc.line(Math.max(1, Math.min(o.doc.lines, h))), v = De.cursor(p.from + Math.max(0, Math.min(d, p.length)));
- t.dispatch({
- effects: [WT.of(!1), rt.scrollIntoView(v.from, { y: "center" })],
- selection: v
- }), t.focus();
- }
- return { dom: r };
- }
- const WT = /* @__PURE__ */ zt.define(), CJ = /* @__PURE__ */ fi.define({
- create() {
- return !0;
- },
- update(t, e) {
- for (let n of e.effects)
- n.is(WT) && (t = n.value);
- return t;
- },
- provide: (t) => S_.from(t, (e) => e ? Q4 : null)
- }), B2t = (t) => {
- let e = O_(t, Q4);
- if (!e) {
- let n = [WT.of(!0)];
- t.state.field(CJ, !1) == null && n.push(zt.appendConfig.of([CJ, z2t])), t.dispatch({ effects: n }), e = O_(t, Q4);
- }
- return e && e.dom.querySelector("input").select(), !0;
- }, z2t = /* @__PURE__ */ rt.baseTheme({
- ".cm-panel.cm-gotoLine": {
- padding: "2px 6px 4px",
- "& label": { fontSize: "80%" }
- }
- }), V2t = {
- highlightWordAroundCursor: !1,
- minSelectionLength: 1,
- maxMatches: 100,
- wholeWords: !1
- }, F2t = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, V2t, {
- highlightWordAroundCursor: (e, n) => e || n,
- minSelectionLength: Math.min,
- maxMatches: Math.min
- });
- }
- });
- function W2t(t) {
- return [Z2t, j2t];
- }
- const Q2t = /* @__PURE__ */ pt.mark({ class: "cm-selectionMatch" }), H2t = /* @__PURE__ */ pt.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
- function TJ(t, e, n, r) {
- return (n == 0 || t(e.sliceDoc(n - 1, n)) != lr.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != lr.Word);
- }
- function G2t(t, e, n, r) {
- return t(e.sliceDoc(n, n + 1)) == lr.Word && t(e.sliceDoc(r - 1, r)) == lr.Word;
- }
- const j2t = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.decorations = this.getDeco(t);
- }
- update(t) {
- (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
- }
- getDeco(t) {
- let e = t.state.facet(F2t), { state: n } = t, r = n.selection;
- if (r.ranges.length > 1)
- return pt.none;
- let i = r.main, a, o = null;
- if (i.empty) {
- if (!e.highlightWordAroundCursor)
- return pt.none;
- let l = n.wordAt(i.head);
- if (!l)
- return pt.none;
- o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
- } else {
- let l = i.to - i.from;
- if (l < e.minSelectionLength || l > 200)
- return pt.none;
- if (e.wholeWords) {
- if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(TJ(o, n, i.from, i.to) && G2t(o, n, i.from, i.to)))
- return pt.none;
- } else if (a = n.sliceDoc(i.from, i.to), !a)
- return pt.none;
- }
- let s = [];
- for (let l of t.visibleRanges) {
- let u = new nm(n.doc, a, l.from, l.to);
- for (; !u.next().done; ) {
- let { from: c, to: f } = u.value;
- if ((!o || TJ(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(H2t.range(c, f)) : (c >= i.to || f <= i.from) && s.push(Q2t.range(c, f)), s.length > e.maxMatches))
- return pt.none;
- }
- }
- return pt.set(s);
- }
- }, {
- decorations: (t) => t.decorations
- }), Z2t = /* @__PURE__ */ rt.baseTheme({
- ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
- ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
- }), U2t = ({ state: t, dispatch: e }) => {
- let { selection: n } = t, r = De.create(n.ranges.map((i) => t.wordAt(i.head) || De.cursor(i.head)), n.mainIndex);
- return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
- };
- function X2t(t, e) {
- let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
- for (let o = !1, s = new nm(t.doc, e, r[r.length - 1].to); ; )
- if (s.next(), s.done) {
- if (o)
- return null;
- s = new nm(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
- } else {
- if (o && r.some((l) => l.from == s.value.from))
- continue;
- if (a) {
- let l = t.wordAt(s.value.from);
- if (!l || l.from != s.value.from || l.to != s.value.to)
- continue;
- }
- return s.value;
- }
- }
- const Y2t = ({ state: t, dispatch: e }) => {
- let { ranges: n } = t.selection;
- if (n.some((a) => a.from === a.to))
- return U2t({ state: t, dispatch: e });
- let r = t.sliceDoc(n[0].from, n[0].to);
- if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
- return !1;
- let i = X2t(t, r);
- return i ? (e(t.update({
- selection: t.selection.addRange(De.range(i.from, i.to), !1),
- effects: rt.scrollIntoView(i.to)
- })), !0) : !1;
- }, Qm = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, {
- top: !1,
- caseSensitive: !1,
- literal: !1,
- regexp: !1,
- wholeWord: !1,
- createPanel: (e) => new lPt(e),
- scrollToMatch: (e) => rt.scrollIntoView(e)
- });
- }
- });
- class ame {
- /**
- Create a query object.
- */
- constructor(e) {
- this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || N2t(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
- }
- /**
- @internal
- */
- unquote(e) {
- return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
- ` : r == "r" ? "\r" : r == "t" ? " " : "\\");
- }
- /**
- Compare this query to another query.
- */
- eq(e) {
- return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
- }
- /**
- @internal
- */
- create() {
- return this.regexp ? new ePt(this) : new K2t(this);
- }
- /**
- Get a search cursor for this query, searching through the given
- range in the given state.
- */
- getCursor(e, n = 0, r) {
- let i = e.doc ? e : cn.create({ doc: e });
- return r == null && (r = i.doc.length), this.regexp ? Tv(this, i, n, r) : Cv(this, i, n, r);
- }
- }
- class ome {
- constructor(e) {
- this.spec = e;
- }
- }
- function Cv(t, e, n, r) {
- return new nm(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? q2t(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
- }
- function q2t(t, e) {
- return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = t.sliceString(a, Math.min(t.length, r + 2))), (e(QT(i, n - a)) != lr.Word || e(HT(i, n - a)) != lr.Word) && (e(HT(i, r - a)) != lr.Word || e(QT(i, r - a)) != lr.Word));
- }
- class K2t extends ome {
- constructor(e) {
- super(e);
- }
- nextMatch(e, n, r) {
- let i = Cv(this.spec, e, r, e.doc.length).nextOverlapping();
- return i.done && (i = Cv(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
- }
- // Searching in reverse is, rather than implementing an inverted search
- // cursor, done by scanning chunk after chunk forward.
- prevMatchInRange(e, n, r) {
- for (let i = r; ; ) {
- let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Cv(this.spec, e, a, i), s = null;
- for (; !o.nextOverlapping().done; )
- s = o.value;
- if (s)
- return s;
- if (a == n)
- return null;
- i -= 1e4;
- }
- }
- prevMatch(e, n, r) {
- return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
- }
- getReplacement(e) {
- return this.spec.unquote(this.spec.replace);
- }
- matchAll(e, n) {
- let r = Cv(this.spec, e, 0, e.doc.length), i = [];
- for (; !r.next().done; ) {
- if (i.length >= n)
- return null;
- i.push(r.value);
- }
- return i;
- }
- highlight(e, n, r, i) {
- let a = Cv(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
- for (; !a.next().done; )
- i(a.value.from, a.value.to);
- }
- }
- function Tv(t, e, n, r) {
- return new rme(e.doc, t.search, {
- ignoreCase: !t.caseSensitive,
- test: t.wholeWord ? J2t(e.charCategorizer(e.selection.main.head)) : void 0
- }, n, r);
- }
- function QT(t, e) {
- return t.slice(wi(t, e, !1), e);
- }
- function HT(t, e) {
- return t.slice(e, wi(t, e));
- }
- function J2t(t) {
- return (e, n, r) => !r[0].length || (t(QT(r.input, r.index)) != lr.Word || t(HT(r.input, r.index)) != lr.Word) && (t(HT(r.input, r.index + r[0].length)) != lr.Word || t(QT(r.input, r.index + r[0].length)) != lr.Word);
- }
- class ePt extends ome {
- nextMatch(e, n, r) {
- let i = Tv(this.spec, e, r, e.doc.length).next();
- return i.done && (i = Tv(this.spec, e, 0, n).next()), i.done ? null : i.value;
- }
- prevMatchInRange(e, n, r) {
- for (let i = 1; ; i++) {
- let a = Math.max(
- n,
- r - i * 1e4
- /* FindPrev.ChunkSize */
- ), o = Tv(this.spec, e, a, r), s = null;
- for (; !o.next().done; )
- s = o.value;
- if (s && (a == n || s.from > a + 10))
- return s;
- if (a == n)
- return null;
- }
- }
- prevMatch(e, n, r) {
- return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
- }
- getReplacement(e) {
- return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (n, r) => r == "$" ? "$" : r == "&" ? e.match[0] : r != "0" && +r < e.match.length ? e.match[r] : n);
- }
- matchAll(e, n) {
- let r = Tv(this.spec, e, 0, e.doc.length), i = [];
- for (; !r.next().done; ) {
- if (i.length >= n)
- return null;
- i.push(r.value);
- }
- return i;
- }
- highlight(e, n, r, i) {
- let a = Tv(this.spec, e, Math.max(
- 0,
- n - 250
- /* RegExp.HighlightMargin */
- ), Math.min(r + 250, e.doc.length));
- for (; !a.next().done; )
- i(a.value.from, a.value.to);
- }
- }
- const T_ = /* @__PURE__ */ zt.define(), wB = /* @__PURE__ */ zt.define(), uf = /* @__PURE__ */ fi.define({
- create(t) {
- return new _D(H4(t).create(), null);
- },
- update(t, e) {
- for (let n of e.effects)
- n.is(T_) ? t = new _D(n.value.create(), t.panel) : n.is(wB) && (t = new _D(t.query, n.value ? CB : null));
- return t;
- },
- provide: (t) => S_.from(t, (e) => e.panel)
- });
- class _D {
- constructor(e, n) {
- this.query = e, this.panel = n;
- }
- }
- const tPt = /* @__PURE__ */ pt.mark({ class: "cm-searchMatch" }), nPt = /* @__PURE__ */ pt.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), rPt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.decorations = this.highlight(t.state.field(uf));
- }
- update(t) {
- let e = t.state.field(uf);
- (e != t.startState.field(uf) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
- }
- highlight({ query: t, panel: e }) {
- if (!e || !t.spec.valid)
- return pt.none;
- let { view: n } = this, r = new wf();
- for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
- let { from: s, to: l } = a[i];
- for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
- l = a[++i].to;
- t.highlight(n.state, s, l, (u, c) => {
- let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
- r.add(u, c, f ? nPt : tPt);
- });
- }
- return r.finish();
- }
- }, {
- decorations: (t) => t.decorations
- });
- function N1(t) {
- return (e) => {
- let n = e.state.field(uf, !1);
- return n && n.query.spec.valid ? t(e, n) : ume(e);
- };
- }
- const GT = /* @__PURE__ */ N1((t, { query: e }) => {
- let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
- if (!r)
- return !1;
- let i = De.single(r.from, r.to), a = t.state.facet(Qm);
- return t.dispatch({
- selection: i,
- effects: [TB(t, r), a.scrollToMatch(i.main, t)],
- userEvent: "select.search"
- }), lme(t), !0;
- }), jT = /* @__PURE__ */ N1((t, { query: e }) => {
- let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
- if (!i)
- return !1;
- let a = De.single(i.from, i.to), o = t.state.facet(Qm);
- return t.dispatch({
- selection: a,
- effects: [TB(t, i), o.scrollToMatch(a.main, t)],
- userEvent: "select.search"
- }), lme(t), !0;
- }), iPt = /* @__PURE__ */ N1((t, { query: e }) => {
- let n = e.matchAll(t.state, 1e3);
- return !n || !n.length ? !1 : (t.dispatch({
- selection: De.create(n.map((r) => De.range(r.from, r.to))),
- userEvent: "select.search.matches"
- }), !0);
- }), aPt = ({ state: t, dispatch: e }) => {
- let n = t.selection;
- if (n.ranges.length > 1 || n.main.empty)
- return !1;
- let { from: r, to: i } = n.main, a = [], o = 0;
- for (let s = new nm(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
- if (a.length > 1e3)
- return !1;
- s.value.from == r && (o = a.length), a.push(De.range(s.value.from, s.value.to));
- }
- return e(t.update({
- selection: De.create(a, o),
- userEvent: "select.search.matches"
- })), !0;
- }, PJ = /* @__PURE__ */ N1((t, { query: e }) => {
- let { state: n } = t, { from: r, to: i } = n.selection.main;
- if (n.readOnly)
- return !1;
- let a = e.nextMatch(n, r, r);
- if (!a)
- return !1;
- let o = [], s, l, u = [];
- if (a.from == r && a.to == i && (l = n.toText(e.getReplacement(a)), o.push({ from: a.from, to: a.to, insert: l }), a = e.nextMatch(n, a.from, a.to), u.push(rt.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))), a) {
- let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
- s = De.single(a.from - c, a.to - c), u.push(TB(t, a)), u.push(n.facet(Qm).scrollToMatch(s.main, t));
- }
- return t.dispatch({
- changes: o,
- selection: s,
- effects: u,
- userEvent: "input.replace"
- }), !0;
- }), oPt = /* @__PURE__ */ N1((t, { query: e }) => {
- if (t.state.readOnly)
- return !1;
- let n = e.matchAll(t.state, 1e9).map((i) => {
- let { from: a, to: o } = i;
- return { from: a, to: o, insert: e.getReplacement(i) };
- });
- if (!n.length)
- return !1;
- let r = t.state.phrase("replaced $ matches", n.length) + ".";
- return t.dispatch({
- changes: n,
- effects: rt.announce.of(r),
- userEvent: "input.replace.all"
- }), !0;
- });
- function CB(t) {
- return t.state.facet(Qm).createPanel(t);
- }
- function H4(t, e) {
- var n, r, i, a, o;
- let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
- if (e && !l)
- return e;
- let u = t.facet(Qm);
- return new ame({
- search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
- caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
- literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
- regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
- wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
- });
- }
- function sme(t) {
- let e = O_(t, CB);
- return e && e.dom.querySelector("[main-field]");
- }
- function lme(t) {
- let e = sme(t);
- e && e == t.root.activeElement && e.select();
- }
- const ume = (t) => {
- let e = t.state.field(uf, !1);
- if (e && e.panel) {
- let n = sme(t);
- if (n && n != t.root.activeElement) {
- let r = H4(t.state, e.query.spec);
- r.valid && t.dispatch({ effects: T_.of(r) }), n.focus(), n.select();
- }
- } else
- t.dispatch({ effects: [
- wB.of(!0),
- e ? T_.of(H4(t.state, e.query.spec)) : zt.appendConfig.of(cPt)
- ] });
- return !0;
- }, cme = (t) => {
- let e = t.state.field(uf, !1);
- if (!e || !e.panel)
- return !1;
- let n = O_(t, CB);
- return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: wB.of(!1) }), !0;
- }, sPt = [
- { key: "Mod-f", run: ume, scope: "editor search-panel" },
- { key: "F3", run: GT, shift: jT, scope: "editor search-panel", preventDefault: !0 },
- { key: "Mod-g", run: GT, shift: jT, scope: "editor search-panel", preventDefault: !0 },
- { key: "Escape", run: cme, scope: "editor search-panel" },
- { key: "Mod-Shift-l", run: aPt },
- { key: "Mod-Alt-g", run: B2t },
- { key: "Mod-d", run: Y2t, preventDefault: !0 }
- ];
- class lPt {
- constructor(e) {
- this.view = e;
- let n = this.query = e.state.field(uf).query.spec;
- this.commit = this.commit.bind(this), this.searchField = Yn("input", {
- value: n.search,
- placeholder: Ya(e, "Find"),
- "aria-label": Ya(e, "Find"),
- class: "cm-textfield",
- name: "search",
- form: "",
- "main-field": "true",
- onchange: this.commit,
- onkeyup: this.commit
- }), this.replaceField = Yn("input", {
- value: n.replace,
- placeholder: Ya(e, "Replace"),
- "aria-label": Ya(e, "Replace"),
- class: "cm-textfield",
- name: "replace",
- form: "",
- onchange: this.commit,
- onkeyup: this.commit
- }), this.caseField = Yn("input", {
- type: "checkbox",
- name: "case",
- form: "",
- checked: n.caseSensitive,
- onchange: this.commit
- }), this.reField = Yn("input", {
- type: "checkbox",
- name: "re",
- form: "",
- checked: n.regexp,
- onchange: this.commit
- }), this.wordField = Yn("input", {
- type: "checkbox",
- name: "word",
- form: "",
- checked: n.wholeWord,
- onchange: this.commit
- });
- function r(i, a, o) {
- return Yn("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
- }
- this.dom = Yn("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
- this.searchField,
- r("next", () => GT(e), [Ya(e, "next")]),
- r("prev", () => jT(e), [Ya(e, "previous")]),
- r("select", () => iPt(e), [Ya(e, "all")]),
- Yn("label", null, [this.caseField, Ya(e, "match case")]),
- Yn("label", null, [this.reField, Ya(e, "regexp")]),
- Yn("label", null, [this.wordField, Ya(e, "by word")]),
- ...e.state.readOnly ? [] : [
- Yn("br"),
- this.replaceField,
- r("replace", () => PJ(e), [Ya(e, "replace")]),
- r("replaceAll", () => oPt(e), [Ya(e, "replace all")])
- ],
- Yn("button", {
- name: "close",
- onclick: () => cme(e),
- "aria-label": Ya(e, "close"),
- type: "button"
- }, ["×"])
- ]);
- }
- commit() {
- let e = new ame({
- search: this.searchField.value,
- caseSensitive: this.caseField.checked,
- regexp: this.reField.checked,
- wholeWord: this.wordField.checked,
- replace: this.replaceField.value
- });
- e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: T_.of(e) }));
- }
- keydown(e) {
- bwt(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? jT : GT)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), PJ(this.view));
- }
- update(e) {
- for (let n of e.transactions)
- for (let r of n.effects)
- r.is(T_) && !r.value.eq(this.query) && this.setQuery(r.value);
- }
- setQuery(e) {
- this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
- }
- mount() {
- this.searchField.select();
- }
- get pos() {
- return 80;
- }
- get top() {
- return this.view.state.facet(Qm).top;
- }
- }
- function Ya(t, e) {
- return t.state.phrase(e);
- }
- const Cx = 30, Tx = /[\s\.,:;?!]/;
- function TB(t, { from: e, to: n }) {
- let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - Cx), o = Math.min(i, n + Cx), s = t.state.sliceDoc(a, o);
- if (a != r.from) {
- for (let l = 0; l < Cx; l++)
- if (!Tx.test(s[l + 1]) && Tx.test(s[l])) {
- s = s.slice(l);
- break;
- }
- }
- if (o != i) {
- for (let l = s.length - 1; l > s.length - Cx; l--)
- if (!Tx.test(s[l - 1]) && Tx.test(s[l])) {
- s = s.slice(0, l);
- break;
- }
- }
- return rt.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
- }
- const uPt = /* @__PURE__ */ rt.baseTheme({
- ".cm-panel.cm-search": {
- padding: "2px 6px 4px",
- position: "relative",
- "& [name=close]": {
- position: "absolute",
- top: "0",
- right: "4px",
- backgroundColor: "inherit",
- border: "none",
- font: "inherit",
- padding: 0,
- margin: 0
- },
- "& input, & button, & label": {
- margin: ".2em .6em .2em 0"
- },
- "& input[type=checkbox]": {
- marginRight: ".2em"
- },
- "& label": {
- fontSize: "80%",
- whiteSpace: "pre"
- }
- },
- "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
- "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
- "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
- "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
- }), cPt = [
- uf,
- /* @__PURE__ */ Ff.low(rPt),
- uPt
- ];
- class fme {
- /**
- Create a new completion context. (Mostly useful for testing
- completion sources—in the editor, the extension will create
- these for you.)
- */
- constructor(e, n, r, i) {
- this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
- }
- /**
- Get the extent, content, and (if there is a token) type of the
- token before `this.pos`.
- */
- tokenBefore(e) {
- let n = ni(this.state).resolveInner(this.pos, -1);
- for (; n && e.indexOf(n.name) < 0; )
- n = n.parent;
- return n ? {
- from: n.from,
- to: this.pos,
- text: this.state.sliceDoc(n.from, this.pos),
- type: n.type
- } : null;
- }
- /**
- Get the match of the given expression directly before the
- cursor.
- */
- matchBefore(e) {
- let n = this.state.doc.lineAt(this.pos), r = Math.max(n.from, this.pos - 250), i = n.text.slice(r - n.from, this.pos - n.from), a = i.search(hme(e, !1));
- return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
- }
- /**
- Yields true when the query has been aborted. Can be useful in
- asynchronous queries to avoid doing work that will be ignored.
- */
- get aborted() {
- return this.abortListeners == null;
- }
- /**
- Allows you to register abort handlers, which will be called when
- the query is
- [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
- */
- addEventListener(e, n) {
- e == "abort" && this.abortListeners && this.abortListeners.push(n);
- }
- }
- function $J(t) {
- let e = Object.keys(t).join(""), n = /\w/.test(e);
- return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
- }
- function fPt(t) {
- let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
- for (let { label: i } of t) {
- e[i[0]] = !0;
- for (let a = 1; a < i.length; a++)
- n[i[a]] = !0;
- }
- let r = $J(e) + $J(n) + "*$";
- return [new RegExp("^" + r), new RegExp(r)];
- }
- function dme(t) {
- let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : fPt(e);
- return (i) => {
- let a = i.matchBefore(r);
- return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
- };
- }
- function dPt(t, e) {
- return (n) => {
- for (let r = ni(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
- if (t.indexOf(r.name) > -1)
- return null;
- if (r.type.isTop)
- break;
- }
- return e(n);
- };
- }
- class AJ {
- constructor(e, n, r, i) {
- this.completion = e, this.source = n, this.match = r, this.score = i;
- }
- }
- function cf(t) {
- return t.selection.main.from;
- }
- function hme(t, e) {
- var n;
- let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
- return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
- }
- const PB = /* @__PURE__ */ ac.define();
- function hPt(t, e, n, r) {
- let { main: i } = t.selection, a = n - i.from, o = r - i.from;
- return Object.assign(Object.assign({}, t.changeByRange((s) => s != i && n != r && t.sliceDoc(s.from + a, s.from + o) != t.sliceDoc(n, r) ? { range: s } : {
- changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
- range: De.cursor(s.from + a + e.length)
- })), { scrollIntoView: !0, userEvent: "input.complete" });
- }
- const EJ = /* @__PURE__ */ new WeakMap();
- function pPt(t) {
- if (!Array.isArray(t))
- return t;
- let e = EJ.get(t);
- return e || EJ.set(t, e = dme(t)), e;
- }
- const ZT = /* @__PURE__ */ zt.define(), P_ = /* @__PURE__ */ zt.define();
- class vPt {
- constructor(e) {
- this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
- for (let n = 0; n < e.length; ) {
- let r = bi(e, n), i = jo(r);
- this.chars.push(r);
- let a = e.slice(n, n + i), o = a.toUpperCase();
- this.folded.push(bi(o == a ? a.toLowerCase() : o, 0)), n += i;
- }
- this.astral = e.length != this.chars.length;
- }
- ret(e, n) {
- return this.score = e, this.matched = n, this;
- }
- // Matches a given word (completion) against the pattern (input).
- // Will return a boolean indicating whether there was a match and,
- // on success, set `this.score` to the score, `this.matched` to an
- // array of `from, to` pairs indicating the matched parts of `word`.
- //
- // The score is a number that is more negative the worse the match
- // is. See `Penalty` above.
- match(e) {
- if (this.pattern.length == 0)
- return this.ret(-100, []);
- if (e.length < this.pattern.length)
- return null;
- let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
- if (n.length == 1) {
- let y = bi(e, 0), _ = jo(y), O = _ == e.length ? 0 : -100;
- if (y != n[0]) if (y == r[0])
- O += -200;
- else
- return null;
- return this.ret(O, [0, _]);
- }
- let s = e.indexOf(this.pattern);
- if (s == 0)
- return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
- let l = n.length, u = 0;
- if (s < 0) {
- for (let y = 0, _ = Math.min(e.length, 200); y < _ && u < l; ) {
- let O = bi(e, y);
- (O == n[u] || O == r[u]) && (i[u++] = y), y += jo(O);
- }
- if (u < l)
- return null;
- }
- let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
- for (let y = 0, _ = Math.min(e.length, 200), O = 0; y < _ && f < l; ) {
- let S = bi(e, y);
- s < 0 && (c < l && S == n[c] && (a[c++] = y), h < l && (S == n[h] || S == r[h] ? (h == 0 && (p = y), v = y + 1, h++) : h = 0));
- let x, C = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (x = K6(S)) != x.toLowerCase() ? 1 : x != x.toUpperCase() ? 2 : 0;
- (!y || C == 1 && g || O == 0 && C != 0) && (n[f] == S || r[f] == S && (d = !0) ? o[f++] = y : o.length && (m = !1)), O = C, y += jo(S);
- }
- return f == l && o[0] == 0 && m ? this.result(-100 + (d ? -200 : 0), o, e) : h == l && p == 0 ? this.ret(-200 - e.length + (v == e.length ? 0 : -100), [0, v]) : s > -1 ? this.ret(-700 - e.length, [s, s + this.pattern.length]) : h == l ? this.ret(-900 - e.length, [p, v]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (m ? 0 : -1100), o, e) : n.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e);
- }
- result(e, n, r) {
- let i = [], a = 0;
- for (let o of n) {
- let s = o + (this.astral ? jo(bi(r, o)) : 1);
- a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
- }
- return this.ret(e - r.length, i);
- }
- }
- class gPt {
- constructor(e) {
- this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
- }
- match(e) {
- if (e.length < this.pattern.length)
- return null;
- let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
- return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
- }
- }
- const Si = /* @__PURE__ */ ut.define({
- combine(t) {
- return Kl(t, {
- activateOnTyping: !0,
- activateOnCompletion: () => !1,
- activateOnTypingDelay: 100,
- selectOnOpen: !0,
- override: null,
- closeOnBlur: !0,
- maxRenderedOptions: 100,
- defaultKeymap: !0,
- tooltipClass: () => "",
- optionClass: () => "",
- aboveCursor: !1,
- icons: !0,
- addToOptions: [],
- positionInfo: mPt,
- filterStrict: !1,
- compareCompletions: (e, n) => e.label.localeCompare(n.label),
- interactionDelay: 75,
- updateSyncTime: 100
- }, {
- defaultKeymap: (e, n) => e && n,
- closeOnBlur: (e, n) => e && n,
- icons: (e, n) => e && n,
- tooltipClass: (e, n) => (r) => MJ(e(r), n(r)),
- optionClass: (e, n) => (r) => MJ(e(r), n(r)),
- addToOptions: (e, n) => e.concat(n),
- filterStrict: (e, n) => e || n
- });
- }
- });
- function MJ(t, e) {
- return t ? e ? t + " " + e : t : e;
- }
- function mPt(t, e, n, r, i, a) {
- let o = t.textDirection == ir.RTL, s = o, l = !1, u = "top", c, f, d = e.left - i.left, h = i.right - e.right, p = r.right - r.left, v = r.bottom - r.top;
- if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
- c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
- else {
- l = !0, f = Math.min(
- 400,
- (o ? e.right : i.right - e.left) - 30
- /* Info.Margin */
- );
- let y = i.bottom - e.bottom;
- y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
- }
- let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
- return {
- style: `${u}: ${c / g}px; max-width: ${f / m}px`,
- class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
- };
- }
- function yPt(t) {
- let e = t.addToOptions.slice();
- return t.icons && e.push({
- render(n) {
- let r = document.createElement("div");
- return r.classList.add("cm-completionIcon"), n.type && r.classList.add(...n.type.split(/\s+/g).map((i) => "cm-completionIcon-" + i)), r.setAttribute("aria-hidden", "true"), r;
- },
- position: 20
- }), e.push({
- render(n, r, i, a) {
- let o = document.createElement("span");
- o.className = "cm-completionLabel";
- let s = n.displayLabel || n.label, l = 0;
- for (let u = 0; u < a.length; ) {
- let c = a[u++], f = a[u++];
- c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
- let d = o.appendChild(document.createElement("span"));
- d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
- }
- return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
- },
- position: 50
- }, {
- render(n) {
- if (!n.detail)
- return null;
- let r = document.createElement("span");
- return r.className = "cm-completionDetail", r.textContent = n.detail, r;
- },
- position: 80
- }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
- }
- function OD(t, e, n) {
- if (t <= n)
- return { from: 0, to: t };
- if (e < 0 && (e = 0), e <= t >> 1) {
- let i = Math.floor(e / n);
- return { from: i * n, to: (i + 1) * n };
- }
- let r = Math.floor((t - e) / n);
- return { from: t - (r + 1) * n, to: t - r * n };
- }
- class bPt {
- constructor(e, n, r) {
- this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
- read: () => this.measureInfo(),
- write: (l) => this.placeInfo(l),
- key: this
- }, this.space = null, this.currentClass = "";
- let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(Si);
- this.optionContent = yPt(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = OD(a.length, o, s.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => {
- let { options: u } = e.state.field(n).open;
- for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
- if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
- this.applyCompletion(e, u[+f[1]]), l.preventDefault();
- return;
- }
- }), this.dom.addEventListener("focusout", (l) => {
- let u = e.state.field(this.stateField, !1);
- u && u.tooltip && e.state.facet(Si).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: P_.of(null) });
- }), this.showOptions(a, i.id);
- }
- mount() {
- this.updateSel();
- }
- showOptions(e, n) {
- this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
- this.info && this.view.requestMeasure(this.placeInfoReq);
- });
- }
- update(e) {
- var n;
- let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
- if (this.updateTooltipClass(e.state), r != i) {
- let { options: a, selected: o, disabled: s } = r.open;
- (!i.open || i.open.options != a) && (this.range = OD(a.length, o, e.state.facet(Si).maxRenderedOptions), this.showOptions(a, r.id)), this.updateSel(), s != ((n = i.open) === null || n === void 0 ? void 0 : n.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!s);
- }
- }
- updateTooltipClass(e) {
- let n = this.tooltipClass(e);
- if (n != this.currentClass) {
- for (let r of this.currentClass.split(" "))
- r && this.dom.classList.remove(r);
- for (let r of n.split(" "))
- r && this.dom.classList.add(r);
- this.currentClass = n;
- }
- }
- positioned(e) {
- this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
- }
- updateSel() {
- let e = this.view.state.field(this.stateField), n = e.open;
- if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = OD(n.options.length, n.selected, this.view.state.facet(Si).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
- this.destroyInfo();
- let { completion: r } = n.options[n.selected], { info: i } = r;
- if (!i)
- return;
- let a = typeof i == "string" ? document.createTextNode(i) : i(r);
- if (!a)
- return;
- "then" in a ? a.then((o) => {
- o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
- }).catch((o) => Ia(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
- }
- }
- addInfoPane(e, n) {
- this.destroyInfo();
- let r = this.info = document.createElement("div");
- if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
- r.appendChild(e), this.infoDestroy = null;
- else {
- let { dom: i, destroy: a } = e;
- r.appendChild(i), this.infoDestroy = a || null;
- }
- this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
- }
- updateSelectedOption(e) {
- let n = null;
- for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
- r.nodeName != "LI" || !r.id ? i-- : i == e ? r.hasAttribute("aria-selected") || (r.setAttribute("aria-selected", "true"), n = r) : r.hasAttribute("aria-selected") && r.removeAttribute("aria-selected");
- return n && OPt(this.list, n), n;
- }
- measureInfo() {
- let e = this.dom.querySelector("[aria-selected]");
- if (!e || !this.info)
- return null;
- let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
- if (!a) {
- let o = this.dom.ownerDocument.defaultView || window;
- a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
- }
- return i.top > Math.min(a.bottom, n.bottom) - 10 || i.bottom < Math.max(a.top, n.top) + 10 ? null : this.view.state.facet(Si).positionInfo(this.view, n, i, r, a, this.dom);
- }
- placeInfo(e) {
- this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px");
- }
- createListBox(e, n, r) {
- const i = document.createElement("ul");
- i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
- let a = null;
- for (let o = r.from; o < r.to; o++) {
- let { completion: s, match: l } = e[o], { section: u } = s;
- if (u) {
- let d = typeof u == "string" ? u : u.name;
- if (d != a && (o > r.from || r.from == 0))
- if (a = d, typeof u != "string" && u.header)
- i.appendChild(u.header(u));
- else {
- let h = i.appendChild(document.createElement("completion-section"));
- h.textContent = d;
- }
- }
- const c = i.appendChild(document.createElement("li"));
- c.id = n + "-" + o, c.setAttribute("role", "option");
- let f = this.optionClass(s);
- f && (c.className = f);
- for (let d of this.optionContent) {
- let h = d(s, this.view.state, this.view, l);
- h && c.appendChild(h);
- }
- }
- return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
- }
- destroyInfo() {
- this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
- }
- destroy() {
- this.destroyInfo();
- }
- }
- function _Pt(t, e) {
- return (n) => new bPt(n, t, e);
- }
- function OPt(t, e) {
- let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
- r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
- }
- function IJ(t) {
- return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
- }
- function SPt(t, e) {
- let n = [], r = null, i = (u) => {
- n.push(u);
- let { section: c } = u.completion;
- if (c) {
- r || (r = []);
- let f = typeof c == "string" ? c : c.name;
- r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
- }
- }, a = e.facet(Si);
- for (let u of t)
- if (u.hasResult()) {
- let c = u.result.getMatch;
- if (u.result.filter === !1)
- for (let f of u.result.options)
- i(new AJ(f, u.source, c ? c(f) : [], 1e9 - n.length));
- else {
- let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new gPt(f) : new vPt(f);
- for (let p of u.result.options)
- if (d = h.match(p.label)) {
- let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
- i(new AJ(p, u.source, v, d.score + (p.boost || 0)));
- }
- }
- }
- if (r) {
- let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
- var p, v;
- return ((p = d.rank) !== null && p !== void 0 ? p : 1e9) - ((v = h.rank) !== null && v !== void 0 ? v : 1e9) || (d.name < h.name ? -1 : 1);
- };
- for (let d of r.sort(f))
- c -= 1e5, u[d.name] = c;
- for (let d of n) {
- let { section: h } = d.completion;
- h && (d.score += u[typeof h == "string" ? h : h.name]);
- }
- }
- let o = [], s = null, l = a.compareCompletions;
- for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
- let c = u.completion;
- !s || s.label != c.label || s.detail != c.detail || s.type != null && c.type != null && s.type != c.type || s.apply != c.apply || s.boost != c.boost ? o.push(u) : IJ(u.completion) > IJ(s) && (o[o.length - 1] = u), s = u.completion;
- }
- return o;
- }
- class Bv {
- constructor(e, n, r, i, a, o) {
- this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
- }
- setSelected(e, n) {
- return e == this.selected || e >= this.options.length ? this : new Bv(this.options, DJ(n, e), this.tooltip, this.timestamp, e, this.disabled);
- }
- static build(e, n, r, i, a) {
- let o = SPt(e, n);
- if (!o.length)
- return i && e.some(
- (l) => l.state == 1
- /* State.Pending */
- ) ? new Bv(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
- let s = n.facet(Si).selectOnOpen ? 0 : -1;
- if (i && i.selected != s && i.selected != -1) {
- let l = i.options[i.selected].completion;
- for (let u = 0; u < o.length; u++)
- if (o[u].completion == l) {
- s = u;
- break;
- }
- }
- return new Bv(o, DJ(r, s), {
- pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
- create: $Pt,
- above: a.aboveCursor
- }, i ? i.timestamp : Date.now(), s, !1);
- }
- map(e) {
- return new Bv(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
- }
- }
- class UT {
- constructor(e, n, r) {
- this.active = e, this.id = n, this.open = r;
- }
- static start() {
- return new UT(TPt, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
- }
- update(e) {
- let { state: n } = e, r = n.facet(Si), a = (r.override || n.languageDataAt("autocomplete", cf(n)).map(pPt)).map((s) => (this.active.find((u) => u.source == s) || new ro(
- s,
- this.active.some(
- (u) => u.state != 0
- /* State.Inactive */
- ) ? 1 : 0
- /* State.Inactive */
- )).update(e, r));
- a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
- let o = this.open;
- o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !xPt(a, this.active) ? o = Bv.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
- (s) => s.state == 1
- /* State.Pending */
- ) && (o = null), !o && a.every(
- (s) => s.state != 1
- /* State.Pending */
- ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new ro(
- s.source,
- 0
- /* State.Inactive */
- ) : s));
- for (let s of e.effects)
- s.is(gme) && (o = o && o.setSelected(s.value, this.id));
- return a == this.active && o == this.open ? this : new UT(a, this.id, o);
- }
- get tooltip() {
- return this.open ? this.open.tooltip : null;
- }
- get attrs() {
- return this.open ? this.open.attrs : this.active.length ? wPt : CPt;
- }
- }
- function xPt(t, e) {
- if (t == e)
- return !0;
- for (let n = 0, r = 0; ; ) {
- for (; n < t.length && !t[n].hasResult; )
- n++;
- for (; r < e.length && !e[r].hasResult; )
- r++;
- let i = n == t.length, a = r == e.length;
- if (i || a)
- return i == a;
- if (t[n++].result != e[r++].result)
- return !1;
- }
- }
- const wPt = {
- "aria-autocomplete": "list"
- }, CPt = {};
- function DJ(t, e) {
- let n = {
- "aria-autocomplete": "list",
- "aria-haspopup": "listbox",
- "aria-controls": t
- };
- return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
- }
- const TPt = [];
- function pme(t, e) {
- if (t.isUserEvent("input.complete")) {
- let r = t.annotation(PB);
- if (r && e.activateOnCompletion(r))
- return 12;
- }
- let n = t.isUserEvent("input.type");
- return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
- }
- class ro {
- constructor(e, n, r = -1) {
- this.source = e, this.state = n, this.explicitPos = r;
- }
- hasResult() {
- return !1;
- }
- update(e, n) {
- let r = pme(e, n), i = this;
- (r & 8 || r & 16 && this.touches(e)) && (i = new ro(
- i.source,
- 0
- /* State.Inactive */
- )), r & 4 && i.state == 0 && (i = new ro(
- this.source,
- 1
- /* State.Pending */
- )), i = i.updateFor(e, r);
- for (let a of e.effects)
- if (a.is(ZT))
- i = new ro(i.source, 1, a.value ? cf(e.state) : -1);
- else if (a.is(P_))
- i = new ro(
- i.source,
- 0
- /* State.Inactive */
- );
- else if (a.is(vme))
- for (let o of a.value)
- o.source == i.source && (i = o);
- return i;
- }
- updateFor(e, n) {
- return this.map(e.changes);
- }
- map(e) {
- return e.empty || this.explicitPos < 0 ? this : new ro(this.source, this.state, e.mapPos(this.explicitPos));
- }
- touches(e) {
- return e.changes.touchesRange(cf(e.state));
- }
- }
- class lg extends ro {
- constructor(e, n, r, i, a) {
- super(e, 2, n), this.result = r, this.from = i, this.to = a;
- }
- hasResult() {
- return !0;
- }
- updateFor(e, n) {
- var r;
- if (!(n & 3))
- return this.map(e.changes);
- let i = this.result;
- i.map && !e.changes.empty && (i = i.map(i, e.changes));
- let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = cf(e.state);
- if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && cf(e.startState) == this.from)
- return new ro(
- this.source,
- n & 4 ? 1 : 0
- /* State.Inactive */
- );
- let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
- return PPt(i.validFor, e.state, a, o) ? new lg(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new fme(e.state, s, l >= 0))) ? new lg(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : cf(e.state)) : new ro(this.source, 1, l);
- }
- map(e) {
- return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new lg(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new ro(
- this.source,
- 0
- /* State.Inactive */
- );
- }
- touches(e) {
- return e.changes.touchesRange(this.from, this.to);
- }
- }
- function PPt(t, e, n, r) {
- if (!t)
- return !1;
- let i = e.sliceDoc(n, r);
- return typeof t == "function" ? t(i, n, r, e) : hme(t, !0).test(i);
- }
- const vme = /* @__PURE__ */ zt.define({
- map(t, e) {
- return t.map((n) => n.map(e));
- }
- }), gme = /* @__PURE__ */ zt.define(), Ea = /* @__PURE__ */ fi.define({
- create() {
- return UT.start();
- },
- update(t, e) {
- return t.update(e);
- },
- provide: (t) => [
- uB.from(t, (e) => e.tooltip),
- rt.contentAttributes.from(t, (e) => e.attrs)
- ]
- });
- function $B(t, e) {
- const n = e.completion.apply || e.completion.label;
- let r = t.state.field(Ea).active.find((i) => i.source == e.source);
- return r instanceof lg ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, hPt(t.state, n, r.from, r.to)), { annotations: PB.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
- }
- const $Pt = /* @__PURE__ */ _Pt(Ea, $B);
- function Px(t, e = "option") {
- return (n) => {
- let r = n.state.field(Ea, !1);
- if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(Si).interactionDelay)
- return !1;
- let i = 1, a;
- e == "page" && (a = Uve(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
- let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
- return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: gme.of(s) }), !0;
- };
- }
- const APt = (t) => {
- let e = t.state.field(Ea, !1);
- return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Si).interactionDelay ? !1 : $B(t, e.open.options[e.open.selected]);
- }, EPt = (t) => t.state.field(Ea, !1) ? (t.dispatch({ effects: ZT.of(!0) }), !0) : !1, MPt = (t) => {
- let e = t.state.field(Ea, !1);
- return !e || !e.active.some(
- (n) => n.state != 0
- /* State.Inactive */
- ) ? !1 : (t.dispatch({ effects: P_.of(null) }), !0);
- };
- class IPt {
- constructor(e, n) {
- this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
- }
- }
- const DPt = 50, RPt = 1e3, kPt = /* @__PURE__ */ Ir.fromClass(class {
- constructor(t) {
- this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
- for (let e of t.state.field(Ea).active)
- e.state == 1 && this.startQuery(e);
- }
- update(t) {
- let e = t.state.field(Ea), n = t.state.facet(Si);
- if (!t.selectionSet && !t.docChanged && t.startState.field(Ea) == e)
- return;
- let r = t.transactions.some((a) => {
- let o = pme(a, n);
- return o & 8 || (a.selection || a.docChanged) && !(o & 3);
- });
- for (let a = 0; a < this.running.length; a++) {
- let o = this.running[a];
- if (r || o.updates.length + t.transactions.length > DPt && Date.now() - o.time > RPt) {
- for (let s of o.context.abortListeners)
- try {
- s();
- } catch (l) {
- Ia(this.view.state, l);
- }
- o.context.abortListeners = null, this.running.splice(a--, 1);
- } else
- o.updates.push(...t.transactions);
- }
- this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(ZT))) && (this.pendingStart = !0);
- let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
- if (this.debounceUpdate = e.active.some((a) => a.state == 1 && !this.running.some((o) => o.active.source == a.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0)
- for (let a of t.transactions)
- a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
- }
- startUpdate() {
- this.debounceUpdate = -1, this.pendingStart = !1;
- let { state: t } = this.view, e = t.field(Ea);
- for (let n of e.active)
- n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
- }
- startQuery(t) {
- let { state: e } = this.view, n = cf(e), r = new fme(e, n, t.explicitPos == n, this.view), i = new IPt(t, r);
- this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
- i.context.aborted || (i.done = a || null, this.scheduleAccept());
- }, (a) => {
- this.view.dispatch({ effects: P_.of(null) }), Ia(this.view.state, a);
- });
- }
- scheduleAccept() {
- this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Si).updateSyncTime));
- }
- // For each finished query in this.running, try to create a result
- // or, if appropriate, restart the query.
- accept() {
- var t;
- this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
- let e = [], n = this.view.state.facet(Si);
- for (let r = 0; r < this.running.length; r++) {
- let i = this.running[r];
- if (i.done === void 0)
- continue;
- if (this.running.splice(r--, 1), i.done) {
- let o = new lg(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : cf(i.updates.length ? i.updates[0].startState : this.view.state));
- for (let s of i.updates)
- o = o.update(s, n);
- if (o.hasResult()) {
- e.push(o);
- continue;
- }
- }
- let a = this.view.state.field(Ea).active.find((o) => o.source == i.active.source);
- if (a && a.state == 1)
- if (i.done == null) {
- let o = new ro(
- i.active.source,
- 0
- /* State.Inactive */
- );
- for (let s of i.updates)
- o = o.update(s, n);
- o.state != 1 && e.push(o);
- } else
- this.startQuery(a);
- }
- e.length && this.view.dispatch({ effects: vme.of(e) });
- }
- }, {
- eventHandlers: {
- blur(t) {
- let e = this.view.state.field(Ea, !1);
- if (e && e.tooltip && this.view.state.facet(Si).closeOnBlur) {
- let n = e.open && Uve(this.view, e.open.tooltip);
- (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: P_.of(null) }), 10);
- }
- },
- compositionstart() {
- this.composing = 1;
- },
- compositionend() {
- this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: ZT.of(!1) }), 20), this.composing = 0;
- }
- }
- }), LPt = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), NPt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ rt.domEventHandlers({
- keydown(t, e) {
- let n = e.state.field(Ea, !1);
- if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(LPt && t.altKey) || t.metaKey)
- return !1;
- let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
- return a && a.indexOf(t.key) > -1 && $B(e, r), !1;
- }
- })), mme = /* @__PURE__ */ rt.baseTheme({
- ".cm-tooltip.cm-tooltip-autocomplete": {
- "& > ul": {
- fontFamily: "monospace",
- whiteSpace: "nowrap",
- overflow: "hidden auto",
- maxWidth_fallback: "700px",
- maxWidth: "min(700px, 95vw)",
- minWidth: "250px",
- maxHeight: "10em",
- height: "100%",
- listStyle: "none",
- margin: 0,
- padding: 0,
- "& > li, & > completion-section": {
- padding: "1px 3px",
- lineHeight: 1.2
- },
- "& > li": {
- overflowX: "hidden",
- textOverflow: "ellipsis",
- cursor: "pointer"
- },
- "& > completion-section": {
- display: "list-item",
- borderBottom: "1px solid silver",
- paddingLeft: "0.5em",
- opacity: 0.7
- }
- }
- },
- "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
- background: "#17c",
- color: "white"
- },
- "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
- background: "#777"
- },
- "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
- background: "#347",
- color: "white"
- },
- "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
- background: "#444"
- },
- ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
- content: '"···"',
- opacity: 0.5,
- display: "block",
- textAlign: "center"
- },
- ".cm-tooltip.cm-completionInfo": {
- position: "absolute",
- padding: "3px 9px",
- width: "max-content",
- maxWidth: "400px",
- boxSizing: "border-box"
- },
- ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
- ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
- ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
- ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
- "&light .cm-snippetField": { backgroundColor: "#00000022" },
- "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
- ".cm-snippetFieldPosition": {
- verticalAlign: "text-top",
- width: 0,
- height: "1.15em",
- display: "inline-block",
- margin: "0 -0.7px -.7em",
- borderLeft: "1.4px dotted #888"
- },
- ".cm-completionMatchedText": {
- textDecoration: "underline"
- },
- ".cm-completionDetail": {
- marginLeft: "0.5em",
- fontStyle: "italic"
- },
- ".cm-completionIcon": {
- fontSize: "90%",
- width: ".8em",
- display: "inline-block",
- textAlign: "center",
- paddingRight: ".6em",
- opacity: "0.6",
- boxSizing: "content-box"
- },
- ".cm-completionIcon-function, .cm-completionIcon-method": {
- "&:after": { content: "'ƒ'" }
- },
- ".cm-completionIcon-class": {
- "&:after": { content: "'○'" }
- },
- ".cm-completionIcon-interface": {
- "&:after": { content: "'◌'" }
- },
- ".cm-completionIcon-variable": {
- "&:after": { content: "'𝑥'" }
- },
- ".cm-completionIcon-constant": {
- "&:after": { content: "'𝐶'" }
- },
- ".cm-completionIcon-type": {
- "&:after": { content: "'𝑡'" }
- },
- ".cm-completionIcon-enum": {
- "&:after": { content: "'∪'" }
- },
- ".cm-completionIcon-property": {
- "&:after": { content: "'□'" }
- },
- ".cm-completionIcon-keyword": {
- "&:after": { content: "'🔑︎'" }
- // Disable emoji rendering
- },
- ".cm-completionIcon-namespace": {
- "&:after": { content: "'▢'" }
- },
- ".cm-completionIcon-text": {
- "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
- }
- });
- class BPt {
- constructor(e, n, r, i) {
- this.field = e, this.line = n, this.from = r, this.to = i;
- }
- }
- class AB {
- constructor(e, n, r) {
- this.field = e, this.from = n, this.to = r;
- }
- map(e) {
- let n = e.mapPos(this.from, -1, Oi.TrackDel), r = e.mapPos(this.to, 1, Oi.TrackDel);
- return n == null || r == null ? null : new AB(this.field, n, r);
- }
- }
- class EB {
- constructor(e, n) {
- this.lines = e, this.fieldPositions = n;
- }
- instantiate(e, n) {
- let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
- for (let l of this.lines) {
- if (r.length) {
- let u = o, c = /^\t*/.exec(l)[0].length;
- for (let f = 0; f < c; f++)
- u += e.facet(D1);
- i.push(n + u.length - c), l = u + l.slice(c);
- }
- r.push(l), n += l.length + 1;
- }
- let s = this.fieldPositions.map((l) => new AB(l.field, i[l.line] + l.from, i[l.line] + l.to));
- return { text: r, ranges: s };
- }
- static parse(e) {
- let n = [], r = [], i = [], a;
- for (let o of e.split(/\r\n?|\n/)) {
- for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
- let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
- for (let f = 0; f < n.length; f++)
- (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
- if (u < 0) {
- let f = 0;
- for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
- f++;
- n.splice(f, 0, { seq: s, name: c }), u = f;
- for (let d of i)
- d.field >= u && d.field++;
- }
- i.push(new BPt(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
- }
- o = o.replace(/\\([{}])/g, (s, l, u) => {
- for (let c of i)
- c.line == r.length && c.from > u && (c.from--, c.to--);
- return l;
- }), r.push(o);
- }
- return new EB(r, i);
- }
- }
- let zPt = /* @__PURE__ */ pt.widget({ widget: /* @__PURE__ */ new class extends Jl {
- toDOM() {
- let t = document.createElement("span");
- return t.className = "cm-snippetFieldPosition", t;
- }
- ignoreEvent() {
- return !1;
- }
- }() }), VPt = /* @__PURE__ */ pt.mark({ class: "cm-snippetField" });
- class Hm {
- constructor(e, n) {
- this.ranges = e, this.active = n, this.deco = pt.set(e.map((r) => (r.from == r.to ? zPt : VPt).range(r.from, r.to)));
- }
- map(e) {
- let n = [];
- for (let r of this.ranges) {
- let i = r.map(e);
- if (!i)
- return null;
- n.push(i);
- }
- return new Hm(n, this.active);
- }
- selectionInsideField(e) {
- return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
- }
- }
- const B1 = /* @__PURE__ */ zt.define({
- map(t, e) {
- return t && t.map(e);
- }
- }), FPt = /* @__PURE__ */ zt.define(), $_ = /* @__PURE__ */ fi.define({
- create() {
- return null;
- },
- update(t, e) {
- for (let n of e.effects) {
- if (n.is(B1))
- return n.value;
- if (n.is(FPt) && t)
- return new Hm(t.ranges, n.value);
- }
- return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
- },
- provide: (t) => rt.decorations.from(t, (e) => e ? e.deco : pt.none)
- });
- function MB(t, e) {
- return De.create(t.filter((n) => n.field == e).map((n) => De.range(n.from, n.to)));
- }
- function WPt(t) {
- let e = EB.parse(t);
- return (n, r, i, a) => {
- let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
- changes: { from: i, to: a, insert: xn.of(o) },
- scrollIntoView: !0,
- annotations: r ? [PB.of(r), zr.userEvent.of("input.complete")] : void 0
- };
- if (s.length && (l.selection = MB(s, 0)), s.some((u) => u.field > 0)) {
- let u = new Hm(s, 0), c = l.effects = [B1.of(u)];
- n.state.field($_, !1) === void 0 && c.push(zt.appendConfig.of([$_, ZPt, UPt, mme]));
- }
- n.dispatch(n.state.update(l));
- };
- }
- function yme(t) {
- return ({ state: e, dispatch: n }) => {
- let r = e.field($_, !1);
- if (!r || t < 0 && r.active == 0)
- return !1;
- let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
- return n(e.update({
- selection: MB(r.ranges, i),
- effects: B1.of(a ? null : new Hm(r.ranges, i)),
- scrollIntoView: !0
- })), !0;
- };
- }
- const QPt = ({ state: t, dispatch: e }) => t.field($_, !1) ? (e(t.update({ effects: B1.of(null) })), !0) : !1, HPt = /* @__PURE__ */ yme(1), GPt = /* @__PURE__ */ yme(-1), jPt = [
- { key: "Tab", run: HPt, shift: GPt },
- { key: "Escape", run: QPt }
- ], RJ = /* @__PURE__ */ ut.define({
- combine(t) {
- return t.length ? t[0] : jPt;
- }
- }), ZPt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ M1.compute([RJ], (t) => t.facet(RJ)));
- function xa(t, e) {
- return Object.assign(Object.assign({}, e), { apply: WPt(t) });
- }
- const UPt = /* @__PURE__ */ rt.domEventHandlers({
- mousedown(t, e) {
- let n = e.state.field($_, !1), r;
- if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
- return !1;
- let i = n.ranges.find((a) => a.from <= r && a.to >= r);
- return !i || i.field == n.active ? !1 : (e.dispatch({
- selection: MB(n.ranges, i.field),
- effects: B1.of(n.ranges.some((a) => a.field > i.field) ? new Hm(n.ranges, i.field) : null),
- scrollIntoView: !0
- }), !0);
- }
- }), A_ = {
- brackets: ["(", "[", "{", "'", '"'],
- before: ")]}:;>",
- stringPrefixes: []
- }, dh = /* @__PURE__ */ zt.define({
- map(t, e) {
- let n = e.mapPos(t, -1, Oi.TrackAfter);
- return n ?? void 0;
- }
- }), IB = /* @__PURE__ */ new class extends Kh {
- }();
- IB.startSide = 1;
- IB.endSide = -1;
- const bme = /* @__PURE__ */ fi.define({
- create() {
- return Sn.empty;
- },
- update(t, e) {
- if (t = t.map(e.changes), e.selection) {
- let n = e.state.doc.lineAt(e.selection.main.head);
- t = t.update({ filter: (r) => r >= n.from && r <= n.to });
- }
- for (let n of e.effects)
- n.is(dh) && (t = t.update({ add: [IB.range(n.value, n.value + 1)] }));
- return t;
- }
- });
- function XPt() {
- return [qPt, bme];
- }
- const SD = "()[]{}<>";
- function _me(t) {
- for (let e = 0; e < SD.length; e += 2)
- if (SD.charCodeAt(e) == t)
- return SD.charAt(e + 1);
- return K6(t < 128 ? t : t + 1);
- }
- function Ome(t, e) {
- return t.languageDataAt("closeBrackets", e)[0] || A_;
- }
- const YPt = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), qPt = /* @__PURE__ */ rt.inputHandler.of((t, e, n, r) => {
- if ((YPt ? t.composing : t.compositionStarted) || t.state.readOnly)
- return !1;
- let i = t.state.selection.main;
- if (r.length > 2 || r.length == 2 && jo(bi(r, 0)) == 1 || e != i.from || n != i.to)
- return !1;
- let a = e$t(t.state, r);
- return a ? (t.dispatch(a), !0) : !1;
- }), KPt = ({ state: t, dispatch: e }) => {
- if (t.readOnly)
- return !1;
- let r = Ome(t, t.selection.main.head).brackets || A_.brackets, i = null, a = t.changeByRange((o) => {
- if (o.empty) {
- let s = t$t(t.doc, o.head);
- for (let l of r)
- if (l == s && h$(t.doc, o.head) == _me(bi(l, 0)))
- return {
- changes: { from: o.head - l.length, to: o.head + l.length },
- range: De.cursor(o.head - l.length)
- };
- }
- return { range: i = o };
- });
- return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
- }, JPt = [
- { key: "Backspace", run: KPt }
- ];
- function e$t(t, e) {
- let n = Ome(t, t.selection.main.head), r = n.brackets || A_.brackets;
- for (let i of r) {
- let a = _me(bi(i, 0));
- if (e == i)
- return a == i ? i$t(t, i, r.indexOf(i + i + i) > -1, n) : n$t(t, i, a, n.before || A_.before);
- if (e == a && Sme(t, t.selection.main.from))
- return r$t(t, i, a);
- }
- return null;
- }
- function Sme(t, e) {
- let n = !1;
- return t.field(bme).between(0, t.doc.length, (r) => {
- r == e && (n = !0);
- }), n;
- }
- function h$(t, e) {
- let n = t.sliceString(e, e + 2);
- return n.slice(0, jo(bi(n, 0)));
- }
- function t$t(t, e) {
- let n = t.sliceString(e - 2, e);
- return jo(bi(n, 0)) == n.length ? n : n.slice(1);
- }
- function n$t(t, e, n, r) {
- let i = null, a = t.changeByRange((o) => {
- if (!o.empty)
- return {
- changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
- effects: dh.of(o.to + e.length),
- range: De.range(o.anchor + e.length, o.head + e.length)
- };
- let s = h$(t.doc, o.head);
- return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
- changes: { insert: e + n, from: o.head },
- effects: dh.of(o.head + e.length),
- range: De.cursor(o.head + e.length)
- } : { range: i = o };
- });
- return i ? null : t.update(a, {
- scrollIntoView: !0,
- userEvent: "input.type"
- });
- }
- function r$t(t, e, n) {
- let r = null, i = t.changeByRange((a) => a.empty && h$(t.doc, a.head) == n ? {
- changes: { from: a.head, to: a.head + n.length, insert: n },
- range: De.cursor(a.head + n.length)
- } : r = { range: a });
- return r ? null : t.update(i, {
- scrollIntoView: !0,
- userEvent: "input.type"
- });
- }
- function i$t(t, e, n, r) {
- let i = r.stringPrefixes || A_.stringPrefixes, a = null, o = t.changeByRange((s) => {
- if (!s.empty)
- return {
- changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
- effects: dh.of(s.to + e.length),
- range: De.range(s.anchor + e.length, s.head + e.length)
- };
- let l = s.head, u = h$(t.doc, l), c;
- if (u == e) {
- if (kJ(t, l))
- return {
- changes: { insert: e + e, from: l },
- effects: dh.of(l + e.length),
- range: De.cursor(l + e.length)
- };
- if (Sme(t, l)) {
- let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
- return {
- changes: { from: l, to: l + d.length, insert: d },
- range: De.cursor(l + d.length)
- };
- }
- } else {
- if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = LJ(t, l - 2 * e.length, i)) > -1 && kJ(t, c))
- return {
- changes: { insert: e + e + e + e, from: l },
- effects: dh.of(l + e.length),
- range: De.cursor(l + e.length)
- };
- if (t.charCategorizer(l)(u) != lr.Word && LJ(t, l, i) > -1 && !a$t(t, l, e, i))
- return {
- changes: { insert: e + e, from: l },
- effects: dh.of(l + e.length),
- range: De.cursor(l + e.length)
- };
- }
- return { range: a = s };
- });
- return a ? null : t.update(o, {
- scrollIntoView: !0,
- userEvent: "input.type"
- });
- }
- function kJ(t, e) {
- let n = ni(t).resolveInner(e + 1);
- return n.parent && n.from == e;
- }
- function a$t(t, e, n, r) {
- let i = ni(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
- for (let o = 0; o < 5; o++) {
- let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
- if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
- let c = i.firstChild;
- for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
- if (t.sliceDoc(c.to - n.length, c.to) == n)
- return !1;
- c = c.firstChild;
- }
- return !0;
- }
- let u = i.to == e && i.parent;
- if (!u)
- break;
- i = u;
- }
- return !1;
- }
- function LJ(t, e, n) {
- let r = t.charCategorizer(e);
- if (r(t.sliceDoc(e - 1, e)) != lr.Word)
- return e;
- for (let i of n) {
- let a = e - i.length;
- if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != lr.Word)
- return a;
- }
- return -1;
- }
- function o$t(t = {}) {
- return [
- NPt,
- Ea,
- Si.of(t),
- kPt,
- s$t,
- mme
- ];
- }
- const xme = [
- { key: "Ctrl-Space", run: EPt },
- { key: "Escape", run: MPt },
- { key: "ArrowDown", run: /* @__PURE__ */ Px(!0) },
- { key: "ArrowUp", run: /* @__PURE__ */ Px(!1) },
- { key: "PageDown", run: /* @__PURE__ */ Px(!0, "page") },
- { key: "PageUp", run: /* @__PURE__ */ Px(!1, "page") },
- { key: "Enter", run: APt }
- ], s$t = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ M1.computeN([Si], (t) => t.facet(Si).defaultKeymap ? [xme] : []));
- class l$t {
- constructor(e, n, r) {
- this.from = e, this.to = n, this.diagnostic = r;
- }
- }
- class qd {
- constructor(e, n, r) {
- this.diagnostics = e, this.panel = n, this.selected = r;
- }
- static init(e, n, r) {
- let i = e, a = r.facet(E_).markerFilter;
- a && (i = a(i, r));
- let o = pt.set(i.map((s) => s.from == s.to || s.from == s.to - 1 && r.doc.lineAt(s.from).to == s.from ? pt.widget({
- widget: new m$t(s),
- diagnostic: s
- }).range(s.from) : pt.mark({
- attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
- diagnostic: s
- }).range(s.from, s.to)), !0);
- return new qd(o, n, rm(o));
- }
- }
- function rm(t, e = null, n = 0) {
- let r = null;
- return t.between(n, 1e9, (i, a, { spec: o }) => {
- if (!(e && o.diagnostic != e))
- return r = new l$t(i, a, o.diagnostic), !1;
- }), r;
- }
- function u$t(t, e) {
- let n = e.pos, r = e.end || n, i = t.state.facet(E_).hideOn(t, n, r);
- if (i != null)
- return i;
- let a = t.startState.doc.lineAt(e.pos);
- return !!(t.effects.some((o) => o.is(wme)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
- }
- function c$t(t, e) {
- return t.field(so, !1) ? e : e.concat(zt.appendConfig.of(_$t));
- }
- const wme = /* @__PURE__ */ zt.define(), DB = /* @__PURE__ */ zt.define(), Cme = /* @__PURE__ */ zt.define(), so = /* @__PURE__ */ fi.define({
- create() {
- return new qd(pt.none, null, null);
- },
- update(t, e) {
- if (e.docChanged && t.diagnostics.size) {
- let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
- if (t.selected) {
- let a = e.changes.mapPos(t.selected.from, 1);
- r = rm(n, t.selected.diagnostic, a) || rm(n, null, a);
- }
- !n.size && i && e.state.facet(E_).autoPanel && (i = null), t = new qd(n, i, r);
- }
- for (let n of e.effects)
- if (n.is(wme)) {
- let r = e.state.facet(E_).autoPanel ? n.value.length ? M_.open : null : t.panel;
- t = qd.init(n.value, r, e.state);
- } else n.is(DB) ? t = new qd(t.diagnostics, n.value ? M_.open : null, t.selected) : n.is(Cme) && (t = new qd(t.diagnostics, t.panel, n.value));
- return t;
- },
- provide: (t) => [
- S_.from(t, (e) => e.panel),
- rt.decorations.from(t, (e) => e.diagnostics)
- ]
- }), f$t = /* @__PURE__ */ pt.mark({ class: "cm-lintRange cm-lintRange-active" });
- function d$t(t, e, n) {
- let { diagnostics: r } = t.state.field(so), i = [], a = 2e8, o = 0;
- r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
- e >= l && e <= u && (l == u || (e > l || n > 0) && (e < u || n < 0)) && (i.push(c.diagnostic), a = Math.min(l, a), o = Math.max(u, o));
- });
- let s = t.state.facet(E_).tooltipFilter;
- return s && (i = s(i, t.state)), i.length ? {
- pos: a,
- end: o,
- above: t.state.doc.lineAt(a).to < o,
- create() {
- return { dom: h$t(t, i) };
- }
- } : null;
- }
- function h$t(t, e) {
- return Yn("ul", { class: "cm-tooltip-lint" }, e.map((n) => Pme(t, n, !1)));
- }
- const p$t = (t) => {
- let e = t.state.field(so, !1);
- (!e || !e.panel) && t.dispatch({ effects: c$t(t.state, [DB.of(!0)]) });
- let n = O_(t, M_.open);
- return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
- }, NJ = (t) => {
- let e = t.state.field(so, !1);
- return !e || !e.panel ? !1 : (t.dispatch({ effects: DB.of(!1) }), !0);
- }, v$t = (t) => {
- let e = t.state.field(so, !1);
- if (!e)
- return !1;
- let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
- return !r.value && (r = e.diagnostics.iter(0), !r.value || r.from == n.from && r.to == n.to) ? !1 : (t.dispatch({ selection: { anchor: r.from, head: r.to }, scrollIntoView: !0 }), !0);
- }, g$t = [
- { key: "Mod-Shift-m", run: p$t, preventDefault: !0 },
- { key: "F8", run: v$t }
- ], E_ = /* @__PURE__ */ ut.define({
- combine(t) {
- return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, Kl(t.map((e) => e.config), {
- delay: 750,
- markerFilter: null,
- tooltipFilter: null,
- needsRefresh: null,
- hideOn: () => null
- }, {
- needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
- }));
- }
- });
- function Tme(t) {
- let e = [];
- if (t)
- e: for (let { name: n } of t) {
- for (let r = 0; r < n.length; r++) {
- let i = n[r];
- if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
- e.push(i);
- continue e;
- }
- }
- e.push("");
- }
- return e;
- }
- function Pme(t, e, n) {
- var r;
- let i = n ? Tme(e.actions) : [];
- return Yn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, Yn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (r = e.actions) === null || r === void 0 ? void 0 : r.map((a, o) => {
- let s = !1, l = (d) => {
- if (d.preventDefault(), s)
- return;
- s = !0;
- let h = rm(t.state.field(so).diagnostics, e);
- h && a.apply(t, h.from, h.to);
- }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
- u.slice(0, c),
- Yn("u", u.slice(c, c + 1)),
- u.slice(c + 1)
- ];
- return Yn("button", {
- type: "button",
- class: "cm-diagnosticAction",
- onclick: l,
- onmousedown: l,
- "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
- }, f);
- }), e.source && Yn("div", { class: "cm-diagnosticSource" }, e.source));
- }
- class m$t extends Jl {
- constructor(e) {
- super(), this.diagnostic = e;
- }
- eq(e) {
- return e.diagnostic == this.diagnostic;
- }
- toDOM() {
- return Yn("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
- }
- }
- class BJ {
- constructor(e, n) {
- this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = Pme(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
- }
- }
- class M_ {
- constructor(e) {
- this.view = e, this.items = [];
- let n = (i) => {
- if (i.keyCode == 27)
- NJ(this.view), this.view.focus();
- else if (i.keyCode == 38 || i.keyCode == 33)
- this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
- else if (i.keyCode == 40 || i.keyCode == 34)
- this.moveSelection((this.selectedIndex + 1) % this.items.length);
- else if (i.keyCode == 36)
- this.moveSelection(0);
- else if (i.keyCode == 35)
- this.moveSelection(this.items.length - 1);
- else if (i.keyCode == 13)
- this.view.focus();
- else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
- let { diagnostic: a } = this.items[this.selectedIndex], o = Tme(a.actions);
- for (let s = 0; s < o.length; s++)
- if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
- let l = rm(this.view.state.field(so).diagnostics, a);
- l && a.actions[s].apply(e, l.from, l.to);
- }
- } else
- return;
- i.preventDefault();
- }, r = (i) => {
- for (let a = 0; a < this.items.length; a++)
- this.items[a].dom.contains(i.target) && this.moveSelection(a);
- };
- this.list = Yn("ul", {
- tabIndex: 0,
- role: "listbox",
- "aria-label": this.view.state.phrase("Diagnostics"),
- onkeydown: n,
- onclick: r
- }), this.dom = Yn("div", { class: "cm-panel-lint" }, this.list, Yn("button", {
- type: "button",
- name: "close",
- "aria-label": this.view.state.phrase("close"),
- onclick: () => NJ(this.view)
- }, "×")), this.update();
- }
- get selectedIndex() {
- let e = this.view.state.field(so).selected;
- if (!e)
- return -1;
- for (let n = 0; n < this.items.length; n++)
- if (this.items[n].diagnostic == e.diagnostic)
- return n;
- return -1;
- }
- update() {
- let { diagnostics: e, selected: n } = this.view.state.field(so), r = 0, i = !1, a = null;
- for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
- let u = -1, c;
- for (let f = r; f < this.items.length; f++)
- if (this.items[f].diagnostic == l.diagnostic) {
- u = f;
- break;
- }
- u < 0 ? (c = new BJ(this.view, l.diagnostic), this.items.splice(r, 0, c), i = !0) : (c = this.items[u], u > r && (this.items.splice(r, u - r), i = !0)), n && c.diagnostic == n.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), a = c) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), r++;
- }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
- i = !0, this.items.pop();
- this.items.length == 0 && (this.items.push(new BJ(this.view, {
- from: -1,
- to: -1,
- severity: "info",
- message: this.view.state.phrase("No diagnostics")
- })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
- key: this,
- read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
- write: ({ sel: o, panel: s }) => {
- let l = s.height / this.list.offsetHeight;
- o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
- }
- })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
- }
- sync() {
- let e = this.list.firstChild;
- function n() {
- let r = e;
- e = r.nextSibling, r.remove();
- }
- for (let r of this.items)
- if (r.dom.parentNode == this.list) {
- for (; e != r.dom; )
- n();
- e = r.dom.nextSibling;
- } else
- this.list.insertBefore(r.dom, e);
- for (; e; )
- n();
- }
- moveSelection(e) {
- if (this.selectedIndex < 0)
- return;
- let n = this.view.state.field(so), r = rm(n.diagnostics, this.items[e].diagnostic);
- r && this.view.dispatch({
- selection: { anchor: r.from, head: r.to },
- scrollIntoView: !0,
- effects: Cme.of(r)
- });
- }
- static open(e) {
- return new M_(e);
- }
- }
- function y$t(t, e = 'viewBox="0 0 40 40"') {
- return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
- }
- function $x(t) {
- return y$t(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
- }
- const b$t = /* @__PURE__ */ rt.baseTheme({
- ".cm-diagnostic": {
- padding: "3px 6px 3px 8px",
- marginLeft: "-1px",
- display: "block",
- whiteSpace: "pre-wrap"
- },
- ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
- ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
- ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
- ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
- ".cm-diagnosticAction": {
- font: "inherit",
- border: "none",
- padding: "2px 4px",
- backgroundColor: "#444",
- color: "white",
- borderRadius: "3px",
- marginLeft: "8px",
- cursor: "pointer"
- },
- ".cm-diagnosticSource": {
- fontSize: "70%",
- opacity: 0.7
- },
- ".cm-lintRange": {
- backgroundPosition: "left bottom",
- backgroundRepeat: "repeat-x",
- paddingBottom: "0.7px"
- },
- ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ $x("#d11") },
- ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ $x("orange") },
- ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ $x("#999") },
- ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ $x("#66d") },
- ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
- ".cm-tooltip-lint": {
- padding: 0,
- margin: 0
- },
- ".cm-lintPoint": {
- position: "relative",
- "&:after": {
- content: '""',
- position: "absolute",
- bottom: 0,
- left: "-2px",
- borderLeft: "3px solid transparent",
- borderRight: "3px solid transparent",
- borderBottom: "4px solid #d11"
- }
- },
- ".cm-lintPoint-warning": {
- "&:after": { borderBottomColor: "orange" }
- },
- ".cm-lintPoint-info": {
- "&:after": { borderBottomColor: "#999" }
- },
- ".cm-lintPoint-hint": {
- "&:after": { borderBottomColor: "#66d" }
- },
- ".cm-panel.cm-panel-lint": {
- position: "relative",
- "& ul": {
- maxHeight: "100px",
- overflowY: "auto",
- "& [aria-selected]": {
- backgroundColor: "#ddd",
- "& u": { textDecoration: "underline" }
- },
- "&:focus [aria-selected]": {
- background_fallback: "#bdf",
- backgroundColor: "Highlight",
- color_fallback: "white",
- color: "HighlightText"
- },
- "& u": { textDecoration: "none" },
- padding: 0,
- margin: 0
- },
- "& [name=close]": {
- position: "absolute",
- top: "0",
- right: "2px",
- background: "inherit",
- border: "none",
- font: "inherit",
- padding: 0,
- margin: 0
- }
- }
- }), _$t = [
- so,
- /* @__PURE__ */ rt.decorations.compute([so], (t) => {
- let { selected: e, panel: n } = t.field(so);
- return !e || !n || e.from == e.to ? pt.none : pt.set([
- f$t.range(e.from, e.to)
- ]);
- }),
- /* @__PURE__ */ sCt(d$t, { hideOn: u$t }),
- b$t
- ], O$t = [
- gCt(),
- bCt(),
- Lwt(),
- RTt(),
- sTt(),
- Cwt(),
- Ewt(),
- cn.allowMultipleSelections.of(!0),
- UCt(),
- bge(fTt, { fallback: !0 }),
- yTt(),
- XPt(),
- o$t(),
- Ywt(),
- Jwt(),
- Wwt(),
- W2t(),
- M1.of([
- ...JPt,
- ...k2t,
- ...sPt,
- ...QTt,
- ...rTt,
- ...xme,
- ...g$t
- ])
- ];
- /*!
- * VueCodemirror v6.1.1
- * Copyright (c) Surmon. All rights reserved.
- * Released under the MIT License.
- * Surmon
- */
- var S$t = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [O$t] }), x$t = Symbol("vue-codemirror-global-config"), na, w$t = function(t) {
- var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
- var l = {};
- for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
- if (o != null && typeof Object.getOwnPropertySymbols == "function") {
- var c = 0;
- for (u = Object.getOwnPropertySymbols(o); c < u.length; c++) s.indexOf(u[c]) < 0 && Object.prototype.propertyIsEnumerable.call(o, u[c]) && (l[u[c]] = o[u[c]]);
- }
- return l;
- }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
- return cn.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([rt.updateListener.of(function(o) {
- e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
- })]) });
- }, Pv = function(t) {
- var e = new $1();
- return { compartment: e, run: function(n) {
- e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: zt.appendConfig.of(e.of(n)) });
- } };
- }, zJ = function(t, e) {
- var n = Pv(t), r = n.compartment, i = n.run;
- return function(a) {
- var o = r.get(t.state);
- i(a ?? o !== e ? e : []);
- };
- }, Ax = { type: Boolean, default: void 0 }, C$t = { autofocus: Ax, disabled: Ax, indentWithTab: Ax, tabSize: Number, placeholder: String, style: Object, autoDestroy: Ax, phrases: Object, root: Object, extensions: Array, selection: Object }, T$t = { modelValue: { type: String, default: "" } }, P$t = Object.assign(Object.assign({}, C$t), T$t);
- (function(t) {
- t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
- })(na || (na = {}));
- var Kd = {};
- Kd[na.Change] = function(t, e) {
- return !0;
- }, Kd[na.Update] = function(t) {
- return !0;
- }, Kd[na.Focus] = function(t) {
- return !0;
- }, Kd[na.Blur] = function(t) {
- return !0;
- }, Kd[na.Ready] = function(t) {
- return !0;
- };
- var $me = {};
- $me[na.ModelUpdate] = Kd[na.Change];
- var $$t = Object.assign(Object.assign({}, Kd), $me), A$t = ae({ name: "VueCodemirror", props: Object.assign({}, P$t), emits: Object.assign({}, $$t), setup: function(t, e) {
- var n = ve(), r = ve(), i = ve(), a = Object.assign(Object.assign({}, S$t), et(x$t, {})), o = V(function() {
- var s = {};
- return Object.keys(es(t)).forEach(function(l) {
- var u;
- l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
- }), s;
- });
- return _t(function() {
- var s;
- r.value = w$t({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
- return e.emit(na.Focus, u);
- }, onBlur: function(u) {
- return e.emit(na.Blur, u);
- }, onUpdate: function(u) {
- return e.emit(na.Update, u);
- }, onChange: function(u, c) {
- u !== t.modelValue && (e.emit(na.Change, u, c), e.emit(na.ModelUpdate, u, c));
- } }), i.value = function(u) {
- return new rt(Object.assign({}, u));
- }({ state: r.value, parent: n.value, root: o.value.root });
- var l = function(u) {
- var c = function() {
- return u.state.doc.toString();
- }, f = Pv(u).run, d = zJ(u, [rt.editable.of(!1), cn.readOnly.of(!0)]), h = zJ(u, M1.of([L2t])), p = Pv(u).run, v = Pv(u).run, g = Pv(u).run, m = Pv(u).run;
- return { focus: function() {
- return u.focus();
- }, getDoc: c, setDoc: function(y) {
- y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
- }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
- p([cn.tabSize.of(y), D1.of(" ".repeat(y))]);
- }, setPhrases: function(y) {
- v([cn.phrases.of(y)]);
- }, setPlaceholder: function(y) {
- g(jwt(y));
- }, setStyle: function(y) {
- y === void 0 && (y = {}), m(rt.theme({ "&": Object.assign({}, y) }));
- } };
- }(i.value);
- me(function() {
- return t.modelValue;
- }, function(u) {
- u !== l.getDoc() && l.setDoc(u);
- }), me(function() {
- return t.extensions;
- }, function(u) {
- return l.reExtensions(u || []);
- }, { immediate: !0 }), me(function() {
- return o.value.disabled;
- }, function(u) {
- return l.toggleDisabled(u);
- }, { immediate: !0 }), me(function() {
- return o.value.indentWithTab;
- }, function(u) {
- return l.toggleIndentWithTab(u);
- }, { immediate: !0 }), me(function() {
- return o.value.tabSize;
- }, function(u) {
- return l.setTabSize(u);
- }, { immediate: !0 }), me(function() {
- return o.value.phrases;
- }, function(u) {
- return l.setPhrases(u || {});
- }, { immediate: !0 }), me(function() {
- return o.value.placeholder;
- }, function(u) {
- return l.setPlaceholder(u);
- }, { immediate: !0 }), me(function() {
- return o.value.style;
- }, function(u) {
- return l.setStyle(u);
- }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(na.Ready, { state: r.value, view: i.value, container: n.value });
- }), Qt(function() {
- o.value.autoDestroy && i.value && function(s) {
- s.destroy();
- }(i.value);
- }), function() {
- return ff("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
- };
- } }), E$t = A$t;
- const M$t = "#e5c07b", VJ = "#e06c75", I$t = "#56b6c2", D$t = "#ffffff", kw = "#abb2bf", G4 = "#7d8799", R$t = "#61afef", k$t = "#98c379", FJ = "#d19a66", L$t = "#c678dd", N$t = "#21252b", WJ = "#2c313a", QJ = "#282c34", xD = "#353a42", B$t = "#3E4451", HJ = "#528bff", z$t = /* @__PURE__ */ rt.theme({
- "&": {
- color: kw,
- backgroundColor: QJ
- },
- ".cm-content": {
- caretColor: HJ
- },
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: HJ },
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: B$t },
- ".cm-panels": { backgroundColor: N$t, color: kw },
- ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
- ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
- ".cm-searchMatch": {
- backgroundColor: "#72a1ff59",
- outline: "1px solid #457dff"
- },
- ".cm-searchMatch.cm-searchMatch-selected": {
- backgroundColor: "#6199ff2f"
- },
- ".cm-activeLine": { backgroundColor: "#6699ff0b" },
- ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
- "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
- backgroundColor: "#bad0f847"
- },
- ".cm-gutters": {
- backgroundColor: QJ,
- color: G4,
- border: "none"
- },
- ".cm-activeLineGutter": {
- backgroundColor: WJ
- },
- ".cm-foldPlaceholder": {
- backgroundColor: "transparent",
- border: "none",
- color: "#ddd"
- },
- ".cm-tooltip": {
- border: "none",
- backgroundColor: xD
- },
- ".cm-tooltip .cm-tooltip-arrow:before": {
- borderTopColor: "transparent",
- borderBottomColor: "transparent"
- },
- ".cm-tooltip .cm-tooltip-arrow:after": {
- borderTopColor: xD,
- borderBottomColor: xD
- },
- ".cm-tooltip-autocomplete": {
- "& > ul > li[aria-selected]": {
- backgroundColor: WJ,
- color: kw
- }
- }
- }, { dark: !0 }), V$t = /* @__PURE__ */ k1.define([
- {
- tag: ce.keyword,
- color: L$t
- },
- {
- tag: [ce.name, ce.deleted, ce.character, ce.propertyName, ce.macroName],
- color: VJ
- },
- {
- tag: [/* @__PURE__ */ ce.function(ce.variableName), ce.labelName],
- color: R$t
- },
- {
- tag: [ce.color, /* @__PURE__ */ ce.constant(ce.name), /* @__PURE__ */ ce.standard(ce.name)],
- color: FJ
- },
- {
- tag: [/* @__PURE__ */ ce.definition(ce.name), ce.separator],
- color: kw
- },
- {
- tag: [ce.typeName, ce.className, ce.number, ce.changed, ce.annotation, ce.modifier, ce.self, ce.namespace],
- color: M$t
- },
- {
- tag: [ce.operator, ce.operatorKeyword, ce.url, ce.escape, ce.regexp, ce.link, /* @__PURE__ */ ce.special(ce.string)],
- color: I$t
- },
- {
- tag: [ce.meta, ce.comment],
- color: G4
- },
- {
- tag: ce.strong,
- fontWeight: "bold"
- },
- {
- tag: ce.emphasis,
- fontStyle: "italic"
- },
- {
- tag: ce.strikethrough,
- textDecoration: "line-through"
- },
- {
- tag: ce.link,
- color: G4,
- textDecoration: "underline"
- },
- {
- tag: ce.heading,
- fontWeight: "bold",
- color: VJ
- },
- {
- tag: [ce.atom, ce.bool, /* @__PURE__ */ ce.special(ce.variableName)],
- color: FJ
- },
- {
- tag: [ce.processingInstruction, ce.string, ce.inserted],
- color: k$t
- },
- {
- tag: ce.invalid,
- color: D$t
- }
- ]), F$t = [z$t, /* @__PURE__ */ bge(V$t)];
- class XT {
- /**
- @internal
- */
- constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
- this.p = e, this.stack = n, this.state = r, this.reducePos = i, this.pos = a, this.score = o, this.buffer = s, this.bufferBase = l, this.curContext = u, this.lookAhead = c, this.parent = f;
- }
- /**
- @internal
- */
- toString() {
- return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
- }
- // Start an empty stack
- /**
- @internal
- */
- static start(e, n, r = 0) {
- let i = e.parser.context;
- return new XT(e, [], n, r, r, 0, [], 0, i ? new GJ(i, i.start) : null, 0, null);
- }
- /**
- The stack's current [context](#lr.ContextTracker) value, if
- any. Its type will depend on the context tracker's type
- parameter, or it will be `null` if there is no context
- tracker.
- */
- get context() {
- return this.curContext ? this.curContext.context : null;
- }
- // Push a state onto the stack, tracking its start position as well
- // as the buffer base at that point.
- /**
- @internal
- */
- pushState(e, n) {
- this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
- }
- // Apply a reduce action
- /**
- @internal
- */
- reduce(e) {
- var n;
- let r = e >> 19, i = e & 65535, { parser: a } = this.p;
- this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
- let o = a.dynamicPrecedence(i);
- if (o && (this.score += o), r == 0) {
- this.pushState(a.getGoto(this.state, i, !0), this.reducePos), i < a.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, 4, !0), this.reduceContext(i, this.reducePos);
- return;
- }
- let s = this.stack.length - (r - 1) * 3 - (e & 262144 ? 6 : 0), l = s ? this.stack[s - 2] : this.p.ranges[0].from, u = this.reducePos - l;
- u >= 2e3 && !(!((n = this.p.parser.nodeSet.types[i]) === null || n === void 0) && n.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = l, this.p.lastBigReductionSize = u));
- let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
- if (i < a.minRepeatTerm || e & 131072) {
- let d = a.stateFlag(
- this.state,
- 1
- /* StateFlag.Skipped */
- ) ? this.pos : this.reducePos;
- this.storeNode(i, l, d, f + 4, !0);
- }
- if (e & 262144)
- this.state = this.stack[s];
- else {
- let d = this.stack[s - 3];
- this.state = a.getGoto(d, i, !0);
- }
- for (; this.stack.length > s; )
- this.stack.pop();
- this.reduceContext(i, l);
- }
- // Shift a value into the buffer
- /**
- @internal
- */
- storeNode(e, n, r, i = 4, a = !1) {
- if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
- let o = this, s = this.buffer.length;
- if (s == 0 && o.parent && (s = o.bufferBase - o.parent.bufferBase, o = o.parent), s > 0 && o.buffer[s - 4] == 0 && o.buffer[s - 1] > -1) {
- if (n == r)
- return;
- if (o.buffer[s - 2] >= n) {
- o.buffer[s - 2] = r;
- return;
- }
- }
- }
- if (!a || this.pos == r)
- this.buffer.push(e, n, r, i);
- else {
- let o = this.buffer.length;
- if (o > 0 && this.buffer[o - 4] != 0)
- for (; o > 0 && this.buffer[o - 2] > r; )
- this.buffer[o] = this.buffer[o - 4], this.buffer[o + 1] = this.buffer[o - 3], this.buffer[o + 2] = this.buffer[o - 2], this.buffer[o + 3] = this.buffer[o - 1], o -= 4, i > 4 && (i -= 4);
- this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
- }
- }
- // Apply a shift action
- /**
- @internal
- */
- shift(e, n, r, i) {
- if (e & 131072)
- this.pushState(e & 65535, this.pos);
- else if (e & 262144)
- this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
- else {
- let a = e, { parser: o } = this.p;
- (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
- a,
- 1
- /* StateFlag.Skipped */
- ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
- }
- }
- // Apply an action
- /**
- @internal
- */
- apply(e, n, r, i) {
- e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
- }
- // Add a prebuilt (reused) node into the buffer.
- /**
- @internal
- */
- useNode(e, n) {
- let r = this.p.reused.length - 1;
- (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
- let i = this.pos;
- this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
- r,
- i,
- this.reducePos,
- -1
- /* size == -1 means this is a reused value */
- ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
- }
- // Split the stack. Due to the buffer sharing and the fact
- // that `this.stack` tends to stay quite shallow, this isn't very
- // expensive.
- /**
- @internal
- */
- split() {
- let e = this, n = e.buffer.length;
- for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
- n -= 4;
- let r = e.buffer.slice(n), i = e.bufferBase + n;
- for (; e && i == e.bufferBase; )
- e = e.parent;
- return new XT(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
- }
- // Try to recover from an error by 'deleting' (ignoring) one token.
- /**
- @internal
- */
- recoverByDelete(e, n) {
- let r = e <= this.p.parser.maxNode;
- r && this.storeNode(e, this.pos, n, 4), this.storeNode(0, this.pos, n, r ? 8 : 4), this.pos = this.reducePos = n, this.score -= 190;
- }
- /**
- Check if the given term would be able to be shifted (optionally
- after some reductions) on this stack. This can be useful for
- external tokenizers that want to make sure they only provide a
- given token when it applies.
- */
- canShift(e) {
- for (let n = new W$t(this); ; ) {
- let r = this.p.parser.stateSlot(
- n.state,
- 4
- /* ParseState.DefaultReduce */
- ) || this.p.parser.hasAction(n.state, e);
- if (r == 0)
- return !1;
- if (!(r & 65536))
- return !0;
- n.reduce(r);
- }
- }
- // Apply up to Recover.MaxNext recovery actions that conceptually
- // inserts some missing token or rule.
- /**
- @internal
- */
- recoverByInsert(e) {
- if (this.stack.length >= 300)
- return [];
- let n = this.p.parser.nextStates(this.state);
- if (n.length > 8 || this.stack.length >= 120) {
- let i = [];
- for (let a = 0, o; a < n.length; a += 2)
- (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
- if (this.stack.length < 120)
- for (let a = 0; i.length < 8 && a < n.length; a += 2) {
- let o = n[a + 1];
- i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
- }
- n = i;
- }
- let r = [];
- for (let i = 0; i < n.length && r.length < 4; i += 2) {
- let a = n[i + 1];
- if (a == this.state)
- continue;
- let o = this.split();
- o.pushState(a, this.pos), o.storeNode(0, o.pos, o.pos, 4, !0), o.shiftContext(n[i], this.pos), o.reducePos = this.pos, o.score -= 200, r.push(o);
- }
- return r;
- }
- // Force a reduce, if possible. Return false if that can't
- // be done.
- /**
- @internal
- */
- forceReduce() {
- let { parser: e } = this.p, n = e.stateSlot(
- this.state,
- 5
- /* ParseState.ForcedReduce */
- );
- if (!(n & 65536))
- return !1;
- if (!e.validAction(this.state, n)) {
- let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
- if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
- let o = this.findForcedReduction();
- if (o == null)
- return !1;
- n = o;
- }
- this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
- }
- return this.reducePos = this.pos, this.reduce(n), !0;
- }
- /**
- Try to scan through the automaton to find some kind of reduction
- that can be applied. Used when the regular ForcedReduce field
- isn't a valid action. @internal
- */
- findForcedReduction() {
- let { parser: e } = this.p, n = [], r = (i, a) => {
- if (!n.includes(i))
- return n.push(i), e.allActions(i, (o) => {
- if (!(o & 393216)) if (o & 65536) {
- let s = (o >> 19) - a;
- if (s > 1) {
- let l = o & 65535, u = this.stack.length - s * 3;
- if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
- return s << 19 | 65536 | l;
- }
- } else {
- let s = r(o, a + 1);
- if (s != null)
- return s;
- }
- });
- };
- return r(this.state, 0);
- }
- /**
- @internal
- */
- forceAll() {
- for (; !this.p.parser.stateFlag(
- this.state,
- 2
- /* StateFlag.Accepting */
- ); )
- if (!this.forceReduce()) {
- this.storeNode(0, this.pos, this.pos, 4, !0);
- break;
- }
- return this;
- }
- /**
- Check whether this state has no further actions (assumed to be a direct descendant of the
- top state, since any other states must be able to continue
- somehow). @internal
- */
- get deadEnd() {
- if (this.stack.length != 3)
- return !1;
- let { parser: e } = this.p;
- return e.data[e.stateSlot(
- this.state,
- 1
- /* ParseState.Actions */
- )] == 65535 && !e.stateSlot(
- this.state,
- 4
- /* ParseState.DefaultReduce */
- );
- }
- /**
- Restart the stack (put it back in its start state). Only safe
- when this.stack.length == 3 (state is directly below the top
- state). @internal
- */
- restart() {
- this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
- }
- /**
- @internal
- */
- sameState(e) {
- if (this.state != e.state || this.stack.length != e.stack.length)
- return !1;
- for (let n = 0; n < this.stack.length; n += 3)
- if (this.stack[n] != e.stack[n])
- return !1;
- return !0;
- }
- /**
- Get the parser used by this stack.
- */
- get parser() {
- return this.p.parser;
- }
- /**
- Test whether a given dialect (by numeric ID, as exported from
- the terms file) is enabled.
- */
- dialectEnabled(e) {
- return this.p.parser.dialect.flags[e];
- }
- shiftContext(e, n) {
- this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
- }
- reduceContext(e, n) {
- this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
- }
- /**
- @internal
- */
- emitContext() {
- let e = this.buffer.length - 1;
- (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
- }
- /**
- @internal
- */
- emitLookAhead() {
- let e = this.buffer.length - 1;
- (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
- }
- updateContext(e) {
- if (e != this.curContext.context) {
- let n = new GJ(this.curContext.tracker, e);
- n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
- }
- }
- /**
- @internal
- */
- setLookAhead(e) {
- e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
- }
- /**
- @internal
- */
- close() {
- this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
- }
- }
- class GJ {
- constructor(e, n) {
- this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
- }
- }
- class W$t {
- constructor(e) {
- this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
- }
- reduce(e) {
- let n = e & 65535, r = e >> 19;
- r == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (r - 1) * 3;
- let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
- this.state = i;
- }
- }
- class YT {
- constructor(e, n, r) {
- this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
- }
- static create(e, n = e.bufferBase + e.buffer.length) {
- return new YT(e, n, n - e.bufferBase);
- }
- maybeNext() {
- let e = this.stack.parent;
- e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
- }
- get id() {
- return this.buffer[this.index - 4];
- }
- get start() {
- return this.buffer[this.index - 3];
- }
- get end() {
- return this.buffer[this.index - 2];
- }
- get size() {
- return this.buffer[this.index - 1];
- }
- next() {
- this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
- }
- fork() {
- return new YT(this.stack, this.pos, this.index);
- }
- }
- function My(t, e = Uint16Array) {
- if (typeof t != "string")
- return t;
- let n = null;
- for (let r = 0, i = 0; r < t.length; ) {
- let a = 0;
- for (; ; ) {
- let o = t.charCodeAt(r++), s = !1;
- if (o == 126) {
- a = 65535;
- break;
- }
- o >= 92 && o--, o >= 34 && o--;
- let l = o - 32;
- if (l >= 46 && (l -= 46, s = !0), a += l, s)
- break;
- a *= 46;
- }
- n ? n[i++] = a : n = new e(a);
- }
- return n;
- }
- class Lw {
- constructor() {
- this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
- }
- }
- const jJ = new Lw();
- class Q$t {
- /**
- @internal
- */
- constructor(e, n) {
- this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = jJ, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
- }
- /**
- @internal
- */
- resolveOffset(e, n) {
- let r = this.range, i = this.rangeIndex, a = this.pos + e;
- for (; a < r.from; ) {
- if (!i)
- return null;
- let o = this.ranges[--i];
- a -= r.from - o.to, r = o;
- }
- for (; n < 0 ? a > r.to : a >= r.to; ) {
- if (i == this.ranges.length - 1)
- return null;
- let o = this.ranges[++i];
- a += o.from - r.to, r = o;
- }
- return a;
- }
- /**
- @internal
- */
- clipPos(e) {
- if (e >= this.range.from && e < this.range.to)
- return e;
- for (let n of this.ranges)
- if (n.to > e)
- return Math.max(e, n.from);
- return this.end;
- }
- /**
- Look at a code unit near the stream position. `.peek(0)` equals
- `.next`, `.peek(-1)` gives you the previous character, and so
- on.
-
- Note that looking around during tokenizing creates dependencies
- on potentially far-away content, which may reduce the
- effectiveness incremental parsing—when looking forward—or even
- cause invalid reparses when looking backward more than 25 code
- units, since the library does not track lookbehind.
- */
- peek(e) {
- let n = this.chunkOff + e, r, i;
- if (n >= 0 && n < this.chunk.length)
- r = this.pos + e, i = this.chunk.charCodeAt(n);
- else {
- let a = this.resolveOffset(e, 1);
- if (a == null)
- return -1;
- if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
- i = this.chunk2.charCodeAt(r - this.chunk2Pos);
- else {
- let o = this.rangeIndex, s = this.range;
- for (; s.to <= r; )
- s = this.ranges[++o];
- this.chunk2 = this.input.chunk(this.chunk2Pos = r), r + this.chunk2.length > s.to && (this.chunk2 = this.chunk2.slice(0, s.to - r)), i = this.chunk2.charCodeAt(0);
- }
- }
- return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
- }
- /**
- Accept a token. By default, the end of the token is set to the
- current stream position, but you can pass an offset (relative to
- the stream position) to change that.
- */
- acceptToken(e, n = 0) {
- let r = n ? this.resolveOffset(n, -1) : this.pos;
- if (r == null || r < this.token.start)
- throw new RangeError("Token end out of bounds");
- this.token.value = e, this.token.end = r;
- }
- /**
- Accept a token ending at a specific given position.
- */
- acceptTokenTo(e, n) {
- this.token.value = e, this.token.end = n;
- }
- getChunk() {
- if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
- let { chunk: e, chunkPos: n } = this;
- this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
- } else {
- this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
- let e = this.input.chunk(this.pos), n = this.pos + e.length;
- this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
- }
- }
- readNext() {
- return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
- }
- /**
- Move the stream forward N (defaults to 1) code units. Returns
- the new value of [`next`](#lr.InputStream.next).
- */
- advance(e = 1) {
- for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
- if (this.rangeIndex == this.ranges.length - 1)
- return this.setDone();
- e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
- }
- return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
- }
- setDone() {
- return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
- }
- /**
- @internal
- */
- reset(e, n) {
- if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = jJ, this.pos != e) {
- if (this.pos = e, e == this.end)
- return this.setDone(), this;
- for (; e < this.range.from; )
- this.range = this.ranges[--this.rangeIndex];
- for (; e >= this.range.to; )
- this.range = this.ranges[++this.rangeIndex];
- e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
- }
- return this;
- }
- /**
- @internal
- */
- read(e, n) {
- if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
- return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
- if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
- return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
- if (e >= this.range.from && n <= this.range.to)
- return this.input.read(e, n);
- let r = "";
- for (let i of this.ranges) {
- if (i.from >= n)
- break;
- i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
- }
- return r;
- }
- }
- class ug {
- constructor(e, n) {
- this.data = e, this.id = n;
- }
- token(e, n) {
- let { parser: r } = n.p;
- Ame(this.data, e, n, this.id, r.data, r.tokenPrecTable);
- }
- }
- ug.prototype.contextual = ug.prototype.fallback = ug.prototype.extend = !1;
- class j4 {
- constructor(e, n, r) {
- this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? My(e) : e;
- }
- token(e, n) {
- let r = e.pos, i = 0;
- for (; ; ) {
- let a = e.next < 0, o = e.resolveOffset(1, 1);
- if (Ame(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
- break;
- if (this.elseToken == null)
- return;
- if (a || i++, o == null)
- break;
- e.reset(o, e.token);
- }
- i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
- }
- }
- j4.prototype.contextual = ug.prototype.fallback = ug.prototype.extend = !1;
- class p$ {
- /**
- Create a tokenizer. The first argument is the function that,
- given an input stream, scans for the types of tokens it
- recognizes at the stream's position, and calls
- [`acceptToken`](#lr.InputStream.acceptToken) when it finds
- one.
- */
- constructor(e, n = {}) {
- this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
- }
- }
- function Ame(t, e, n, r, i, a) {
- let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
- e: for (; s & t[o]; ) {
- let u = t[o + 1];
- for (let h = o + 3; h < u; h += 2)
- if ((t[h + 1] & s) > 0) {
- let p = t[h];
- if (l.allows(p) && (e.token.value == -1 || e.token.value == p || H$t(p, e.token.value, i, a))) {
- e.acceptToken(p);
- break;
- }
- }
- let c = e.next, f = 0, d = t[o + 2];
- if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
- o = t[u + d * 3 - 1];
- continue e;
- }
- for (; f < d; ) {
- let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
- if (c < v)
- d = h;
- else if (c >= g)
- f = h + 1;
- else {
- o = t[p + 2], e.advance();
- continue e;
- }
- }
- break;
- }
- }
- function ZJ(t, e, n) {
- for (let r = e, i; (i = t[r]) != 65535; r++)
- if (i == n)
- return r - e;
- return -1;
- }
- function H$t(t, e, n, r) {
- let i = ZJ(n, r, e);
- return i < 0 || ZJ(n, r, t) < i;
- }
- const qa = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
- let wD = null;
- function UJ(t, e, n) {
- let r = t.cursor(Ur.IncludeAnonymous);
- for (r.moveTo(e); ; )
- if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
- for (; ; ) {
- if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
- return n < 0 ? Math.max(0, Math.min(
- r.to - 1,
- e - 25
- /* Lookahead.Margin */
- )) : Math.min(t.length, Math.max(
- r.from + 1,
- e + 25
- /* Lookahead.Margin */
- ));
- if (n < 0 ? r.prevSibling() : r.nextSibling())
- break;
- if (!r.parent())
- return n < 0 ? 0 : t.length;
- }
- }
- class G$t {
- constructor(e, n) {
- this.fragments = e, this.nodeSet = n, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
- }
- nextFragment() {
- let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
- if (e) {
- for (this.safeFrom = e.openStart ? UJ(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? UJ(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
- this.trees.pop(), this.start.pop(), this.index.pop();
- this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
- } else
- this.nextStart = 1e9;
- }
- // `pos` must be >= any previously given `pos` for this cursor
- nodeAt(e) {
- if (e < this.nextStart)
- return null;
- for (; this.fragment && this.safeTo <= e; )
- this.nextFragment();
- if (!this.fragment)
- return null;
- for (; ; ) {
- let n = this.trees.length - 1;
- if (n < 0)
- return this.nextFragment(), null;
- let r = this.trees[n], i = this.index[n];
- if (i == r.children.length) {
- this.trees.pop(), this.start.pop(), this.index.pop();
- continue;
- }
- let a = r.children[i], o = this.start[n] + r.positions[i];
- if (o > e)
- return this.nextStart = o, null;
- if (a instanceof Vr) {
- if (o == e) {
- if (o < this.safeFrom)
- return null;
- let s = o + a.length;
- if (s <= this.safeTo) {
- let l = a.prop(rn.lookAhead);
- if (!l || s + l < this.fragment.to)
- return a;
- }
- }
- this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
- } else
- this.index[n]++, this.nextStart = o + a.length;
- }
- }
- }
- class j$t {
- constructor(e, n) {
- this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new Lw());
- }
- getActions(e) {
- let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
- e.state,
- 3
- /* ParseState.TokenizerMask */
- ), s = e.curContext ? e.curContext.hash : 0, l = 0;
- for (let u = 0; u < a.length; u++) {
- if (!(1 << u & o))
- continue;
- let c = a[u], f = this.tokens[u];
- if (!(r && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != s) && (this.updateCachedToken(f, c, e), f.mask = o, f.context = s), f.lookAhead > f.end + 25 && (l = Math.max(f.lookAhead, l)), f.value != 0)) {
- let d = n;
- if (f.extended > -1 && (n = this.addActions(e, f.extended, f.end, n)), n = this.addActions(e, f.value, f.end, n), !c.extend && (r = f, n > d))
- break;
- }
- }
- for (; this.actions.length > n; )
- this.actions.pop();
- return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new Lw(), r.value = e.p.parser.eofTerm, r.start = r.end = e.pos, n = this.addActions(e, r.value, r.end, n)), this.mainToken = r, this.actions;
- }
- getMainToken(e) {
- if (this.mainToken)
- return this.mainToken;
- let n = new Lw(), { pos: r, p: i } = e;
- return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
- }
- updateCachedToken(e, n, r) {
- let i = this.stream.clipPos(r.pos);
- if (n.token(this.stream.reset(i, e), r), e.value > -1) {
- let { parser: a } = r.p;
- for (let o = 0; o < a.specialized.length; o++)
- if (a.specialized[o] == e.value) {
- let s = a.specializers[o](this.stream.read(e.start, e.end), r);
- if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
- s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
- break;
- }
- }
- } else
- e.value = 0, e.end = this.stream.clipPos(i + 1);
- }
- putAction(e, n, r, i) {
- for (let a = 0; a < i; a += 3)
- if (this.actions[a] == e)
- return i;
- return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
- }
- addActions(e, n, r, i) {
- let { state: a } = e, { parser: o } = e.p, { data: s } = o;
- for (let l = 0; l < 2; l++)
- for (let u = o.stateSlot(
- a,
- l ? 2 : 1
- /* ParseState.Actions */
- ); ; u += 3) {
- if (s[u] == 65535)
- if (s[u + 1] == 1)
- u = Ou(s, u + 2);
- else {
- i == 0 && s[u + 1] == 2 && (i = this.putAction(Ou(s, u + 2), n, r, i));
- break;
- }
- s[u] == n && (i = this.putAction(Ou(s, u + 1), n, r, i));
- }
- return i;
- }
- }
- class Z$t {
- constructor(e, n, r, i) {
- this.parser = e, this.input = n, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new Q$t(n, i), this.tokens = new j$t(e, this.stream), this.topTerm = e.top[1];
- let { from: a } = i[0];
- this.stacks = [XT.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new G$t(r, e.nodeSet) : null;
- }
- get parsedPos() {
- return this.minStackPos;
- }
- // Move the parser forward. This will process all parse stacks at
- // `this.pos` and try to advance them to a further position. If no
- // stack for such a position is found, it'll start error-recovery.
- //
- // When the parse is finished, this will return a syntax tree. When
- // not, it returns `null`.
- advance() {
- let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
- if (this.bigReductionCount > 300 && e.length == 1) {
- let [o] = e;
- for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
- ;
- this.bigReductionCount = this.lastBigReductionSize = 0;
- }
- for (let o = 0; o < e.length; o++) {
- let s = e[o];
- for (; ; ) {
- if (this.tokens.mainToken = null, s.pos > n)
- r.push(s);
- else {
- if (this.advanceStack(s, r, e))
- continue;
- {
- i || (i = [], a = []), i.push(s);
- let l = this.tokens.getMainToken(s);
- a.push(l.value, l.end);
- }
- }
- break;
- }
- }
- if (!r.length) {
- let o = i && Y$t(i);
- if (o)
- return qa && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
- if (this.parser.strict)
- throw qa && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
- this.recovering || (this.recovering = 5);
- }
- if (this.recovering && i) {
- let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
- if (o)
- return qa && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
- }
- if (this.recovering) {
- let o = this.recovering == 1 ? 1 : this.recovering * 3;
- if (r.length > o)
- for (r.sort((s, l) => l.score - s.score); r.length > o; )
- r.pop();
- r.some((s) => s.reducePos > n) && this.recovering--;
- } else if (r.length > 1) {
- e: for (let o = 0; o < r.length - 1; o++) {
- let s = r[o];
- for (let l = o + 1; l < r.length; l++) {
- let u = r[l];
- if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
- if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
- r.splice(l--, 1);
- else {
- r.splice(o--, 1);
- continue e;
- }
- }
- }
- r.length > 12 && r.splice(
- 12,
- r.length - 12
- /* Rec.MaxStackCount */
- );
- }
- this.minStackPos = r[0].pos;
- for (let o = 1; o < r.length; o++)
- r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
- return null;
- }
- stopAt(e) {
- if (this.stoppedAt != null && this.stoppedAt < e)
- throw new RangeError("Can't move stoppedAt forward");
- this.stoppedAt = e;
- }
- // Returns an updated version of the given stack, or null if the
- // stack can't advance normally. When `split` and `stacks` are
- // given, stacks split off by ambiguous operations will be pushed to
- // `split`, or added to `stacks` if they move `pos` forward.
- advanceStack(e, n, r) {
- let i = e.pos, { parser: a } = this, o = qa ? this.stackID(e) + " -> " : "";
- if (this.stoppedAt != null && i > this.stoppedAt)
- return e.forceReduce() ? e : null;
- if (this.fragments) {
- let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
- for (let f = this.fragments.nodeAt(i); f; ) {
- let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
- if (d > -1 && f.length && (!u || (f.prop(rn.contextHash) || 0) == c))
- return e.useNode(f, d), qa && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
- if (!(f instanceof Vr) || f.children.length == 0 || f.positions[0] > 0)
- break;
- let h = f.children[0];
- if (h instanceof Vr && f.positions[0] == 0)
- f = h;
- else
- break;
- }
- }
- let s = a.stateSlot(
- e.state,
- 4
- /* ParseState.DefaultReduce */
- );
- if (s > 0)
- return e.reduce(s), qa && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
- s & 65535
- /* Action.ValueMask */
- )})`), !0;
- if (e.stack.length >= 8400)
- for (; e.stack.length > 6e3 && e.forceReduce(); )
- ;
- let l = this.tokens.getActions(e);
- for (let u = 0; u < l.length; ) {
- let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
- if (p.apply(c, f, v ? v.start : p.pos, d), qa && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
- c & 65535
- /* Action.ValueMask */
- )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
- return !0;
- p.pos > i ? n.push(p) : r.push(p);
- }
- return !1;
- }
- // Advance a given stack forward as far as it will go. Returns the
- // (possibly updated) stack if it got stuck, or null if it moved
- // forward and was given to `pushStackDedup`.
- advanceFully(e, n) {
- let r = e.pos;
- for (; ; ) {
- if (!this.advanceStack(e, null, null))
- return !1;
- if (e.pos > r)
- return XJ(e, n), !0;
- }
- }
- runRecovery(e, n, r) {
- let i = null, a = !1;
- for (let o = 0; o < e.length; o++) {
- let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = qa ? this.stackID(s) + " -> " : "";
- if (s.deadEnd && (a || (a = !0, s.restart(), qa && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
- continue;
- let f = s.split(), d = c;
- for (let h = 0; f.forceReduce() && h < 10 && (qa && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
- qa && (d = this.stackID(f) + " -> ");
- for (let h of s.recoverByInsert(l))
- qa && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
- this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), qa && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), XJ(s, r)) : (!i || i.score < s.score) && (i = s);
- }
- return i;
- }
- // Convert the stack's buffer to a syntax tree.
- stackToTree(e) {
- return e.close(), Vr.build({
- buffer: YT.create(e),
- nodeSet: this.parser.nodeSet,
- topID: this.topTerm,
- maxBufferLength: this.parser.bufferLength,
- reused: this.reused,
- start: this.ranges[0].from,
- length: e.pos - this.ranges[0].from,
- minRepeatType: this.parser.minRepeatTerm
- });
- }
- stackID(e) {
- let n = (wD || (wD = /* @__PURE__ */ new WeakMap())).get(e);
- return n || wD.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
- }
- }
- function XJ(t, e) {
- for (let n = 0; n < e.length; n++) {
- let r = e[n];
- if (r.pos == t.pos && r.sameState(t)) {
- e[n].score < t.score && (e[n] = t);
- return;
- }
- }
- e.push(t);
- }
- class U$t {
- constructor(e, n, r) {
- this.source = e, this.flags = n, this.disabled = r;
- }
- allows(e) {
- return !this.disabled || this.disabled[e] == 0;
- }
- }
- const CD = (t) => t;
- class X$t {
- /**
- Define a context tracker.
- */
- constructor(e) {
- this.start = e.start, this.shift = e.shift || CD, this.reduce = e.reduce || CD, this.reuse = e.reuse || CD, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
- }
- }
- class I_ extends nge {
- /**
- @internal
- */
- constructor(e) {
- if (super(), this.wrappers = [], e.version != 14)
- throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
- let n = e.nodeNames.split(" ");
- this.minRepeatTerm = n.length;
- for (let s = 0; s < e.repeatNodeCount; s++)
- n.push("");
- let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
- for (let s = 0; s < n.length; s++)
- i.push([]);
- function a(s, l, u) {
- i[s].push([l, l.deserialize(String(u))]);
- }
- if (e.nodeProps)
- for (let s of e.nodeProps) {
- let l = s[0];
- typeof l == "string" && (l = rn[l]);
- for (let u = 1; u < s.length; ) {
- let c = s[u++];
- if (c >= 0)
- a(c, l, s[u++]);
- else {
- let f = s[u + -c];
- for (let d = -c; d > 0; d--)
- a(s[u++], l, f);
- u++;
- }
- }
- }
- this.nodeSet = new cB(n.map((s, l) => Va.define({
- name: l >= this.minRepeatTerm ? void 0 : s,
- id: l,
- props: i[l],
- top: r.indexOf(l) > -1,
- error: l == 0,
- skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
- }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = Kve;
- let o = My(e.tokenData);
- this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
- for (let s = 0; s < this.specializerSpecs.length; s++)
- this.specialized[s] = this.specializerSpecs[s].term;
- this.specializers = this.specializerSpecs.map(YJ), this.states = My(e.states, Uint32Array), this.data = My(e.stateData), this.goto = My(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new ug(o, s) : s), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
- }
- createParse(e, n, r) {
- let i = new Z$t(this, e, n, r);
- for (let a of this.wrappers)
- i = a(i, e, n, r);
- return i;
- }
- /**
- Get a goto table entry @internal
- */
- getGoto(e, n, r = !1) {
- let i = this.goto;
- if (n >= i[0])
- return -1;
- for (let a = i[n + 1]; ; ) {
- let o = i[a++], s = o & 1, l = i[a++];
- if (s && r)
- return l;
- for (let u = a + (o >> 1); a < u; a++)
- if (i[a] == e)
- return l;
- if (s)
- return -1;
- }
- }
- /**
- Check if this state has an action for a given terminal @internal
- */
- hasAction(e, n) {
- let r = this.data;
- for (let i = 0; i < 2; i++)
- for (let a = this.stateSlot(
- e,
- i ? 2 : 1
- /* ParseState.Actions */
- ), o; ; a += 3) {
- if ((o = r[a]) == 65535)
- if (r[a + 1] == 1)
- o = r[a = Ou(r, a + 2)];
- else {
- if (r[a + 1] == 2)
- return Ou(r, a + 2);
- break;
- }
- if (o == n || o == 0)
- return Ou(r, a + 1);
- }
- return 0;
- }
- /**
- @internal
- */
- stateSlot(e, n) {
- return this.states[e * 6 + n];
- }
- /**
- @internal
- */
- stateFlag(e, n) {
- return (this.stateSlot(
- e,
- 0
- /* ParseState.Flags */
- ) & n) > 0;
- }
- /**
- @internal
- */
- validAction(e, n) {
- return !!this.allActions(e, (r) => r == n ? !0 : null);
- }
- /**
- @internal
- */
- allActions(e, n) {
- let r = this.stateSlot(
- e,
- 4
- /* ParseState.DefaultReduce */
- ), i = r ? n(r) : void 0;
- for (let a = this.stateSlot(
- e,
- 1
- /* ParseState.Actions */
- ); i == null; a += 3) {
- if (this.data[a] == 65535)
- if (this.data[a + 1] == 1)
- a = Ou(this.data, a + 2);
- else
- break;
- i = n(Ou(this.data, a + 1));
- }
- return i;
- }
- /**
- Get the states that can follow this one through shift actions or
- goto jumps. @internal
- */
- nextStates(e) {
- let n = [];
- for (let r = this.stateSlot(
- e,
- 1
- /* ParseState.Actions */
- ); ; r += 3) {
- if (this.data[r] == 65535)
- if (this.data[r + 1] == 1)
- r = Ou(this.data, r + 2);
- else
- break;
- if (!(this.data[r + 2] & 1)) {
- let i = this.data[r + 1];
- n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
- }
- }
- return n;
- }
- /**
- Configure the parser. Returns a new parser instance that has the
- given settings modified. Settings not provided in `config` are
- kept from the original parser.
- */
- configure(e) {
- let n = Object.assign(Object.create(I_.prototype), this);
- if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
- let r = this.topRules[e.top];
- if (!r)
- throw new RangeError(`Invalid top rule name ${e.top}`);
- n.top = r;
- }
- return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
- let i = e.tokenizers.find((a) => a.from == r);
- return i ? i.to : r;
- })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
- let a = e.specializers.find((s) => s.from == r.external);
- if (!a)
- return r;
- let o = Object.assign(Object.assign({}, r), { external: a.to });
- return n.specializers[i] = YJ(o), o;
- })), e.contextTracker && (n.context = e.contextTracker), e.dialect && (n.dialect = this.parseDialect(e.dialect)), e.strict != null && (n.strict = e.strict), e.wrap && (n.wrappers = n.wrappers.concat(e.wrap)), e.bufferLength != null && (n.bufferLength = e.bufferLength), n;
- }
- /**
- Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
- are registered for this parser.
- */
- hasWrappers() {
- return this.wrappers.length > 0;
- }
- /**
- Returns the name associated with a given term. This will only
- work for all terms when the parser was generated with the
- `--names` option. By default, only the names of tagged terms are
- stored.
- */
- getName(e) {
- return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
- }
- /**
- The eof term id is always allocated directly after the node
- types. @internal
- */
- get eofTerm() {
- return this.maxNode + 1;
- }
- /**
- The type of top node produced by the parser.
- */
- get topNode() {
- return this.nodeSet.types[this.top[1]];
- }
- /**
- @internal
- */
- dynamicPrecedence(e) {
- let n = this.dynamicPrecedences;
- return n == null ? 0 : n[e] || 0;
- }
- /**
- @internal
- */
- parseDialect(e) {
- let n = Object.keys(this.dialects), r = n.map(() => !1);
- if (e)
- for (let a of e.split(" ")) {
- let o = n.indexOf(a);
- o >= 0 && (r[o] = !0);
- }
- let i = null;
- for (let a = 0; a < n.length; a++)
- if (!r[a])
- for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
- (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
- return new U$t(e, r, i);
- }
- /**
- Used by the output of the parser generator. Not available to
- user code. @hide
- */
- static deserialize(e) {
- return new I_(e);
- }
- }
- function Ou(t, e) {
- return t[e] | t[e + 1] << 16;
- }
- function Y$t(t) {
- let e = null;
- for (let n of t) {
- let r = n.p.stoppedAt;
- (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
- n.state,
- 2
- /* StateFlag.Accepting */
- ) && (!e || e.score < n.score) && (e = n);
- }
- return e;
- }
- function YJ(t) {
- if (t.external) {
- let e = t.extend ? 1 : 0;
- return (n, r) => t.external(n, r) << 1 | e;
- }
- return t.get;
- }
- const q$t = 312, qJ = 1, K$t = 2, J$t = 3, eAt = 4, tAt = 313, nAt = 315, rAt = 316, iAt = 5, aAt = 6, oAt = 0, Z4 = [
- 9,
- 10,
- 11,
- 12,
- 13,
- 32,
- 133,
- 160,
- 5760,
- 8192,
- 8193,
- 8194,
- 8195,
- 8196,
- 8197,
- 8198,
- 8199,
- 8200,
- 8201,
- 8202,
- 8232,
- 8233,
- 8239,
- 8287,
- 12288
- ], Eme = 125, sAt = 59, U4 = 47, lAt = 42, uAt = 43, cAt = 45, fAt = 60, dAt = 44, hAt = 63, pAt = 46, vAt = new X$t({
- start: !1,
- shift(t, e) {
- return e == iAt || e == aAt || e == nAt ? t : e == rAt;
- },
- strict: !1
- }), gAt = new p$((t, e) => {
- let { next: n } = t;
- (n == Eme || n == -1 || e.context) && t.acceptToken(tAt);
- }, { contextual: !0, fallback: !0 }), mAt = new p$((t, e) => {
- let { next: n } = t, r;
- Z4.indexOf(n) > -1 || n == U4 && ((r = t.peek(1)) == U4 || r == lAt) || n != Eme && n != sAt && n != -1 && !e.context && t.acceptToken(q$t);
- }, { contextual: !0 }), yAt = new p$((t, e) => {
- let { next: n } = t;
- if (n == uAt || n == cAt) {
- if (t.advance(), n == t.next) {
- t.advance();
- let r = !e.context && e.canShift(qJ);
- t.acceptToken(r ? qJ : K$t);
- }
- } else n == hAt && t.peek(1) == pAt && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(J$t));
- }, { contextual: !0 });
- function TD(t, e) {
- return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
- }
- const bAt = new p$((t, e) => {
- if (t.next != fAt || !e.dialectEnabled(oAt) || (t.advance(), t.next == U4)) return;
- let n = 0;
- for (; Z4.indexOf(t.next) > -1; )
- t.advance(), n++;
- if (TD(t.next, !0)) {
- for (t.advance(), n++; TD(t.next, !1); )
- t.advance(), n++;
- for (; Z4.indexOf(t.next) > -1; )
- t.advance(), n++;
- if (t.next == dAt) return;
- for (let r = 0; ; r++) {
- if (r == 7) {
- if (!TD(t.next, !0)) return;
- break;
- }
- if (t.next != "extends".charCodeAt(r)) break;
- t.advance(), n++;
- }
- }
- t.acceptToken(eAt, -n);
- }), _At = pB({
- "get set async static": ce.modifier,
- "for while do if else switch try catch finally return throw break continue default case": ce.controlKeyword,
- "in of await yield void typeof delete instanceof": ce.operatorKeyword,
- "let var const using function class extends": ce.definitionKeyword,
- "import export from": ce.moduleKeyword,
- "with debugger as new": ce.keyword,
- TemplateString: ce.special(ce.string),
- super: ce.atom,
- BooleanLiteral: ce.bool,
- this: ce.self,
- null: ce.null,
- Star: ce.modifier,
- VariableName: ce.variableName,
- "CallExpression/VariableName TaggedTemplateExpression/VariableName": ce.function(ce.variableName),
- VariableDefinition: ce.definition(ce.variableName),
- Label: ce.labelName,
- PropertyName: ce.propertyName,
- PrivatePropertyName: ce.special(ce.propertyName),
- "CallExpression/MemberExpression/PropertyName": ce.function(ce.propertyName),
- "FunctionDeclaration/VariableDefinition": ce.function(ce.definition(ce.variableName)),
- "ClassDeclaration/VariableDefinition": ce.definition(ce.className),
- PropertyDefinition: ce.definition(ce.propertyName),
- PrivatePropertyDefinition: ce.definition(ce.special(ce.propertyName)),
- UpdateOp: ce.updateOperator,
- "LineComment Hashbang": ce.lineComment,
- BlockComment: ce.blockComment,
- Number: ce.number,
- String: ce.string,
- Escape: ce.escape,
- ArithOp: ce.arithmeticOperator,
- LogicOp: ce.logicOperator,
- BitOp: ce.bitwiseOperator,
- CompareOp: ce.compareOperator,
- RegExp: ce.regexp,
- Equals: ce.definitionOperator,
- Arrow: ce.function(ce.punctuation),
- ": Spread": ce.punctuation,
- "( )": ce.paren,
- "[ ]": ce.squareBracket,
- "{ }": ce.brace,
- "InterpolationStart InterpolationEnd": ce.special(ce.brace),
- ".": ce.derefOperator,
- ", ;": ce.separator,
- "@": ce.meta,
- TypeName: ce.typeName,
- TypeDefinition: ce.definition(ce.typeName),
- "type enum interface implements namespace module declare": ce.definitionKeyword,
- "abstract global Privacy readonly override": ce.modifier,
- "is keyof unique infer": ce.operatorKeyword,
- JSXAttributeValue: ce.attributeValue,
- JSXText: ce.content,
- "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": ce.angleBracket,
- "JSXIdentifier JSXNameSpacedName": ce.tagName,
- "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": ce.attributeName,
- "JSXBuiltin/JSXIdentifier": ce.standard(ce.tagName)
- }), OAt = { __proto__: null, export: 20, as: 25, from: 33, default: 36, async: 41, function: 42, extends: 54, this: 58, true: 66, false: 66, null: 78, void: 82, typeof: 86, super: 102, new: 136, delete: 148, yield: 157, await: 161, class: 166, public: 229, private: 229, protected: 229, readonly: 231, instanceof: 250, satisfies: 253, in: 254, const: 256, import: 290, keyof: 345, unique: 349, infer: 355, is: 391, abstract: 411, implements: 413, type: 415, let: 418, var: 420, using: 423, interface: 429, enum: 433, namespace: 439, module: 441, declare: 445, global: 449, for: 468, of: 477, while: 480, with: 484, do: 488, if: 492, else: 494, switch: 498, case: 504, try: 510, catch: 514, finally: 518, return: 522, throw: 526, break: 530, continue: 534, debugger: 538 }, SAt = { __proto__: null, async: 123, get: 125, set: 127, declare: 189, public: 191, private: 191, protected: 191, static: 193, abstract: 195, override: 197, readonly: 203, accessor: 205, new: 395 }, xAt = { __proto__: null, "<": 187 }, wAt = I_.deserialize({
- version: 14,
- states: "$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-E<f-E<fO9^QWO,5=[O!$VQWO,5=[O!$[Q^O,5;WO!&_Q7[O'#EhO!'xQWO,5;WO!'}Q^O'#DvO!(XQ`O,5;aO!(aQ`O,5;aO%[Q^O,5;aOOQU'#FS'#FSOOQU'#FU'#FUO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bOOQU'#FY'#FYO!(oQ^O,5;sOOQ?Mr,5;x,5;xOOQ?Mr,5;y,5;yOOQ?Mr,5;{,5;{O%[Q^O'#IlO!*rQ?MxO,5<gO%[Q^O,5;bO!&_Q7[O,5;bO!+aQ7[O,5;bO!-RQ7[O'#EZO%[Q^O,5;vOOQ?Mr,5;z,5;zO!-YQ&jO'#FiO!.VQ&jO'#KSO!-qQ&jO'#KSO!.^Q&jO'#KSOOQO'#KS'#KSO!.rQ&jO,5<ROOOS,5<_,5<_O!/TQ^O'#FuOOOS'#Ik'#IkO7VO,YO,5<PO!/[Q&jO'#FwOOQ?Mr,5<P,5<PO!/{Q!LQO'#CvOOQ?Mr'#Cz'#CzO!0`O!0LbO'#DOO!0|Q7[O,5<dO!1TQWO,5<fO!2pQ$ISO'#GVO!2}QWO'#GWO!3SQWO'#GWO!4rQ$ISO'#G[O!5nQ`O'#G`OOQO'#Gk'#GkO!+hQ7[O'#GjOOQO'#Gm'#GmO!+hQ7[O'#GlO!6aQ!LQO'#JgOOQ?Mr'#Jg'#JgO!6kQWO'#JfO!6yQWO'#JeO!7RQWO'#CuOOQ?Mr'#Cx'#CxO!7ZQWO'#CzOOQ?Mr'#DS'#DSOOQ?Mr'#DU'#DUO1SQWO'#DWO!+hQ7[O'#F}O!+hQ7[O'#GPO!7`QWO'#GRO!7eQWO'#GSO!3SQWO'#GYO!+hQ7[O'#G_O!7jQWO'#EnO!8XQWO,5<eOOQ?Mp'#Cr'#CrO!8aQWO'#EoO!9ZQ`O'#EpOOQ?Mp'#J|'#J|O!9bQ?MxO'#K]O9hQ?MxO,5=`O`Q^O,5>pOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-E<X-E<XO!;aQ?NdO,5:_O!9UQ`O,5:]O!=zQ?NdO,5:gO%[Q^O,5:gO!@bQ?NdO,5:iOOQO,5@v,5@vO!ARQ7[O,5=[O!AaQ?MxO'#JdO9RQWO'#JdO!ArQ?MxO,59ZO!A}Q`O,59ZO!BVQ7[O,59ZO:VQ7[O,59ZO!BbQWO,5;WO!BjQWO'#H^O!COQWO'#K`O%[Q^O,5;|O!9UQ`O,5<OO!CWQWO,5=wO!C]QWO,5=wO!CbQWO,5=wO9hQ?MxO,5=wO;wQWO,5=gOOQO'#Cv'#CvO!CpQ`O,5=dO!CxQ7[O,5=eO!DTQWO,5=gO!DYQpO,5=jO!DbQWO'#K[O>tQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-E<b-E<bO#(XQ?NQO,5;OOCrQ`O,5:oO#(cQ`O,5:oOCrQ`O,5;OO!ArQ?MxO,5:oOOQ?Mp'#Eg'#EgOOQO,5;O,5;OO%[Q^O,5;OO#(pQ?MxO,5;OO#({Q?MxO,5;OO!A}Q`O,5:oOOQO,5;U,5;UO#)ZQ?MxO,5;OPOOO'#IY'#IYP#)oO#@ItO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ?Mr1G.p1G.pOOOO-E<Z-E<ZO#)zQpO,59zOOOO-E<]-E<]OOQ?Mr1G/d1G/dO#*PQrO,5>zO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-E<d-E<dO#*wQWO,5@iOOQ?Mp1G0u1G0uOOQ?Mv1G/u1G/uOOQ?Mv1G0V1G0VO%[Q^O,5@gO#+eQ?MxO,5@gO#+vQ?MxO,5@gO#+}QWO,5@fO9WQWO,5@fO#,VQWO,5@fO#,eQWO'#IiO#+}QWO,5@fOOQ?Mp1G0t1G0tO!(XQ`O,5:rO!(dQ`O,5:rOOQQ,5:t,5:tO#-VQYO,5:tO#-_Q7[O1G2vO9^QWO1G2vOOQ?Mr1G0r1G0rO#-mQ?NdO1G0rO#.rQ?NbO,5;SOOQ?Mr'#GU'#GUO#/`Q?NdO'#JgO!$[Q^O1G0rO#1hQrO'#JrO%[Q^O'#JrO#1rQWO,5:bOOQ?Mr'#D['#D[OOQ?Mr1G0{1G0{O%[Q^O1G0{OOQ?Mr1G1e1G1eO#1wQWO1G0{O#4]Q?NdO1G0|O#4dQ?NdO1G0|O#6zQ?NdO1G0|O#7RQ?NdO1G0|O#9iQ?NdO1G0|O#<PQ?NdO1G0|O#<WQ?NdO1G0|O#<_Q?NdO1G0|O#>uQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-E<j-E<jO#E}Q?NdO1G0|O#FzQ?NdO1G0|OOQ?Mr1G0|1G0|O#GzQ7[O'#JwO#HUQWO,5:uO#HZQ?NdO1G1bO#H}Q&jO,5<VO#IVQ&jO,5<WO#I_Q&jO'#FnO#IvQWO'#FmOOQO'#KT'#KTOOQO'#Ij'#IjO#I{Q&jO1G1mOOQ?Mr1G1m1G1mOOOS1G1x1G1xO#J^Q07bO'#JmO#JhQWO,5<aO!(oQ^O,5<aOOOS-E<i-E<iOOQ?Mr1G1k1G1kO#JmQ`O'#KSOOQ?Mr,5<c,5<cO#JuQ`O,5<cO!&_Q7[O'#DQOOOO'#I^'#I^O#JzO!0LbO,59jOOQ?Mr,59j,59jO%[Q^O1G2OO!7eQWO'#InO#KVQ7[O,5<xOOQ?Mr,5<u,5<uO!+hQ7[O'#IqO#KuQ7[O,5=UO!+hQ7[O'#IsO#LhQ7[O,5=WO!&_Q7[O,5=YOOQO1G2Q1G2QO#LrQpO'#CrO#MVQ$ISO'#EoO#NUQ`O'#G`O#NrQpO,5<qO#NyQWO'#KWO9WQWO'#KWO$ XQWO,5<sO!+hQ7[O,5<rO$ ^QWO'#GXO$ oQWO,5<rO$ tQpO'#GUO$!RQpO'#KXO$!]QWO'#KXO!&_Q7[O'#KXO$!bQWO,5<vO$!gQ`O'#GaO!5iQ`O'#GaO$!xQWO'#GcO$!}QWO'#GeO!3SQWO'#GhO$#SQ?MxO'#IpO$#_Q`O,5<zOOQ?Mv,5<z,5<zO$#fQ`O'#GaO$#tQ`O'#GbO$#|Q`O'#GbO$$RQ7[O,5=UO$$cQ7[O,5=WOOQ?Mr,5=Z,5=ZO!+hQ7[O,5@QO!+hQ7[O,5@QO$$sQWO'#IuO$%OQWO,5@PO$%WQWO,59aOOQ?Mr,59f,59fO$%zQ!LSO,59rOOQ?Mr'#Jk'#JkO$&mQ7[O,5<iO$'`Q7[O,5<kO@fQWO,5<mOOQ?Mr,5<n,5<nO$'jQWO,5<tO$'oQ7[O,5<yO$(PQWO'#JzO!$[Q^O1G2PO$(UQWO1G2PO9WQWO'#J}O9WQWO'#EqO%[Q^O'#EqO9WQWO'#IwO$(ZQ?MxO,5@wOOQU1G2z1G2zOOQU1G4[1G4[OOQ?Mr1G/y1G/yOOQ?Mr1G/w1G/wO$*]Q?NdO1G0ROOQU1G2v1G2vO!&_Q7[O1G2vO%[Q^O1G2vO#-bQWO1G2vO$,aQ7[O'#EhOOQ?Mp,5@O,5@OO$,kQ?MxO,5@OOOQU1G.u1G.uO!ArQ?MxO1G.uO!A}Q`O1G.uO!BVQ7[O1G.uO$,|QWO1G0rO$-RQWO'#CiO$-^QWO'#KaO$-fQWO,5=xO$-kQWO'#KaO$-pQWO'#KaO$.OQWO'#I}O$.^QWO,5@zO$.fQrO1G1hOOQ?Mr1G1j1G1jO9^QWO1G3cO@fQWO1G3cO$.mQWO1G3cO$.rQWO1G3cOOQU1G3c1G3cO!DTQWO1G3RO!&_Q7[O1G3OO$.wQWO1G3OOOQU1G3P1G3PO!&_Q7[O1G3PO$.|QWO1G3PO$/UQ`O'#G}OOQU1G3R1G3RO!5iQ`O'#IyO!DYQpO1G3UOOQU1G3U1G3UOOQU,5=o,5=oO$/^Q7[O,5=qO9^QWO,5=qO$!}QWO,5=sO9RQWO,5=sO!A}Q`O,5=sO!BVQ7[O,5=sO:VQ7[O,5=sO$/lQWO'#K_O$/wQWO,5=tOOQU1G.k1G.kO$/|Q?MxO1G.kO@fQWO1G.kO$0XQWO1G.kO9hQ?MxO1G.kO$2aQrO,5@|O$2nQWO,5@|O9WQWO,5@|O$2yQ^O,5={O$3QQWO,5={OOQU1G3e1G3eO`Q^O1G3eOOQU1G3k1G3kOOQU1G3m1G3mO>oQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$<WQ`O'#IaO$<nQWO,5@[OOQ?Mr1G/o1G/oO$<vQ`O'#IgO$=QQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$=YQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$>jQpO,5<gO$>rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E<g-E<gOOQQ1G0^1G0^OOQQ1G0`1G0`O#-YQWO1G0`OOQU7+(b7+(bO!&_Q7[O7+(bO%[Q^O7+(bO$AVQWO7+(bO$AbQ7[O7+(bO$ApQ?NdO,5=UO$CxQ?NdO,5=WO$FQQ?NdO,5=UO$H`Q?NdO,5=WO$JnQ?NdO,59rO$LsQ?NdO,5<iO$N{Q?NdO,5<kO%#TQ?NdO,5<yOOQ?Mr7+&^7+&^O%%cQ?NdO7+&^O%&VQ^O'#IbO%&dQWO,5@^O%&lQrO,5@^OOQ?Mr1G/|1G/|O%&vQWO7+&gOOQ?Mr7+&g7+&gO%&{Q07bO,5:cO%[Q^O7+&yO%'VQ07bO,5:_O%'dQ07bO,5:gO%'nQ07bO,5:iO%'xQ7[O'#IeO%(SQWO,5@cOOQ?Mr1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%([QtO,5<YO!(oQ^O,5<XOOQO-E<h-E<hOOQ?Mr7+'X7+'XOOOS7+'d7+'dOOOS1G1{1G1{O%(gQWO1G1{OOQ?Mr1G1}1G1}O%(lQpO,59lOOOO-E<[-E<[OOQ?Mr1G/U1G/UO%(sQ?NdO7+'jOOQ?Mr,5?Y,5?YO%)gQpO,5?YOOQ?Mr1G2d1G2dP!&_Q7[O'#InPOQ?Mr-E<l-E<lO%*VQ7[O,5?]OOQ?Mr-E<o-E<oO%*xQ7[O,5?_OOQ?Mr-E<q-E<qO%+SQpO1G2tO%+ZQpO'#CrO%+qQ7[O'#J}O%+xQ^O'#EqOOQ?Mr1G2]1G2]O%,SQWO'#ImO%,hQWO,5@rO%,hQWO,5@rO%,pQWO,5@rO%,{QWO,5@rOOQO1G2_1G2_O%-ZQ7[O1G2^O!+hQ7[O1G2^O%-kQ$ISO'#IoO%-xQWO,5@sO!&_Q7[O,5@sO%.QQpO,5@sOOQ?Mr1G2b1G2bOOQ?Mp,5<{,5<{OOQ?Mp,5<|,5<|O$(PQWO,5<|OCcQWO,5<|O!A}Q`O,5<{OOQO'#Gd'#GdO%.[QWO,5<}OOQ?Mp,5=P,5=PO$(PQWO,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ?Mv1G2f1G2fO!5iQ`O,5<{O%.dQWO,5<|O$!xQWO,5<}O%.oQ`O,5<|O!+hQ7[O'#IqO%/`Q7[O1G2pO!+hQ7[O'#IsO%0RQ7[O1G2rO%0]Q7[O1G5lO%0gQ7[O1G5lOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9UQ`O,59tO%[Q^O,59tOOQ?Mr,5<h,5<hO%0tQWO1G2XO!+hQ7[O1G2`O%0yQ?NdO7+'kOOQ?Mr7+'k7+'kO!$[Q^O7+'kO%1mQWO,5;]OOQ?Mp,5?c,5?cOOQ?Mp-E<u-E<uO%1rQpO'#KYO#&wQWO7+(bO4UQrO7+(bO$AYQWO7+(bO%1|Q?NbO'#CiO%2aQ?NbO,5=QO%3RQWO,5=QOOQ?Mp1G5j1G5jOOQU7+$a7+$aO!ArQ?MxO7+$aO!A}Q`O7+$aO!$[Q^O7+&^O%3WQWO'#I|O%3oQWO,5@{OOQO1G3d1G3dO9^QWO,5@{O%3oQWO,5@{O%3wQWO,5@{OOQO,5?i,5?iOOQO-E<{-E<{OOQ?Mr7+'S7+'SO%3|QWO7+(}O9hQ?MxO7+(}O9^QWO7+(}O@fQWO7+(}OOQU7+(m7+(mO%4RQ?NbO7+(jO!&_Q7[O7+(jO%4]QpO7+(kOOQU7+(k7+(kO!&_Q7[O7+(kO%4dQWO'#K^O%4oQWO,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQU7+(p7+(pO%6RQ`O'#HWOOQU1G3]1G3]O!&_Q7[O1G3]O%[Q^O1G3]O%6YQWO1G3]O%6eQ7[O1G3]O9hQ?MxO1G3_O$!}QWO1G3_O9RQWO1G3_O!A}Q`O1G3_O!BVQ7[O1G3_O%6sQWO'#I{O%7XQWO,5@yO%7aQ`O,5@yOOQ?Mp1G3`1G3`OOQU7+$V7+$VO@fQWO7+$VO9hQ?MxO7+$VO%7lQWO7+$VO%[Q^O1G6hO%[Q^O1G6iO%7qQ?MxO1G6hO%7{Q^O1G3gO%8SQWO1G3gO%8XQ^O1G3gOOQU7+)P7+)PO9hQ?MxO7+)ZO`Q^O7+)]OOQU'#Kd'#KdOOQU'#JO'#JOO%8`Q^O,5>[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!A}Q`O1G/pOOQO-E<a-E<aOOQ?Mv1G0Y1G0YOOQ?Mr7+%r7+%rO#&wQWO7+%rOOQ?Mr7+&]7+&]O>tQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<<K|O4UQrO<<K|O%;YQWO<<K|OOQU<<K|<<K|O!&_Q7[O<<K|O%[Q^O<<K|O%;bQWO<<K|O%;mQ?NdO,5?]O%=uQ?NdO,5?_O%?}Q?NdO1G2^O%B]Q?NdO1G2pO%DeQ?NdO1G2rO%FmQrO,5>|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<<JR<<JRO%GPQ07bO1G0rO%IWQ07bO1G0|O%I_Q07bO1G0|O%K`Q07bO1G0|O%KgQ07bO1G0|O%MhQ07bO1G0|O& iQ07bO1G0|O& pQ07bO1G0|O& wQ07bO1G0|O&#xQ07bO1G0|O&$PQ07bO1G0|O&$WQ?NdO<<JeO&&OQ07bO1G0|O&&{Q07bO1G0|O&'{Q07bO'#JgO&*OQ07bO1G1bO&*]Q07bO1G0RO&*gQ7[O,5?POOQO-E<c-E<cO!(oQ^O'#FpOOQO'#KU'#KUOOQO1G1t1G1tO&*qQWO1G1sO&*vQ07bO,5?WOOOS7+'g7+'gOOOO1G/W1G/WOOQ?Mr1G4t1G4tO!+hQ7[O7+(`O&-WQrO'#CiO&-bQWO,5?XO9WQWO,5?XOOQO-E<k-E<kO&-pQWO1G6^O&-pQWO1G6^O&-xQWO1G6^O&.TQ7[O7+'xO&.eQpO,5?ZO&.oQWO,5?ZO!&_Q7[O,5?ZOOQO-E<m-E<mO&.tQpO1G6_O&/OQWO1G6_OOQ?Mp1G2h1G2hO$(PQWO1G2hOOQ?Mp1G2g1G2gO&/WQWO1G2iO!&_Q7[O1G2iOOQ?Mp1G2n1G2nO!A}Q`O1G2gOCcQWO1G2hO&/]QWO1G2iO&/eQWO1G2hO$!xQWO1G2iO&0XQ7[O,5?]OOQ?Mr-E<p-E<pO&0zQ7[O,5?_OOQ?Mr-E<r-E<rO!+hQ7[O7++WOOQ?Mr1G/`1G/`O&1UQWO1G/`OOQ?Mr7+'s7+'sO&1ZQ7[O7+'zO&1kQ?NdO<<KVOOQ?Mr<<KV<<KVO&2_QWO1G0wO!&_Q7[O'#IvO&2dQWO,5@tO&4fQrO<<K|O!&_Q7[O1G2lOOQU<<G{<<G{O!ArQ?MxO<<G{O&4mQ?NdO<<IxOOQ?Mr<<Ix<<IxOOQO,5?h,5?hO&5aQWO,5?hO&5fQWO,5?hOOQO-E<z-E<zO&5tQWO1G6gO&5tQWO1G6gO9^QWO1G6gO@fQWO<<LiOOQU<<Li<<LiO&5|QWO<<LiO9hQ?MxO<<LiOOQU<<LU<<LUO%4RQ?NbO<<LUOOQU<<LV<<LVO%4]QpO<<LVO&6RQ`O'#IxO&6^QWO,5@xO!(oQ^O,5@xOOQU1G3T1G3TO%+xQ^O'#JqOOQO'#Iz'#IzO9hQ?MxO'#IzO&6fQ`O,5=rOOQU,5=r,5=rO&6mQ`O'#EdO&7RQ`O'#GcO&7WQWO7+(wO&7]QWO7+(wOOQU7+(w7+(wO!&_Q7[O7+(wO%[Q^O7+(wO&7eQWO7+(wOOQU7+(y7+(yO9hQ?MxO7+(yO$!}QWO7+(yO9RQWO7+(yO!A}Q`O7+(yO&7pQWO,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&7{QWO1G6eO9hQ?MxO<<GqOOQU<<Gq<<GqO@fQWO<<GqO&8TQWO7+,SO&8YQWO7+,TO%[Q^O7+,SO%[Q^O7+,TOOQU7+)R7+)RO&8_QWO7+)RO&8dQ^O7+)RO&8kQWO7+)ROOQU<<Lu<<LuOOQU<<Lw<<LwOOQU-E<|-E<|OOQU1G3v1G3vO&8pQWO,5>]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<<I^<<I^OOQ?Mr<<Iw<<IwO>tQWO<<IwOOQO<<Ip<<IpO$>`Q?NdO<<IpO%[Q^O<<IpOOQO<<Ia<<IaO!ArQ?MxO<<IaO&9UQ?MxO<<IpO&9aQ?NdO<= XO&9qQWO<= WOOQO7+*Z7+*ZO9WQWO7+*ZOOQUANAhANAhO&9yQrOANAhO!&_Q7[OANAhO#&wQWOANAhO4UQrOANAhO&:QQWOANAhO%[Q^OANAhO&:YQ?NdO7+'xO&<hQ?NdO,5?]O&>pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5<iO&LlQ07bO,5<kO&N}Q07bO,5<yO'!pQ07bO7+'jO'!}Q07bO7+'kO'#[QWO,5<[OOQO7+'_7+'_O'#aQ7[O<<KzOOQO1G4s1G4sO'#hQWO1G4sO'#sQWO1G4sO'$RQWO7++xO'$RQWO7++xO!&_Q7[O1G4uO'$ZQpO1G4uO'$eQWO7++yOOQ?Mp7+(S7+(SO'$mQWO7+(TO'$xQpO7+(TOOQ?Mp7+(R7+(RO$(PQWO7+(SO'%PQWO7+(TO!&_Q7[O7+(TOCcQWO7+(SO'%UQWO7+(TO'%^Q7[O<<NrOOQ?Mr7+$z7+$zO'%hQpO,5?bOOQO-E<t-E<tO'%rQ?NbO7+(WOOQUAN=gAN=gO9^QWO1G5SOOQO1G5S1G5SO'&SQWO1G5SO'&XQWO7+,RO'&XQWO7+,RO9hQ?MxOANBTO@fQWOANBTOOQUANBTANBTOOQUANApANApOOQUANAqANAqO'&aQWO,5?dOOQO-E<v-E<vO'&lQ07bO1G6dOOQO,5?f,5?fOOQO-E<x-E<xOOQU1G3^1G3^O%+xQ^O,5<}O'&vQWO,5<}OOQU<<Lc<<LcO!&_Q7[O<<LcO&7WQWO<<LcO'&{QWO<<LcO%[Q^O<<LcOOQU<<Le<<LeO9hQ?MxO<<LeO$!}QWO<<LeO9RQWO<<LeO''TQ`O1G5RO''`QWO7+,POOQUAN=]AN=]O9hQ?MxOAN=]OOQU<= n<= nOOQU<= o<= oO''hQWO<= nO''mQWO<= oOOQU<<Lm<<LmO''rQWO<<LmO''wQ^O<<LmOOQU1G3w1G3wO>tQWO7+)hO'(OQWO<<I}O'(ZQ07bO<<I}OOQO<<Hv<<HvOOQ?MrAN?cAN?cOOQOAN?[AN?[O$>`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<<Mu<<MuOOQUG27SG27SO!&_Q7[OG27SO#&wQWOG27SO'(eQrOG27SO4UQrOG27SO'(lQWOG27SO'(tQ07bO<<JeO')RQ07bO1G2^O'*tQ07bO,5?]O',tQ07bO,5?_O'.tQ07bO1G2pO'0tQ07bO1G2rO'2tQ07bO<<KVO'3RQ07bO<<IxOOQO1G1v1G1vO!+hQ7[OANAfOOQO7+*_7+*_O'3`QWO7+*_O'3kQWO<= dO'3sQpO7+*aOOQ?Mp<<Ko<<KoO$(PQWO<<KoOCcQWO<<KoO'3}QWO<<KoOOQ?Mp<<Kn<<KnO'4YQpO<<KoO$(PQWO<<KnO'4aQWO<<KoO!&_Q7[O<<KoOOQO7+*n7+*nO9^QWO7+*nO'4fQWO<= mOOQUG27oG27oO9hQ?MxOG27oO!(oQ^O1G5OO'4nQWO7+,OO&7WQWOANA}OOQUANA}ANA}O!&_Q7[OANA}O'4vQWOANA}OOQUANBPANBPO9hQ?MxOANBPO$!}QWOANBPOOQO'#H['#H[OOQO7+*m7+*mOOQUG22wG22wOOQUANEYANEYOOQUANEZANEZOOQUANBXANBXO'5OQWOANBXOOQU<<MS<<MSO!(oQ^OAN?iOOQOG24vG24vO$>`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'<pQ7[OG27QOOQO<<My<<MyOOQ?MpANAZANAZO$(PQWOANAZOCcQWOANAZO'=QQWOANAZOOQ?MpANAYANAYO'=]QpOANAZOOQO<<NY<<NYOOQULD-ZLD-ZO'=dQ07bO7+*jOOQUG27iG27iO&7WQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'=nQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'=xQ?NdOG27QOOQ?MpG26uG26uO$(PQWOG26uOCcQWOG26uO'@WQWOG26uOOQULD-TLD-TO&7WQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQ?MpLD,aLD,aO$(PQWOLD,aOCcQWOLD,aOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'@cQ07bOG27QOOQ?Mp!$( {!$( {O$(PQWO!$( {OOQ?Mp!)9Eg!)9EgO!(oQ^O'#DwO1PQWO'#EUO'BUQrO'#JmO'B]QMnO'#DsO'BdQ^O'#D{O'BkQrO'#CiO'ERQrO'#CiO!(oQ^O'#D}O'EcQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'GfQWO,5<gO!(oQ^O,5;bO'GnQ7[O,5;bO'IXQ7[O,5;bO!(oQ^O,5;vO!&_Q7[O'#GjO'GnQ7[O'#GjO!&_Q7[O'#GlO'GnQ7[O'#GlO1SQWO'#DWO1SQWO'#DWO!&_Q7[O'#F}O'GnQ7[O'#F}O!&_Q7[O'#GPO'GnQ7[O'#GPO!&_Q7[O'#G_O'GnQ7[O'#G_O!(oQ^O,5:gO'I`Q`O'#D[O!(oQ^O,5@jO'EcQ^O1G0rO'IjQ07bO'#CiO!(oQ^O1G2OO!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO'ItQpO'#CrO!&_Q7[O,5<rO'GnQ7[O,5<rO'EcQ^O1G2PO!(oQ^O7+&yO!&_Q7[O1G2^O'GnQ7[O1G2^O!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO!&_Q7[O1G2`O'GnQ7[O1G2`O'EcQ^O7+'kO'EcQ^O7+&^O!&_Q7[OANAfO'GnQ7[OANAfO'JXQWO'#ElO'J^QWO'#ElO'JfQWO'#F[O'JkQWO'#EvO'JpQWO'#KOO'J{QWO'#J|O'KWQWO,5;WO'K]Q7[O,5<dO'KdQWO'#GWO'KiQWO'#GWO'KnQWO,5<eO'KvQWO,5;WO'LOQ07bO1G1_O'LVQWO,5<rO'L[QWO,5<rO'LaQWO,5<tO'LfQWO,5<tO'LkQWO1G2PO'LpQWO1G0rO'LuQ7[O<<KzO'L|Q7[O<<KzO7eQ7[O'#FzO9RQWO'#FyOAaQWO'#EkO!(oQ^O,5;sO!3SQWO'#GWO!3SQWO'#GWO!3SQWO'#GYO!3SQWO'#GYO!+hQ7[O7+(`O!+hQ7[O7+(`O%+SQpO1G2tO%+SQpO1G2tO!&_Q7[O,5=YO!&_Q7[O,5=Y",
- stateData: "'NQ~O'wOS'xOSTOS'yRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(OSO(QTO(TUO([VO(j[O(yiO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O'y!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'u]X([]X(m]X(t]X(u]X~O!d%PX~P(qO_!}O(Q#PO(R!}O(S#PO~O_#QO(S#PO(T#PO(U#QO~Ou#SO!R#TO(]#TO(^#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O;UO(QTO(TUO([VO(j[O(yiO~O!X#ZO!Y#WO!V(cP!V(qP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(QTO(TUO([VO(j[O(yiO~Om#mO!X#iO!y]O#f#lO#g#iO(O;VO!h(nP~P.iO!i#oO(O#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa(aX'u(aX's(aX!h(aX!V(aX![(aX%f(aX!d(aX~P1qO#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX![(bX%f(bX~Oa(bX'u(bX's(bX!V(bX!h(bXs(bX!d(bX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O$sO(QTO(TUO([$uO(t$}O(u%POg(XP~O!i%cO~O!P%fO![%gO(O%eO~O!d%kO~Oa%lO'u%lO~O}%pO~P%[O(P!lO~P%[O%k%tO~P%[Oh%VO!i%cO(O%eO(P!lO~Oe%{O!i%cO(O%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(O%eO(P!lO(QTO(TUO`)SP~O!u#sO~O%p&VO!P)OX![)OX(O)OX~O(O&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(P!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'u%lO~Oa%lO't&{O'u%lO~Oa%lO't&}O'u%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(P!lO(QTO(TUO~Op'RO!P'QO!X'UO(`'PO!Z(dP!Z(sP~P@YOk'_O![']O(O%eO~Oe'dO!i%cO(O%eO~O}&QO!i&PO~Op!nO!P!oO!y;QO#Q!pO#R!pO#T!pO#U!pO(P!lO(QTO(TUO(`!mO(j!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'u%lO(m'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(QTO(TUO(`!mO(j!sO~O![XOp(hX!P(hX!_(hX!`(hX!a(hX!y(hX#Q(hX#R(hX#S(hX#T(hX#U(hX#X(hX#Y(hX(P(hX(Q(hX(T(hX(`(hX(j(hX~O!`'iO!a'iO(P!lO~PCrO'z'uO'{'uO'|'wO~O_!}O(Q'yO(R!}O(S'yO~O_#QO(S'yO(T'yO(U#QO~Ou#SO!R#TO(]#TO(^'}O~O!X(PO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(RO!V(cX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(RO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~O!V(cX~PGfO!V(WO~O!V(pX!Y(pX!d(pX!h(pX(m(pX~O#](pX#h#aX!Z(pX~PIiO#](XO!V(rX!Y(rX~O!Y(YO!V(qX~O!V(]O~O#]$eO~PIiO!Z(^O~P`OR#zO}#yO!P#{O!i#xO([VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(m!ka(t!ka(u!ka~Oa!ka'u!ka's!ka!V!ka!h!kas!kaXO(QTO(TUO([VO(j[O(y<xO~O!Y$_Oa$oa'u$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)`O~P!&_Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~Og(kP~P!+hO})eO!d)dO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)dO![(vX$Y(vX$[(vX$^(vX$e(vX~O})eO~P!-qO})eO![(vX$Y(vX$[(vX$^(vX$e(vX~O![)gO$Y)kO$[)fO$^)fO$e)lO~O!X)oO~P!(oO$[$hO$^$gO$e)sO~Ok$xX}$xX!P$xX#P$xX(t$xX(u$xX~OgjXg$xXkjX!YjX#]jX~P!/gOu)uO(])vO(^)xO~Ok*RO})zO!P){O(t$}O(u%PO~Og)yO~P!0kOg*SO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P*UO![*VO!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~O!X*YO(O*TO!h(zP~P!1YO#h*[O~O!i*]O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O*_O(QTO(TUO([$uO(t$}O(u%PO~O!X*bO!V({P~P!3XOo*nO!P*fO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO(`!mO~O!Z*kO~P!4|O#P$dOk(ZX}(ZX!P(ZX(t(ZX(u(ZX!Y(ZX#](ZX~Og(ZX#}(ZX~P!5uOk*sO#]*rOg(YX!Y(YX~O!Y*tOg(XX~O(O&WOg(XP~Op*wO~O!i*|O~O(O(rO~Om+QO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(O%eO!h(nP~O!d#vO#h+RO~O!P%fO!X+TO!Y(YO![%gO(O%eO!V(qP~Op'XO!P+VO!X+UO(QTO(TUO(`(xO~O!Z(sP~P!8uO!Y+WOa)PX'u)PX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa!ga!Y!ga'u!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9mOR#zO}#yO!P#{O!i#xO([VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(m!oa(t!oa(u!oa~Oa!oa'u!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<TOR#zO}#yO!P#{O!i#xO([VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(m!qa(t!qa(u!qa~Oa!qa'u!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(QTO(TUO([VO(j[O(y<xO~O(O;zO~P##_O!Y-TO!Z(dX~O!Z-VO~O!d,}O#],|O!Y#eX!Z#eX~O!Y-WO!Z(sX~O!Z-YO~O!`-ZO!a-ZO(P!lO~P#!|O!Z-^O~P'_Ok-aO![']O~O!V-fO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(P!xa(Q!xa(T!xa(`!xa(j!xa~P!#ZO!m-kO#]-iO~PCSO!`-mO!a-mO(P!lO~PCrOa%lO#]-iO'u%lO~Oa%lO!d#vO#]-iO'u%lO~Oa%lO!d#vO!m-kO#]-iO'u%lO(m'mO~O'z'uO'{'uO'|-rO~Os-sO~O!V'Sa!Y'Sa~P!9mO!X-wO!V'SX!Y'SX~P%[O!Y(RO!V(ca~O!V(ca~PGfO!Y(YO!V(qa~O!P%fO!X-{O![%gO(O%eO!V'YX!Y'YX~O#]-}O!Y(oa!h(oaa(oa'u(oa~O!d#vO~P#+eO!Y(fO!h(na~O!P%fO![%gO#g.RO(O%eO~Om.WO!P%fO!X.TO![%gO!y]O#f.VO#g.TO(O%eO!Y']X!h']X~OR.[O!i#xO~Oh%VOk._O![']O%f.^O~Oa#`i!Y#`i'u#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9mOk=UO})zO!P){O(t$}O(u%PO~O#h#[aa#[a#]#[a'u#[a!Y#[a!h#[a![#[a!V#[a~P#.aO#h(ZXP(ZXR(ZX[(ZXa(ZXo(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX'u(ZX([(ZX(m(ZX!h(ZX!V(ZX's(ZXs(ZX![(ZX%f(ZX!d(ZX~P!5uO!Y.lO!h(fX~P!9mO!h.oO~O!V.qO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#1|O#k$OO~P#1|OP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#4kO#o$QO~P#4kOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO([VOa#ji!Y#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO([VO(u#}Oa#ji!Y#ji#y#ji#z#ji'u#ji(m#ji(t#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#9pO#w#ji~P#9pO#u$SO~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO([VO(t#|O(u#}Oa#ji!Y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<fO#y$WO~P#<fOP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X!Y]X!Z]X~O#}]X~P#?TOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O#y;bO#z;cO([VO(m$YO(t#|O(u#}O~O#}.sO~P#AbO#P$dO#];iO$P;iO#}(bX!Z(bX~P! YOa'`a!Y'`a'u'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9mO[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO(t#ji(u#ji~P#DdOk=UO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P#DdO!Y.wOg(kX~P!0kOg.yO~Oa$Oi!Y$Oi'u$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9mO$[.zO$^.zO~O$[.{O$^.{O~O!d)dO#].|O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X.}O~O![)gO$Y/PO$[)fO$^)fO$e/QO~O!Y;dO!Z(aX~P#AbO!Z/RO~O!d)dO$e(vX~O$e/TO~Ou)uO(])vO(^/WO~O!V/[O~P!&_O(t$}Ok%^a}%^a!P%^a(u%^a!Y%^a#]%^a~Og%^a#}%^a~P#K^O(u%POk%`a}%`a!P%`a(t%`a!Y%`a#]%`a~Og%`a#}%`a~P#LPO!YfX!dfX!hfX!h$xX(mfX~P!/gO!X/eO!Y(YO(O/dO!V(qP!V({P~P!1YOo*nO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO~Op'XO!P/fO!X+UO!Z*kO(QTO(TUO(`;wO!Z(sP~P#MjO!h/gO~P#.aO!Y/hO!d#vO(m'mO!h(zX~O!h/mO~O!P%fO!X*YO![%gO(O%eO!h(zP~O#h/oO~O!V$xX!Y$xX!d%PX~P!/gO!Y/pO!V({X~P#.aO!d/rO~O!V/tO~Oh%VOo/xO!d#vO!i%cO(m'mO~O(O/zO~O!d+cO~Oa%lO!Y0OO'u%lO~O!Z0QO~P!4|O!`0RO!a0RO(P!lO(`!mO~O!P0TO(`!mO~O#X0UO~Og%^a!Y%^a#]%^a#}%^a~P!0kOg%`a!Y%`a#]%`a#}%`a~P!0kO(O&WOg'iX!Y'iX~O!Y*tOg(Xa~Og0_O~OR0`O}0`O!P0aO#P$dOkza(tza(uza!Yza#]za~Ogza#}za~P$%]O})zO!P){Ok$qa(t$qa(u$qa!Y$qa#]$qa~Og$qa#}$qa~P$&UO})zO!P){Ok$sa(t$sa(u$sa!Y$sa#]$sa~Og$sa#}$sa~P$&wO#h0dO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0kO!d#vO~O#h0gO~O!Y+WOa)Pa'u)Pa~OR#zO}#yO!P#{O!i#xO([VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(m!oi(t!oi(u!oi~Oa!oi'u!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$(fOh%VOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~Om0pO(O0oO~P$*|O!d+cOa(Wa![(Wa'u(Wa!Y(Wa~O#h0vO~O[]X!YfX!ZfX~O!Y0wO!Z)TX~O!Z0yO~O[0zO~Ob0|O(O+kO(QTO(TUO~O![%}O(O%eO`'qX!Y'qX~O!Y+pO`)Sa~O!h1PO~P!9mO[1SO~O`1TO~O#]1WO~Ok1ZO![$|O~O(`(xO!Z)QP~Oh%VOk1dO![1aO%f1cO~O[1nO!Y1lO!Z)RX~O!Z1oO~O`1qOa%lO'u%lO~O(O#nO(QTO(TUO~O#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O#s1tO&W1uOa(bX~P$0dO#]$eO#s1tO&W1uO~Oa1wO~P%[Oa1yO~O&a1|OP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(O&_i(Q&_i(T&_i([&_i(j&_i(y&_i!Z&_ib&_i&f&_i~Ob2SO!Z2QO&f2RO~P`O![XO!i2UO~O&m,sOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(O&hi(Q&hi(T&hi([&hi(j&hi(y&hi!Z&hi&a&hib&hi&f&hi~O!V2[O~O!Y!^a!Z!^a~P#AbOp!nO!P!oO!X2bO(`!mO!Y'TX!Z'TX~P@YO!Y-TO!Z(da~O!Y'ZX!Z'ZX~P!8uO!Y-WO!Z(sa~O!Z2iO~P'_Oa%lO#]2rO'u%lO~Oa%lO!d#vO#]2rO'u%lO~Oa%lO!d#vO!m2vO#]2rO'u%lO(m'mO~Oa%lO'u%lO~P!9mO!Y$_Os$oa~O!V'Si!Y'Si~P!9mO!Y(RO!V(ci~O!Y(YO!V(qi~O!V(ri!Y(ri~P!9mO!Y(oi!h(oia(oi'u(oi~P!9mO#]2xO!Y(oi!h(oia(oi'u(oi~O!Y(fO!h(ni~O!P%fO![%gO!y]O#f2}O#g2|O(O%eO~O!P%fO![%gO#g2|O(O%eO~Ok3UO![']O%f3TO~Oh%VOk3UO![']O%f3TO~O#h%^aP%^aR%^a[%^aa%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#K^O#h%`aP%`aR%`a[%`aa%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#LPO#h%^aP%^aR%^a[%^aa%^ao%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.aO#h%`aP%`aR%`a[%`aa%`ao%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.aO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'uza([za(mza!hza!Vza'szasza![za%fza!dza~P$%]O#h$qaP$qaR$qa[$qaa$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'u$qa([$qa(m$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$&UO#h$saP$saR$sa[$saa$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'u$sa([$sa(m$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$&wO#h%RaP%RaR%Ra[%Raa%Rao%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'u%Ra([%Ra(m%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.aOa#`q!Y#`q'u#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9mO!X3^O!Y'UX!h'UX~P%[O!Y.lO!h(fa~O!Y.lO!h(fa~P!9mO!V3aO~O#}!ka!Z!ka~PKPO#}!ga!Y!ga!Z!ga~P#AbO#}!oa!Z!oa~P!<TO#}!qa!Z!qa~P!>kOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O<QO~P!1YOmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0kO!X4YO!V'cX!Y'cX~P!3XO!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O!P4hO(`!mO~O(t$}Ok%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%.wO(u%POk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%/jOg(Yi!Y(Yi~P!0kO#]4mOg(Yi!Y(Yi~P!0kO!h4pO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4tO~O!Y4uO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4xOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4xO~Ob5OO%g5PO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5TO~O`5UO~Oa%lO'u%lO~P#.aO![$|O~P#.aO!Y5^O#]5`O!Z)QX~O!Z5aO~Oo5hOp!nO!P5bO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5gO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5fO~P%4tOk5mO![1aO%f5lO~Oh%VOk5mO![1aO%f5lO~Ob5tO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5vO~O`5zO~O#s5}O&W6OO~PMlO!h6PO~P%[Oa6RO~Oa6RO~P%[Ob2SO!Z6WO&f2RO~P`O!d6YO~O!d6[Oh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#AbO#]6]O!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AbOa%lO#]6fO'u%lO~Oa%lO!d#vO#]6fO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6mO(O%eO~O![']O%f6pO~Ok6tO![']O%f6pO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%)nO#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%*aO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%.wO#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%/jO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#AbOP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%G^O#k;YO~P%G^OP$[OR#zOo;fO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#o#ji~P%IfO#o;[O~P%IfOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O([VO#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#u#ji~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w;`O~P%MoO#w#ji~P%MoO#u;^O~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O([VO(t#|O(u#}O#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#y#ji~P&!OO#y;bO~P&!OOa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mO[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO(t#ji(u#ji~P&$zOk=VO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P&$zO#P$dOP(ZXR(ZX[(ZXk(ZXo(ZX}(ZX!P(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX#}(ZX([(ZX(m(ZX(t(ZX(u(ZX!Y(ZX!Z(ZX~O#}$Oi!Y$Oi!Z$Oi~P#AbO#}!oi!Z!oi~P$(fOg'Xa!Y'Xa~P!0kO!Z7WO~O!Y'`a!Z'`a~P#AbOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!d%WX#s%WX~P&+QO!d#vO(m'mO!Y'aa!h'aa~O!Y/hO!h(zi~O!Y/hO!d#vO!h(zi~Og$zq!Y$zq#]$zq#}$zq~P!0kO!V'ca!Y'ca~P#.aO!d7_O~O!Y/pO!V({i~P#.aO!Y/pO!V({i~O!V7cO~O!d#vO#s7hO~Oo7iO!d#vO(m'mO~O})zO!P){O(u%POk'fa(t'fa!Y'fa#]'fa~Og'fa#}'fa~P&/pO})zO!P){Ok'ha(t'ha(u'ha!Y'ha#]'ha~Og'ha#}'ha~P&0cO!V7lO~Og$|q!Y$|q#]$|q#}$|q~P!0kOa$my!Y$my'u$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9mO!d6[O~O!Y4uO![(|a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa([$Sa(m$Sa(t$Sa(u$Sa~O%f6pO~P&2lOa#`y!Y#`y'u#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9mO[7qO~Ob7sO(O+kO(QTO(TUO~O!Y0wO!Z)Ti~O`7wO~O(`(xO!Y'lX!Z'lX~O!Y5^O!Z)Qa~O!Z8QO~P%4tOp!nO!P8RO(QTO(TUO(`!mO(j!sO~O#X8SO~O![1aO~O![1aO%f8UO~Ok8XO![1aO%f8UO~O[8^O!Y'oa!Z'oa~O!Y1lO!Z)Ri~O!h8bO~O!h8cO~O!h8fO~O!h8fO~P%[Oa8hO~O!d8iO~O!h8jO~O!Y(ri!Z(ri~P#AbOa%lO#]8rO'u%lO~O!Y(oy!h(oya(oy'u(oy~P!9mO!Y(fO!h(ny~O%f8uO~P&2lO![']O%f8uO~O#h$zqP$zqR$zq[$zqa$zqo$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'u$zq([$zq(m$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.aO#h'faP'faR'fa['faa'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'u'fa(['fa(m'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&/pO#h'haP'haR'ha['haa'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'u'ha(['ha(m'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&0cO#h$|qP$|qR$|q[$|qa$|qo$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'u$|q([$|q(m$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.aO!Y'Ui!h'Ui~P!9mO#}#`q!Y#`q!Z#`q~P#AbO(t$}OP%^aR%^a[%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a([%^a(m%^a!Y%^a!Z%^a~Ok%^a}%^a!P%^a(u%^a~P&CoO(u%POP%`aR%`a[%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a([%`a(m%`a!Y%`a!Z%`a~Ok%`a}%`a!P%`a(t%`a~P&EsOk=VO})zO!P){O(u%PO~P&CoOk=VO})zO!P){O(t$}O~P&EsOR0`O}0`O!P0aO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za([za(mza(tza(uza!Yza!Zza~O})zO!P){OP$qaR$qa[$qak$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa([$qa(m$qa(t$qa(u$qa!Y$qa!Z$qa~O})zO!P){OP$saR$sa[$sak$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa([$sa(m$sa(t$sa(u$sa!Y$sa!Z$sa~Ok=VO})zO!P){O(t$}O(u%PO~OP%RaR%Ra[%Rao%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra([%Ra(m%Ra!Y%Ra!Z%Ra~P&NlO#}$lq!Y$lq!Z$lq~P#AbO#}$mq!Y$mq!Z$mq~P#AbO!Z9SO~O#}9TO~P!0kO!d#vO!Y'ai!h'ai~O!d#vO(m'mO!Y'ai!h'ai~O!Y/hO!h(zq~O!V'ci!Y'ci~P#.aO!Y/pO!V({q~Oo9[O!d#vO(m'mO~O!V9]O~P#.aO!V9]O~O!d#vO#s9bO~Og(Yy!Y(Yy~P!0kO!Y'ja!['ja~P#.aOa%Yq![%Yq'u%Yq!Y%Yq~P#.aO[9dO~O!Y0wO!Z)Tq~O#]9hO!Y'la!Z'la~O!Y5^O!Z)Qi~P#AbO!P4hO~O![1aO%f9lO~O(QTO(TUO(`9qO~O!Y1lO!Z)Rq~O!h9tO~O!h9uO~O!h9vO~O!h9vO~P%[O#]9yO!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AbO%f:OO~P&2lO![']O%f:OO~O#}#{y!Y#{y!Z#{y~P#AbOP$ziR$zi[$zio$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi([$zi(m$zi!Y$zi!Z$zi~P&NlO})zO!P){O(u%POP'eaR'ea['eak'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(['ea(m'ea(t'ea!Y'ea!Z'ea~O})zO!P){OP'gaR'ga['gak'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(['ga(m'ga(t'ga(u'ga!Y'ga!Z'ga~O(t$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i([%^i(m%^i(u%^i!Y%^i!Z%^i~O(u%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i([%`i(m%`i(t%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AbO#}#`y!Y#`y!Z#`y~P#AbO!d#vO!Y'aq!h'aq~O!Y/hO!h(zy~O!V'cq!Y'cq~P#.aOo:YO!d#vO(m'mO~O!V:ZO~P#.aO!V:ZO~O!Y0wO!Z)Ty~O!Y5^O!Z)Qq~O![1aO%f:cO~O!h:fO~O%f:kO~P&2lOP$zqR$zq[$zqo$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq([$zq(m$zq!Y$zq!Z$zq~P&NlO})zO!P){O(u%POP'faR'fa['fak'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(['fa(m'fa(t'fa!Y'fa!Z'fa~O})zO!P){OP'haR'ha['hak'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(['ha(m'ha(t'ha(u'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q([$|q(m$|q!Y$|q!Z$|q~P&NlOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0kOo:oO!d#vO(m'mO~O!V:pO~P#.aO!Y'lq!Z'lq~P#AbO!Y#e!Z!Z#e!Z~P#AbO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'u%b!Z([%b!Z(m%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.aOo:xO!d#vO(m'mO~OP%b!ZR%b!Z[%b!Zo%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z([%b!Z(m%b!Z!Y%b!Z!Z%b!Z~P&NlOs(aX~P1qO}%pO~P!(oO(P!lO~P!(oO!VfX!YfX#]fX~P&+QOP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!dfX!h]X!hfX(mfX~P'BxOP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![XO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y;dO!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;oO!P${O![$|O!f=PO!i$xO#g;uO$V%_O$r;qO$t;sO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#t)`O~P'GnOo!bX(m!bX~P# ZO!Z]X!ZfX~P'BxO!VfX!V$xX!YfX!Y$xX#]fX~P!/gO#h;XO~O!d#vO#h;XO~O#];iO~O#s;]O~O#];xO!Y(rX!Z(rX~O#];iO!Y(pX!Z(pX~O#h;yO~Og;{O~P!0kO#h<RO~O#h<SO~O!d#vO#h<TO~O!d#vO#h;yO~O#}<UO~P#AbO#h<VO~O#h<WO~O#h<]O~O#h<^O~O#h<_O~O#h<`O~O#}<aO~P!0kO#}<bO~P!0kO#P#Q#R#T#U#X#f#g#r(y$r$t$w%Z%e%f%g%n%p%s%t%v%x~'yT#l!U'w(P#mp#k#no}'x$['x(O$^(`~",
- goto: "$4Q)XPPPPPP)YPP)]P)nP+O/PPPPP5xPP6`PP<V?mP@QP@QPPP@QPBRP@QP@QP@QPBVPB[PByPGrPPPGvPPPPGvJxPPPKOKzPGvPGvPPNYGvPPPGvPGvP!!aGvP!%v!&{!'UP!'x!'|!'x!+YPPPPPPP!+y!&{PP!,Z!-gP!0jGvGv!0o!3z!8b!8b!<`PPP!<hGvPPPPPPPPPPP!?vP!ATPPGv!BfPGvPGvGvGvGvGvPGv!CxP!GRP!JWP!J[!Jf!Jj!JjP!GOP!Jn!JnP!MsP!MwGvGv!M}##RBV@QP@QP@Q@QP#$_@Q@Q#&j@Q#)Z@Q#+`@Q@Q#,O#.]#.]#.b#.k#.]#.wP#.]P@Q#/a@Q#3S@Q@Q5xPPP#6{PPP#7f#7fP#7fP#7|#7fPP#8SP#7yP#7y#8g#7y#9R#9X5u)]#9[)]P#9c#9c#9cP)]P)]P)]P)]PP)]P#9i#9lP#9l)]P#9pP#9sP)]P)]P)]P)]P)]P)])]PP#9y#:P#:[#:b#:h#:n#:t#;S#;Y#;d#;j#;t#;z#<[#<b#=S#=f#=l#=r#>Q#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U*y%[;n;oQ+n%}Q,^&dQ,e&lQ0m+aQ0q+cQ0|+oQ1s,cQ3Q._Q5O0wQ5t1lQ6r3UQ7s5PR8x6t'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{t!nQ!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5g$|$ti#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ&U|Q'R!eU'X%g*V-WQ+n%}Q,^&dQ0c*|Q0|+oQ1R+uQ1r,bQ1s,cQ5O0wQ5X1TQ5t1lQ5w1nQ5x1qQ7s5PQ7v5UQ8a5zQ9g7wR9r8^rnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR,`&h&x^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<z<{[#]WZ#W#Z'U(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(m#sS+h%z%{Q+l%}Q,V&_Q,Z&aS-d'c'dQ.a(nQ0u+iQ0{+oQ0}+pQ1Q+tQ1f,WS1j,[,]Q2n-eQ4}0wQ5R0zQ5W1SQ5s1kQ7r5PQ7u5TQ9c7qR:^9d!O$zi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R!S%wy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dQ+b%uQ+{&XQ,O&YQ,Y&aQ.`(mQ1e,VU1i,Z,[,]Q3V.aQ5n1fS5r1j1kQ8]5s#^<|#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo<};g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bW%Ti%V*t<xS&X!Q&fQ&Y!RQ&Z!SR+y&V$}%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VT)v$u)wV*y%[;n;oW'X!e%g*V-WS(y#y#zQ+]%pQ+s&QS.Y(i(jQ1[,PQ4n0`R7{5^'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{$i$^c#Y#e%o%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.t.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oT#TV#U'PkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q'V!eR2c-Tv!nQ!e!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5gU*d$|*V*jS/y*e*lQ0S*mQ1^,RQ4d0RR4g0UnqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&v!^Q's!xS(o#u;XQ+f%xQ,T&[Q,U&^Q-b'aQ-o'lS.j(t;yS0f+R<TQ0s+gQ1`,SQ2T,rQ2V,sQ2_-OQ2l-cQ2o-gS4s0g<_Q4y0tS4|0v<`Q6^2aQ6b2mQ6g2tQ7p4zQ8m6`Q8n6cQ8q6hR9x8j$d$]c#Y#e%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oS(k#p'fQ({#zS+[%o.tS.Z(j(lR3O.['OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S#q];QQ&q!XQ&r!YQ&t![Q&u!]R1{,nQ'^!hQ+_%uQ-`'`S.](m+bQ2j-_W3S.`.a0l0nQ6a2kW6n3P3R3V4wU8t6o6q6sU9}8v8w8yS:i9|:PQ:t:jR:z:uU!wQ']-]T5c1a5e!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(f,k,p.S1|2P]!pQ!r']-]1a5eT#q];Q%[{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS(y#y#zS.Y(i(j!s<f$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U$fd)Z,eS(l#p'fU*q%R(s3pU0b*x.f7PQ4w0mQ6o3QQ8w6rR:P8xm!tQ!r!v!y!z']'i'j'k-]-m1a5e5gQ'q!uS(b#g1vS-k'h'tQ/k*XQ/w*dQ2v-nQ4U/lS4_/x0SQ7Z4PS7f4e4gQ9V7[Q9Z7cQ9`7iS:X9[9]S:n:Y:ZS:w:o:pR:}:xQ#wbQ'p!uS(a#g1vS(c#m+QQ+S%dQ+d%vQ+j%|U-j'h'q'tQ.O(bQ/j*XQ/v*dQ/|*gQ0r+eQ1g,XS2s-k-nQ2{.WS4T/k/lS4^/w0SQ4a/{Q4c/}Q5p1hQ6i2vQ7Y4PQ7^4US7b4_4gQ7g4fQ8Z5qS9U7Z7[Q9Y7cQ9^7fQ9a7jQ9o8[Q:V9VS:W9Z9]Q:[9`Q:e9pS:m:X:ZS:v:n:pQ:|:wQ;O:}Q<i<dQ<t<mR<u<nV!wQ']-]%[aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS#wz!j!r<c$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<i<z%[bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rQ%dj!S%vy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dS%|z!jQ+e%wQ,X&aW1h,Y,Z,[,]U5q1i1j1kS8[5r5sQ9p8]!r<d$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q<m<yR<n<z%OeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rY#bWZ#W#Z(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ,f&l!p<e$Z$n)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<h'UU'Y!e%g*VR2e-W%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8r!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q,e&lQ0m+aQ3Q._Q6r3UR8x6t!b$Tc#Y%o(O(U(p(u)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!P;_)Y)m-R.t2]2`3b3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!f$Vc#Y%o(O(U(p(u)S)T)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!T;a)Y)m-R.t2]2`3b3h3i3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!^$Zc#Y%o(O(U(p(u)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;RQ3}/cz<{)Y)m-R.t2]2`3b3q3y6_6z7T7U7}8l8z9Q9R:`:g<oQ=Q=SR=R=T'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S$oh$pR3v.|'VgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$kf$qQ$ifS)f$l)jR)r$qT$jf$qT)h$l)j'VhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$oh$pQ$rhR)q$p%[jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8r!s<y$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{#elOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_(z)o+V+a,h,k,p-a._.}/f0a1d1t1u1w1y1|2P2R3U3u5b5m5}6O6R6t8R8X8h!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=VQ*}%`Q/Y)zo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!O$yi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=RQ*^$zU*g$|*V*jQ+O%aQ/}*h#^<k#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn<l;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bQ<p<|Q<q<}Q<r=OR<s=P!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bnoOXst!Z#d%k&o&q&r&t,k,p1|2PS*a${*UQ,y&{Q,z&}R4X/p$|%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ+|&YQ1Y,OQ5[1XR7z5]V*i$|*V*jU*i$|*V*jT5d1a5eU/{*f/f5bS4f0T8RR7j4hQ+d%vQ/|*gQ0r+eQ1g,XQ5p1hQ8Z5qQ9o8[R:e9p!O%Oi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rr)}$v)a*O*p+P/n0Z0[3s4V4q7X7k:U<j<v<wS0V*o0W#^;j#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;k;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!`;|(q)_*W*`.b.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=T`;}3o6{7O7S8{:Q:T:{S<X.d3ZT<Y6}9O!O%Qi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rv*P$v)a*Q*o+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<wS0X*p0Y#^;l#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;m;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!d<O(q)_*W*`.c.d.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=Td<P3o6|6}7S8{8|:Q:R:T:{S<Z.e3[T<[7O9PrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ&c!UR,h&lrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR&c!UQ,Q&ZR1U+ysnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ1b,VS5k1e1fU8T5i5j5nS9k8V8WS:a9j9mQ:q:bR:y:rQ&j!VR,a&fR5w1nS&O|&TR0}+pQ&o!WR,k&pR,q&uT1},p2PR,u&vQ,t&vR2W,uQ'v!{R-q'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)w$uR/V)wQ#UVR'|#UQ#XWU(S#X(T-xQ(T#YR-x(UQ-U'VR2d-UQ.m(uS3_.m3`R3`.nQ-]']R2h-]Y!rQ']-]1a5eR'g!rQ.x)aR3t.xU#_W%f*UU(Z#_([-yQ([#`R-y(VQ-X'YR2f-Xt`OXst!V!Z#d%k&f&h&o&q&r&t,k,p1|2PS#hZ%cU#r`#h.SR.S(fQ(g#jQ.P(cW.X(g.P2y6kQ2y.QR6k2zQ)j$lR/O)jQ$phR)p$pQ$`cU)]$`-t;eQ-t;RR;e)mQ/i*XW4R/i4S7]9WU4S/j/k/lS7]4T4UR9W7^$Z)|$v(q)_)a*W*`*o*p*z*{+P.d.e.g.h.i/U/Z/_/a/c/n/s0Z0[0k1V1X3W3X3Y3o3s4V4W4[4i4k4q5Z5]6u6v6w6x6}7O7Q7R7S7X7`7d7k7m7o8{8|8}9X9_:Q:R:S:T:U:]:l:{<j<v<w=S=TQ/q*`U4Z/q4]7aQ4]/sR7a4[S*j$|*VR0P*jr*O$v)a*o*p+P/n0Z0[3s4V4q7X7k:U<j<v<w!`.b(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=TU/`*O.b6{a6{3o6}7O7S8{:Q:T:{Q0W*oQ3Z.dU4j0W3Z9OR9O6}v*Q$v)a*o*p+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<w!d.c(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=TU/b*Q.c6|e6|3o6}7O7S8{8|:Q:R:T:{Q0Y*pQ3[.eU4l0Y3[9PR9P7OQ*u%UR0^*uQ4v0kR7n4vQ+X%iR0j+XQ5_1[S7|5_9iR9i7}Q,S&[R1_,SQ5e1aR8P5eQ1m,^S5u1m8_R8_5wQ0x+lW5Q0x5S7t9eQ5S0{Q7t5RR9e7uQ+q&OR1O+qQ2P,pR6V2PYrOXst#dQ&s!ZQ+Z%kQ,j&oQ,l&qQ,m&rQ,o&tQ1z,kS1},p2PR6U1|Q%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Y%jQ+f%xQ+x&UQ,`&jQ,w&yW-h'h'p'q'tQ-o'lQ0O*iQ0s+gS1p,a,dQ2X,vQ2Y,yQ2Z,zQ2o-gW2q-j-k-n-pQ4y0tQ5V1RQ5Y1VQ5o1gQ5y1rQ6T1{U6d2p2s2vQ6g2tQ7p4zQ7x5XQ7y5ZQ8O5dQ8Y5pQ8`5xS8o6e6iQ8q6hQ9f7vQ9n8ZQ9s8aQ9z8pQ:_9gQ:d9oQ:h9{R:s:eQ%xyQ'a!iQ'l!uU+g%y%z%{Q-O'SU-c'b'c'dS-g'h'rQ/u*dS0t+h+iQ2a-QS2m-d-eQ2t-lQ4`/yQ4z0uQ6`2gQ6c2nQ6h2uR7e4dS$wi<xR*v%VU%Ui%V<xR0]*tQ$viS(q#v+cS)_$b$cQ)a$dQ*W$xS*`${*UQ*o%OQ*p%QQ*z%]Q*{%^Q+P%bQ.d;jQ.e;lQ.g;pQ.h;rQ.i;tQ/U)uS/Z){/]Q/_)}Q/a*PQ/c*RQ/n*[S/s*b/eQ0Z*rQ0[*sh0k+`.^1c3T5l6p8U8u9l:O:c:kQ1V+zQ1X+}Q3W;|Q3X<OQ3Y<RS3o;g;hQ3s.wQ4V/oQ4W/pQ4[/rQ4i0VQ4k0XQ4q0dQ5Z1WQ5]1ZQ6u<VQ6v<XQ6w<ZQ6x<]Q6};kQ7O;mQ7Q;qQ7R;sQ7S;uQ7X3}Q7`4YQ7d4bQ7k4mQ7m4uQ7o4xQ8{<SQ8|;}Q8}<PQ9X7_Q9_7hQ:Q<WQ:R<YQ:S<[Q:T<^Q:U9TQ:]9bQ:l<aQ:{<bQ<j<xQ<v=QQ<w=RQ=S=UR=T=VQ*x%[Q.f;nR7P;onpOXst!Z#d%k&o&q&r&t,k,p1|2PQ!fPS#fZ#oQ&y!`U'e!o5b8RQ'{#SQ(|#{Q)n$nS,d&h&kQ,i&lQ,v&xQ,{'QQ-_'_Q.p(zQ/S)oS0h+V/fQ0n+aQ1x,hQ2k-aQ3R._Q3x.}Q4o0aQ5j1dQ5{1tQ5|1uQ6Q1wQ6S1yQ6X2RQ6s3UQ7V3uQ8W5mQ8d5}Q8e6OQ8g6RQ8y6tQ9m8XR9w8h#YcOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_(z+V+a,h,k,p-a._/f0a1d1t1u1w1y1|2P2R3U5b5m5}6O6R6t8R8X8hQ#YWQ#eYQ%ouQ%qvS%sw!gS(O#W(RQ(U#ZQ(p#uQ(u#xQ(}$OQ)O$PQ)P$QQ)Q$RQ)R$SQ)S$TQ)T$UQ)U$VQ)V$WQ)W$XQ)Y$ZQ)[$_Q)^$aQ)c$eW)m$n)o.}3uQ+^%rQ+r&PS-R'U2bQ-p'oS-u(P-wQ-z(XQ-|(`Q.k(tQ.n(vQ.r;PQ.t;SQ.u;TQ.v;WQ/X)yQ0e+RQ2],|Q2`-PQ2p-iQ2w-}Q3].lQ3b;XQ3c;YQ3d;ZQ3e;[Q3f;]Q3g;^Q3h;_Q3i;`Q3j;aQ3k;bQ3l;cQ3m.sQ3n;fQ3q;iQ3r;vQ3y;dQ4r0gQ4{0vQ6_;xQ6e2rQ6j2xQ6y3^Q6z;yQ7T;{Q7U<TQ7}5`Q8l6]Q8p6fQ8z<UQ9Q<_Q9R<`Q9{8rQ:`9hQ:g9yQ;R#SR<o<{R#[WR'W!el!tQ!r!v!y!z']'i'j'k-]-m1a5e5gS'S!e-TS-Q'T'[R2g-ZR(w#xQ!fQT-[']-]]!qQ!r']-]1a5eQ#p]R'f;QR)b$dY!uQ']-]1a5eQ'h!rS'r!v!yS't!z5gS-l'i'jQ-n'kR2u-mT#kZ%cS#jZ%cS%im,gU(c#h#i#lS.Q(d(eQ.U(fQ0i+WQ2z.RU2{.S.T.VS6l2|2}R8s6md#^W#W#Z%f(P(Y*U+T-{/er#gZm#h#i#l%c(d(e(f+W.R.S.T.V2|2}6mS*X$x*]Q/l*YQ1v,gQ2^,}Q4P/hQ6Z2UQ7[4QQ8k6[T<g'U+UV#aW%f*UU#`W%f*US(Q#W(YU(V#Z+T/eS-S'U+UT-v(P-{V'Z!e%g*VQ$lfR)t$qT)i$l)jR3w.|T*Z$x*]T*c${*UQ0l+`Q3P.^Q5i1cQ6q3TQ8V5lQ8v6pQ9j8UQ9|8uQ:b9lQ:j:OQ:r:cR:u:knqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&i!VR,`&ftmOXst!U!V!Z#d%k&f&o&q&r&t,k,p1|2PR,g&lT%jm,gR1],PR,_&dQ&S|R+w&TR+m%}T&m!W&pT&n!W&pT2O,p2P",
- nodeNames: "⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",
- maxTerm: 376,
- context: vAt,
- nodeProps: [
- ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
- ["group", -26, 9, 17, 19, 65, 204, 208, 212, 213, 215, 218, 221, 231, 233, 239, 241, 243, 245, 248, 254, 260, 262, 264, 266, 268, 270, 271, "Statement", -34, 13, 14, 29, 32, 33, 39, 48, 51, 52, 54, 59, 67, 69, 73, 77, 79, 81, 82, 107, 108, 117, 118, 135, 138, 140, 141, 142, 143, 144, 146, 147, 166, 167, 169, "Expression", -23, 28, 30, 34, 38, 40, 42, 171, 173, 175, 176, 178, 179, 180, 182, 183, 184, 186, 187, 188, 198, 200, 202, 203, "Type", -3, 85, 100, 106, "ClassItem"],
- ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
- ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
- ],
- propSources: [_At],
- skippedNodes: [0, 5, 6, 274],
- repeatNodeCount: 37,
- tokenData: "$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Rp(U!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(U!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(j%1l(Rp(U!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Rp(U!b$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Rp(U!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Rp(U!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(u+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(T';W$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(RpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Rp(U!b(P%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Rp(U!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Rp(U!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Rp(U!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Rp(U!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(U!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Rp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Rp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Rp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Rp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(RpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(RpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Rp(U!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Rp(U!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Rp(U!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Rp(U!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Rp(U!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Rp(U!b'y0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Rp(U!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(U!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(U!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(RpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(RpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Rp(U!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Rp(U!b(y7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(m(Ct$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Rp(U!b([+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Rp(U!b(O,2j$^#t(`$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Rp(U!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(t+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z(Kd$?V_!Z(Cds`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Rp(U!b'w0/l$[#t(O,2j(`$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Rp(U!b'x0/l$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",
- tokenizers: [mAt, yAt, bAt, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, gAt, new j4("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~", 141, 335), new j4("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
- topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
- dialects: { jsx: 0, ts: 14725 },
- dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
- specialized: [{ term: 322, get: (t) => OAt[t] || -1 }, { term: 338, get: (t) => SAt[t] || -1 }, { term: 92, get: (t) => xAt[t] || -1 }],
- tokenPrec: 14749
- }), Mme = [
- /* @__PURE__ */ xa("function ${name}(${params}) {\n ${}\n}", {
- label: "function",
- detail: "definition",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", {
- label: "for",
- detail: "loop",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("for (let ${name} of ${collection}) {\n ${}\n}", {
- label: "for",
- detail: "of loop",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("do {\n ${}\n} while (${})", {
- label: "do",
- detail: "loop",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("while (${}) {\n ${}\n}", {
- label: "while",
- detail: "loop",
- type: "keyword"
- }),
- /* @__PURE__ */ xa(`try {
- \${}
- } catch (\${error}) {
- \${}
- }`, {
- label: "try",
- detail: "/ catch block",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("if (${}) {\n ${}\n}", {
- label: "if",
- detail: "block",
- type: "keyword"
- }),
- /* @__PURE__ */ xa(`if (\${}) {
- \${}
- } else {
- \${}
- }`, {
- label: "if",
- detail: "/ else block",
- type: "keyword"
- }),
- /* @__PURE__ */ xa(`class \${name} {
- constructor(\${params}) {
- \${}
- }
- }`, {
- label: "class",
- detail: "definition",
- type: "keyword"
- }),
- /* @__PURE__ */ xa('import {${names}} from "${module}"\n${}', {
- label: "import",
- detail: "named",
- type: "keyword"
- }),
- /* @__PURE__ */ xa('import ${name} from "${module}"\n${}', {
- label: "import",
- detail: "default",
- type: "keyword"
- })
- ], CAt = /* @__PURE__ */ Mme.concat([
- /* @__PURE__ */ xa("interface ${name} {\n ${}\n}", {
- label: "interface",
- detail: "definition",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("type ${name} = ${type}", {
- label: "type",
- detail: "definition",
- type: "keyword"
- }),
- /* @__PURE__ */ xa("enum ${name} {\n ${}\n}", {
- label: "enum",
- detail: "definition",
- type: "keyword"
- })
- ]), KJ = /* @__PURE__ */ new TCt(), Ime = /* @__PURE__ */ new Set([
- "Script",
- "Block",
- "FunctionExpression",
- "FunctionDeclaration",
- "ArrowFunction",
- "MethodDeclaration",
- "ForStatement"
- ]);
- function oy(t) {
- return (e, n) => {
- let r = e.node.getChild("VariableDefinition");
- return r && n(r, t), !0;
- };
- }
- const TAt = ["FunctionDeclaration"], PAt = {
- FunctionDeclaration: /* @__PURE__ */ oy("function"),
- ClassDeclaration: /* @__PURE__ */ oy("class"),
- ClassExpression: () => !0,
- EnumDeclaration: /* @__PURE__ */ oy("constant"),
- TypeAliasDeclaration: /* @__PURE__ */ oy("type"),
- NamespaceDeclaration: /* @__PURE__ */ oy("namespace"),
- VariableDefinition(t, e) {
- t.matchContext(TAt) || e(t, "variable");
- },
- TypeDefinition(t, e) {
- e(t, "type");
- },
- __proto__: null
- };
- function Dme(t, e) {
- let n = KJ.get(e);
- if (n)
- return n;
- let r = [], i = !0;
- function a(o, s) {
- let l = t.sliceString(o.from, o.to);
- r.push({ label: l, type: s });
- }
- return e.cursor(Ur.IncludeAnonymous).iterate((o) => {
- if (i)
- i = !1;
- else if (o.name) {
- let s = PAt[o.name];
- if (s && s(o, a) || Ime.has(o.name))
- return !1;
- } else if (o.to - o.from > 8192) {
- for (let s of Dme(t, o.node))
- r.push(s);
- return !1;
- }
- }), KJ.set(e, r), r;
- }
- const JJ = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, Rme = [
- "TemplateString",
- "String",
- "RegExp",
- "LineComment",
- "BlockComment",
- "VariableDefinition",
- "TypeDefinition",
- "Label",
- "PropertyDefinition",
- "PropertyName",
- "PrivatePropertyDefinition",
- "PrivatePropertyName",
- ".",
- "?."
- ];
- function $At(t) {
- let e = ni(t.state).resolveInner(t.pos, -1);
- if (Rme.indexOf(e.name) > -1)
- return null;
- let n = e.name == "VariableName" || e.to - e.from < 20 && JJ.test(t.state.sliceDoc(e.from, e.to));
- if (!n && !t.explicit)
- return null;
- let r = [];
- for (let i = e; i; i = i.parent)
- Ime.has(i.name) && (r = r.concat(Dme(t.state.doc, i)));
- return {
- options: r,
- from: n ? e.from : t.pos,
- validFor: JJ
- };
- }
- const Mh = /* @__PURE__ */ w_.define({
- name: "javascript",
- parser: /* @__PURE__ */ wAt.configure({
- props: [
- /* @__PURE__ */ mB.add({
- IfStatement: /* @__PURE__ */ yb({ except: /^\s*({|else\b)/ }),
- TryStatement: /* @__PURE__ */ yb({ except: /^\s*({|catch\b|finally\b)/ }),
- LabeledStatement: jCt,
- SwitchBody: (t) => {
- let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
- return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
- },
- Block: /* @__PURE__ */ GCt({ closing: "}" }),
- ArrowFunction: (t) => t.baseIndent + t.unit,
- "TemplateString BlockComment": () => null,
- "Statement Property": /* @__PURE__ */ yb({ except: /^{/ }),
- JSXElement(t) {
- let e = /^\s*<\//.test(t.textAfter);
- return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
- },
- JSXEscape(t) {
- let e = /\s*\}/.test(t.textAfter);
- return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
- },
- "JSXOpenTag JSXSelfClosingTag"(t) {
- return t.column(t.node.from) + t.unit;
- }
- }),
- /* @__PURE__ */ bB.add({
- "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": cge,
- BlockComment(t) {
- return { from: t.from + 2, to: t.to - 2 };
- }
- })
- ]
- }),
- languageData: {
- closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
- commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
- indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
- wordChars: "$"
- }
- }), kme = {
- test: (t) => /^JSX/.test(t.name),
- facet: /* @__PURE__ */ age({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
- }, AAt = /* @__PURE__ */ Mh.configure({ dialect: "ts" }, "typescript"), EAt = /* @__PURE__ */ Mh.configure({
- dialect: "jsx",
- props: [/* @__PURE__ */ vB.add((t) => t.isTop ? [kme] : void 0)]
- }), MAt = /* @__PURE__ */ Mh.configure({
- dialect: "jsx ts",
- props: [/* @__PURE__ */ vB.add((t) => t.isTop ? [kme] : void 0)]
- }, "typescript");
- let Lme = (t) => ({ label: t, type: "keyword" });
- const Nme = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Lme), IAt = /* @__PURE__ */ Nme.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(Lme));
- function DAt(t = {}) {
- let e = t.jsx ? t.typescript ? MAt : EAt : t.typescript ? AAt : Mh, n = t.typescript ? CAt.concat(IAt) : Mme.concat(Nme);
- return new sge(e, [
- Mh.data.of({
- autocomplete: dPt(Rme, dme(n))
- }),
- Mh.data.of({
- autocomplete: $At
- }),
- t.jsx ? LAt : []
- ]);
- }
- function RAt(t) {
- for (; ; ) {
- if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
- return t;
- if (t.name == "JSXEscape" || !t.parent)
- return null;
- t = t.parent;
- }
- }
- function eee(t, e, n = t.length) {
- for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
- if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
- return t.sliceString(r.from, Math.min(r.to, n));
- return "";
- }
- const kAt = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), LAt = /* @__PURE__ */ rt.inputHandler.of((t, e, n, r, i) => {
- if ((kAt ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !Mh.isActiveAt(t.state, e, -1))
- return !1;
- let a = i(), { state: o } = a, s = o.changeByRange((l) => {
- var u;
- let { head: c } = l, f = ni(o).resolveInner(c - 1, -1), d;
- if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
- if (r == ">" && f.name == "JSXFragmentTag")
- return { range: l, changes: { from: c, insert: "</>" } };
- if (r == "/" && f.name == "JSXStartCloseTag") {
- let h = f.parent, p = h.parent;
- if (p && h.from == c - 2 && ((d = eee(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
- let v = `${d}>`;
- return { range: De.cursor(c + v.length, -1), changes: { from: c, insert: v } };
- }
- } else if (r == ">") {
- let h = RAt(f);
- if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = eee(o.doc, h, c)))
- return { range: l, changes: { from: c, insert: `</${d}>` } };
- }
- }
- return { range: l };
- });
- return s.changes.empty ? !1 : (t.dispatch([
- a,
- o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
- ]), !0);
- }), NAt = pB({
- String: ce.string,
- Number: ce.number,
- "True False": ce.bool,
- PropertyName: ce.propertyName,
- Null: ce.null,
- ",": ce.separator,
- "[ ]": ce.squareBracket,
- "{ }": ce.brace
- }), BAt = I_.deserialize({
- version: 14,
- states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",
- stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
- goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
- nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
- maxTerm: 25,
- nodeProps: [
- ["isolate", -2, 6, 11, ""],
- ["openedBy", 7, "{", 12, "["],
- ["closedBy", 8, "}", 13, "]"]
- ],
- propSources: [NAt],
- skippedNodes: [0],
- repeatNodeCount: 2,
- tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
- tokenizers: [0],
- topRules: { JsonText: [0, 1] },
- tokenPrec: 0
- }), zAt = /* @__PURE__ */ w_.define({
- name: "json",
- parser: /* @__PURE__ */ BAt.configure({
- props: [
- /* @__PURE__ */ mB.add({
- Object: /* @__PURE__ */ yb({ except: /^\s*\}/ }),
- Array: /* @__PURE__ */ yb({ except: /^\s*\]/ })
- }),
- /* @__PURE__ */ bB.add({
- "Object Array": cge
- })
- ]
- }),
- languageData: {
- closeBrackets: { brackets: ["[", "{", '"'] },
- indentOnInput: /^\s*[\}\]]$/
- }
- });
- function VAt() {
- return new sge(zAt);
- }
- var Bme = { exports: {} }, sy = {}, Ex = { exports: {} }, PD = {}, $D = {}, tee;
- function RB() {
- if (tee) return $D;
- tee = 1;
- function t(r) {
- this.__parent = r, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = [];
- }
- t.prototype.clone_empty = function() {
- var r = new t(this.__parent);
- return r.set_indent(this.__indent_count, this.__alignment_count), r;
- }, t.prototype.item = function(r) {
- return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
- }, t.prototype.has_match = function(r) {
- for (var i = this.__items.length - 1; i >= 0; i--)
- if (this.__items[i].match(r))
- return !0;
- return !1;
- }, t.prototype.set_indent = function(r, i) {
- this.is_empty() && (this.__indent_count = r || 0, this.__alignment_count = i || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
- }, t.prototype._set_wrap_point = function() {
- this.__parent.wrap_line_length && (this.__wrap_point_index = this.__items.length, this.__wrap_point_character_count = this.__character_count, this.__wrap_point_indent_count = this.__parent.next_line.__indent_count, this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count);
- }, t.prototype._should_wrap = function() {
- return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
- }, t.prototype._allow_wrap = function() {
- if (this._should_wrap()) {
- this.__parent.add_new_line();
- var r = this.__parent.current_line;
- return r.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count), r.__items = this.__items.slice(this.__wrap_point_index), this.__items = this.__items.slice(0, this.__wrap_point_index), r.__character_count += this.__character_count - this.__wrap_point_character_count, this.__character_count = this.__wrap_point_character_count, r.__items[0] === " " && (r.__items.splice(0, 1), r.__character_count -= 1), !0;
- }
- return !1;
- }, t.prototype.is_empty = function() {
- return this.__items.length === 0;
- }, t.prototype.last = function() {
- return this.is_empty() ? null : this.__items[this.__items.length - 1];
- }, t.prototype.push = function(r) {
- this.__items.push(r);
- var i = r.lastIndexOf(`
- `);
- i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
- }, t.prototype.pop = function() {
- var r = null;
- return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
- }, t.prototype._remove_indent = function() {
- this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
- }, t.prototype._remove_wrap_indent = function() {
- this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
- }, t.prototype.trim = function() {
- for (; this.last() === " "; )
- this.__items.pop(), this.__character_count -= 1;
- }, t.prototype.toString = function() {
- var r = "";
- return this.is_empty() ? this.__parent.indent_empty_lines && (r = this.__parent.get_indent_string(this.__indent_count)) : (r = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count), r += this.__items.join("")), r;
- };
- function e(r, i) {
- this.__cache = [""], this.__indent_size = r.indent_size, this.__indent_string = r.indent_char, r.indent_with_tabs || (this.__indent_string = new Array(r.indent_size + 1).join(r.indent_char)), i = i || "", r.indent_level > 0 && (i = new Array(r.indent_level + 1).join(this.__indent_string)), this.__base_string = i, this.__base_string_length = i.length;
- }
- e.prototype.get_indent_size = function(r, i) {
- var a = this.__base_string_length;
- return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
- }, e.prototype.get_indent_string = function(r, i) {
- var a = this.__base_string;
- return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
- }, e.prototype.__ensure_cache = function(r) {
- for (; r >= this.__cache.length; )
- this.__add_column();
- }, e.prototype.__add_column = function() {
- var r = this.__cache.length, i = 0, a = "";
- this.__indent_size && r >= this.__indent_size && (i = Math.floor(r / this.__indent_size), r -= i * this.__indent_size, a = new Array(i + 1).join(this.__indent_string)), r && (a += new Array(r + 1).join(" ")), this.__cache.push(a);
- };
- function n(r, i) {
- this.__indent_cache = new e(r, i), this.raw = !1, this._end_with_newline = r.end_with_newline, this.indent_size = r.indent_size, this.wrap_line_length = r.wrap_line_length, this.indent_empty_lines = r.indent_empty_lines, this.__lines = [], this.previous_line = null, this.current_line = null, this.next_line = new t(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
- }
- return n.prototype.__add_outputline = function() {
- this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
- }, n.prototype.get_line_number = function() {
- return this.__lines.length;
- }, n.prototype.get_indent_string = function(r, i) {
- return this.__indent_cache.get_indent_string(r, i);
- }, n.prototype.get_indent_size = function(r, i) {
- return this.__indent_cache.get_indent_size(r, i);
- }, n.prototype.is_empty = function() {
- return !this.previous_line && this.current_line.is_empty();
- }, n.prototype.add_new_line = function(r) {
- return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
- }, n.prototype.get_code = function(r) {
- this.trim(!0);
- var i = this.current_line.pop();
- i && (i[i.length - 1] === `
- ` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
- var a = this.__lines.join(`
- `);
- return r !== `
- ` && (a = a.replace(/[\n]/g, r)), a;
- }, n.prototype.set_wrap_point = function() {
- this.current_line._set_wrap_point();
- }, n.prototype.set_indent = function(r, i) {
- return r = r || 0, i = i || 0, this.next_line.set_indent(r, i), this.__lines.length > 1 ? (this.current_line.set_indent(r, i), !0) : (this.current_line.set_indent(), !1);
- }, n.prototype.add_raw_token = function(r) {
- for (var i = 0; i < r.newlines; i++)
- this.__add_outputline();
- this.current_line.set_indent(-1), this.current_line.push(r.whitespace_before), this.current_line.push(r.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1;
- }, n.prototype.add_token = function(r) {
- this.__add_space_before_token(), this.current_line.push(r), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap();
- }, n.prototype.__add_space_before_token = function() {
- this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
- }, n.prototype.remove_indent = function(r) {
- for (var i = this.__lines.length; r < i; )
- this.__lines[r]._remove_indent(), r++;
- this.current_line._remove_wrap_indent();
- }, n.prototype.trim = function(r) {
- for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
- this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
- this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
- }, n.prototype.just_added_newline = function() {
- return this.current_line.is_empty();
- }, n.prototype.just_added_blankline = function() {
- return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
- }, n.prototype.ensure_empty_line_above = function(r, i) {
- for (var a = this.__lines.length - 2; a >= 0; ) {
- var o = this.__lines[a];
- if (o.is_empty())
- break;
- if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
- this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
- break;
- }
- a--;
- }
- }, $D.Output = n, $D;
- }
- var AD = {}, nee;
- function zme() {
- if (nee) return AD;
- nee = 1;
- function t(e, n, r, i) {
- this.type = e, this.text = n, this.comments_before = null, this.newlines = r || 0, this.whitespace_before = i || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
- }
- return AD.Token = t, AD;
- }
- var ED = {}, ree;
- function Vme() {
- return ree || (ree = 1, function(t) {
- var e = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", n = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", r = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc", i = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f", a = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}", o = "(?:" + a + "|[" + e + r + "])", s = "(?:" + a + "|[" + n + r + i + "])*";
- t.identifier = new RegExp(o + s, "g"), t.identifierStart = new RegExp(o), t.identifierMatch = new RegExp("(?:" + a + "|[" + n + r + i + "])+"), t.newline = /[\n\r\u2028\u2029]/, t.lineBreak = new RegExp(`\r
- |` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
- }(ED)), ED;
- }
- var MD = {}, ly = {}, iee;
- function kB() {
- if (iee) return ly;
- iee = 1;
- function t(r, i) {
- this.raw_options = e(r, i), this.disabled = this._get_boolean("disabled"), this.eol = this._get_characters("eol", "auto"), this.end_with_newline = this._get_boolean("end_with_newline"), this.indent_size = this._get_number("indent_size", 4), this.indent_char = this._get_characters("indent_char", " "), this.indent_level = this._get_number("indent_level"), this.preserve_newlines = this._get_boolean("preserve_newlines", !0), this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786), this.preserve_newlines || (this.max_preserve_newlines = 0), this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === " "), this.indent_with_tabs && (this.indent_char = " ", this.indent_size === 1 && (this.indent_size = 4)), this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char")), this.indent_empty_lines = this._get_boolean("indent_empty_lines"), this.templating = this._get_selection_list("templating", ["auto", "none", "angular", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
- }
- t.prototype._get_array = function(r, i) {
- var a = this.raw_options[r], o = i || [];
- return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
- }, t.prototype._get_boolean = function(r, i) {
- var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
- return o;
- }, t.prototype._get_characters = function(r, i) {
- var a = this.raw_options[r], o = i || "";
- return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
- `).replace(/\\t/, " ")), o;
- }, t.prototype._get_number = function(r, i) {
- var a = this.raw_options[r];
- i = parseInt(i, 10), isNaN(i) && (i = 0);
- var o = parseInt(a, 10);
- return isNaN(o) && (o = i), o;
- }, t.prototype._get_selection = function(r, i, a) {
- var o = this._get_selection_list(r, i, a);
- if (o.length !== 1)
- throw new Error(
- "Invalid Option Value: The option '" + r + `' can only be one of the following values:
- ` + i + `
- You passed in: '` + this.raw_options[r] + "'"
- );
- return o[0];
- }, t.prototype._get_selection_list = function(r, i, a) {
- if (!i || i.length === 0)
- throw new Error("Selection list cannot be empty.");
- if (a = a || [i[0]], !this._is_valid_selection(a, i))
- throw new Error("Invalid Default Value!");
- var o = this._get_array(r, a);
- if (!this._is_valid_selection(o, i))
- throw new Error(
- "Invalid Option Value: The option '" + r + `' can contain only the following values:
- ` + i + `
- You passed in: '` + this.raw_options[r] + "'"
- );
- return o;
- }, t.prototype._is_valid_selection = function(r, i) {
- return r.length && i.length && !r.some(function(a) {
- return i.indexOf(a) === -1;
- });
- };
- function e(r, i) {
- var a = {};
- r = n(r);
- var o;
- for (o in r)
- o !== i && (a[o] = r[o]);
- if (i && r[i])
- for (o in r[i])
- a[o] = r[i][o];
- return a;
- }
- function n(r) {
- var i = {}, a;
- for (a in r) {
- var o = a.replace(/-/g, "_");
- i[o] = r[a];
- }
- return i;
- }
- return ly.Options = t, ly.normalizeOpts = n, ly.mergeOpts = e, ly;
- }
- var aee;
- function Fme() {
- if (aee) return MD;
- aee = 1;
- var t = kB().Options, e = ["before-newline", "after-newline", "preserve-newline"];
- function n(r) {
- t.call(this, r, "js");
- var i = this.raw_options.brace_style || null;
- i === "expand-strict" ? this.raw_options.brace_style = "expand" : i === "collapse-preserve-inline" ? this.raw_options.brace_style = "collapse,preserve-inline" : this.raw_options.braces_on_own_line !== void 0 && (this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse");
- var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
- this.brace_preserve_inline = !1, this.brace_style = "collapse";
- for (var o = 0; o < a.length; o++)
- a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
- this.unindent_chained_methods = this._get_boolean("unindent_chained_methods"), this.break_chained_methods = this._get_boolean("break_chained_methods"), this.space_in_paren = this._get_boolean("space_in_paren"), this.space_in_empty_paren = this._get_boolean("space_in_empty_paren"), this.jslint_happy = this._get_boolean("jslint_happy"), this.space_after_anon_function = this._get_boolean("space_after_anon_function"), this.space_after_named_function = this._get_boolean("space_after_named_function"), this.keep_array_indentation = this._get_boolean("keep_array_indentation"), this.space_before_conditional = this._get_boolean("space_before_conditional", !0), this.unescape_strings = this._get_boolean("unescape_strings"), this.e4x = this._get_boolean("e4x"), this.comma_first = this._get_boolean("comma_first"), this.operator_position = this._get_selection("operator_position", e), this.test_output_raw = this._get_boolean("test_output_raw"), this.jslint_happy && (this.space_after_anon_function = !0);
- }
- return n.prototype = new t(), MD.Options = n, MD;
- }
- var gv = {}, ID = {}, oee;
- function LB() {
- if (oee) return ID;
- oee = 1;
- var t = RegExp.prototype.hasOwnProperty("sticky");
- function e(n) {
- this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
- }
- return e.prototype.restart = function() {
- this.__position = 0;
- }, e.prototype.back = function() {
- this.__position > 0 && (this.__position -= 1);
- }, e.prototype.hasNext = function() {
- return this.__position < this.__input_length;
- }, e.prototype.next = function() {
- var n = null;
- return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
- }, e.prototype.peek = function(n) {
- var r = null;
- return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
- }, e.prototype.__match = function(n, r) {
- n.lastIndex = r;
- var i = n.exec(this.__input);
- return i && !(t && n.sticky) && i.index !== r && (i = null), i;
- }, e.prototype.test = function(n, r) {
- return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
- }, e.prototype.testChar = function(n, r) {
- var i = this.peek(r);
- return n.lastIndex = 0, i !== null && n.test(i);
- }, e.prototype.match = function(n) {
- var r = this.__match(n, this.__position);
- return r ? this.__position += r[0].length : r = null, r;
- }, e.prototype.read = function(n, r, i) {
- var a = "", o;
- return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
- }, e.prototype.readUntil = function(n, r) {
- var i = "", a = this.__position;
- n.lastIndex = this.__position;
- var o = n.exec(this.__input);
- return o ? (a = o.index, r && (a += o[0].length)) : a = this.__input_length, i = this.__input.substring(this.__position, a), this.__position = a, i;
- }, e.prototype.readUntilAfter = function(n) {
- return this.readUntil(n, !0);
- }, e.prototype.get_regexp = function(n, r) {
- var i = null, a = "g";
- return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
- }, e.prototype.get_literal_regexp = function(n) {
- return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
- }, e.prototype.peekUntilAfter = function(n) {
- var r = this.__position, i = this.readUntilAfter(n);
- return this.__position = r, i;
- }, e.prototype.lookBack = function(n) {
- var r = this.__position - 1;
- return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
- }, ID.InputScanner = e, ID;
- }
- var Mx = {}, DD = {}, see;
- function FAt() {
- if (see) return DD;
- see = 1;
- function t(e) {
- this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
- }
- return t.prototype.restart = function() {
- this.__position = 0;
- }, t.prototype.isEmpty = function() {
- return this.__tokens_length === 0;
- }, t.prototype.hasNext = function() {
- return this.__position < this.__tokens_length;
- }, t.prototype.next = function() {
- var e = null;
- return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
- }, t.prototype.peek = function(e) {
- var n = null;
- return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
- }, t.prototype.add = function(e) {
- this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
- }, DD.TokenStream = t, DD;
- }
- var RD = {}, kD = {}, lee;
- function v$() {
- if (lee) return kD;
- lee = 1;
- function t(e, n) {
- this._input = e, this._starting_pattern = null, this._match_pattern = null, this._until_pattern = null, this._until_after = !1, n && (this._starting_pattern = this._input.get_regexp(n._starting_pattern, !0), this._match_pattern = this._input.get_regexp(n._match_pattern, !0), this._until_pattern = this._input.get_regexp(n._until_pattern), this._until_after = n._until_after);
- }
- return t.prototype.read = function() {
- var e = this._input.read(this._starting_pattern);
- return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
- }, t.prototype.read_match = function() {
- return this._input.match(this._match_pattern);
- }, t.prototype.until_after = function(e) {
- var n = this._create();
- return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
- }, t.prototype.until = function(e) {
- var n = this._create();
- return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
- }, t.prototype.starting_with = function(e) {
- var n = this._create();
- return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
- }, t.prototype.matching = function(e) {
- var n = this._create();
- return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
- }, t.prototype._create = function() {
- return new t(this._input, this);
- }, t.prototype._update = function() {
- }, kD.Pattern = t, kD;
- }
- var uee;
- function WAt() {
- if (uee) return RD;
- uee = 1;
- var t = v$().Pattern;
- function e(n, r) {
- t.call(this, n, r), r ? this._line_regexp = this._input.get_regexp(r._line_regexp) : this.__set_whitespace_patterns("", ""), this.newline_count = 0, this.whitespace_before_token = "";
- }
- return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
- n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
- "[" + n + r + "]+",
- !0
- ), this._newline_regexp = this._input.get_regexp(
- "\\r\\n|[" + r + "]"
- );
- }, e.prototype.read = function() {
- this.newline_count = 0, this.whitespace_before_token = "";
- var n = this._input.read(this._match_pattern);
- if (n === " ")
- this.whitespace_before_token = " ";
- else if (n) {
- var r = this.__split(this._newline_regexp, n);
- this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
- }
- return n;
- }, e.prototype.matching = function(n, r) {
- var i = this._create();
- return i.__set_whitespace_patterns(n, r), i._update(), i;
- }, e.prototype._create = function() {
- return new e(this._input, this);
- }, e.prototype.__split = function(n, r) {
- n.lastIndex = 0;
- for (var i = 0, a = [], o = n.exec(r); o; )
- a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
- return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
- }, RD.WhitespacePattern = e, RD;
- }
- var cee;
- function qT() {
- if (cee) return Mx;
- cee = 1;
- var t = LB().InputScanner, e = zme().Token, n = FAt().TokenStream, r = WAt().WhitespacePattern, i = {
- START: "TK_START",
- RAW: "TK_RAW",
- EOF: "TK_EOF"
- }, a = function(o, s) {
- this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
- };
- return a.prototype.tokenize = function() {
- this._input.restart(), this.__tokens = new n(), this._reset();
- for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
- for (o = this._get_next_token(s, l); this._is_comment(o); )
- c.add(o), o = this._get_next_token(s, l);
- c.isEmpty() || (o.comments_before = c, c = new n()), o.parent = l, this._is_opening(o) ? (u.push(l), l = o) : l && this._is_closing(o, l) && (o.opened = l, l.closed = o, l = u.pop(), o.parent = l), o.previous = s, s.next = o, this.__tokens.add(o), s = o;
- }
- return this.__tokens;
- }, a.prototype._is_first_token = function() {
- return this.__tokens.isEmpty();
- }, a.prototype._reset = function() {
- }, a.prototype._get_next_token = function(o, s) {
- this._readWhitespace();
- var l = this._input.read(/.+/g);
- return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
- }, a.prototype._is_comment = function(o) {
- return !1;
- }, a.prototype._is_opening = function(o) {
- return !1;
- }, a.prototype._is_closing = function(o, s) {
- return !1;
- }, a.prototype._create_token = function(o, s) {
- var l = new e(
- o,
- s,
- this._patterns.whitespace.newline_count,
- this._patterns.whitespace.whitespace_before_token
- );
- return l;
- }, a.prototype._readWhitespace = function() {
- return this._patterns.whitespace.read();
- }, Mx.Tokenizer = a, Mx.TOKEN = i, Mx;
- }
- var LD = {}, fee;
- function NB() {
- if (fee) return LD;
- fee = 1;
- function t(e, n) {
- e = typeof e == "string" ? e : e.source, n = typeof n == "string" ? n : n.source, this.__directives_block_pattern = new RegExp(e + / beautify( \w+[:]\w+)+ /.source + n, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(e + /\sbeautify\signore:end\s/.source + n, "g");
- }
- return t.prototype.get_directives = function(e) {
- if (!e.match(this.__directives_block_pattern))
- return null;
- var n = {};
- this.__directive_pattern.lastIndex = 0;
- for (var r = this.__directive_pattern.exec(e); r; )
- n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
- return n;
- }, t.prototype.readIgnored = function(e) {
- return e.readUntilAfter(this.__directives_end_ignore_pattern);
- }, LD.Directives = t, LD;
- }
- var ND = {}, dee;
- function Wme() {
- if (dee) return ND;
- dee = 1;
- var t = v$().Pattern, e = {
- django: !1,
- erb: !1,
- handlebars: !1,
- php: !1,
- smarty: !1,
- angular: !1
- };
- function n(r, i) {
- t.call(this, r, i), this.__template_pattern = null, this._disabled = Object.assign({}, e), this._excluded = Object.assign({}, e), i && (this.__template_pattern = this._input.get_regexp(i.__template_pattern), this._excluded = Object.assign(this._excluded, i._excluded), this._disabled = Object.assign(this._disabled, i._disabled));
- var a = new t(r);
- this.__patterns = {
- handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
- handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
- handlebars: a.starting_with(/{{/).until_after(/}}/),
- php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
- erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
- // django coflicts with handlebars a bit.
- django: a.starting_with(/{%/).until_after(/%}/),
- django_value: a.starting_with(/{{/).until_after(/}}/),
- django_comment: a.starting_with(/{#/).until_after(/#}/),
- smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
- smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
- smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
- };
- }
- return n.prototype = new t(), n.prototype._create = function() {
- return new n(this._input, this);
- }, n.prototype._update = function() {
- this.__set_templated_pattern();
- }, n.prototype.disable = function(r) {
- var i = this._create();
- return i._disabled[r] = !0, i._update(), i;
- }, n.prototype.read_options = function(r) {
- var i = this._create();
- for (var a in e)
- i._disabled[a] = r.templating.indexOf(a) === -1;
- return i._update(), i;
- }, n.prototype.exclude = function(r) {
- var i = this._create();
- return i._excluded[r] = !0, i._update(), i;
- }, n.prototype.read = function() {
- var r = "";
- this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
- for (var i = this._read_template(); i; )
- this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
- return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
- }, n.prototype.__set_templated_pattern = function() {
- var r = [];
- this._disabled.php || r.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || r.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.erb || r.push(this.__patterns.erb._starting_pattern.source), this._disabled.django || (r.push(this.__patterns.django._starting_pattern.source), r.push(this.__patterns.django_value._starting_pattern.source), r.push(this.__patterns.django_comment._starting_pattern.source)), this._disabled.smarty || r.push(this.__patterns.smarty._starting_pattern.source), this._until_pattern && r.push(this._until_pattern.source), this.__template_pattern = this._input.get_regexp("(?:" + r.join("|") + ")");
- }, n.prototype._read_template = function() {
- var r = "", i = this._input.peek();
- if (i === "<") {
- var a = this._input.peek(1);
- !this._disabled.php && !this._excluded.php && a === "?" && (r = r || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && a === "%" && (r = r || this.__patterns.erb.read());
- } else i === "{" && (!this._disabled.handlebars && !this._excluded.handlebars && (r = r || this.__patterns.handlebars_comment.read(), r = r || this.__patterns.handlebars_unescaped.read(), r = r || this.__patterns.handlebars.read()), this._disabled.django || (!this._excluded.django && !this._excluded.handlebars && (r = r || this.__patterns.django_value.read()), this._excluded.django || (r = r || this.__patterns.django_comment.read(), r = r || this.__patterns.django.read())), this._disabled.smarty || this._disabled.django && this._disabled.handlebars && (r = r || this.__patterns.smarty_comment.read(), r = r || this.__patterns.smarty_literal.read(), r = r || this.__patterns.smarty.read()));
- return r;
- }, ND.TemplatablePattern = n, ND;
- }
- var hee;
- function Ix() {
- if (hee) return gv;
- hee = 1;
- var t = LB().InputScanner, e = qT().Tokenizer, n = qT().TOKEN, r = NB().Directives, i = Vme(), a = v$().Pattern, o = Wme().TemplatablePattern;
- function s(x, C) {
- return C.indexOf(x) !== -1;
- }
- var l = {
- START_EXPR: "TK_START_EXPR",
- END_EXPR: "TK_END_EXPR",
- START_BLOCK: "TK_START_BLOCK",
- END_BLOCK: "TK_END_BLOCK",
- WORD: "TK_WORD",
- RESERVED: "TK_RESERVED",
- SEMICOLON: "TK_SEMICOLON",
- STRING: "TK_STRING",
- EQUALS: "TK_EQUALS",
- OPERATOR: "TK_OPERATOR",
- COMMA: "TK_COMMA",
- BLOCK_COMMENT: "TK_BLOCK_COMMENT",
- COMMENT: "TK_COMMENT",
- DOT: "TK_DOT",
- UNKNOWN: "TK_UNKNOWN",
- START: n.START,
- RAW: n.RAW,
- EOF: n.EOF
- }, u = new r(/\/\*/, /\*\//), c = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, f = /[0-9]/, d = /[^\d\.]/, h = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), p = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
- p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
- var v = new RegExp(p), g = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), m = g.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), y = new RegExp("^(?:" + m.join("|") + ")$"), _, O = function(x, C) {
- e.call(this, x, C), this._patterns.whitespace = this._patterns.whitespace.matching(
- /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
- /\u2028\u2029/.source
- );
- var P = new a(this._input), $ = new o(this._input).read_options(this._options);
- this.__patterns = {
- template: $,
- identifier: $.starting_with(i.identifier).matching(i.identifierMatch),
- number: P.matching(c),
- punct: P.matching(v),
- // comment ends just before nearest linefeed or end of file
- comment: P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
- // /* ... */ comment ends with nearest */ or end of file
- block_comment: P.starting_with(/\/\*/).until_after(/\*\//),
- html_comment_start: P.matching(/<!--/),
- html_comment_end: P.matching(/-->/),
- include: P.starting_with(/#include/).until_after(i.lineBreak),
- shebang: P.starting_with(/#!/).until_after(i.lineBreak),
- xml: P.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
- single_quote: $.until(/['\\\n\r\u2028\u2029]/),
- double_quote: $.until(/["\\\n\r\u2028\u2029]/),
- template_text: $.until(/[`\\$]/),
- template_expression: $.until(/[`}\\]/)
- };
- };
- O.prototype = new e(), O.prototype._is_comment = function(x) {
- return x.type === l.COMMENT || x.type === l.BLOCK_COMMENT || x.type === l.UNKNOWN;
- }, O.prototype._is_opening = function(x) {
- return x.type === l.START_BLOCK || x.type === l.START_EXPR;
- }, O.prototype._is_closing = function(x, C) {
- return (x.type === l.END_BLOCK || x.type === l.END_EXPR) && C && (x.text === "]" && C.text === "[" || x.text === ")" && C.text === "(" || x.text === "}" && C.text === "{");
- }, O.prototype._reset = function() {
- _ = !1;
- }, O.prototype._get_next_token = function(x, C) {
- var P = null;
- this._readWhitespace();
- var $ = this._input.peek();
- return $ === null ? this._create_token(l.EOF, "") : (P = P || this._read_non_javascript($), P = P || this._read_string($), P = P || this._read_pair($, this._input.peek(1)), P = P || this._read_word(x), P = P || this._read_singles($), P = P || this._read_comment($), P = P || this._read_regexp($, x), P = P || this._read_xml($, x), P = P || this._read_punctuation(), P = P || this._create_token(l.UNKNOWN, this._input.next()), P);
- }, O.prototype._read_word = function(x) {
- var C;
- if (C = this.__patterns.identifier.read(), C !== "")
- return C = C.replace(i.allLineBreaks, `
- `), !(x.type === l.DOT || x.type === l.RESERVED && (x.text === "set" || x.text === "get")) && y.test(C) ? (C === "in" || C === "of") && (x.type === l.WORD || x.type === l.STRING) ? this._create_token(l.OPERATOR, C) : this._create_token(l.RESERVED, C) : this._create_token(l.WORD, C);
- if (C = this.__patterns.number.read(), C !== "")
- return this._create_token(l.WORD, C);
- }, O.prototype._read_singles = function(x) {
- var C = null;
- return x === "(" || x === "[" ? C = this._create_token(l.START_EXPR, x) : x === ")" || x === "]" ? C = this._create_token(l.END_EXPR, x) : x === "{" ? C = this._create_token(l.START_BLOCK, x) : x === "}" ? C = this._create_token(l.END_BLOCK, x) : x === ";" ? C = this._create_token(l.SEMICOLON, x) : x === "." && d.test(this._input.peek(1)) ? C = this._create_token(l.DOT, x) : x === "," && (C = this._create_token(l.COMMA, x)), C && this._input.next(), C;
- }, O.prototype._read_pair = function(x, C) {
- var P = null;
- return x === "#" && C === "{" && (P = this._create_token(l.START_BLOCK, x + C)), P && (this._input.next(), this._input.next()), P;
- }, O.prototype._read_punctuation = function() {
- var x = this.__patterns.punct.read();
- if (x !== "")
- return x === "=" ? this._create_token(l.EQUALS, x) : x === "?." ? this._create_token(l.DOT, x) : this._create_token(l.OPERATOR, x);
- }, O.prototype._read_non_javascript = function(x) {
- var C = "";
- if (x === "#") {
- if (this._is_first_token() && (C = this.__patterns.shebang.read(), C))
- return this._create_token(l.UNKNOWN, C.trim() + `
- `);
- if (C = this.__patterns.include.read(), C)
- return this._create_token(l.UNKNOWN, C.trim() + `
- `);
- x = this._input.next();
- var P = "#";
- if (this._input.hasNext() && this._input.testChar(f)) {
- do
- x = this._input.next(), P += x;
- while (this._input.hasNext() && x !== "#" && x !== "=");
- return x === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (P += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (P += "{}", this._input.next(), this._input.next())), this._create_token(l.WORD, P);
- }
- this._input.back();
- } else if (x === "<" && this._is_first_token()) {
- if (C = this.__patterns.html_comment_start.read(), C) {
- for (; this._input.hasNext() && !this._input.testChar(i.newline); )
- C += this._input.next();
- return _ = !0, this._create_token(l.COMMENT, C);
- }
- } else if (_ && x === "-" && (C = this.__patterns.html_comment_end.read(), C))
- return _ = !1, this._create_token(l.COMMENT, C);
- return null;
- }, O.prototype._read_comment = function(x) {
- var C = null;
- if (x === "/") {
- var P = "";
- if (this._input.peek(1) === "*") {
- P = this.__patterns.block_comment.read();
- var $ = u.get_directives(P);
- $ && $.ignore === "start" && (P += u.readIgnored(this._input)), P = P.replace(i.allLineBreaks, `
- `), C = this._create_token(l.BLOCK_COMMENT, P), C.directives = $;
- } else this._input.peek(1) === "/" && (P = this.__patterns.comment.read(), C = this._create_token(l.COMMENT, P));
- }
- return C;
- }, O.prototype._read_string = function(x) {
- if (x === "`" || x === "'" || x === '"') {
- var C = this._input.next();
- return this.has_char_escapes = !1, x === "`" ? C += this._read_string_recursive("`", !0, "${") : C += this._read_string_recursive(x), this.has_char_escapes && this._options.unescape_strings && (C = S(C)), this._input.peek() === x && (C += this._input.next()), C = C.replace(i.allLineBreaks, `
- `), this._create_token(l.STRING, C);
- }
- return null;
- }, O.prototype._allow_regexp_or_xml = function(x) {
- return x.type === l.RESERVED && s(x.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || x.type === l.END_EXPR && x.text === ")" && x.opened.previous.type === l.RESERVED && s(x.opened.previous.text, ["if", "while", "for"]) || s(x.type, [
- l.COMMENT,
- l.START_EXPR,
- l.START_BLOCK,
- l.START,
- l.END_BLOCK,
- l.OPERATOR,
- l.EQUALS,
- l.EOF,
- l.SEMICOLON,
- l.COMMA
- ]);
- }, O.prototype._read_regexp = function(x, C) {
- if (x === "/" && this._allow_regexp_or_xml(C)) {
- for (var P = this._input.next(), $ = !1, T = !1; this._input.hasNext() && ($ || T || this._input.peek() !== x) && !this._input.testChar(i.newline); )
- P += this._input.peek(), $ ? $ = !1 : ($ = this._input.peek() === "\\", this._input.peek() === "[" ? T = !0 : this._input.peek() === "]" && (T = !1)), this._input.next();
- return this._input.peek() === x && (P += this._input.next(), P += this._input.read(i.identifier)), this._create_token(l.STRING, P);
- }
- return null;
- }, O.prototype._read_xml = function(x, C) {
- if (this._options.e4x && x === "<" && this._allow_regexp_or_xml(C)) {
- var P = "", $ = this.__patterns.xml.read_match();
- if ($) {
- for (var T = $[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), E = T.indexOf("{") === 0, M = 0; $; ) {
- var R = !!$[1], N = $[2], I = !!$[$.length - 1] || N.slice(0, 8) === "![CDATA[";
- if (!I && (N === T || E && N.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (R ? --M : ++M), P += $[0], M <= 0)
- break;
- $ = this.__patterns.xml.read_match();
- }
- return $ || (P += this._input.match(/[\s\S]*/g)[0]), P = P.replace(i.allLineBreaks, `
- `), this._create_token(l.STRING, P);
- }
- }
- return null;
- };
- function S(x) {
- for (var C = "", P = 0, $ = new t(x), T = null; $.hasNext(); )
- if (T = $.match(/([\s]|[^\\]|\\\\)+/g), T && (C += T[0]), $.peek() === "\\") {
- if ($.next(), $.peek() === "x")
- T = $.match(/x([0-9A-Fa-f]{2})/g);
- else if ($.peek() === "u")
- T = $.match(/u([0-9A-Fa-f]{4})/g), T || (T = $.match(/u\{([0-9A-Fa-f]+)\}/g));
- else {
- C += "\\", $.hasNext() && (C += $.next());
- continue;
- }
- if (!T || (P = parseInt(T[1], 16), P > 126 && P <= 255 && T[0].indexOf("x") === 0))
- return x;
- P >= 0 && P < 32 || P > 1114111 ? C += "\\" + T[0] : P === 34 || P === 39 || P === 92 ? C += "\\" + String.fromCharCode(P) : C += String.fromCharCode(P);
- }
- return C;
- }
- return O.prototype._read_string_recursive = function(x, C, P) {
- var $, T;
- x === "'" ? T = this.__patterns.single_quote : x === '"' ? T = this.__patterns.double_quote : x === "`" ? T = this.__patterns.template_text : x === "}" && (T = this.__patterns.template_expression);
- for (var E = T.read(), M = ""; this._input.hasNext(); ) {
- if (M = this._input.next(), M === x || !C && i.newline.test(M)) {
- this._input.back();
- break;
- } else M === "\\" && this._input.hasNext() ? ($ = this._input.peek(), $ === "x" || $ === "u" ? this.has_char_escapes = !0 : $ === "\r" && this._input.peek(1) === `
- ` && this._input.next(), M += this._input.next()) : P && (P === "${" && M === "$" && this._input.peek() === "{" && (M += this._input.next()), P === M && (x === "`" ? M += this._read_string_recursive("}", C, "`") : M += this._read_string_recursive("`", C, "${"), this._input.hasNext() && (M += this._input.next())));
- M += T.read(), E += M;
- }
- return E;
- }, gv.Tokenizer = O, gv.TOKEN = l, gv.positionable_operators = h.slice(), gv.line_starters = g.slice(), gv;
- }
- var pee;
- function QAt() {
- if (pee) return PD;
- pee = 1;
- var t = RB().Output, e = zme().Token, n = Vme(), r = Fme().Options, i = Ix().Tokenizer, a = Ix().line_starters, o = Ix().positionable_operators, s = Ix().TOKEN;
- function l(T, E) {
- return E.indexOf(T) !== -1;
- }
- function u(T) {
- return T.replace(/^\s+/g, "");
- }
- function c(T) {
- for (var E = {}, M = 0; M < T.length; M++)
- E[T[M].replace(/-/g, "_")] = T[M];
- return E;
- }
- function f(T, E) {
- return T && T.type === s.RESERVED && T.text === E;
- }
- function d(T, E) {
- return T && T.type === s.RESERVED && l(T.text, E);
- }
- var h = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], p = ["before-newline", "after-newline", "preserve-newline"], v = c(p), g = [v.before_newline, v.preserve_newline], m = {
- BlockStatement: "BlockStatement",
- // 'BLOCK'
- Statement: "Statement",
- // 'STATEMENT'
- ObjectLiteral: "ObjectLiteral",
- // 'OBJECT',
- ArrayLiteral: "ArrayLiteral",
- //'[EXPRESSION]',
- ForInitializer: "ForInitializer",
- //'(FOR-EXPRESSION)',
- Conditional: "Conditional",
- //'(COND-EXPRESSION)',
- Expression: "Expression"
- //'(EXPRESSION)'
- };
- function y(T, E) {
- E.multiline_frame || E.mode === m.ForInitializer || E.mode === m.Conditional || T.remove_indent(E.start_line_index);
- }
- function _(T) {
- T = T.replace(n.allLineBreaks, `
- `);
- for (var E = [], M = T.indexOf(`
- `); M !== -1; )
- E.push(T.substring(0, M)), T = T.substring(M + 1), M = T.indexOf(`
- `);
- return T.length && E.push(T), E;
- }
- function O(T) {
- return T === m.ArrayLiteral;
- }
- function S(T) {
- return l(T, [m.Expression, m.ForInitializer, m.Conditional]);
- }
- function x(T, E) {
- for (var M = 0; M < T.length; M++) {
- var R = T[M].trim();
- if (R.charAt(0) !== E)
- return !1;
- }
- return !0;
- }
- function C(T, E) {
- for (var M = 0, R = T.length, N; M < R; M++)
- if (N = T[M], N && N.indexOf(E) !== 0)
- return !1;
- return !0;
- }
- function P(T, E) {
- E = E || {}, this._source_text = T || "", this._output = null, this._tokens = null, this._last_last_text = null, this._flags = null, this._previous_flags = null, this._flag_store = null, this._options = new r(E);
- }
- P.prototype.create_flags = function(T, E) {
- var M = 0;
- T && (M = T.indentation_level, !this._output.just_added_newline() && T.line_indent_level > M && (M = T.line_indent_level));
- var R = {
- mode: E,
- parent: T,
- last_token: T ? T.last_token : new e(s.START_BLOCK, ""),
- // last token text
- last_word: T ? T.last_word : "",
- // last TOKEN.WORD passed
- declaration_statement: !1,
- declaration_assignment: !1,
- multiline_frame: !1,
- inline_frame: !1,
- if_block: !1,
- else_block: !1,
- class_start_block: !1,
- // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
- do_block: !1,
- do_while: !1,
- import_block: !1,
- in_case_statement: !1,
- // switch(..){ INSIDE HERE }
- in_case: !1,
- // we're on the exact line with "case 0:"
- case_body: !1,
- // the indented case-action block
- case_block: !1,
- // the indented case-action block is wrapped with {}
- indentation_level: M,
- alignment: 0,
- line_indent_level: T ? T.line_indent_level : M,
- start_line_index: this._output.get_line_number(),
- ternary_depth: 0
- };
- return R;
- }, P.prototype._reset = function(T) {
- var E = T.match(/^[\t ]*/)[0];
- this._last_last_text = "", this._output = new t(this._options, E), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(m.BlockStatement);
- var M = new i(T, this._options);
- return this._tokens = M.tokenize(), T;
- }, P.prototype.beautify = function() {
- if (this._options.disabled)
- return this._source_text;
- var T, E = this._reset(this._source_text), M = this._options.eol;
- this._options.eol === "auto" && (M = `
- `, E && n.lineBreak.test(E || "") && (M = E.match(n.lineBreak)[0]));
- for (var R = this._tokens.next(); R; )
- this.handle_token(R), this._last_last_text = this._flags.last_token.text, this._flags.last_token = R, R = this._tokens.next();
- return T = this._output.get_code(M), T;
- }, P.prototype.handle_token = function(T, E) {
- T.type === s.START_EXPR ? this.handle_start_expr(T) : T.type === s.END_EXPR ? this.handle_end_expr(T) : T.type === s.START_BLOCK ? this.handle_start_block(T) : T.type === s.END_BLOCK ? this.handle_end_block(T) : T.type === s.WORD ? this.handle_word(T) : T.type === s.RESERVED ? this.handle_word(T) : T.type === s.SEMICOLON ? this.handle_semicolon(T) : T.type === s.STRING ? this.handle_string(T) : T.type === s.EQUALS ? this.handle_equals(T) : T.type === s.OPERATOR ? this.handle_operator(T) : T.type === s.COMMA ? this.handle_comma(T) : T.type === s.BLOCK_COMMENT ? this.handle_block_comment(T, E) : T.type === s.COMMENT ? this.handle_comment(T, E) : T.type === s.DOT ? this.handle_dot(T) : T.type === s.EOF ? this.handle_eof(T) : T.type === s.UNKNOWN ? this.handle_unknown(T, E) : this.handle_unknown(T, E);
- }, P.prototype.handle_whitespace_and_comments = function(T, E) {
- var M = T.newlines, R = this._options.keep_array_indentation && O(this._flags.mode);
- if (T.comments_before)
- for (var N = T.comments_before.next(); N; )
- this.handle_whitespace_and_comments(N, E), this.handle_token(N, E), N = T.comments_before.next();
- if (R)
- for (var I = 0; I < M; I += 1)
- this.print_newline(I > 0, E);
- else if (this._options.max_preserve_newlines && M > this._options.max_preserve_newlines && (M = this._options.max_preserve_newlines), this._options.preserve_newlines && M > 1) {
- this.print_newline(!1, E);
- for (var B = 1; B < M; B += 1)
- this.print_newline(!0, E);
- }
- };
- var $ = ["async", "break", "continue", "return", "throw", "yield"];
- return P.prototype.allow_wrap_or_preserved_newline = function(T, E) {
- if (E = E === void 0 ? !1 : E, !this._output.just_added_newline()) {
- var M = this._options.preserve_newlines && T.newlines || E, R = l(this._flags.last_token.text, o) || l(T.text, o);
- if (R) {
- var N = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(T.text, o);
- M = M && N;
- }
- if (M)
- this.print_newline(!1, !0);
- else if (this._options.wrap_line_length) {
- if (d(this._flags.last_token, $))
- return;
- this._output.set_wrap_point();
- }
- }
- }, P.prototype.print_newline = function(T, E) {
- if (!E && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
- for (var M = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(M, "else")) && !this._flags.do_block; )
- this.restore_mode();
- this._output.add_new_line(T) && (this._flags.multiline_frame = !0);
- }, P.prototype.print_token_line_indentation = function(T) {
- this._output.just_added_newline() && (this._options.keep_array_indentation && T.newlines && (T.text === "[" || O(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(T.whitespace_before), this._output.space_before_token = !1) : this._output.set_indent(this._flags.indentation_level, this._flags.alignment) && (this._flags.line_indent_level = this._flags.indentation_level));
- }, P.prototype.print_token = function(T) {
- if (this._output.raw) {
- this._output.add_raw_token(T);
- return;
- }
- if (this._options.comma_first && T.previous && T.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
- var E = this._output.previous_line.pop();
- this._output.previous_line.is_empty() && (this._output.previous_line.push(E), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(T), this._output.add_token(","), this._output.space_before_token = !0;
- }
- this.print_token_line_indentation(T), this._output.non_breaking_space = !0, this._output.add_token(T.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
- }, P.prototype.indent = function() {
- this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
- }, P.prototype.deindent = function() {
- this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level) && (this._flags.indentation_level -= 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
- }, P.prototype.set_mode = function(T) {
- this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, T), this._flags = this.create_flags(this._previous_flags, T), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
- }, P.prototype.restore_mode = function() {
- this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === m.Statement && y(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
- }, P.prototype.start_of_object_property = function() {
- return this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"]));
- }, P.prototype.start_of_statement = function(T) {
- var E = !1;
- return E = E || d(this._flags.last_token, ["var", "let", "const"]) && T.type === s.WORD, E = E || f(this._flags.last_token, "do"), E = E || !(this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement) && d(this._flags.last_token, $) && !T.newlines, E = E || f(this._flags.last_token, "else") && !(f(T, "if") && !T.comments_before), E = E || this._flags.last_token.type === s.END_EXPR && (this._previous_flags.mode === m.ForInitializer || this._previous_flags.mode === m.Conditional), E = E || this._flags.last_token.type === s.WORD && this._flags.mode === m.BlockStatement && !this._flags.in_case && !(T.text === "--" || T.text === "++") && this._last_last_text !== "function" && T.type !== s.WORD && T.type !== s.RESERVED, E = E || this._flags.mode === m.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"])), E ? (this.set_mode(m.Statement), this.indent(), this.handle_whitespace_and_comments(T, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
- T,
- d(T, ["do", "for", "if", "while"])
- ), !0) : !1;
- }, P.prototype.handle_start_expr = function(T) {
- this.start_of_statement(T) || this.handle_whitespace_and_comments(T);
- var E = m.Expression;
- if (T.text === "[") {
- if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
- d(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(T), this.set_mode(E), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
- return;
- }
- E = m.ArrayLiteral, O(this._flags.mode) && (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) && (this._options.keep_array_indentation || this.print_newline()), l(this._flags.last_token.type, [s.START_EXPR, s.END_EXPR, s.WORD, s.OPERATOR, s.DOT]) || (this._output.space_before_token = !0);
- } else {
- if (this._flags.last_token.type === s.RESERVED)
- this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, E = m.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, E = m.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && T.whitespace_before === "" ? this._output.space_before_token = !1 : (l(this._flags.last_token.text, a) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
- else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
- this.start_of_object_property() || this.allow_wrap_or_preserved_newline(T);
- else if (this._flags.last_token.type === s.WORD) {
- this._output.space_before_token = !1;
- var M = this._tokens.peek(-3);
- if (this._options.space_after_named_function && M) {
- var R = this._tokens.peek(-4);
- d(M, ["async", "function"]) || M.text === "*" && d(R, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === m.ObjectLiteral ? (M.text === "{" || M.text === "," || M.text === "*" && (R.text === "{" || R.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
- }
- } else
- this.allow_wrap_or_preserved_newline(T);
- (this._flags.last_token.type === s.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
- }
- this._flags.last_token.text === ";" || this._flags.last_token.type === s.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === s.END_EXPR || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === s.COMMA) && this.allow_wrap_or_preserved_newline(T, T.newlines), this.print_token(T), this.set_mode(E), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
- }, P.prototype.handle_end_expr = function(T) {
- for (; this._flags.mode === m.Statement; )
- this.restore_mode();
- this.handle_whitespace_and_comments(T), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
- T,
- T.text === "]" && O(this._flags.mode) && !this._options.keep_array_indentation
- ), this._options.space_in_paren && (this._flags.last_token.type === s.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(T), this.restore_mode(), y(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === m.Conditional && (this._previous_flags.mode = m.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
- }, P.prototype.handle_start_block = function(T) {
- this.handle_whitespace_and_comments(T);
- var E = this._tokens.peek(), M = this._tokens.peek(1);
- this._flags.last_word === "switch" && this._flags.last_token.type === s.END_EXPR ? (this.set_mode(m.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(m.BlockStatement) : M && (l(M.text, [":", ","]) && l(E.type, [s.STRING, s.WORD, s.RESERVED]) || l(E.text, ["get", "set", "..."]) && l(M.type, [s.WORD, s.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l(M.text, [":", ","]) ? this.set_mode(m.BlockStatement) : this.set_mode(m.ObjectLiteral) : this._flags.last_token.type === s.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(m.BlockStatement) : l(this._flags.last_token.type, [s.EQUALS, s.START_EXPR, s.COMMA, s.OPERATOR]) || d(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(m.ObjectLiteral) : this.set_mode(m.BlockStatement), this._flags.last_token && d(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
- var R = !E.comments_before && E.text === "}", N = R && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
- if (this._options.brace_preserve_inline) {
- var I = 0, B = null;
- this._flags.inline_frame = !0;
- do
- if (I += 1, B = this._tokens.peek(I - 1), B.newlines) {
- this._flags.inline_frame = !1;
- break;
- }
- while (B.type !== s.EOF && !(B.type === s.END_BLOCK && B.opened === T));
- }
- (this._options.brace_style === "expand" || this._options.brace_style === "none" && T.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== s.OPERATOR && (N || this._flags.last_token.type === s.EQUALS || d(this._flags.last_token, h) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (O(this._previous_flags.mode) && (this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.COMMA) && ((this._flags.last_token.type === s.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(T), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== s.OPERATOR && this._flags.last_token.type !== s.START_EXPR && (l(this._flags.last_token.type, [s.START_BLOCK, s.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(T), this.indent(), !R && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
- }, P.prototype.handle_end_block = function(T) {
- for (this.handle_whitespace_and_comments(T); this._flags.mode === m.Statement; )
- this.restore_mode();
- var E = this._flags.last_token.type === s.START_BLOCK;
- this._flags.inline_frame && !E ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? E || this.print_newline() : E || (O(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(T);
- }, P.prototype.handle_word = function(T) {
- if (T.type === s.RESERVED) {
- if (l(T.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
- T.type = s.WORD;
- else if (T.text === "import" && l(this._tokens.peek().text, ["(", "."]))
- T.type = s.WORD;
- else if (l(T.text, ["as", "from"]) && !this._flags.import_block)
- T.type = s.WORD;
- else if (this._flags.mode === m.ObjectLiteral) {
- var E = this._tokens.peek();
- E.text === ":" && (T.type = s.WORD);
- }
- }
- if (this.start_of_statement(T) ? d(this._flags.last_token, ["var", "let", "const"]) && T.type === s.WORD && (this._flags.declaration_statement = !0) : T.newlines && !S(this._flags.mode) && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== s.EQUALS && (this._options.preserve_newlines || !d(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(T), this.print_newline()) : this.handle_whitespace_and_comments(T), this._flags.do_block && !this._flags.do_while)
- if (f(T, "while")) {
- this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0, this._flags.do_while = !0;
- return;
- } else
- this.print_newline(), this._flags.do_block = !1;
- if (this._flags.if_block)
- if (!this._flags.else_block && f(T, "else"))
- this._flags.else_block = !0;
- else {
- for (; this._flags.mode === m.Statement; )
- this.restore_mode();
- this._flags.if_block = !1, this._flags.else_block = !1;
- }
- if (this._flags.in_case_statement && d(T, ["case", "default"])) {
- this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(T), this._flags.in_case = !0;
- return;
- }
- if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR) && !this.start_of_object_property() && !// start of object property is different for numeric values with +/- prefix operators
- (l(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === m.ObjectLiteral) && this.allow_wrap_or_preserved_newline(T), f(T, "function")) {
- (l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === s.OPERATOR)) && !this._output.just_added_blankline() && !T.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD ? d(this._flags.last_token, ["get", "set", "new", "export"]) || d(this._flags.last_token, $) ? this._output.space_before_token = !0 : f(this._flags.last_token, "default") && this._last_last_text === "export" ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" ? this._output.space_before_token = !0 : this.print_newline() : this._flags.last_token.type === s.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (S(this._flags.mode) || O(this._flags.mode)) || this.print_newline(), this.print_token(T), this._flags.last_word = T.text;
- return;
- }
- var M = "NONE";
- if (this._flags.last_token.type === s.END_BLOCK ? this._previous_flags.inline_frame ? M = "SPACE" : d(T, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && T.newlines ? M = "NEWLINE" : (M = "SPACE", this._output.space_before_token = !0) : M = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && this._flags.mode === m.BlockStatement ? M = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && S(this._flags.mode) ? M = "SPACE" : this._flags.last_token.type === s.STRING ? M = "NEWLINE" : this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","])) ? M = "SPACE" : this._flags.last_token.type === s.START_BLOCK ? this._flags.inline_frame ? M = "SPACE" : M = "NEWLINE" : this._flags.last_token.type === s.END_EXPR && (this._output.space_before_token = !0, M = "NEWLINE"), d(T, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? M = "SPACE" : M = "NEWLINE"), d(T, ["else", "catch", "finally"]))
- if ((!(this._flags.last_token.type === s.END_BLOCK && this._previous_flags.mode === m.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && T.newlines) && !this._flags.inline_frame)
- this.print_newline();
- else {
- this._output.trim(!0);
- var R = this._output.current_line;
- R.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
- }
- else M === "NEWLINE" ? d(this._flags.last_token, h) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && d(T, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== s.END_EXPR ? (this._flags.last_token.type !== s.START_EXPR || !d(T, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (f(T, "if") && f(T.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : d(T, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && O(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : M === "SPACE" && (this._output.space_before_token = !0);
- T.previous && (T.previous.type === s.WORD || T.previous.type === s.RESERVED) && (this._output.space_before_token = !0), this.print_token(T), this._flags.last_word = T.text, T.type === s.RESERVED && (T.text === "do" ? this._flags.do_block = !0 : T.text === "if" ? this._flags.if_block = !0 : T.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && f(T, "from") && (this._flags.import_block = !1));
- }, P.prototype.handle_semicolon = function(T) {
- this.start_of_statement(T) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(T);
- for (var E = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(E, "else")) && !this._flags.do_block; )
- this.restore_mode();
- this._flags.import_block && (this._flags.import_block = !1), this.print_token(T);
- }, P.prototype.handle_string = function(T) {
- T.text.startsWith("`") && T.newlines === 0 && T.whitespace_before === "" && (T.previous.text === ")" || this._flags.last_token.type === s.WORD) || (this.start_of_statement(T) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(T), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(T) : T.text.startsWith("`") && this._flags.last_token.type === s.END_EXPR && (T.previous.text === "]" || T.previous.text === ")") && T.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(T);
- }, P.prototype.handle_equals = function(T) {
- this.start_of_statement(T) || this.handle_whitespace_and_comments(T), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0;
- }, P.prototype.handle_comma = function(T) {
- this.handle_whitespace_and_comments(T, !0), this.print_token(T), this._output.space_before_token = !0, this._flags.declaration_statement ? (S(this._flags.parent.mode) && (this._flags.declaration_assignment = !1), this._flags.declaration_assignment ? (this._flags.declaration_assignment = !1, this.print_newline(!1, !0)) : this._options.comma_first && this.allow_wrap_or_preserved_newline(T)) : this._flags.mode === m.ObjectLiteral || this._flags.mode === m.Statement && this._flags.parent.mode === m.ObjectLiteral ? (this._flags.mode === m.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(T);
- }, P.prototype.handle_operator = function(T) {
- var E = T.text === "*" && (d(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [s.START_BLOCK, s.COMMA, s.END_BLOCK, s.SEMICOLON])), M = l(T.text, ["-", "+"]) && (l(this._flags.last_token.type, [s.START_BLOCK, s.START_EXPR, s.EQUALS, s.OPERATOR]) || l(this._flags.last_token.text, a) || this._flags.last_token.text === ",");
- if (!this.start_of_statement(T)) {
- var R = !E;
- this.handle_whitespace_and_comments(T, R);
- }
- if (T.text === "*" && this._flags.last_token.type === s.DOT) {
- this.print_token(T);
- return;
- }
- if (T.text === "::") {
- this.print_token(T);
- return;
- }
- if (l(T.text, ["-", "+"]) && this.start_of_object_property()) {
- this.print_token(T);
- return;
- }
- if (this._flags.last_token.type === s.OPERATOR && l(this._options.operator_position, g) && this.allow_wrap_or_preserved_newline(T), T.text === ":" && this._flags.in_case) {
- this.print_token(T), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== s.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
- return;
- }
- var N = !0, I = !0, B = !1;
- if (T.text === ":" ? this._flags.ternary_depth === 0 ? N = !1 : (this._flags.ternary_depth -= 1, B = !0) : T.text === "?" && (this._flags.ternary_depth += 1), !M && !E && this._options.preserve_newlines && l(T.text, o)) {
- var Q = T.text === ":", W = Q && B, H = Q && !B;
- switch (this._options.operator_position) {
- case v.before_newline:
- this._output.space_before_token = !H, this.print_token(T), (!Q || W) && this.allow_wrap_or_preserved_newline(T), this._output.space_before_token = !0;
- return;
- case v.after_newline:
- this._output.space_before_token = !0, !Q || W ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(T) : this._output.space_before_token = !1, this.print_token(T), this._output.space_before_token = !0;
- return;
- case v.preserve_newline:
- H || this.allow_wrap_or_preserved_newline(T), N = !(this._output.just_added_newline() || H), this._output.space_before_token = N, this.print_token(T), this._output.space_before_token = !0;
- return;
- }
- }
- if (E) {
- this.allow_wrap_or_preserved_newline(T), N = !1;
- var U = this._tokens.peek();
- I = U && l(U.type, [s.WORD, s.RESERVED]);
- } else if (T.text === "...")
- this.allow_wrap_or_preserved_newline(T), N = this._flags.last_token.type === s.START_BLOCK, I = !1;
- else if (l(T.text, ["--", "++", "!", "~"]) || M) {
- if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR) && this.allow_wrap_or_preserved_newline(T), N = !1, I = !1, T.newlines && (T.text === "--" || T.text === "++" || T.text === "~")) {
- var j = d(this._flags.last_token, h) && T.newlines;
- j && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(j, !0);
- }
- this._flags.last_token.text === ";" && S(this._flags.mode) && (N = !0), this._flags.last_token.type === s.RESERVED ? N = !0 : this._flags.last_token.type === s.END_EXPR ? N = !(this._flags.last_token.text === "]" && (T.text === "--" || T.text === "++")) : this._flags.last_token.type === s.OPERATOR && (N = l(T.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(T.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (I = !0)), (this._flags.mode === m.BlockStatement && !this._flags.inline_frame || this._flags.mode === m.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
- }
- this._output.space_before_token = this._output.space_before_token || N, this.print_token(T), this._output.space_before_token = I;
- }, P.prototype.handle_block_comment = function(T, E) {
- if (this._output.raw) {
- this._output.add_raw_token(T), T.directives && T.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
- return;
- }
- if (T.directives) {
- this.print_newline(!1, E), this.print_token(T), T.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
- return;
- }
- if (!n.newline.test(T.text) && !T.newlines) {
- this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0;
- return;
- } else
- this.print_block_commment(T, E);
- }, P.prototype.print_block_commment = function(T, E) {
- var M = _(T.text), R, N = !1, I = !1, B = T.whitespace_before, Q = B.length;
- if (this.print_newline(!1, E), this.print_token_line_indentation(T), this._output.add_token(M[0]), this.print_newline(!1, E), M.length > 1) {
- for (M = M.slice(1), N = x(M, "*"), I = C(M, B), N && (this._flags.alignment = 1), R = 0; R < M.length; R++)
- N ? (this.print_token_line_indentation(T), this._output.add_token(u(M[R]))) : I && M[R] ? (this.print_token_line_indentation(T), this._output.add_token(M[R].substring(Q))) : (this._output.current_line.set_indent(-1), this._output.add_token(M[R])), this.print_newline(!1, E);
- this._flags.alignment = 0;
- }
- }, P.prototype.handle_comment = function(T, E) {
- T.newlines ? this.print_newline(!1, E) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(T), this.print_newline(!1, E);
- }, P.prototype.handle_dot = function(T) {
- this.start_of_statement(T) || this.handle_whitespace_and_comments(T, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), d(this._flags.last_token, h) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
- T,
- this._flags.last_token.text === ")" && this._options.break_chained_methods
- ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(T);
- }, P.prototype.handle_unknown = function(T, E) {
- this.print_token(T), T.text[T.text.length - 1] === `
- ` && this.print_newline(!1, E);
- }, P.prototype.handle_eof = function(T) {
- for (; this._flags.mode === m.Statement; )
- this.restore_mode();
- this.handle_whitespace_and_comments(T);
- }, PD.Beautifier = P, PD;
- }
- var vee;
- function HAt() {
- if (vee) return Ex.exports;
- vee = 1;
- var t = QAt().Beautifier, e = Fme().Options;
- function n(r, i) {
- var a = new t(r, i);
- return a.beautify();
- }
- return Ex.exports = n, Ex.exports.defaultOptions = function() {
- return new e();
- }, Ex.exports;
- }
- var Dx = { exports: {} }, BD = {}, zD = {}, gee;
- function Qme() {
- if (gee) return zD;
- gee = 1;
- var t = kB().Options;
- function e(n) {
- t.call(this, n, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
- var r = this._get_boolean("space_around_selector_separator");
- this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
- var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
- this.brace_style = "collapse";
- for (var a = 0; a < i.length; a++)
- i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
- }
- return e.prototype = new t(), zD.Options = e, zD;
- }
- var mee;
- function GAt() {
- if (mee) return BD;
- mee = 1;
- var t = Qme().Options, e = RB().Output, n = LB().InputScanner, r = NB().Directives, i = new r(/\/\*/, /\*\//), a = /\r\n|[\r\n]/, o = /\r\n|[\r\n]/g, s = /\s/, l = /(?:\s|\n)+/g, u = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, c = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
- function f(d, h) {
- this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
- page: !0,
- "font-face": !0,
- keyframes: !0,
- // also in CONDITIONAL_GROUP_RULE below
- media: !0,
- supports: !0,
- document: !0
- }, this.CONDITIONAL_GROUP_RULE = {
- media: !0,
- supports: !0,
- document: !0
- }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
- "grid-template-areas",
- "grid-template"
- ];
- }
- return f.prototype.eatString = function(d) {
- var h = "";
- for (this._ch = this._input.next(); this._ch; ) {
- if (h += this._ch, this._ch === "\\")
- h += this._input.next();
- else if (d.indexOf(this._ch) !== -1 || this._ch === `
- `)
- break;
- this._ch = this._input.next();
- }
- return h;
- }, f.prototype.eatWhitespace = function(d) {
- for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
- this._ch = this._input.next(), d && this._ch === `
- ` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
- return h;
- }, f.prototype.foundNestedPseudoClass = function() {
- for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
- if (p === "{")
- return !0;
- if (p === "(")
- d += 1;
- else if (p === ")") {
- if (d === 0)
- return !1;
- d -= 1;
- } else if (p === ";" || p === "}")
- return !1;
- h++, p = this._input.peek(h);
- }
- return !1;
- }, f.prototype.print_string = function(d) {
- this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
- }, f.prototype.preserveSingleSpace = function(d) {
- d && (this._output.space_before_token = !0);
- }, f.prototype.indent = function() {
- this._indentLevel++;
- }, f.prototype.outdent = function() {
- this._indentLevel > 0 && this._indentLevel--;
- }, f.prototype.beautify = function() {
- if (this._options.disabled)
- return this._source_text;
- var d = this._source_text, h = this._options.eol;
- h === "auto" && (h = `
- `, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
- `);
- var p = d.match(/^[\t ]*/)[0];
- this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
- for (var v = 0, g = !1, m = !1, y = !1, _ = !1, O = !1, S = this._ch, x = !1, C, P, $; C = this._input.read(l), P = C !== "", $ = S, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), S = this._ch, this._ch; )
- if (this._ch === "/" && this._input.peek() === "*") {
- this._output.add_new_line(), this._input.back();
- var T = this._input.read(u), E = i.get_directives(T);
- E && E.ignore === "start" && (T += i.readIgnored(this._input)), this.print_string(T), this.eatWhitespace(!0), this._output.add_new_line();
- } else if (this._ch === "/" && this._input.peek() === "/")
- this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
- else if (this._ch === "$") {
- this.preserveSingleSpace(P), this.print_string(this._ch);
- var M = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
- M.match(/[ :]$/) && (M = this.eatString(": ").replace(/\s+$/, ""), this.print_string(M), this._output.space_before_token = !0), v === 0 && M.indexOf(":") !== -1 && (m = !0, this.indent());
- } else if (this._ch === "@")
- if (this.preserveSingleSpace(P), this._input.peek() === "{")
- this.print_string(this._ch + this.eatString("}"));
- else {
- this.print_string(this._ch);
- var R = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
- R.match(/[ :]$/) && (R = this.eatString(": ").replace(/\s+$/, ""), this.print_string(R), this._output.space_before_token = !0), v === 0 && R.indexOf(":") !== -1 ? (m = !0, this.indent()) : R in this.NESTED_AT_RULE ? (this._nestedLevel += 1, R in this.CONDITIONAL_GROUP_RULE && (y = !0)) : v === 0 && !m && (_ = !0);
- }
- else if (this._ch === "#" && this._input.peek() === "{")
- this.preserveSingleSpace(P), this.print_string(this._ch + this.eatString("}"));
- else if (this._ch === "{")
- m && (m = !1, this.outdent()), _ = !1, y ? (y = !1, g = this._indentLevel >= this._nestedLevel) : g = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && g && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : ($ === "(" ? this._output.space_before_token = !1 : $ !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
- else if (this._ch === "}")
- this.outdent(), this._output.add_new_line(), $ === "{" && this._output.trim(!0), m && (this.outdent(), m = !1), this.print_string(this._ch), g = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0), this._input.peek() === ")" && (this._output.trim(!0), this._options.brace_style === "expand" && this._output.add_new_line(!0));
- else if (this._ch === ":") {
- for (var N = 0; N < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; N++)
- if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[N])) {
- x = !0;
- break;
- }
- (g || y) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !_ && v === 0 ? (this.print_string(":"), m || (m = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":"));
- } else if (this._ch === '"' || this._ch === "'") {
- var I = $ === '"' || $ === "'";
- this.preserveSingleSpace(I || P), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
- } else if (this._ch === ";")
- x = !1, v === 0 ? (m && (this.outdent(), m = !1), _ = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0);
- else if (this._ch === "(")
- if (this._input.lookBack("url"))
- this.print_string(this._ch), this.eatWhitespace(), v++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), v && (v--, this.outdent()));
- else {
- var B = !1;
- this._input.lookBack("with") && (B = !0), this.preserveSingleSpace(P || B), this.print_string(this._ch), m && $ === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), O = !0) : (this.eatWhitespace(), v++, this.indent());
- }
- else if (this._ch === ")")
- v && (v--, this.outdent()), O && this._input.peek() === ";" && this._options.selector_separator_newline && (O = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
- else if (this._ch === ",")
- this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!m || O) && v === 0 && !_ ? this._output.add_new_line() : this._output.space_before_token = !0;
- else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
- this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && s.test(this._ch) && (this._ch = ""));
- else if (this._ch === "]")
- this.print_string(this._ch);
- else if (this._ch === "[")
- this.preserveSingleSpace(P), this.print_string(this._ch);
- else if (this._ch === "=")
- this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
- else if (this._ch === "!" && !this._input.lookBack("\\"))
- this._output.space_before_token = !0, this.print_string(this._ch);
- else {
- var Q = $ === '"' || $ === "'";
- this.preserveSingleSpace(Q || P), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
- ` && x && this._output.add_new_line();
- }
- var W = this._output.get_code(h);
- return W;
- }, BD.Beautifier = f, BD;
- }
- var yee;
- function jAt() {
- if (yee) return Dx.exports;
- yee = 1;
- var t = GAt().Beautifier, e = Qme().Options;
- function n(r, i) {
- var a = new t(r, i);
- return a.beautify();
- }
- return Dx.exports = n, Dx.exports.defaultOptions = function() {
- return new e();
- }, Dx.exports;
- }
- var Rx = { exports: {} }, VD = {}, FD = {}, bee;
- function Hme() {
- if (bee) return FD;
- bee = 1;
- var t = kB().Options;
- function e(n) {
- t.call(this, n, "html"), this.templating.length === 1 && this.templating[0] === "auto" && (this.templating = ["django", "erb", "handlebars", "php"]), this.indent_inner_html = this._get_boolean("indent_inner_html"), this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", !0), this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", !0), this.indent_handlebars = this._get_boolean("indent_handlebars", !0), this.wrap_attributes = this._get_selection(
- "wrap_attributes",
- ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
- ), this.wrap_attributes_min_attrs = this._get_number("wrap_attributes_min_attrs", 2), this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size), this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]), this.inline = this._get_array("inline", [
- "a",
- "abbr",
- "area",
- "audio",
- "b",
- "bdi",
- "bdo",
- "br",
- "button",
- "canvas",
- "cite",
- "code",
- "data",
- "datalist",
- "del",
- "dfn",
- "em",
- "embed",
- "i",
- "iframe",
- "img",
- "input",
- "ins",
- "kbd",
- "keygen",
- "label",
- "map",
- "mark",
- "math",
- "meter",
- "noscript",
- "object",
- "output",
- "progress",
- "q",
- "ruby",
- "s",
- "samp",
- /* 'script', */
- "select",
- "small",
- "span",
- "strong",
- "sub",
- "sup",
- "svg",
- "template",
- "textarea",
- "time",
- "u",
- "var",
- "video",
- "wbr",
- "text",
- // obsolete inline tags
- "acronym",
- "big",
- "strike",
- "tt"
- ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
- // HTLM void elements - aka self-closing tags - aka singletons
- // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
- "area",
- "base",
- "br",
- "col",
- "embed",
- "hr",
- "img",
- "input",
- "keygen",
- "link",
- "menuitem",
- "meta",
- "param",
- "source",
- "track",
- "wbr",
- // NOTE: Optional tags are too complex for a simple list
- // they are hard coded in _do_optional_end_element
- // Doctype and xml elements
- "!doctype",
- "?xml",
- // obsolete tags
- // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
- // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
- "basefont",
- "isindex"
- ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
- "pre",
- "textarea"
- ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
- }
- return e.prototype = new t(), FD.Options = e, FD;
- }
- var kx = {}, _ee;
- function Oee() {
- if (_ee) return kx;
- _ee = 1;
- var t = qT().Tokenizer, e = qT().TOKEN, n = NB().Directives, r = Wme().TemplatablePattern, i = v$().Pattern, a = {
- TAG_OPEN: "TK_TAG_OPEN",
- TAG_CLOSE: "TK_TAG_CLOSE",
- CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
- CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
- ATTRIBUTE: "TK_ATTRIBUTE",
- EQUALS: "TK_EQUALS",
- VALUE: "TK_VALUE",
- COMMENT: "TK_COMMENT",
- TEXT: "TK_TEXT",
- UNKNOWN: "TK_UNKNOWN",
- START: e.START,
- RAW: e.RAW,
- EOF: e.EOF
- }, o = new n(/<\!--/, /-->/), s = function(l, u) {
- t.call(this, l, u), this._current_tag_name = "";
- var c = new r(this._input).read_options(this._options), f = new i(this._input);
- if (this.__patterns = {
- word: c.until(/[\n\r\t <]/),
- word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
- single_quote: c.until_after(/'/),
- double_quote: c.until_after(/"/),
- attribute: c.until(/[\n\r\t =>]|\/>/),
- element_name: c.until(/[\n\r\t >\/]/),
- angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
- handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
- handlebars: f.starting_with(/{{/).until_after(/}}/),
- handlebars_open: f.until(/[\n\r\t }]/),
- handlebars_raw_close: f.until(/}}/),
- comment: f.starting_with(/<!--/).until_after(/-->/),
- cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
- // https://en.wikipedia.org/wiki/Conditional_comment
- conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
- processing: f.starting_with(/<\?/).until_after(/\?>/)
- }, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars"), this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
- var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
- this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
- }
- };
- return s.prototype = new t(), s.prototype._is_comment = function(l) {
- return !1;
- }, s.prototype._is_opening = function(l) {
- return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
- }, s.prototype._is_closing = function(l, u) {
- return l.type === a.TAG_CLOSE && u && ((l.text === ">" || l.text === "/>") && u.text[0] === "<" || l.text === "}}" && u.text[0] === "{" && u.text[1] === "{") || l.type === a.CONTROL_FLOW_CLOSE && l.text === "}" && u.text.endsWith("{");
- }, s.prototype._reset = function() {
- this._current_tag_name = "";
- }, s.prototype._get_next_token = function(l, u) {
- var c = null;
- this._readWhitespace();
- var f = this._input.peek();
- return f === null ? this._create_token(a.EOF, "") : (c = c || this._read_open_handlebars(f, u), c = c || this._read_attribute(f, l, u), c = c || this._read_close(f, u), c = c || this._read_control_flows(f, u), c = c || this._read_raw_content(f, l, u), c = c || this._read_content_word(f, u), c = c || this._read_comment_or_cdata(f), c = c || this._read_processing(f), c = c || this._read_open(f, u), c = c || this._create_token(a.UNKNOWN, this._input.next()), c);
- }, s.prototype._read_comment_or_cdata = function(l) {
- var u = null, c = null, f = null;
- if (l === "<") {
- var d = this._input.peek(1);
- d === "!" && (c = this.__patterns.comment.read(), c ? (f = o.get_directives(c), f && f.ignore === "start" && (c += o.readIgnored(this._input))) : c = this.__patterns.cdata.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
- }
- return u;
- }, s.prototype._read_processing = function(l) {
- var u = null, c = null, f = null;
- if (l === "<") {
- var d = this._input.peek(1);
- (d === "!" || d === "?") && (c = this.__patterns.conditional_comment.read(), c = c || this.__patterns.processing.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
- }
- return u;
- }, s.prototype._read_open = function(l, u) {
- var c = null, f = null;
- return (!u || u.type === a.CONTROL_FLOW_OPEN) && l === "<" && (c = this._input.next(), this._input.peek() === "/" && (c += this._input.next()), c += this.__patterns.element_name.read(), f = this._create_token(a.TAG_OPEN, c)), f;
- }, s.prototype._read_open_handlebars = function(l, u) {
- var c = null, f = null;
- return (!u || u.type === a.CONTROL_FLOW_OPEN) && this._options.indent_handlebars && l === "{" && this._input.peek(1) === "{" && (this._input.peek(2) === "!" ? (c = this.__patterns.handlebars_comment.read(), c = c || this.__patterns.handlebars.read(), f = this._create_token(a.COMMENT, c)) : (c = this.__patterns.handlebars_open.read(), f = this._create_token(a.TAG_OPEN, c))), f;
- }, s.prototype._read_control_flows = function(l, u) {
- var c = "", f = null;
- if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
- return f;
- if (l === "@") {
- if (c = this.__patterns.angular_control_flow_start.read(), c === "")
- return f;
- for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
- var p = this._input.next();
- if (p === null)
- break;
- p === "(" ? d++ : p === ")" && h++, c += p;
- }
- f = this._create_token(a.CONTROL_FLOW_OPEN, c);
- } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
- return f;
- }, s.prototype._read_close = function(l, u) {
- var c = null, f = null;
- return u && u.type === a.TAG_OPEN && (u.text[0] === "<" && (l === ">" || l === "/" && this._input.peek(1) === ">") ? (c = this._input.next(), l === "/" && (c += this._input.next()), f = this._create_token(a.TAG_CLOSE, c)) : u.text[0] === "{" && l === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), f = this._create_token(a.TAG_CLOSE, "}}"))), f;
- }, s.prototype._read_attribute = function(l, u, c) {
- var f = null, d = "";
- if (c && c.text[0] === "<")
- if (l === "=")
- f = this._create_token(a.EQUALS, this._input.next());
- else if (l === '"' || l === "'") {
- var h = this._input.next();
- l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
- } else
- d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
- return f;
- }, s.prototype._is_content_unformatted = function(l) {
- return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
- }, s.prototype._read_raw_content = function(l, u, c) {
- var f = "";
- if (c && c.text[0] === "{")
- f = this.__patterns.handlebars_raw_close.read();
- else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
- var d = u.opened.text.substr(1).toLowerCase();
- if (d === "script" || d === "style") {
- var h = this._read_comment_or_cdata(l);
- if (h)
- return h.type = a.TEXT, h;
- f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
- } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
- }
- return f ? this._create_token(a.TEXT, f) : null;
- }, s.prototype._read_content_word = function(l, u) {
- var c = "";
- if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (c = this.__patterns.unformatted_content_delimiter.read()), c || (c = u && u.type === a.CONTROL_FLOW_OPEN ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read()), c)
- return this._create_token(a.TEXT, c);
- }, kx.Tokenizer = s, kx.TOKEN = a, kx;
- }
- var See;
- function ZAt() {
- if (See) return VD;
- See = 1;
- var t = Hme().Options, e = RB().Output, n = Oee().Tokenizer, r = Oee().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
- this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = g.max_preserve_newlines, this.preserve_newlines = g.preserve_newlines, this._output = new e(g, m);
- };
- o.prototype.current_line_has_match = function(g) {
- return this._output.current_line.has_match(g);
- }, o.prototype.set_space_before_token = function(g, m) {
- this._output.space_before_token = g, this._output.non_breaking_space = m;
- }, o.prototype.set_wrap_point = function() {
- this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
- }, o.prototype.add_raw_token = function(g) {
- this._output.add_raw_token(g);
- }, o.prototype.print_preserved_newlines = function(g) {
- var m = 0;
- g.type !== r.TEXT && g.previous.type !== r.TEXT && (m = g.newlines ? 1 : 0), this.preserve_newlines && (m = g.newlines < this.max_preserve_newlines + 1 ? g.newlines : this.max_preserve_newlines + 1);
- for (var y = 0; y < m; y++)
- this.print_newline(y > 0);
- return m !== 0;
- }, o.prototype.traverse_whitespace = function(g) {
- return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
- }, o.prototype.previous_token_wrapped = function() {
- return this._output.previous_token_wrapped;
- }, o.prototype.print_newline = function(g) {
- this._output.add_new_line(g);
- }, o.prototype.print_token = function(g) {
- g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
- }, o.prototype.indent = function() {
- this.indent_level++;
- }, o.prototype.deindent = function() {
- this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
- }, o.prototype.get_full_indent = function(g) {
- return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
- };
- var s = function(g) {
- for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
- if (y.type === r.ATTRIBUTE && y.text === "type") {
- y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
- break;
- }
- y = y.next;
- }
- return m;
- }, l = function(g, m) {
- var y = null, _ = null;
- return m.closed ? (g === "script" ? y = "text/javascript" : g === "style" && (y = "text/css"), y = s(m) || y, y.search("text/css") > -1 ? _ = "css" : y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? _ = "javascript" : y.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? _ = "html" : y.search(/test\/null/) > -1 && (_ = "null"), _) : null;
- };
- function u(g, m) {
- return m.indexOf(g) !== -1;
- }
- function c(g, m, y) {
- this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
- }
- function f(g) {
- this._printer = g, this._current_frame = null;
- }
- f.prototype.get_parser_token = function() {
- return this._current_frame ? this._current_frame.parser_token : null;
- }, f.prototype.record_tag = function(g) {
- var m = new c(this._current_frame, g, this._printer.indent_level);
- this._current_frame = m;
- }, f.prototype._try_pop_frame = function(g) {
- var m = null;
- return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
- }, f.prototype._get_frame = function(g, m) {
- for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
- if (m && m.indexOf(y.tag) !== -1) {
- y = null;
- break;
- }
- y = y.parent;
- }
- return y;
- }, f.prototype.try_pop = function(g, m) {
- var y = this._get_frame([g], m);
- return this._try_pop_frame(y);
- }, f.prototype.indent_to_tag = function(g) {
- var m = this._get_frame(g);
- m && (this._printer.indent_level = m.indent_level);
- };
- function d(g, m, y, _) {
- this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = _, this._tag_stack = null;
- var O = new t(m, "html");
- this._options = O, this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 5) === "force", this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline", this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned", this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple", this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 8) === "preserve", this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
- }
- d.prototype.beautify = function() {
- if (this._options.disabled)
- return this._source_text;
- var g = this._source_text, m = this._options.eol;
- this._options.eol === "auto" && (m = `
- `, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
- `);
- var y = g.match(/^[\t ]*/)[0], _ = {
- text: "",
- type: ""
- }, O = new h(), S = new o(this._options, y), x = new n(g, this._options).tokenize();
- this._tag_stack = new f(S);
- for (var C = null, P = x.next(); P.type !== r.EOF; )
- P.type === r.TAG_OPEN || P.type === r.COMMENT ? (C = this._handle_tag_open(S, P, O, _, x), O = C) : P.type === r.ATTRIBUTE || P.type === r.EQUALS || P.type === r.VALUE || P.type === r.TEXT && !O.tag_complete ? C = this._handle_inside_tag(S, P, O, _) : P.type === r.TAG_CLOSE ? C = this._handle_tag_close(S, P, O) : P.type === r.TEXT ? C = this._handle_text(S, P, O) : P.type === r.CONTROL_FLOW_OPEN ? C = this._handle_control_flow_open(S, P) : P.type === r.CONTROL_FLOW_CLOSE ? C = this._handle_control_flow_close(S, P) : S.add_raw_token(P), _ = C, P = x.next();
- var $ = S._output.get_code(m);
- return $;
- }, d.prototype._handle_control_flow_open = function(g, m) {
- var y = {
- text: m.text,
- type: m.type
- };
- return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), g.indent(), y;
- }, d.prototype._handle_control_flow_close = function(g, m) {
- var y = {
- text: m.text,
- type: m.type
- };
- return g.deindent(), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), y;
- }, d.prototype._handle_tag_close = function(g, m, y) {
- var _ = {
- text: m.text,
- type: m.type
- };
- return g.alignment_size = 0, y.tag_complete = !0, g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : (y.tag_start_char === "<" && (g.set_space_before_token(m.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && y.has_wrapped_attrs && g.print_newline(!1)), g.print_token(m)), y.indent_content && !(y.is_unformatted || y.is_content_unformatted) && (g.indent(), y.indent_content = !1), !y.is_inline_element && !(y.is_unformatted || y.is_content_unformatted) && g.set_wrap_point(), _;
- }, d.prototype._handle_inside_tag = function(g, m, y, _) {
- var O = y.has_wrapped_attrs, S = {
- text: m.text,
- type: m.type
- };
- return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : y.tag_start_char === "{" && m.type === r.TEXT ? g.print_preserved_newlines(m) ? (m.newlines = 0, g.add_raw_token(m)) : g.print_token(m) : (m.type === r.ATTRIBUTE ? g.set_space_before_token(!0) : (m.type === r.EQUALS || m.type === r.VALUE && m.previous.type === r.EQUALS) && g.set_space_before_token(!1), m.type === r.ATTRIBUTE && y.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (g.traverse_whitespace(m), O = O || m.newlines !== 0), this._is_wrap_attributes_force && y.attr_count >= this._options.wrap_attributes_min_attrs && (_.type !== r.TAG_OPEN || // ie. second attribute and beyond
- this._is_wrap_attributes_force_expand_multiline) && (g.print_newline(!1), O = !0)), g.print_token(m), O = O || g.previous_token_wrapped(), y.has_wrapped_attrs = O), S;
- }, d.prototype._handle_text = function(g, m, y) {
- var _ = {
- text: m.text,
- type: "TK_CONTENT"
- };
- return y.custom_beautifier_name ? this._print_custom_beatifier_text(g, m, y) : y.is_unformatted || y.is_content_unformatted ? g.add_raw_token(m) : (g.traverse_whitespace(m), g.print_token(m)), _;
- }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
- var _ = this;
- if (m.text !== "") {
- var O = m.text, S, x = 1, C = "", P = "";
- y.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? S = this._js_beautify : y.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? S = this._css_beautify : y.custom_beautifier_name === "html" && (S = function(N, I) {
- var B = new d(N, I, _._js_beautify, _._css_beautify);
- return B.beautify();
- }), this._options.indent_scripts === "keep" ? x = 0 : this._options.indent_scripts === "separate" && (x = -g.indent_level);
- var $ = g.get_full_indent(x);
- if (O = O.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && O[0] === "<" && O.match(/^(<!--|<!\[CDATA\[)/)) {
- var T = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);
- if (!T) {
- g.add_raw_token(m);
- return;
- }
- C = $ + T[1] + `
- `, O = T[4], T[5] && (P = $ + T[5]), O = O.replace(/\n[ \t]*$/, ""), (T[2] || T[3].indexOf(`
- `) !== -1) && (T = T[3].match(/[ \t]+$/), T && (m.whitespace_before = T[0]));
- }
- if (O)
- if (S) {
- var E = function() {
- this.eol = `
- `;
- };
- E.prototype = this._options.raw_options;
- var M = new E();
- O = S($ + O, M);
- } else {
- var R = m.whitespace_before;
- R && (O = O.replace(new RegExp(`
- (` + R + ")?", "g"), `
- `)), O = $ + O.replace(/\n/g, `
- ` + $);
- }
- C && (O ? O = C + O + `
- ` + P : O = C + P), g.print_newline(!1), O && (m.text = O, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
- }
- }, d.prototype._handle_tag_open = function(g, m, y, _, O) {
- var S = this._get_tag_open_token(m);
- if ((y.is_unformatted || y.is_content_unformatted) && !y.is_empty_element && m.type === r.TAG_OPEN && !S.is_start_tag ? (g.add_raw_token(m), S.start_tag_token = this._tag_stack.try_pop(S.tag_name)) : (g.traverse_whitespace(m), this._set_tag_position(g, m, S, y, _), S.is_inline_element || g.set_wrap_point(), g.print_token(m)), S.is_start_tag && this._is_wrap_attributes_force) {
- var x = 0, C;
- do
- C = O.peek(x), C.type === r.ATTRIBUTE && (S.attr_count += 1), x += 1;
- while (C.type !== r.EOF && C.type !== r.TAG_CLOSE);
- }
- return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (S.alignment_size = m.text.length + 1), !S.tag_complete && !S.is_unformatted && (g.alignment_size = S.alignment_size), S;
- };
- var h = function(g, m) {
- if (this.parent = g || null, this.text = "", this.type = "TK_TAG_OPEN", this.tag_name = "", this.is_inline_element = !1, this.is_unformatted = !1, this.is_content_unformatted = !1, this.is_empty_element = !1, this.is_start_tag = !1, this.is_end_tag = !1, this.indent_content = !1, this.multiline_content = !1, this.custom_beautifier_name = null, this.start_tag_token = null, this.attr_count = 0, this.has_wrapped_attrs = !1, this.alignment_size = 0, this.tag_complete = !1, this.tag_start_char = "", this.tag_check = "", !m)
- this.tag_complete = !0;
- else {
- var y;
- this.tag_start_char = m.text[0], this.text = m.text, this.tag_start_char === "<" ? (y = m.text.match(/^<([^\s>]*)/), this.tag_check = y ? y[1] : "") : (y = m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/), this.tag_check = y ? y[1] : "", (m.text.startsWith("{{#>") || m.text.startsWith("{{~#>")) && this.tag_check[0] === ">" && (this.tag_check === ">" && m.next !== null ? this.tag_check = m.next.text.split(" ")[0] : this.tag_check = m.text.split(">")[1])), this.tag_check = this.tag_check.toLowerCase(), m.type === r.COMMENT && (this.tag_complete = !0), this.is_start_tag = this.tag_check.charAt(0) !== "/", this.tag_name = this.is_start_tag ? this.tag_check : this.tag_check.substr(1), this.is_end_tag = !this.is_start_tag || m.closed && m.closed.text === "/>";
- var _ = 2;
- this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (_ = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(_)));
- }
- };
- d.prototype._get_tag_open_token = function(g) {
- var m = new h(this._tag_stack.get_parser_token(), g);
- return m.alignment_size = this._options.wrap_attributes_indent_size, m.is_end_tag = m.is_end_tag || u(m.tag_check, this._options.void_elements), m.is_empty_element = m.tag_complete || m.is_start_tag && m.is_end_tag, m.is_unformatted = !m.tag_complete && u(m.tag_check, this._options.unformatted), m.is_content_unformatted = !m.is_empty_element && u(m.tag_check, this._options.content_unformatted), m.is_inline_element = u(m.tag_name, this._options.inline) || this._options.inline_custom_elements && m.tag_name.includes("-") || m.tag_start_char === "{", m;
- }, d.prototype._set_tag_position = function(g, m, y, _, O) {
- if (y.is_empty_element || (y.is_end_tag ? y.start_tag_token = this._tag_stack.try_pop(y.tag_name) : (this._do_optional_end_element(y) && (y.is_inline_element || g.print_newline(!1)), this._tag_stack.record_tag(y), (y.tag_name === "script" || y.tag_name === "style") && !(y.is_unformatted || y.is_content_unformatted) && (y.custom_beautifier_name = l(y.tag_check, m)))), u(y.tag_check, this._options.extra_liners) && (g.print_newline(!1), g._output.just_added_blankline() || g.print_newline(!0)), y.is_empty_element) {
- if (y.tag_start_char === "{" && y.tag_check === "else") {
- this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
- var S = g.current_line_has_match(/{{#if/);
- S || g.print_newline(!1);
- }
- y.tag_name === "!--" && O.type === r.TAG_CLOSE && _.is_end_tag && y.text.indexOf(`
- `) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
- } else if (y.is_end_tag) {
- var x = !1;
- x = y.start_tag_token && y.start_tag_token.multiline_content, x = x || !y.is_inline_element && !(_.is_inline_element || _.is_unformatted) && !(O.type === r.TAG_CLOSE && y.start_tag_token === _) && O.type !== "TK_CONTENT", (y.is_content_unformatted || y.is_unformatted) && (x = !1), x && g.print_newline(!1);
- } else
- y.indent_content = !y.custom_beautifier_name, y.tag_start_char === "<" && (y.tag_name === "html" ? y.indent_content = this._options.indent_inner_html : y.tag_name === "head" ? y.indent_content = this._options.indent_head_inner_html : y.tag_name === "body" && (y.indent_content = this._options.indent_body_inner_html)), !(y.is_inline_element || y.is_unformatted) && (O.type !== "TK_CONTENT" || y.is_content_unformatted) && g.print_newline(!1), this._calcluate_parent_multiline(g, y);
- }, d.prototype._calcluate_parent_multiline = function(g, m) {
- m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
- };
- var p = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"], v = ["a", "audio", "del", "ins", "map", "noscript", "video"];
- return d.prototype._do_optional_end_element = function(g) {
- var m = null;
- if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
- if (g.tag_name === "body")
- m = m || this._tag_stack.try_pop("head");
- else if (g.tag_name === "li")
- m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
- else if (g.tag_name === "dd" || g.tag_name === "dt")
- m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
- else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
- var y = g.parent.parent;
- (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
- } else g.tag_name === "rp" || g.tag_name === "rt" ? (m = m || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), m = m || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : g.tag_name === "optgroup" ? m = m || this._tag_stack.try_pop("optgroup", ["select"]) : g.tag_name === "option" ? m = m || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : g.tag_name === "colgroup" ? m = m || this._tag_stack.try_pop("caption", ["table"]) : g.tag_name === "thead" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"])) : g.tag_name === "tbody" || g.tag_name === "tfoot" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("thead", ["table"]), m = m || this._tag_stack.try_pop("tbody", ["table"])) : g.tag_name === "tr" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (g.tag_name === "th" || g.tag_name === "td") && (m = m || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), m = m || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
- return g.parent = this._tag_stack.get_parser_token(), m;
- }
- }, VD.Beautifier = d, VD;
- }
- var xee;
- function UAt() {
- if (xee) return Rx.exports;
- xee = 1;
- var t = ZAt().Beautifier, e = Hme().Options;
- function n(r, i, a, o) {
- var s = new t(r, i, a, o);
- return s.beautify();
- }
- return Rx.exports = n, Rx.exports.defaultOptions = function() {
- return new e();
- }, Rx.exports;
- }
- var wee;
- function XAt() {
- if (wee) return sy;
- wee = 1;
- var t = HAt(), e = jAt(), n = UAt();
- function r(i, a, o, s) {
- return o = o || t, s = s || e, n(i, a, o, s);
- }
- return r.defaultOptions = n.defaultOptions, sy.js = t, sy.css = e, sy.html = r, sy;
- }
- (function(t) {
- function e(n, r, i) {
- var a = function(o, s) {
- return n.js_beautify(o, s);
- };
- return a.js = n.js_beautify, a.css = r.css_beautify, a.html = i.html_beautify, a.js_beautify = n.js_beautify, a.css_beautify = r.css_beautify, a.html_beautify = i.html_beautify, a;
- }
- (function(n) {
- var r = XAt();
- r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
- })(t);
- })(Bme);
- var YAt = Bme.exports;
- const qAt = /* @__PURE__ */ g2(YAt), KAt = {
- indent_size: "2",
- indent_char: " ",
- max_preserve_newlines: "5",
- preserve_newlines: !0,
- keep_array_indentation: !1,
- break_chained_methods: !1,
- indent_scripts: "normal",
- brace_style: "collapse",
- space_before_conditional: !0,
- unescape_strings: !1,
- jslint_happy: !1,
- end_with_newline: !0,
- wrap_line_length: "0",
- indent_inner_html: !1,
- comma_first: !1,
- e4x: !1,
- indent_empty_lines: !1
- }, JAt = ae({
- name: "DEditor",
- components: { Codemirror: E$t },
- props: {
- code: {
- type: String,
- default: ""
- }
- },
- emits: ["update:code", "change"],
- setup(t, { emit: e }) {
- const n = ee(null), r = ee(qAt(t.code, KAt));
- return {
- editorRef: n,
- modelValue: r,
- handleCodeChange: (a) => {
- try {
- e("update:code", a), e("change", a);
- } catch (o) {
- console.error(o);
- return;
- }
- },
- oneDark: F$t,
- javascript: DAt,
- json: VAt
- };
- }
- });
- function eEt(t, e, n, r, i, a) {
- const o = br("Codemirror");
- return be(), Je(o, {
- ref: "editorRef",
- placeholder: "请输入",
- style: { height: "500px" },
- "model-value": t.modelValue,
- "tab-size": 2,
- "auto-focus": !1,
- "indent-with-tabs": !0,
- extensions: [
- t.oneDark,
- t.javascript(),
- t.json()
- ],
- onChange: t.handleCodeChange
- }, null, 8, ["model-value", "extensions", "onChange"]);
- }
- const tEt = /* @__PURE__ */ ui(JAt, [["render", eEt]]), nEt = ae({
- name: "DEditorModal",
- components: {
- Modal: uo,
- Editor: tEt,
- Button: Vi
- },
- props: {
- title: {
- type: String,
- default: "编辑"
- },
- width: {
- type: Number,
- default: 800
- }
- },
- emits: ["ok"],
- setup(t, { emit: e }) {
- const n = ee(!1), r = ee("");
- return {
- open: (s) => {
- n.value = !0, r.value = s;
- },
- close: () => {
- n.value = !1;
- },
- code: r,
- handleOk: () => {
- e("ok", r.value), n.value = !1;
- },
- show: n
- };
- }
- });
- function rEt(t, e, n, r, i, a) {
- const o = br("Editor"), s = br("Button"), l = br("Modal");
- return be(), Je(l, {
- open: t.show,
- "onUpdate:open": e[1] || (e[1] = (u) => t.show = u),
- title: t.title,
- width: t.width,
- destroyOnClose: !0
- }, {
- footer: ke(() => [
- ln(t.$slots, "footer", {}, () => [
- D(s, { onClick: t.close }, {
- default: ke(() => [
- On("取消")
- ]),
- _: 1
- }, 8, ["onClick"]),
- D(s, {
- type: "primary",
- onClick: t.handleOk
- }, {
- default: ke(() => [
- On("确定")
- ]),
- _: 1
- }, 8, ["onClick"])
- ])
- ]),
- default: ke(() => [
- D(o, {
- code: t.code,
- "onUpdate:code": e[0] || (e[0] = (u) => t.code = u)
- }, null, 8, ["code"])
- ]),
- _: 3
- }, 8, ["open", "title", "width"]);
- }
- const Nw = /* @__PURE__ */ ui(nEt, [["render", rEt]]);
- Nw.install = (t) => (t.component(Nw.name, Nw), t);
- const iEt = /* @__PURE__ */ tt("span", { class: "text-gray-500" }, "秒", -1), BB = /* @__PURE__ */ ae({
- __name: "DataConfig",
- props: {
- dataSource: {}
- },
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = e, r = t, i = ee({
- sourceType: kr.STATIC,
- // 静态数据相关
- data: "",
- // 接口相关
- url: "",
- method: "",
- params: {},
- headers: {},
- refreshTime: 0,
- // 数据处理
- dataProcess: "",
- // 基础数据源
- basicPath: "",
- // 视图源
- viewCode: ""
- }), a = (f) => {
- i.value.refreshTime = f === 0 || f >= 60 ? f : 60;
- };
- let o;
- const s = ee(null), l = (f) => {
- var d;
- o = f, (d = s.value) == null || d.open(
- typeof i.value[f] == "string" ? i.value[f] : JSON.stringify(i.value[f])
- );
- }, u = (f) => {
- try {
- i.value[o] = JSON.parse(f);
- } catch {
- i.value[o] = f;
- }
- }, c = async (f) => {
- const d = await _9e(f);
- console.log(d), f === "table" ? (i.value.basicPath = d.value, i.value.viewCode = "") : (i.value.viewCode = d.value, i.value.basicPath = "");
- };
- return me(
- () => r.dataSource,
- (f) => {
- Object.assign(i.value, f || {});
- },
- { immediate: !0 }
- ), me(
- () => i.value,
- (f) => {
- n("change", f);
- },
- { deep: !0 }
- ), (f, d) => (be(), Ue(Wt, null, [
- D(z(Gr), {
- size: "small",
- layout: "horizontal",
- model: i.value,
- "label-col": { span: 8 },
- "wrapper-col": { span: 16 }
- }, {
- default: ke(() => [
- D(z(Gr).Item, {
- label: "数据源",
- name: "sourceType"
- }, {
- default: ke(() => [
- D(z(Ca), {
- value: i.value.sourceType,
- "onUpdate:value": d[0] || (d[0] = (h) => i.value.sourceType = h)
- }, {
- default: ke(() => [
- D(z(Ev), {
- value: z(kr).STATIC
- }, {
- default: ke(() => [
- On("静态数据")
- ]),
- _: 1
- }, 8, ["value"]),
- D(z(Ev), {
- value: z(kr).API
- }, {
- default: ke(() => [
- On("API")
- ]),
- _: 1
- }, 8, ["value"]),
- D(z(Ev), {
- value: z(kr).BASIC_PATH
- }, {
- default: ke(() => [
- On("基础数据源")
- ]),
- _: 1
- }, 8, ["value"]),
- D(z(Ev), {
- value: z(kr).VIEW_CODE
- }, {
- default: ke(() => [
- On("视图源")
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- }),
- i.value.sourceType === z(kr).STATIC ? (be(), Je(z(Gr).Item, {
- key: 0,
- label: "数据",
- name: "data"
- }, {
- default: ke(() => [
- D(z(Vi), {
- type: "default",
- size: "small",
- onClick: d[1] || (d[1] = (h) => l("data"))
- }, {
- default: ke(() => [
- On("编辑")
- ]),
- _: 1
- })
- ]),
- _: 1
- })) : i.value.sourceType === z(kr).API ? (be(), Ue(Wt, { key: 1 }, [
- D(z(Gr).Item, {
- label: "接口地址",
- name: "url"
- }, {
- default: ke(() => [
- D(z(mr).TextArea, {
- "auto-size": { minRows: 5 },
- placeholder: "请输入接口地址",
- value: i.value.url,
- "onUpdate:value": d[2] || (d[2] = (h) => i.value.url = h)
- }, null, 8, ["value"])
- ]),
- _: 1
- }),
- D(z(Gr).Item, {
- label: "请求方式",
- name: "method"
- }, {
- default: ke(() => [
- D(z(Fh), {
- value: i.value.method,
- "onUpdate:value": d[3] || (d[3] = (h) => i.value.method = h)
- }, {
- default: ke(() => [
- D(z(Ta), { value: "GET" }, {
- default: ke(() => [
- On("GET")
- ]),
- _: 1
- }),
- D(z(Ta), { value: "POST" }, {
- default: ke(() => [
- On("POST")
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- }),
- D(z(Gr).Item, {
- label: "刷新时间",
- name: "refreshTime"
- }, {
- default: ke(() => [
- D(z(Y_), {
- value: i.value.refreshTime,
- "onUpdate:value": d[4] || (d[4] = (h) => i.value.refreshTime = h),
- step: 1,
- style: { width: "100%" },
- onChange: a
- }, {
- addonAfter: ke(() => [
- iEt
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- }),
- D(z(Gr).Item, {
- label: "请求参数",
- name: "params"
- }, {
- default: ke(() => [
- D(z(Vi), {
- type: "default",
- size: "small",
- onClick: d[5] || (d[5] = (h) => l("params"))
- }, {
- default: ke(() => [
- On("编辑")
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- D(z(Gr).Item, {
- label: "请求头",
- name: "headers"
- }, {
- default: ke(() => [
- D(z(Vi), {
- type: "default",
- size: "small",
- onClick: d[6] || (d[6] = (h) => l("headers"))
- }, {
- default: ke(() => [
- On("编辑")
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- D(z(Gr).Item, {
- label: "数据处理",
- name: "dataProcess"
- }, {
- default: ke(() => [
- D(z(Vi), {
- type: "default",
- size: "small",
- onClick: d[7] || (d[7] = (h) => l("dataProcess"))
- }, {
- default: ke(() => [
- On("编辑")
- ]),
- _: 1
- })
- ]),
- _: 1
- })
- ], 64)) : i.value.sourceType === z(kr).BASIC_PATH ? (be(), Je(z(Gr).Item, {
- key: 2,
- label: "基础数据源",
- name: "basicPath"
- }, {
- default: ke(() => [
- D(z(mr), {
- placeholder: "请输入或选择",
- value: i.value.basicPath,
- "onUpdate:value": d[9] || (d[9] = (h) => i.value.basicPath = h)
- }, {
- addonAfter: ke(() => [
- D(z(vC), {
- onClick: d[8] || (d[8] = (h) => c("table"))
- })
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- })) : i.value.sourceType === z(kr).VIEW_CODE ? (be(), Je(z(Gr).Item, {
- key: 3,
- label: "视图源",
- name: "viewCode"
- }, {
- default: ke(() => [
- D(z(mr), {
- placeholder: "请输入或选择",
- value: i.value.viewCode,
- "onUpdate:value": d[11] || (d[11] = (h) => i.value.viewCode = h)
- }, {
- addonAfter: ke(() => [
- D(z(vC), {
- onClick: d[10] || (d[10] = (h) => c("view"))
- })
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- })) : Ot("", !0)
- ]),
- _: 1
- }, 8, ["model"]),
- D(z(Nw), {
- ref_key: "codeEditorRef",
- ref: s,
- title: "编辑",
- onOk: u
- }, null, 512)
- ], 64));
- }
- }), Ar = {
- /* 标题 */
- title: {
- label: "标题",
- prop: "title",
- type: "group",
- children: [
- {
- label: " ",
- prop: "title.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "标题可见", value: !0 }]
- },
- defaultValue: [],
- format: (t, e) => {
- t.value["title.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- type: "dependency",
- label: "",
- prop: "",
- name: ["title.show"],
- children: (t) => t["title.show"].length ? [
- {
- label: "文本",
- prop: "title.text",
- type: "input",
- defaultValue: "图表标题"
- },
- {
- label: "位置",
- prop: "title.left",
- type: "position",
- defaultValue: "center"
- },
- {
- label: "样式",
- prop: "title.textStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#ffffffff",
- size: 18,
- bold: !0,
- italic: !1
- },
- format: (e, n) => {
- e.value["title.textStyle"] = {
- color: n.color,
- fontSize: n.size,
- fontWeight: n.bold ? "bold" : "normal",
- fontStyle: n.italic ? "italic" : "normal"
- };
- },
- valueToForm: (e, n) => ({
- color: vn(n, "title.textStyle.color", "#FFFFFF"),
- size: vn(n, "title.textStyle.size", 16),
- bold: vn(n, "title.textStyle.fontWeight") === "bold",
- italic: vn(n, "title.textStyle.fontStyle") === "italic"
- })
- },
- {
- label: "背景",
- prop: "",
- type: "divider"
- },
- {
- label: "填充",
- prop: "title.backgroundColor",
- type: "backgroundSelect",
- fieldProps: {
- filterOptions: ["image"]
- },
- defaultValue: {
- type: "color",
- color: "#FFFFFF00"
- },
- format: (e, n) => {
- e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
- },
- valueToForm: (e) => !e || e === "none" ? {
- type: "none",
- color: "#000000ff"
- } : {
- type: "color",
- color: e.color
- }
- },
- {
- label: "圆角",
- prop: "title.borderRadius",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- }
- ] : []
- }
- ]
- },
- /* 图例 */
- legend: {
- label: "图例",
- prop: "legend",
- type: "group",
- children: [
- {
- label: " ",
- prop: "legend.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "图例可见", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["legend.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- type: "dependency",
- label: "",
- prop: "",
- name: ["legend.show"],
- children: (t) => t["legend.show"].length ? [
- {
- label: "位置",
- prop: "legend.position",
- type: "position",
- fieldProps: {
- type: "round"
- },
- defaultValue: "top",
- format: (e, n) => {
- switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
- case "bottom":
- e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
- break;
- case "left":
- e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
- break;
- case "right":
- e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
- break;
- default:
- e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
- }
- },
- valueToForm: (e, n) => vn(n, "legend.orient") === "vertical" ? e === "top" ? "top" : e === "bottom" ? "bottom" : "left" : vn(n, "legend.bottom") === 8 && vn(n, "legend.left") === "center" ? "bottom" : "top"
- },
- {
- label: "样式",
- prop: "legend.textStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["legend.textStyle"] = {
- color: n.color,
- fontSize: n.size,
- fontWeight: n.bold ? "bold" : "normal",
- fontStyle: n.italic ? "italic" : "normal"
- };
- },
- valueToForm: (e, n) => ({
- color: vn(n, "legend.textStyle.color", "#000000ff"),
- size: vn(n, "legend.textStyle.fontSize", 12),
- bold: vn(n, "legend.textStyle.fontWeight") === "bold",
- italic: vn(n, "legend.textStyle.fontStyle") === "italic"
- })
- },
- {
- label: "边框",
- prop: "",
- type: "divider"
- },
- {
- label: "线宽",
- prop: "legend.borderWidth",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- },
- {
- label: "颜色",
- prop: "legend.borderColor",
- type: "colorSelect",
- defaultValue: "#ccc"
- },
- {
- label: "圆角",
- prop: "legend.borderRadius",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- },
- {
- label: "背景",
- prop: "",
- type: "divider"
- },
- {
- label: "背景",
- prop: "legend.backgroundColor",
- type: "backgroundSelect",
- fieldProps: {
- filterOptions: ["image"]
- },
- defaultValue: {
- type: "color",
- color: "#fff"
- },
- format: (e, n) => {
- e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
- },
- valueToForm: (e) => !e || e === "none" ? {
- type: "none"
- } : {
- type: "color",
- color: e.color
- }
- },
- {
- label: "阴影",
- prop: "legend.shadowBlur",
- type: "radioGroup",
- fieldProps: {
- options: [
- { label: "开启", value: !0 },
- { label: "关闭", value: !1 }
- ]
- },
- defaultValue: !1,
- format: (e, n) => {
- n ? (e.value["legend.shadowBlur"] = 10, e.value["legend.shadowColor"] = e.value["legend.backgroundColor"] || "#000000ff", e.value["legend.shadowOffsetX"] = 3, e.value["legend.shadowOffsetY"] = 3) : (e.value["legend.shadowBlur"] = 0, e.value["legend.shadowColor"] = "transparent", e.value["legend.shadowOffsetX"] = 0, e.value["legend.shadowOffsetY"] = 0);
- },
- valueToForm: (e) => !!e
- }
- ] : []
- }
- ]
- },
- /* 系列 */
- series: {
- label: "系列",
- prop: "series",
- type: "group",
- children: [
- {
- label: "配色",
- prop: "color",
- type: "colorScheme",
- defaultValue: bC[0].color
- }
- ]
- },
- /* X轴 */
- xAxis: {
- label: "X 轴",
- prop: "xAxis",
- type: "group",
- children: [
- {
- label: "类型",
- prop: "xAxis.type",
- type: "select",
- fieldProps: {
- options: [
- { label: "类目坐标轴", value: "category" },
- { label: "数值坐标轴", value: "value" },
- { label: "时间坐标轴", value: "time" }
- ]
- },
- defaultValue: "category"
- },
- {
- label: " ",
- prop: "xAxis.showName",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示轴标题", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- e != null && e.length ? (t.value["xAxis.showName"] = !0, t.value["xAxis.name"] = "X轴标题", t.value["xAxis.nameGap"] = 25) : (t.value["xAxis.showName"] = !1, t.value["xAxis.name"] = "", t.value["xAxis.nameGap"] = 15, t.value["xAxis.nameGap"] = 15);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["xAxis.showName"],
- children: (t) => t["xAxis.showName"].length ? [
- {
- label: "标题内容",
- prop: "xAxis.name",
- type: "input",
- defaultValue: "X 轴标题",
- format: (e, n) => {
- e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
- },
- valueToForm: (e) => e || "X 轴标题"
- },
- {
- label: "标题位置",
- prop: "xAxis.nameLocation",
- type: "position",
- defaultValue: "center",
- format: (e, n) => {
- const r = {
- left: "start",
- center: "middle",
- right: "end"
- };
- e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
- },
- valueToForm: (e) => ({
- start: "left",
- middle: "center",
- end: "right"
- })[e] || "center"
- },
- {
- label: "标题样式",
- prop: "xAxis.nameTextStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["xAxis.nameTextStyle"] = {
- color: n.color,
- fontSize: n.size,
- fontWeight: n.bold ? "bold" : "normal",
- fontStyle: n.italic ? "italic" : "normal"
- };
- },
- valueToForm: (e) => ({
- color: (e == null ? void 0 : e.color) || "#000000ff",
- size: (e == null ? void 0 : e.fontSize) || 12,
- bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
- italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
- })
- }
- ] : []
- },
- {
- label: "轴线",
- prop: "",
- type: "divider"
- },
- {
- label: "线宽",
- prop: "xAxis.axisLine.lineStyle.width",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 1
- },
- {
- label: "颜色",
- prop: "xAxis.axisLine.lineStyle.color",
- type: "colorSelect",
- defaultValue: "#ccc"
- },
- {
- label: "刻度",
- prop: "",
- type: "divider"
- },
- {
- label: " ",
- prop: "xAxis.axisTick.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示刻度", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["xAxis.axisTick.show"],
- children: (t) => t["xAxis.axisTick.show"].length ? [
- {
- label: "刻度宽度",
- prop: "xAxis.axisTick.lineStyle.width",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 5
- },
- {
- label: "刻度颜色",
- prop: "xAxis.axisTick.lineStyle.color",
- type: "colorSelect",
- defaultValue: "#ccc"
- }
- ] : []
- },
- {
- label: "标签",
- prop: "",
- type: "divider"
- },
- {
- label: " ",
- prop: "xAxis.axisLabel.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示标签", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["xAxis.axisLabel.show"],
- children: (t) => t["xAxis.axisLabel.show"].length ? [
- {
- label: "样式",
- prop: "xAxis.axisLabel",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["xAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["xAxis.axisLabel.fontSize"] = n.size, e.value["xAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["xAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
- },
- valueToForm: (e, n) => ({
- color: vn(n, "xAxis.axisLabel.color", "#000000ff"),
- size: vn(n, "xAxis.axisLabel.fontSize", 12),
- bold: vn(n, "xAxis.axisLabel.fontWeight") === "bold",
- italic: vn(n, "xAxis.axisLabel.fontStyle") === "italic"
- })
- }
- ] : []
- }
- ]
- },
- /* Y 轴 */
- yAxis: {
- label: "Y 轴",
- prop: "yAxis",
- type: "group",
- children: [
- {
- label: " ",
- prop: "yAxis.showName",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示轴标题", value: !0 }]
- },
- defaultValue: [],
- format: (t, e) => {
- e != null && e.length ? (t.value["yAxis.showName"] = !0, t.value["yAxis.name"] = "Y轴标题", t.value["yAxis.nameGap"] = 25) : (t.value["yAxis.showName"] = !1, t.value["yAxis.name"] = "", t.value["yAxis.nameGap"] = 15);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["yAxis.showName"],
- children: (t) => t["yAxis.showName"].length ? [
- {
- label: "标题内容",
- prop: "yAxis.name",
- type: "input",
- defaultValue: "Y 轴标题",
- format: (e, n) => {
- e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
- },
- valueToForm: (e) => e || "Y 轴标题"
- },
- {
- label: "标题位置",
- prop: "yAxis.nameLocation",
- type: "position",
- defaultValue: "center",
- format: (e, n) => {
- const r = {
- left: "start",
- center: "middle",
- right: "end"
- };
- e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
- },
- valueToForm: (e) => ({
- start: "left",
- middle: "center",
- end: "right"
- })[e] || "center "
- },
- {
- label: "标题样式",
- prop: "yAxis.nameTextStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#FFFFFFFF",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["yAxis.nameTextStyle"] = {
- color: n.color,
- fontSize: n.size,
- fontWeight: n.bold ? "bold" : "normal",
- fontStyle: n.italic ? "italic" : "normal"
- };
- },
- valueToForm: (e) => ({
- color: (e == null ? void 0 : e.color) || "#000000ff",
- size: (e == null ? void 0 : e.fontSize) || 12,
- bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
- italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
- })
- }
- ] : []
- },
- {
- label: "轴线",
- prop: "",
- type: "divider"
- },
- {
- label: " ",
- prop: "yAxis.axisLine.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示轴线", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["yAxis.axisLine.show"],
- children: (t) => t["yAxis.axisLine.show"].length ? [
- {
- label: "线宽",
- prop: "yAxis.axisLine.lineStyle.width",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 1
- },
- {
- label: "颜色",
- prop: "yAxis.axisLine.lineStyle.color",
- type: "colorSelect",
- defaultValue: "#ccc"
- }
- ] : []
- },
- {
- label: "刻度",
- prop: "",
- type: "divider"
- },
- {
- label: " ",
- prop: "yAxis.axisTick.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示刻度", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["yAxis.axisTick.show"],
- children: (t) => t["yAxis.axisTick.show"].length ? [
- {
- label: "刻度长度",
- prop: "yAxis.axisTick.lineStyle.width",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 5
- },
- {
- label: "刻度颜色",
- prop: "yAxis.axisTick.lineStyle.color",
- type: "colorSelect",
- defaultValue: "#ccc"
- }
- ] : []
- },
- {
- label: "标签",
- prop: "",
- type: "divider"
- },
- {
- label: " ",
- prop: "yAxis.axisLabel.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "显示标签", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["yAxis.axisLabel.show"],
- children: (t) => t["yAxis.axisLabel.show"].length ? [
- {
- label: "样式",
- prop: "yAxis.axisLabel",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["yAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["yAxis.axisLabel.fontSize"] = n.size, e.value["yAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["yAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
- },
- valueToForm: (e, n) => ({
- color: vn(n, "yAxis.axisLabel.color", "#000000ff"),
- size: vn(n, "yAxis.axisLabel.fontSize", 12),
- bold: vn(n, "yAxis.axisLabel.fontWeight") === "bold",
- italic: vn(n, "yAxis.axisLabel.fontStyle") === "italic"
- })
- },
- {
- label: "旋转角度",
- prop: "yAxis.axisLabel.rotate",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "°",
- min: -90,
- max: 90,
- step: 1
- }
- }
- ] : []
- }
- ]
- },
- /* 提示 */
- tooltip: {
- label: "提示",
- prop: "tooltip",
- type: "group",
- children: [
- {
- label: " ",
- prop: "tooltip.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "提示可见", value: !0 }]
- },
- defaultValue: [!0],
- format: (t, e) => {
- t.value["tooltip.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["tooltip.show"],
- children: (t) => t["tooltip.show"].length ? [
- {
- label: "文本",
- prop: "tooltip.formatter",
- type: "checkboxGroup",
- fieldProps: {
- options: [
- { label: "分类名", value: "b" },
- { label: "系列名", value: "a" },
- { label: "数值", value: "c" }
- ]
- },
- defaultValue: ["b"],
- format: (e, n) => {
- e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
- },
- valueToForm: (e, n) => {
- var r, i;
- return (i = (r = vn(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
- }
- },
- // {
- // label: "格式化",
- // prop: "tooltip.valueFormatter",
- // type: "input",
- // tip: "支持字符串模板和回调函数",
- // defaultValue: "(value, dataIndex) => value",
- // },
- {
- label: "样式",
- prop: "tooltip.textStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["tooltip.textStyle"] = {
- color: n.color,
- fontSize: n.size,
- fontWeight: n.bold ? "bold" : "normal",
- fontStyle: n.italic ? "italic" : "normal"
- };
- },
- valueToForm: (e, n) => ({
- color: vn(n, "tooltip.textStyle.color", "#000000ff"),
- size: vn(n, "tooltip.textStyle.fontSize", 12),
- bold: vn(n, "tooltip.textStyle.fontWeight") === "bold",
- italic: vn(n, "tooltip.textStyle.fontStyle") === "italic"
- })
- },
- {
- label: "边框",
- prop: "",
- type: "divider"
- },
- {
- label: "线宽",
- prop: "tooltip.borderWidth",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 1
- },
- {
- label: "颜色",
- prop: "tooltip.borderColor",
- type: "colorSelect",
- defaultValue: "#ccc"
- },
- {
- label: "圆角",
- prop: "tooltip.borderRadius",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 4
- },
- {
- label: "背景",
- prop: "",
- type: "divider"
- },
- {
- label: "填充",
- prop: "tooltip.backgroundColor",
- type: "backgroundSelect",
- fieldProps: {
- filterOptions: ["image"]
- },
- defaultValue: {
- type: "color",
- color: "#fff"
- },
- format: (e, n) => {
- e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
- },
- valueToForm: (e) => !e || e === "none" ? {
- type: "none"
- } : {
- type: "color",
- color: e
- }
- },
- {
- label: "阴影",
- prop: "tooltip.extraCssText",
- type: "radioGroup",
- fieldProps: {
- options: [
- { label: "开启", value: !0 },
- { label: "关闭", value: !1 }
- ]
- },
- defaultValue: !1,
- format: (e, n) => {
- e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
- },
- valueToForm: (e, n) => !!vn(n, "tooltip.extraCssText")
- }
- ] : []
- }
- ]
- },
- /* 标签 */
- label: {
- label: "标签",
- prop: "label",
- type: "group",
- children: [
- {
- label: " ",
- prop: "label.show",
- type: "checkboxGroup",
- fieldProps: {
- options: [{ label: "标签可见", value: !0 }]
- },
- defaultValue: [],
- format: (t, e) => {
- t.value["label.show"] = !!(e != null && e.length);
- },
- valueToForm: (t) => t ? [!0] : []
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["label.show"],
- children: (t) => t["label.show"].length ? [
- {
- label: "文本",
- prop: "label.formatter",
- type: "checkboxGroup",
- fieldProps: {
- options: [
- { label: "分类名", value: "b" },
- { label: "系列名", value: "a" },
- { label: "数值", value: "c" }
- // { label: "百分比", value: "percent" },
- ]
- },
- defaultValue: ["a"],
- format: (e, n) => {
- e.value["label.formatter"] = `{${n}}`;
- },
- valueToForm: (e, n) => {
- var r, i;
- return (i = (r = vn(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
- }
- },
- {
- label: "样式",
- prop: "label.fontStyle",
- type: "fontStyle",
- defaultValue: {
- color: "#000000ff",
- size: 12,
- bold: !1,
- italic: !1
- },
- format: (e, n) => {
- e.value["label.color"] = n == null ? void 0 : n.color, e.value["label.fontSize"] = n.size, e.value["label.fontWeight"] = n.bold ? "bold" : "normal", e.value["label.fontStyle"] = n.italic ? "italic" : "normal";
- },
- valueToForm: (e, n) => ({
- color: vn(n, "label.color", "#000000ff"),
- size: vn(n, "label.fontSize", 12),
- bold: vn(n, "label.fontWeight") === "bold",
- italic: vn(n, "label.fontStyle") === "italic"
- })
- },
- {
- label: "布局",
- prop: "",
- type: "divider"
- },
- {
- label: "位置",
- prop: "label.position",
- type: "radioGroup",
- fieldProps: {
- options: [
- { label: "顶部", value: "top" },
- { label: "左侧", value: "left" },
- { label: "右侧", value: "right" },
- { label: "底部", value: "bottom" },
- { label: "内部", value: "inside" },
- { label: "内部左侧", value: "insideLeft" },
- { label: "内部右侧", value: "insideRight" },
- { label: "内部顶部", value: "insideTop" },
- { label: "内部底部", value: "insideBottom" }
- ]
- },
- defaultValue: "top"
- },
- {
- label: "文本方向",
- prop: "label.rotate",
- type: "radioGroup",
- fieldProps: {
- options: [
- { label: "水平", value: "horizontal" },
- { label: "垂直", value: "vertical" }
- ]
- },
- defaultValue: "horizontal",
- format: (e, n) => {
- e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
- },
- valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
- },
- {
- label: "边框",
- prop: "",
- type: "divider"
- },
- {
- label: "线宽",
- prop: "label.borderWidth",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- },
- {
- label: "颜色",
- prop: "label.borderColor",
- type: "colorSelect",
- defaultValue: "#ccc"
- },
- {
- label: "圆角",
- prop: "label.borderRadius",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- }
- ] : []
- }
- ]
- }
- }, Gme = (t) => (JT("data-v-0b356b47"), t = t(), e2(), t), aEt = { class: "chart-config" }, oEt = { class: "config-tab" }, sEt = /* @__PURE__ */ Gme(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), lEt = /* @__PURE__ */ Gme(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), uEt = /* @__PURE__ */ ae({
- __name: "Config",
- props: L6,
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = t, r = ee("1"), i = e, a = [
- {
- label: "线",
- prop: "",
- type: "divider"
- },
- {
- label: "线条样式",
- prop: "series.line.lineStyle.type",
- type: "select",
- fieldProps: {
- options: [
- { label: "实线", value: "solid" },
- { label: "虚线", value: "dashed" },
- { label: "点线", value: "dotted" }
- ]
- }
- },
- {
- label: "线宽",
- prop: "series.line.lineStyle.width",
- type: "inputNumber",
- fieldProps: {
- min: 0,
- addonAfter: "px"
- }
- },
- {
- label: "形态",
- prop: "series.line.lineType",
- type: "radioGroupButton",
- fieldProps: {
- options: [
- { label: "普通", value: "normal" },
- { label: "平滑", value: "smooth" },
- { label: "阶梯", value: "step" }
- ]
- },
- format: (u, c) => {
- switch (c) {
- case "smooth":
- u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
- break;
- case "step":
- u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
- break;
- default:
- u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
- }
- },
- valueToForm: (u, c) => {
- const f = vn(c, "series.line.step"), d = vn(c, "series.line.smooth");
- return f ? "step" : d ? "smooth" : "normal";
- }
- },
- {
- label: "标记点",
- prop: "",
- type: "divider"
- },
- {
- label: "图形",
- prop: "series.line.symbol",
- type: "select",
- fieldProps: {
- options: [
- { label: "圆", value: "circle" },
- { label: "方", value: "rect" },
- { label: "三角", value: "triangle" },
- { label: "菱形", value: "diamond" },
- { label: "标记", value: "pin" },
- { label: "箭头", value: "arrow" },
- { label: "无", value: "none" }
- ]
- }
- },
- {
- label: "大小",
- prop: "series.line.symbolSize",
- type: "inputNumber",
- fieldProps: {
- min: 0,
- addonAfter: "px"
- }
- },
- {
- label: "旋转",
- prop: "series.line.symbolRotate",
- type: "inputNumber",
- fieldProps: {
- min: 0,
- addonAfter: "°"
- }
- }
- ], o = [
- Ar.title,
- Ar.legend,
- Ar.label,
- {
- ...Ar.series,
- children: Ar.series.children.concat(
- a
- )
- },
- Ar.tooltip,
- Ar.background
- ], s = (u) => {
- i("change", {
- ...n,
- dataSource: u
- });
- }, l = (u) => {
- const c = ph(n);
- Object.keys(u).forEach((f) => {
- vN(c, f, u[f]);
- }), i("change", c);
- };
- return (u, c) => (be(), Ue("div", aEt, [
- tt("div", oEt, [
- D(z(_h), {
- activeKey: r.value,
- "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
- size: "small",
- centered: ""
- }, {
- default: ke(() => [
- D(z(zu), { key: "1" }, {
- tab: ke(() => [
- D(z(K_)),
- sEt
- ]),
- _: 1
- }),
- D(z(zu), { key: "2" }, {
- tab: ke(() => [
- D(z(J_)),
- lEt
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["activeKey"])
- ]),
- r.value === "1" ? (be(), Je(BB, {
- key: 0,
- dataSource: u.dataSource,
- onChange: s
- }, null, 8, ["dataSource"])) : Ot("", !0),
- r.value === "2" ? (be(), Je(z(Sh), {
- key: 1,
- columns: o,
- formModel: n,
- onChange: l
- }, null, 8, ["formModel"])) : Ot("", !0)
- ]));
- }
- }), jme = /* @__PURE__ */ ui(uEt, [["__scopeId", "data-v-0b356b47"]]);
- ng.Config = jme;
- ng.install = (t) => (t.component(ng.name, ng), t);
- const cEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Config: jme,
- basicLineProps: L6,
- default: ng,
- defaultPropsValue: Xdt
- }, Symbol.toStringTag, { value: "Module" })), zB = {
- width: {
- type: Number,
- default: 400
- },
- height: {
- type: Number,
- default: 260
- },
- dataSource: k6,
- // 标题
- title: {
- type: Object
- },
- // 图例
- legend: {
- type: Object
- },
- // 背景
- backgroundColor: {
- type: String
- },
- // 边框
- grid: {
- type: Object
- },
- // 提示框
- tooltip: {
- type: Object
- },
- // x轴数据
- xAxis: {
- type: Object
- },
- // y轴数据
- yAxis: {
- type: Object
- },
- // 折线
- series: {
- type: Array
- },
- // color
- color: {
- type: Object
- },
- // 系列设置
- seriesExtend: {
- type: Object,
- default: () => Zme
- }
- }, fEt = [], Zme = {
- // @ts-ignore
- fixedBarWidth: !1,
- barWidth: "auto",
- barGap: "10%",
- barCategoryGap: "20%",
- itemStyle: {
- borderColor: "#ccc",
- borderRadius: 0,
- borderWidth: 0
- }
- }, dEt = R6({
- title: {
- text: "柱状图标题"
- },
- xAxis: {
- data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
- },
- series: fEt,
- seriesExtend: Zme
- }), hEt = {
- // 组件容器默认属性
- container: {
- props: {
- width: 400,
- height: 260
- }
- },
- // 图表默认属性
- props: {
- // 数据源
- dataSource: {
- sourceType: kr.STATIC,
- data: {
- series: [
- {
- type: "bar",
- name: "系列1",
- data: [10, 30, 20, 40]
- },
- {
- type: "bar",
- name: "系列2",
- data: [15, 35, 25, 45]
- }
- ]
- },
- url: location.origin + "/mock/api/get/example/bar",
- method: "POST",
- params: {},
- headers: {},
- refreshTime: 0,
- dataProcess: `
- (res) => {
- // 取出列表
- const data = res.data;
- // x轴数据
- const xData = data.map((item) => item.name);
- // 系列数据
- const series = [
- { type: 'bar', name: '价格', data: data.map(item => item.price) },
- { type: 'bar', name: '总量', data: data.map(item => item.count) },
- ];
- // 返回图表数据
- return { xData, series };
- }
- `
- },
- ...dEt
- }
- }, pEt = ae({
- name: "DBasicBar",
- components: { Charts: D6 },
- props: zB,
- setup(t) {
- const { options: e, loading: n } = q6(t);
- return {
- options: e,
- loading: n
- };
- }
- });
- function vEt(t, e, n, r, i, a) {
- const o = br("Charts");
- return be(), Je(o, {
- width: t.width,
- height: t.height,
- "echarts-options": t.options,
- loading: t.loading
- }, null, 8, ["width", "height", "echarts-options", "loading"]);
- }
- const cg = /* @__PURE__ */ ui(pEt, [["render", vEt]]), Ume = (t) => (JT("data-v-3945a2ab"), t = t(), e2(), t), gEt = { class: "chart-config" }, mEt = { class: "config-tab" }, yEt = /* @__PURE__ */ Ume(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), bEt = /* @__PURE__ */ Ume(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), _Et = /* @__PURE__ */ ae({
- __name: "Config",
- props: zB,
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = t, r = ee("1"), i = e, a = [
- {
- label: "样式",
- prop: "",
- type: "divider"
- },
- {
- label: "固定柱宽",
- prop: "seriesExtend.fixedBarWidth",
- type: "radioGroup",
- fieldProps: {
- options: [
- { label: "是", value: !0 },
- { label: "否", value: !1 }
- ]
- },
- defaultValue: !1,
- format: (u, c) => {
- var f, d;
- u.value["seriesExtend.barWidth"] = c && ((f = u.value) == null ? void 0 : f["seriesExtend.barWidth"]) !== "auto" ? ((d = u.value) == null ? void 0 : d["seriesExtend.barWidth"]) || 20 : "auto";
- }
- },
- {
- label: "",
- prop: "",
- type: "dependency",
- name: ["seriesExtend.fixedBarWidth"],
- children: (u) => u["seriesExtend.fixedBarWidth"] ? [
- {
- label: "柱宽",
- prop: "seriesExtend.barWidth",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 20
- }
- ] : []
- },
- {
- label: "系列间隔",
- prop: "seriesExtend.barGap",
- type: "slider",
- defaultValue: 30,
- format: (u, c) => {
- u.value["seriesExtend.barGap"] = c + "%";
- },
- valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
- },
- {
- label: "分类间隔",
- prop: "seriesExtend.barCategoryGap",
- type: "slider",
- defaultValue: 20,
- format: (u, c) => {
- u.value["seriesExtend.barCategoryGap"] = c + "%";
- },
- valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
- },
- {
- label: "边框",
- prop: "",
- type: "divider"
- },
- {
- label: "线宽",
- prop: "seriesExtend.itemStyle.borderWidth",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- },
- {
- label: "颜色",
- prop: "seriesExtend.itemStyle.borderColor",
- type: "colorSelect",
- defaultValue: "#ccc"
- },
- {
- label: "圆角",
- prop: "seriesExtend.itemStyle.borderRadius",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- },
- defaultValue: 0
- }
- ], o = [
- Ar.title,
- Ar.legend,
- Ar.label,
- {
- ...Ar.series,
- children: Ar.series.children.concat(
- a
- )
- },
- Ar.xAxis,
- Ar.yAxis,
- Ar.tooltip
- ], s = (u) => {
- i("change", {
- ...n,
- dataSource: u
- });
- }, l = (u) => {
- const c = ph(n);
- Object.keys(u).forEach((f) => {
- vN(c, f, u[f]);
- }), i("change", c);
- };
- return (u, c) => (be(), Ue("div", gEt, [
- tt("div", mEt, [
- D(z(_h), {
- activeKey: r.value,
- "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
- size: "small",
- centered: ""
- }, {
- default: ke(() => [
- D(z(zu), { key: "1" }, {
- tab: ke(() => [
- D(z(K_)),
- yEt
- ]),
- _: 1
- }),
- D(z(zu), { key: "2" }, {
- tab: ke(() => [
- D(z(J_)),
- bEt
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["activeKey"])
- ]),
- r.value === "1" ? (be(), Je(BB, {
- key: 0,
- dataSource: u.dataSource,
- onChange: s
- }, null, 8, ["dataSource"])) : Ot("", !0),
- r.value === "2" ? (be(), Je(z(Sh), {
- key: 1,
- columns: o,
- formModel: n,
- onChange: l
- }, null, 8, ["formModel"])) : Ot("", !0)
- ]));
- }
- }), Xme = /* @__PURE__ */ ui(_Et, [["__scopeId", "data-v-3945a2ab"]]);
- cg.Config = Xme;
- cg.install = (t) => (t.component(cg.name, cg), t);
- const OEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Config: Xme,
- basicBarProps: zB,
- default: cg,
- defaultPropsValue: hEt
- }, Symbol.toStringTag, { value: "Module" })), VB = {
- width: {
- type: Number,
- default: 400
- },
- height: {
- type: Number,
- default: 260
- },
- dataSource: k6,
- // 标题
- title: {
- type: Object
- },
- // 图例
- legend: {
- type: Object
- },
- // 背景
- backgroundColor: {
- type: String
- },
- // 边框
- grid: {
- type: Object
- },
- // 提示框
- tooltip: {
- type: Object
- },
- // 饼图数据
- series: {
- type: Array
- },
- // color
- color: {
- type: Object
- },
- // 系列设置
- seriesExtend: {
- type: Object,
- default: () => Yme
- }
- }, SEt = [], Yme = {
- top: 70,
- left: 20,
- right: 20,
- bottom: 20,
- startAngle: 0,
- endAngle: 360,
- radius: ["0%", "75%"]
- }, xEt = R6({
- title: {
- text: "饼图标题"
- },
- grid: {
- show: !1
- },
- xAxis: {
- show: !1
- },
- yAxis: {
- show: !1
- },
- series: SEt,
- seriesExtend: Yme
- }), wEt = {
- // 组件容器默认属性
- container: {
- props: {
- width: 400,
- height: 260
- }
- },
- // 图表默认属性
- props: {
- // 数据源
- dataSource: {
- sourceType: kr.STATIC,
- data: {
- series: [
- {
- type: "pie",
- name: "系列1",
- data: [
- { value: 335, name: "直接访问" },
- { value: 310, name: "邮件营销" },
- { value: 234, name: "联盟广告" },
- { value: 135, name: "视频广告" }
- ]
- }
- ]
- },
- url: location.origin + "/mock/api/get/example/pie",
- method: "POST",
- params: {},
- headers: {},
- refreshTime: 0,
- dataProcess: `
- (res) => {
- // 取出列表
- const data = res.data;
-
- // 系列数据
- const series = [
- { type: 'pie', name: '月份', data: data.map(item => ({value: item.apple, name: item.name})) }
- ];
- // 返回图表数据
- return { series };
- }
- `
- },
- ...xEt
- }
- }, CEt = ae({
- name: "DBasicPie",
- components: { Charts: D6 },
- props: VB,
- setup(t) {
- const { options: e, loading: n } = q6(t);
- return {
- options: e,
- loading: n
- };
- }
- });
- function TEt(t, e, n, r, i, a) {
- const o = br("Charts");
- return be(), Je(o, {
- width: t.width,
- height: t.height,
- "echarts-options": t.options,
- loading: t.loading
- }, null, 8, ["width", "height", "echarts-options", "loading"]);
- }
- const fg = /* @__PURE__ */ ui(CEt, [["render", TEt]]), qme = (t) => (JT("data-v-4184f99c"), t = t(), e2(), t), PEt = { class: "chart-config" }, $Et = { class: "config-tab" }, AEt = /* @__PURE__ */ qme(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), EEt = /* @__PURE__ */ qme(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), MEt = /* @__PURE__ */ ae({
- __name: "Config",
- props: VB,
- emits: ["change"],
- setup(t, { emit: e }) {
- const n = t, r = ee("1"), i = e, a = [
- {
- label: "样式",
- prop: "",
- type: "divider"
- },
- {
- label: "起始角度",
- prop: "series.pie.startAngle",
- type: "inputNumber",
- fieldProps: {
- min: 0,
- max: 360,
- addonAfter: "°"
- }
- },
- {
- label: "完结角度",
- prop: "series.pie.endAngle",
- type: "inputNumber",
- fieldProps: {
- min: 0,
- max: 360,
- addonAfter: "°"
- }
- },
- {
- label: "内径占比",
- prop: "series.pie.radius",
- type: "slider",
- format: (u, c) => {
- const f = c * 0.75;
- return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
- },
- valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
- },
- {
- label: "容器距离",
- prop: "",
- type: "divider"
- },
- {
- label: "距离左侧",
- prop: "series.pie.left",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- }
- },
- {
- label: "距离右侧",
- prop: "series.pie.right",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- }
- },
- {
- label: "距离顶部",
- prop: "series.pie.top",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- }
- },
- {
- label: "距离底部",
- prop: "series.pie.bottom",
- type: "inputNumber",
- fieldProps: {
- addonAfter: "px"
- }
- }
- ], o = [
- Ar.title,
- Ar.legend,
- Ar.label,
- {
- ...Ar.series,
- children: Ar.series.children.concat(
- a
- )
- },
- Ar.tooltip
- ], s = (u) => {
- i("change", {
- ...n,
- dataSource: u
- });
- }, l = (u) => {
- const c = ph(n);
- Object.keys(u).forEach((f) => {
- vN(c, f, u[f]);
- }), i("change", c);
- };
- return (u, c) => (be(), Ue("div", PEt, [
- tt("div", $Et, [
- D(z(_h), {
- activeKey: r.value,
- "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
- size: "small",
- centered: ""
- }, {
- default: ke(() => [
- D(z(zu), { key: "1" }, {
- tab: ke(() => [
- D(z(K_)),
- AEt
- ]),
- _: 1
- }),
- D(z(zu), { key: "2" }, {
- tab: ke(() => [
- D(z(J_)),
- EEt
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["activeKey"])
- ]),
- r.value === "1" ? (be(), Je(BB, {
- key: 0,
- dataSource: u.dataSource,
- onChange: s
- }, null, 8, ["dataSource"])) : Ot("", !0),
- r.value === "2" ? (be(), Je(z(Sh), {
- key: 1,
- columns: o,
- formModel: n,
- onChange: l
- }, null, 8, ["formModel"])) : Ot("", !0)
- ]));
- }
- }), Kme = /* @__PURE__ */ ui(MEt, [["__scopeId", "data-v-4184f99c"]]);
- fg.Config = Kme;
- fg.install = (t) => (t.component(fg.name, fg), t);
- const IEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- Config: Kme,
- basicPieProps: VB,
- default: fg,
- defaultPropsValue: wEt
- }, Symbol.toStringTag, { value: "Module" })), NEt = {
- Title: () => Promise.resolve().then(() => rHe),
- BasicLine: () => Promise.resolve().then(() => cEt),
- BasicBar: () => Promise.resolve().then(() => OEt),
- BasicPie: () => Promise.resolve().then(() => IEt),
- Container: () => Promise.resolve().then(() => x9e)
- }, Cee = {
- BasicLine: ng,
- BasicBar: cg,
- Title: Zv,
- BasicPie: fg,
- Container: jv
- }, DEt = function(t) {
- return Object.keys(Cee).forEach((e) => {
- const n = Cee[e];
- n != null && n.install && (console.log("注册组件:", e), t.use(n));
- }), t;
- }, BEt = {
- version: "1.0.0",
- install: DEt
- };
- export {
- cg as BasicBar,
- Xme as BasicBarConfig,
- hEt as BasicBarDefaultProps,
- zB as BasicBarProps,
- ng as BasicLine,
- jme as BasicLineConfig,
- Xdt as BasicLineDefaultProps,
- L6 as BasicLineProps,
- fg as BasicPie,
- Kme as BasicPieConfig,
- wEt as BasicPieDefaultProps,
- VB as BasicPieProps,
- jv as Container,
- Sh as CusForm,
- kr as DataSourceType,
- Zv as Title,
- NEt as asyncComponentAll,
- Cee as components,
- BEt as default,
- DEt as install
- };
- //# sourceMappingURL=shalu-dashboard-ui.js.map
|